1dnl aclocal.m4 generated automatically by aclocal 1.4-p4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13# Like AC_CONFIG_HEADER, but automatically create stamp file.
14
15AC_DEFUN(AM_CONFIG_HEADER,
16[AC_PREREQ([2.12])
17AC_CONFIG_HEADER([$1])
18dnl When config.status generates a header, we must update the stamp-h file.
19dnl This file resides in the same directory as the config header
20dnl that is generated.  We must strip everything past the first ":",
21dnl and everything past the last "/".
22AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
25<<am_indx=1
26for am_file in <<$1>>; do
27  case " <<$>>CONFIG_HEADERS " in
28  *" <<$>>am_file "*<<)>>
29    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
30    ;;
31  esac
32  am_indx=`expr "<<$>>am_indx" + 1`
33done<<>>dnl>>)
34changequote([,]))])
35
36# Do all the work for Automake.  This macro actually does too much --
37# some checks are only needed if your package does certain things.
38# But this isn't really a big deal.
39
40# serial 1
41
42dnl Usage:
43dnl AM_INIT_AUTOMAKE(package,version, [no-define])
44
45AC_DEFUN(AM_INIT_AUTOMAKE,
46[AC_REQUIRE([AC_PROG_INSTALL])
47PACKAGE=[$1]
48AC_SUBST(PACKAGE)
49VERSION=[$2]
50AC_SUBST(VERSION)
51dnl test to see if srcdir already configured
52if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
53  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
54fi
55ifelse([$3],,
56AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
57AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
58AC_REQUIRE([AM_SANITY_CHECK])
59AC_REQUIRE([AC_ARG_PROGRAM])
60dnl FIXME This is truly gross.
61missing_dir=`cd $ac_aux_dir && pwd`
62AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
63AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
64AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
65AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
66AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
67AC_REQUIRE([AC_PROG_MAKE_SET])])
68
69#
70# Check to make sure that the build environment is sane.
71#
72
73AC_DEFUN(AM_SANITY_CHECK,
74[AC_MSG_CHECKING([whether build environment is sane])
75# Just in case
76sleep 1
77echo timestamp > conftestfile
78# Do `set' in a subshell so we don't clobber the current shell's
79# arguments.  Must try -L first in case configure is actually a
80# symlink; some systems play weird games with the mod time of symlinks
81# (eg FreeBSD returns the mod time of the symlink's containing
82# directory).
83if (
84   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
85   if test "[$]*" = "X"; then
86      # -L didn't work.
87      set X `ls -t $srcdir/configure conftestfile`
88   fi
89   if test "[$]*" != "X $srcdir/configure conftestfile" \
90      && test "[$]*" != "X conftestfile $srcdir/configure"; then
91
92      # If neither matched, then we have a broken ls.  This can happen
93      # if, for instance, CONFIG_SHELL is bash and it inherits a
94      # broken ls alias from the environment.  This has actually
95      # happened.  Such a system could not be considered "sane".
96      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
97alias in your environment])
98   fi
99
100   test "[$]2" = conftestfile
101   )
102then
103   # Ok.
104   :
105else
106   AC_MSG_ERROR([newly created file is older than distributed files!
107Check your system clock])
108fi
109rm -f conftest*
110AC_MSG_RESULT(yes)])
111
112dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
113dnl The program must properly implement --version.
114AC_DEFUN(AM_MISSING_PROG,
115[AC_MSG_CHECKING(for working $2)
116# Run test in a subshell; some versions of sh will print an error if
117# an executable is not found, even if stderr is redirected.
118# Redirect stdin to placate older versions of autoconf.  Sigh.
119if ($2 --version) < /dev/null > /dev/null 2>&1; then
120   $1=$2
121   AC_MSG_RESULT(found)
122else
123   $1="$3/missing $2"
124   AC_MSG_RESULT(missing)
125fi
126AC_SUBST($1)])
127
128# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
129
130# serial 47 AC_PROG_LIBTOOL
131
132builtin([undefine],[symbols])
133
134# AC_PROG_LIBTOOL
135# ---------------
136AC_DEFUN([AC_PROG_LIBTOOL],
137[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
138dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
139dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
140  AC_PROVIDE_IFELSE([AC_PROG_CXX],
141    [AC_LIBTOOL_CXX],
142    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
143  ])])
144
145dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
146dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
147dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
148  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
149    [AC_LIBTOOL_GCJ],
150    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
151      [AC_LIBTOOL_GCJ],
152      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
153	[AC_LIBTOOL_GCJ],
154      [ifdef([AC_PROG_GCJ],
155	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
156       ifdef([A][M_PROG_GCJ],
157	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
158       ifdef([LT_AC_PROG_GCJ],
159	     [define([LT_AC_PROG_GCJ],
160                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
161])])# AC_PROG_LIBTOOL
162
163
164# _AC_PROG_LIBTOOL
165# ----------------
166AC_DEFUN([_AC_PROG_LIBTOOL],
167[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
168AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
169AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
170
171# This can be used to rebuild libtool when needed
172LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
173
174# Always use our own libtool.
175LIBTOOL='$(SHELL) $(top_builddir)/libtool'
176AC_SUBST(LIBTOOL)dnl
177
178# Prevent multiple expansion
179define([AC_PROG_LIBTOOL], [])
180])# _AC_PROG_LIBTOOL
181
182
183# AC_LIBTOOL_SETUP
184# ----------------
185AC_DEFUN([AC_LIBTOOL_SETUP],
186[AC_PREREQ(2.50)dnl
187AC_REQUIRE([AC_ENABLE_SHARED])dnl
188AC_REQUIRE([AC_ENABLE_STATIC])dnl
189AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
190AC_REQUIRE([AC_CANONICAL_HOST])dnl
191AC_REQUIRE([AC_CANONICAL_BUILD])dnl
192AC_REQUIRE([AC_PROG_CC])dnl
193AC_REQUIRE([AC_PROG_LD])dnl
194AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
195AC_REQUIRE([AC_PROG_NM])dnl
196AC_REQUIRE([AC_PROG_LN_S])dnl
197AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
198# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
199AC_REQUIRE([AC_OBJEXT])dnl
200AC_REQUIRE([AC_EXEEXT])dnl
201dnl
202
203AC_LIBTOOL_SYS_MAX_CMD_LEN
204AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
205AC_LIBTOOL_OBJDIR
206
207AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
208_LT_AC_PROG_ECHO_BACKSLASH
209
210case $host_os in
211aix3*)
212  # AIX sometimes has problems with the GCC collect2 program.  For some
213  # reason, if we set the COLLECT_NAMES environment variable, the problems
214  # vanish in a puff of smoke.
215  if test "X${COLLECT_NAMES+set}" != Xset; then
216    COLLECT_NAMES=
217    export COLLECT_NAMES
218  fi
219  ;;
220esac
221
222# Sed substitution that helps us do robust quoting.  It backslashifies
223# metacharacters that are still active within double-quoted strings.
224Xsed='sed -e s/^X//'
225[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
226
227# Same as above, but do not quote variable references.
228[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
229
230# Sed substitution to delay expansion of an escaped shell variable in a
231# double_quote_subst'ed string.
232delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
233
234# Sed substitution to avoid accidental globbing in evaled expressions
235no_glob_subst='s/\*/\\\*/g'
236
237# Constants:
238rm="rm -f"
239
240# Global variables:
241default_ofile=libtool
242can_build_shared=yes
243
244# All known linkers require a `.a' archive for static linking (except M$VC,
245# which needs '.lib').
246libext=a
247ltmain="$ac_aux_dir/ltmain.sh"
248ofile="$default_ofile"
249with_gnu_ld="$lt_cv_prog_gnu_ld"
250
251AC_CHECK_TOOL(RANLIB, ranlib, :)
252AC_CHECK_TOOL(STRIP, strip, :)
253
254old_CC="$CC"
255old_CFLAGS="$CFLAGS"
256
257# Set sane defaults for various variables
258test -z "$AR" && AR=ar
259test -z "$AR_FLAGS" && AR_FLAGS=cru
260test -z "$AS" && AS=as
261test -z "$CC" && CC=cc
262test -z "$LTCC" && LTCC=$CC
263test -z "$DLLTOOL" && DLLTOOL=dlltool
264test -z "$LD" && LD=ld
265test -z "$LN_S" && LN_S="ln -s"
266test -z "$MAGIC_CMD" && MAGIC_CMD=file
267test -z "$NM" && NM=nm
268test -z "$OBJDUMP" && OBJDUMP=objdump
269test -z "$RANLIB" && RANLIB=:
270test -z "$STRIP" && STRIP=:
271test -z "$ac_objext" && ac_objext=o
272
273# Determine commands to create old-style static archives.
274old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
275old_postinstall_cmds='chmod 644 $oldlib'
276old_postuninstall_cmds=
277
278if test -n "$RANLIB"; then
279  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
280  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
281fi
282
283# Only perform the check for file, if the check method requires it
284case $deplibs_check_method in
285file_magic*)
286  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
287    AC_PATH_MAGIC
288  fi
289  ;;
290esac
291
292ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
293ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
294enable_win32_dll=yes, enable_win32_dll=no)
295
296AC_ARG_ENABLE([libtool-lock],
297    [AC_HELP_STRING([--disable-libtool-lock],
298        [avoid locking (might break parallel builds)])])
299test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
300
301AC_ARG_WITH([pic],
302    [AC_HELP_STRING([--with-pic],
303        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
304    [pic_mode="$withval"],
305    [pic_mode=default])
306test -z "$pic_mode" && pic_mode=default
307
308# Use C for the default configuration in the libtool script
309tagname=
310AC_LIBTOOL_LANG_C_CONFIG
311_LT_AC_TAGCONFIG
312])# AC_LIBTOOL_SETUP
313
314
315# _LT_AC_SYS_COMPILER
316# -------------------
317AC_DEFUN([_LT_AC_SYS_COMPILER],
318[AC_REQUIRE([AC_PROG_CC])dnl
319
320# If no C compiler was specified, use CC.
321LTCC=${LTCC-"$CC"}
322
323# Allow CC to be a program name with arguments.
324set dummy $CC
325compiler="[$]2"
326])# _LT_AC_SYS_COMPILER
327
328
329# _LT_AC_SYS_LIBPATH_AIX
330# ----------------------
331# Links a minimal program and checks the executable
332# for the system default hardcoded library path. In most cases,
333# this is /usr/lib:/lib, but when the MPI compilers are used
334# the location of the communication and MPI libs are included too.
335# If we don't find anything, use the default library path according
336# to the aix ld manual.
337AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
338[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
339aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`
340# Check for a 64-bit object if we didn't find anything.
341if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | ${AWK-awk} '/Import File Strings/ { getline; getline; if ($[2] ~ /^\//) print $[2] }'`; fi],[])
342if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
343])# _LT_AC_SYS_LIBPATH_AIX
344
345
346# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
347# ---------------------------------
348AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
349[# Find the correct PATH separator.  Usually this is `:', but
350# DJGPP uses `;' like DOS.
351if test "X${PATH_SEPARATOR+set}" != Xset; then
352  UNAME=${UNAME-`uname 2>/dev/null`}
353  case X$UNAME in
354    *-DOS) PATH_SEPARATOR=';' ;;
355    *)     PATH_SEPARATOR=':' ;;
356  esac
357fi
358])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
359
360
361# _LT_AC_PROG_ECHO_BACKSLASH
362# --------------------------
363# Add some code to the start of the generated configure script which
364# will find an echo command which doesn't interpret backslashes.
365AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
366[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
367                              [AC_DIVERT_PUSH(NOTICE)])
368_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
369
370# Check that we are running under the correct shell.
371SHELL=${CONFIG_SHELL-/bin/sh}
372
373case X$ECHO in
374X*--fallback-echo)
375  # Remove one level of quotation (which was required for Make).
376  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
377  ;;
378esac
379
380echo=${ECHO-echo}
381if test "X[$]1" = X--no-reexec; then
382  # Discard the --no-reexec flag, and continue.
383  shift
384elif test "X[$]1" = X--fallback-echo; then
385  # Avoid inline document here, it may be left over
386  :
387elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
388  # Yippee, $echo works!
389  :
390else
391  # Restart under the correct shell.
392  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
393fi
394
395if test "X[$]1" = X--fallback-echo; then
396  # used as fallback echo
397  shift
398  cat <<EOF
399[$]*
400EOF
401  exit 0
402fi
403
404# The HP-UX ksh and POSIX shell print the target directory to stdout
405# if CDPATH is set.
406if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
407
408if test -z "$ECHO"; then
409if test "X${echo_test_string+set}" != Xset; then
410# find a string as large as possible, as long as the shell can cope with it
411  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
412    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
413    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
414       echo_test_string="`eval $cmd`" &&
415       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
416    then
417      break
418    fi
419  done
420fi
421
422if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
423   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
424   test "X$echo_testing_string" = "X$echo_test_string"; then
425  :
426else
427  # The Solaris, AIX, and Digital Unix default echo programs unquote
428  # backslashes.  This makes it impossible to quote backslashes using
429  #   echo "$something" | sed 's/\\/\\\\/g'
430  #
431  # So, first we look for a working echo in the user's PATH.
432
433  IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
434  for dir in $PATH /usr/ucb; do
435    IFS="$lt_save_ifs"
436    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
437       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
438       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
439       test "X$echo_testing_string" = "X$echo_test_string"; then
440      echo="$dir/echo"
441      break
442    fi
443  done
444  IFS="$lt_save_ifs"
445
446  if test "X$echo" = Xecho; then
447    # We didn't find a better echo, so look for alternatives.
448    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
449       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
450       test "X$echo_testing_string" = "X$echo_test_string"; then
451      # This shell has a builtin print -r that does the trick.
452      echo='print -r'
453    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
454	 test "X$CONFIG_SHELL" != X/bin/ksh; then
455      # If we have ksh, try running configure again with it.
456      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
457      export ORIGINAL_CONFIG_SHELL
458      CONFIG_SHELL=/bin/ksh
459      export CONFIG_SHELL
460      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
461    else
462      # Try using printf.
463      echo='printf %s\n'
464      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
465	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
466	 test "X$echo_testing_string" = "X$echo_test_string"; then
467	# Cool, printf works
468	:
469      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
470	   test "X$echo_testing_string" = 'X\t' &&
471	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
472	   test "X$echo_testing_string" = "X$echo_test_string"; then
473	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
474	export CONFIG_SHELL
475	SHELL="$CONFIG_SHELL"
476	export SHELL
477	echo="$CONFIG_SHELL [$]0 --fallback-echo"
478      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
479	   test "X$echo_testing_string" = 'X\t' &&
480	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
481	   test "X$echo_testing_string" = "X$echo_test_string"; then
482	echo="$CONFIG_SHELL [$]0 --fallback-echo"
483      else
484	# maybe with a smaller string...
485	prev=:
486
487	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
488	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
489	  then
490	    break
491	  fi
492	  prev="$cmd"
493	done
494
495	if test "$prev" != 'sed 50q "[$]0"'; then
496	  echo_test_string=`eval $prev`
497	  export echo_test_string
498	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
499	else
500	  # Oops.  We lost completely, so just stick with echo.
501	  echo=echo
502	fi
503      fi
504    fi
505  fi
506fi
507fi
508
509# Copy echo and quote the copy suitably for passing to libtool from
510# the Makefile, instead of quoting the original, which is used later.
511ECHO=$echo
512if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
513   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
514fi
515
516AC_SUBST(ECHO)
517AC_DIVERT_POP
518])# _LT_AC_PROG_ECHO_BACKSLASH
519
520
521# _LT_AC_LOCK
522# -----------
523AC_DEFUN([_LT_AC_LOCK],
524[AC_ARG_ENABLE([libtool-lock],
525    [AC_HELP_STRING([--disable-libtool-lock],
526        [avoid locking (might break parallel builds)])])
527test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
528
529# Some flags need to be propagated to the compiler or linker for good
530# libtool support.
531case $host in
532ia64-*-hpux*)
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.$ac_objext` in
537    *ELF-32*)
538      HPUX_IA64_MODE="32"
539      ;;
540    *ELF-64*)
541      HPUX_IA64_MODE="64"
542      ;;
543    esac
544  fi
545  rm -rf conftest*
546  ;;
547*-*-irix6*)
548  # Find out which ABI we are using.
549  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
550  if AC_TRY_EVAL(ac_compile); then
551    case `/usr/bin/file conftest.$ac_objext` in
552    *32-bit*)
553      LD="${LD-ld} -32"
554      ;;
555    *N32*)
556      LD="${LD-ld} -n32"
557      ;;
558    *64-bit*)
559      LD="${LD-ld} -64"
560      ;;
561    esac
562  fi
563  rm -rf conftest*
564  ;;
565
566*-*-sco3.2v5*)
567  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
568  SAVE_CFLAGS="$CFLAGS"
569  CFLAGS="$CFLAGS -belf"
570  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
571    [AC_LANG_PUSH(C)
572     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
573     AC_LANG_POP])
574  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
575    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
576    CFLAGS="$SAVE_CFLAGS"
577  fi
578  ;;
579ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
580[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
581  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
582  AC_CHECK_TOOL(AS, as, false)
583  AC_CHECK_TOOL(OBJDUMP, objdump, false)
584
585  # recent cygwin and mingw systems supply a stub DllMain which the user
586  # can override, but on older systems we have to supply one
587  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
588    [AC_TRY_LINK([],
589      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
590      DllMain (0, 0, 0);],
591      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
592
593  case $host/$CC in
594  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
595    # old mingw systems require "-dll" to link a DLL, while more recent ones
596    # require "-mdll"
597    SAVE_CFLAGS="$CFLAGS"
598    CFLAGS="$CFLAGS -mdll"
599    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
600      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
601    CFLAGS="$SAVE_CFLAGS" ;;
602  *-*-cygwin* | *-*-pw32*)
603    # cygwin systems need to pass --dll to the linker, and not link
604    # crt.o which will require a WinMain@16 definition.
605    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
606  esac
607  ;;
608  ])
609esac
610
611need_locks="$enable_libtool_lock"
612
613])# _LT_AC_LOCK
614
615
616# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
617#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
618# ----------------------------------------------------------------
619# Check whether the given compiler option works
620AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
621[AC_CACHE_CHECK([$1], [$2],
622  [$2=no
623  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
624   save_CFLAGS="$CFLAGS"
625   CFLAGS="$CFLAGS $3"
626   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
627   if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
628     # The compiler can only warn and ignore the option if not recognized
629     # So say no if there are warnings
630     if test -s conftest.err; then
631       # Append any errors to the config.log.
632       cat conftest.err 1>&AS_MESSAGE_LOG_FD
633     else
634       $2=yes
635     fi
636   fi
637   $rm conftest*
638   CFLAGS="$save_CFLAGS"
639])
640
641if test x"[$]$2" = xyes; then
642    ifelse([$5], , :, [$5])
643else
644    ifelse([$6], , :, [$6])
645fi
646])# AC_LIBTOOL_COMPILER_OPTION
647
648
649# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
650#                          [ACTION-SUCCESS], [ACTION-FAILURE])
651# ------------------------------------------------------------
652# Check whether the given compiler option works
653AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
654[AC_CACHE_CHECK([$1], [$2],
655  [$2=no
656   save_LDFLAGS="$LDFLAGS"
657   LDFLAGS="$LDFLAGS $3"
658   echo "$lt_simple_link_test_code" > conftest.$ac_ext
659   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
660     # The compiler can only warn and ignore the option if not recognized
661     # So say no if there are warnings
662     if test -s conftest.err; then
663       # Append any errors to the config.log.
664       cat conftest.err 1>&AS_MESSAGE_LOG_FD
665     else
666       $2=yes
667     fi
668   fi
669   $rm conftest*
670   LDFLAGS="$save_LDFLAGS"
671])
672
673if test x"[$]$2" = xyes; then
674    ifelse([$4], , :, [$4])
675else
676    ifelse([$5], , :, [$5])
677fi
678])# AC_LIBTOOL_LINKER_OPTION
679
680
681# AC_LIBTOOL_SYS_MAX_CMD_LEN
682# --------------------------
683AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
684[# find the maximum length of command line arguments
685AC_MSG_CHECKING([the maximum length of command line arguments])
686AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
687  i=0
688  testring="ABCD"
689
690  case $host_os in
691  msdosdjgpp*)
692    # On DJGPP, this test can blow up pretty badly due to problems in libc
693    # (any single argument exceeding 2000 bytes causes a buffer overrun
694    # during glob expansion).  Even if it were fixed, the result of this
695    # check would be larger than it should be.
696    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
697    ;;
698
699  gnu*)
700    # Under GNU Hurd, this test is not required because there is
701    # no limit to the length of command line arguments.
702    # Libtool will interpret -1 as no limit whatsoever
703    lt_cv_sys_max_cmd_len=-1;
704    ;;
705
706  *)
707    # If test is not a shell built-in, we'll probably end up computing a
708    # maximum length that is only half of the actual maximum length, but
709    # we can't tell.
710    while test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
711               = "XX$testring" &&
712            new_result=`expr "X$testring" : ".*" 2>&1` &&
713            lt_cv_sys_max_cmd_len=$new_result &&
714            test $i != 17 # 1/2 MB should be enough
715    do
716      i=`expr $i + 1`
717      testring=$testring$testring
718    done
719    testring=
720    # add a significant safety factor because C++ compilers can tack on massive
721    # amounts of additional arguments before passing them to the linker.  1/4
722    # should be good.
723    len=`expr $lt_cv_sys_max_cmd_len \/ 4`
724    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
725    ;;
726  esac
727])
728if test -n $lt_cv_sys_max_cmd_len ; then
729  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
730else
731  AC_MSG_RESULT(none)
732fi
733])# AC_LIBTOOL_SYS_MAX_CMD_LEN
734
735
736# _LT_AC_CHECK_DLFCN
737# --------------------
738AC_DEFUN([_LT_AC_CHECK_DLFCN],
739[AC_CHECK_HEADERS(dlfcn.h)dnl
740])# _LT_AC_CHECK_DLFCN
741
742
743# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
744#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
745# ------------------------------------------------------------------
746AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
747[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
748if test "$cross_compiling" = yes; then :
749  [$4]
750else
751  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
752  lt_status=$lt_dlunknown
753  cat > conftest.$ac_ext <<EOF
754[#line __oline__ "configure"
755#include "confdefs.h"
756
757#if HAVE_DLFCN_H
758#include <dlfcn.h>
759#endif
760
761#include <stdio.h>
762
763#ifdef RTLD_GLOBAL
764#  define LT_DLGLOBAL		RTLD_GLOBAL
765#else
766#  ifdef DL_GLOBAL
767#    define LT_DLGLOBAL		DL_GLOBAL
768#  else
769#    define LT_DLGLOBAL		0
770#  endif
771#endif
772
773/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
774   find out it does not work in some platform. */
775#ifndef LT_DLLAZY_OR_NOW
776#  ifdef RTLD_LAZY
777#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
778#  else
779#    ifdef DL_LAZY
780#      define LT_DLLAZY_OR_NOW		DL_LAZY
781#    else
782#      ifdef RTLD_NOW
783#        define LT_DLLAZY_OR_NOW	RTLD_NOW
784#      else
785#        ifdef DL_NOW
786#          define LT_DLLAZY_OR_NOW	DL_NOW
787#        else
788#          define LT_DLLAZY_OR_NOW	0
789#        endif
790#      endif
791#    endif
792#  endif
793#endif
794
795#ifdef __cplusplus
796extern "C" void exit (int);
797#endif
798
799void fnord() { int i=42;}
800int main ()
801{
802  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
803  int status = $lt_dlunknown;
804
805  if (self)
806    {
807      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
808      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
809      /* dlclose (self); */
810    }
811
812    exit (status);
813}]
814EOF
815  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
816    (./conftest; exit; ) 2>/dev/null
817    lt_status=$?
818    case x$lt_status in
819      x$lt_dlno_uscore) $1 ;;
820      x$lt_dlneed_uscore) $2 ;;
821      x$lt_unknown|x*) $3 ;;
822    esac
823  else :
824    # compilation failed
825    $3
826  fi
827fi
828rm -fr conftest*
829])# _LT_AC_TRY_DLOPEN_SELF
830
831
832# AC_LIBTOOL_DLOPEN_SELF
833# -------------------
834AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
835[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
836if test "x$enable_dlopen" != xyes; then
837  enable_dlopen=unknown
838  enable_dlopen_self=unknown
839  enable_dlopen_self_static=unknown
840else
841  lt_cv_dlopen=no
842  lt_cv_dlopen_libs=
843
844  case $host_os in
845  beos*)
846    lt_cv_dlopen="load_add_on"
847    lt_cv_dlopen_libs=
848    lt_cv_dlopen_self=yes
849    ;;
850
851  cygwin* | mingw* | pw32*)
852    lt_cv_dlopen="LoadLibrary"
853    lt_cv_dlopen_libs=
854   ;;
855
856  *)
857    AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
858      [AC_CHECK_LIB(dld, shl_load,
859        [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
860        [AC_CHECK_LIB(dl, dlopen,
861          [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
862          [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
863            [AC_CHECK_LIB(svld, dlopen,
864             [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"])
865	    ])
866          ])
867        ])
868      ])
869    ;;
870  esac
871
872  if test "x$lt_cv_dlopen" != xno; then
873    enable_dlopen=yes
874  else
875    enable_dlopen=no
876  fi
877
878  case $lt_cv_dlopen in
879  dlopen)
880    save_CPPFLAGS="$CPPFLAGS"
881    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
882
883    save_LDFLAGS="$LDFLAGS"
884    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
885
886    save_LIBS="$LIBS"
887    LIBS="$lt_cv_dlopen_libs $LIBS"
888
889    AC_CACHE_CHECK([whether a program can dlopen itself],
890	  lt_cv_dlopen_self, [dnl
891	  _LT_AC_TRY_DLOPEN_SELF(
892	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
893	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
894    ])
895
896    if test "x$lt_cv_dlopen_self" = xyes; then
897      LDFLAGS="$LDFLAGS $link_static_flag"
898      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
899    	  lt_cv_dlopen_self_static, [dnl
900	  _LT_AC_TRY_DLOPEN_SELF(
901	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
902	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
903      ])
904    fi
905
906    CPPFLAGS="$save_CPPFLAGS"
907    LDFLAGS="$save_LDFLAGS"
908    LIBS="$save_LIBS"
909    ;;
910  esac
911
912  case $lt_cv_dlopen_self in
913  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
914  *) enable_dlopen_self=unknown ;;
915  esac
916
917  case $lt_cv_dlopen_self_static in
918  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
919  *) enable_dlopen_self_static=unknown ;;
920  esac
921fi
922])# AC_LIBTOOL_DLOPEN_SELF
923
924
925# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
926# ---------------------------------
927# Check to see if options -c and -o are simultaneously supported by compiler
928AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
929[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
930AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
931  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
932  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
933   $rm -r conftest 2>/dev/null
934   mkdir conftest
935   cd conftest
936   mkdir out
937   ifelse([$1],[],[save_CFLAGS="$CFLAGS"
938                   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
939          [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
940                   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
941          [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
942                   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
943   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
944
945   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
946   # that will create temporary files in the current directory regardless of
947   # the output directory.  Thus, making CWD read-only will cause this test
948   # to fail, enabling locking or at least warning the user not to do parallel
949   # builds.
950   chmod -w .
951
952   if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
953   then
954     # The compiler can only warn and ignore the option if not recognized
955     # So say no if there are warnings
956     if test -s out/conftest.err; then
957       # Append any errors to the config.log.
958       cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
959     else
960       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
961     fi
962   fi
963   ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
964          [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
965          [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
966   chmod u+w .
967   $rm conftest* out/*
968   rmdir out
969   cd ..
970   rmdir conftest
971   $rm conftest*
972])
973])# AC_LIBTOOL_PROG_CC_C_O
974
975
976# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
977# -----------------------------------------
978# Check to see if we can do hard links to lock some files if needed
979AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
980[AC_REQUIRE([_LT_AC_LOCK])dnl
981
982hard_links="nottested"
983if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
984  # do not overwrite the value of need_locks provided by the user
985  AC_MSG_CHECKING([if we can lock with hard links])
986  hard_links=yes
987  $rm conftest*
988  ln conftest.a conftest.b 2>/dev/null && hard_links=no
989  touch conftest.a
990  ln conftest.a conftest.b 2>&5 || hard_links=no
991  ln conftest.a conftest.b 2>/dev/null && hard_links=no
992  AC_MSG_RESULT([$hard_links])
993  if test "$hard_links" = no; then
994    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
995    need_locks=warn
996  fi
997else
998  need_locks=no
999fi
1000])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1001
1002
1003# AC_LIBTOOL_OBJDIR
1004# -----------------
1005AC_DEFUN([AC_LIBTOOL_OBJDIR],
1006[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1007[rm -f .libs 2>/dev/null
1008mkdir .libs 2>/dev/null
1009if test -d .libs; then
1010  lt_cv_objdir=.libs
1011else
1012  # MS-DOS does not allow filenames that begin with a dot.
1013  lt_cv_objdir=_libs
1014fi
1015rmdir .libs 2>/dev/null])
1016objdir=$lt_cv_objdir
1017])# AC_LIBTOOL_OBJDIR
1018
1019
1020# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1021# ----------------------------------------------
1022# Check hardcoding attributes.
1023AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1024[AC_MSG_CHECKING([how to hardcode library paths into programs])
1025_LT_AC_TAGVAR(hardcode_action, $1)=
1026if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1027   test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
1028
1029  # We can hardcode non-existant directories.
1030  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1031     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1032     # have to relink, otherwise we might link with an installed library
1033     # when we should be linking with a yet-to-be-installed one
1034     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1035     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1036    # Linking always hardcodes the temporary library directory.
1037    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1038  else
1039    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1040    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1041  fi
1042else
1043  # We cannot hardcode anything, or else we can only hardcode existing
1044  # directories.
1045  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1046fi
1047AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1048
1049if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1050  # Fast installation is not supported
1051  enable_fast_install=no
1052elif test "$shlibpath_overrides_runpath" = yes ||
1053     test "$enable_shared" = no; then
1054  # Fast installation is not necessary
1055  enable_fast_install=needless
1056fi
1057])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1058
1059
1060# AC_LIBTOOL_SYS_LIB_STRIP
1061# ------------------------
1062AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1063[striplib=
1064old_striplib=
1065AC_MSG_CHECKING([whether stripping libraries is possible])
1066if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1067  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1068  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1069  AC_MSG_RESULT([yes])
1070else
1071  AC_MSG_RESULT([no])
1072fi
1073])# AC_LIBTOOL_SYS_LIB_STRIP
1074
1075
1076# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1077# -----------------------------
1078# PORTME Fill in your ld.so characteristics
1079AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1080[AC_MSG_CHECKING([dynamic linker characteristics])
1081library_names_spec=
1082libname_spec='lib$name'
1083soname_spec=
1084postinstall_cmds=
1085postuninstall_cmds=
1086finish_cmds=
1087finish_eval=
1088shlibpath_var=
1089shlibpath_overrides_runpath=unknown
1090version_type=none
1091dynamic_linker="$host_os ld.so"
1092sys_lib_dlsearch_path_spec="/lib /usr/lib"
1093sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1094need_lib_prefix=unknown
1095hardcode_into_libs=no
1096
1097# when you set need_version to no, make sure it does not cause -set_version
1098# flags to be left without arguments
1099need_version=unknown
1100
1101case $host_os in
1102aix3*)
1103  version_type=linux
1104  library_names_spec='${libname}${release}.so$versuffix $libname.a'
1105  shlibpath_var=LIBPATH
1106
1107  # AIX 3 has no versioning support, so we append a major version to the name.
1108  soname_spec='${libname}${release}.so$major'
1109  ;;
1110
1111aix4* | aix5*)
1112  version_type=linux
1113  if test "$host_cpu" = ia64; then
1114    # AIX 5 supports IA64
1115    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1116    shlibpath_var=LD_LIBRARY_PATH
1117  else
1118    # With GCC up to 2.95.x, collect2 would create an import file
1119    # for dependence libraries.  The import file would start with
1120    # the line `#! .'.  This would cause the generated library to
1121    # depend on `.', always an invalid library.  This was fixed in
1122    # development snapshots of GCC prior to 3.0.
1123    case $host_os in
1124      [ aix4 | aix4.[01] | aix4.[01].*)]
1125      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1126           echo ' yes '
1127           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1128        :
1129      else
1130        can_build_shared=no
1131      fi
1132      ;;
1133    esac
1134    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1135    # soname into executable. Probably we can add versioning support to
1136    # collect2, so additional links can be useful in future.
1137    if test "$aix_use_runtimelinking" = yes; then
1138      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1139      # instead of lib<name>.a to let people know that these are not
1140      # typical AIX shared libraries.
1141      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1142    else
1143      # We preserve .a as extension for shared libraries through AIX4.2
1144      # and later when we are not doing run time linking.
1145      library_names_spec='${libname}${release}.a $libname.a'
1146      soname_spec='${libname}${release}.so$major'
1147    fi
1148    shlibpath_var=LIBPATH
1149    deplibs_check_method=pass_all
1150  fi
1151  ;;
1152
1153amigaos*)
1154  library_names_spec='$libname.ixlibrary $libname.a'
1155  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1156  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'
1157  ;;
1158
1159beos*)
1160  library_names_spec='${libname}.so'
1161  dynamic_linker="$host_os ld.so"
1162  shlibpath_var=LIBRARY_PATH
1163  ;;
1164
1165bsdi4*)
1166  version_type=linux
1167  need_version=no
1168  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1169  soname_spec='${libname}${release}.so$major'
1170  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1171  shlibpath_var=LD_LIBRARY_PATH
1172  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1173  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1174  # the default ld.so.conf also contains /usr/contrib/lib and
1175  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1176  # libtool to hard-code these into programs
1177  ;;
1178
1179cygwin* | mingw* | pw32*)
1180  version_type=windows
1181  need_version=no
1182  need_lib_prefix=no
1183  case $GCC,$host_os in
1184  yes,cygwin*)
1185    library_names_spec='$libname.dll.a'
1186    sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1187    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1188    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1189      dldir=$destdir/`dirname \$dlpath`~
1190      test -d \$dldir || mkdir -p \$dldir~
1191      $install_prog .libs/$dlname \$dldir/$dlname'
1192    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1193      dlpath=$dir/\$dldll~
1194       $rm \$dlpath'
1195    ;;
1196  yes,mingw*)
1197    library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1198    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/$PATH_SEPARATOR/ /g"`
1199    ;;
1200  yes,pw32*)
1201    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1202    ;;
1203  *)
1204    library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
1205    ;;
1206  esac
1207  dynamic_linker='Win32 ld.exe'
1208  # FIXME: first we should search . and the directory the executable is in
1209  shlibpath_var=PATH
1210  ;;
1211
1212darwin* | rhapsody*)
1213  dynamic_linker="$host_os dyld"
1214  version_type=darwin
1215  need_lib_prefix=no
1216  need_version=no
1217  # FIXME: Relying on posixy $() will cause problems for
1218  #        cross-compilation, but unfortunately the echo tests do not
1219  #        yet detect zsh echo's removal of \ escapes.
1220  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1221  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1222  shlibpath_overrides_runpath=yes
1223  shlibpath_var=DYLD_LIBRARY_PATH
1224  ;;
1225
1226dgux*)
1227  version_type=linux
1228  need_lib_prefix=no
1229  need_version=no
1230  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1231  soname_spec='${libname}${release}.so$major'
1232  shlibpath_var=LD_LIBRARY_PATH
1233  ;;
1234
1235freebsd1*)
1236  dynamic_linker=no
1237  ;;
1238
1239freebsd*)
1240  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1241  version_type=freebsd-$objformat
1242  case $version_type in
1243    freebsd-elf*)
1244      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1245      need_version=no
1246      need_lib_prefix=no
1247      ;;
1248    freebsd-*)
1249      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1250      need_version=yes
1251      ;;
1252  esac
1253  shlibpath_var=LD_LIBRARY_PATH
1254  case $host_os in
1255  freebsd2*)
1256    shlibpath_overrides_runpath=yes
1257    ;;
1258  freebsd3.[01]* | freebsdelf3.[01]*)
1259    shlibpath_overrides_runpath=yes
1260    hardcode_into_libs=yes
1261    ;;
1262  *) # from 3.2 on
1263    shlibpath_overrides_runpath=no
1264    hardcode_into_libs=yes
1265    ;;
1266  esac
1267  ;;
1268
1269gnu*)
1270  version_type=linux
1271  need_lib_prefix=no
1272  need_version=no
1273  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1274  soname_spec='${libname}${release}.so$major'
1275  shlibpath_var=LD_LIBRARY_PATH
1276  hardcode_into_libs=yes
1277  ;;
1278
1279hpux9* | hpux10* | hpux11*)
1280  # Give a soname corresponding to the major version so that dld.sl refuses to
1281  # link against other versions.
1282  version_type=sunos
1283  need_lib_prefix=no
1284  need_version=no
1285  if test "$host_cpu" = ia64; then
1286    hardcode_into_libs=yes
1287    dynamic_linker="$host_os dld.so"
1288    shlibpath_var=LD_LIBRARY_PATH
1289    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1290    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1291    soname_spec='${libname}${release}.so$major'
1292    if test "X$HPUX_IA64_MODE" = X32; then
1293      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1294    else
1295      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1296    fi
1297    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1298  else
1299    dynamic_linker="$host_os dld.sl"
1300    shlibpath_var=SHLIB_PATH
1301    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1302    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1303    soname_spec='${libname}${release}.sl$major'
1304  fi
1305  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1306  postinstall_cmds='chmod 555 $lib'
1307  ;;
1308
1309irix5* | irix6*)
1310  version_type=irix
1311  need_lib_prefix=no
1312  need_version=no
1313  soname_spec='${libname}${release}.so$major'
1314  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1315  case $host_os in
1316  irix5*)
1317    libsuff= shlibsuff=
1318    ;;
1319  *)
1320    case $LD in # libtool.m4 will add one of these switches to LD
1321    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1322    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1323    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1324    *) libsuff= shlibsuff= libmagic=never-match;;
1325    esac
1326    ;;
1327  esac
1328  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1329  shlibpath_overrides_runpath=no
1330  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1331  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1332  ;;
1333
1334# No shared lib support for Linux oldld, aout, or coff.
1335linux*oldld* | linux*aout* | linux*coff*)
1336  dynamic_linker=no
1337  ;;
1338
1339# This must be Linux ELF.
1340linux*)
1341  version_type=linux
1342  need_lib_prefix=no
1343  need_version=no
1344  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1345  soname_spec='${libname}${release}.so$major'
1346  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1347  shlibpath_var=LD_LIBRARY_PATH
1348  shlibpath_overrides_runpath=no
1349  # This implies no fast_install, which is unacceptable.
1350  # Some rework will be needed to allow for fast_install
1351  # before this can be enabled.
1352  hardcode_into_libs=yes
1353
1354  # We used to test for /lib/ld.so.1 and disable shared libraries on
1355  # powerpc, because MkLinux only supported shared libraries with the
1356  # GNU dynamic linker.  Since this was broken with cross compilers,
1357  # most powerpc-linux boxes support dynamic linking these days and
1358  # people can always --disable-shared, the test was removed, and we
1359  # assume the GNU/Linux dynamic linker is in use.
1360  dynamic_linker='GNU/Linux ld.so'
1361  ;;
1362
1363netbsd*)
1364  version_type=sunos
1365  need_lib_prefix=no
1366  need_version=no
1367  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1368    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1369    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1370    dynamic_linker='NetBSD (a.out) ld.so'
1371  else
1372    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1373    soname_spec='${libname}${release}.so$major'
1374    dynamic_linker='NetBSD ld.elf_so'
1375  fi
1376  shlibpath_var=LD_LIBRARY_PATH
1377  shlibpath_overrides_runpath=yes
1378  hardcode_into_libs=yes
1379  ;;
1380
1381newsos6)
1382  version_type=linux
1383  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1384  shlibpath_var=LD_LIBRARY_PATH
1385  shlibpath_overrides_runpath=yes
1386  ;;
1387
1388nto-qnx)
1389  version_type=linux
1390  need_lib_prefix=no
1391  need_version=no
1392  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1393  soname_spec='${libname}${release}.so$major'
1394  shlibpath_var=LD_LIBRARY_PATH
1395  shlibpath_overrides_runpath=yes
1396  ;;
1397
1398openbsd*)
1399  version_type=sunos
1400  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1401  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1402  shlibpath_var=LD_LIBRARY_PATH
1403  file_magic_cmd=/usr/bin/file
1404  file_magic_test_file=`echo /usr/lib/libc.so.*`
1405  if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
1406    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1407  else
1408    deplibs_check_method='file_magic OpenBSD.* shared library'
1409  fi
1410  ;;
1411
1412os2*)
1413  libname_spec='$name'
1414  need_lib_prefix=no
1415  library_names_spec='$libname.dll $libname.a'
1416  dynamic_linker='OS/2 ld.exe'
1417  shlibpath_var=LIBPATH
1418  ;;
1419
1420osf3* | osf4* | osf5*)
1421  version_type=osf
1422  need_version=no
1423  soname_spec='${libname}${release}.so'
1424  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1425  shlibpath_var=LD_LIBRARY_PATH
1426  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1427  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1428  ;;
1429
1430sco3.2v5*)
1431  version_type=osf
1432  soname_spec='${libname}${release}.so$major'
1433  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1434  shlibpath_var=LD_LIBRARY_PATH
1435  ;;
1436
1437solaris*)
1438  version_type=linux
1439  need_lib_prefix=no
1440  need_version=no
1441  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1442  soname_spec='${libname}${release}.so$major'
1443  shlibpath_var=LD_LIBRARY_PATH
1444  shlibpath_overrides_runpath=yes
1445  hardcode_into_libs=yes
1446  # ldd complains unless libraries are executable
1447  postinstall_cmds='chmod +x $lib'
1448  ;;
1449
1450sunos4*)
1451  version_type=sunos
1452  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1453  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1454  shlibpath_var=LD_LIBRARY_PATH
1455  shlibpath_overrides_runpath=yes
1456  if test "$with_gnu_ld" = yes; then
1457    need_lib_prefix=no
1458  fi
1459  need_version=yes
1460  ;;
1461
1462sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1463  version_type=linux
1464  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1465  soname_spec='${libname}${release}.so$major'
1466  shlibpath_var=LD_LIBRARY_PATH
1467  case $host_vendor in
1468    sni)
1469      shlibpath_overrides_runpath=no
1470      ;;
1471    motorola)
1472      need_lib_prefix=no
1473      need_version=no
1474      shlibpath_overrides_runpath=no
1475      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1476      ;;
1477  esac
1478  ;;
1479
1480sysv4*MP*)
1481  if test -d /usr/nec ;then
1482    version_type=linux
1483    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1484    soname_spec='$libname.so.$major'
1485    shlibpath_var=LD_LIBRARY_PATH
1486  fi
1487  ;;
1488
1489uts4*)
1490  version_type=linux
1491  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1492  soname_spec='${libname}${release}.so$major'
1493  shlibpath_var=LD_LIBRARY_PATH
1494  ;;
1495
1496*)
1497  dynamic_linker=no
1498  ;;
1499esac
1500AC_MSG_RESULT([$dynamic_linker])
1501test "$dynamic_linker" = no && can_build_shared=no
1502])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1503
1504
1505# _LT_AC_TAGCONFIG
1506# ----------------
1507AC_DEFUN([_LT_AC_TAGCONFIG],
1508[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1509AC_ARG_WITH([tags],
1510    [AC_HELP_STRING([--with-tags=TAGS],
1511        [include additional configurations @<:@CXX,GCJ@:>@])],
1512    [tagnames="$withval"],
1513    [tagnames="CXX,GCJ"])
1514
1515if test -f "$ltmain" && test -n "$tagnames"; then
1516  if test ! -f "${ofile}"; then
1517    AC_MSG_WARN([output file `$ofile' does not exist])
1518  fi
1519
1520  if test -z "$LTCC"; then
1521    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1522    if test -z "$LTCC"; then
1523      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1524    else
1525      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1526    fi
1527  fi
1528
1529  # Extract list of available tagged configurations in $ofile.
1530  # Note that this assumes the entire list is on one line.
1531  available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1532
1533  IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
1534  for tagname in $tagnames; do
1535    IFS="$lt_save_ifs"
1536    # Check whether tagname contains only valid characters
1537    [case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in]
1538    "") ;;
1539    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1540        ;;
1541    esac
1542
1543    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1544    then
1545      AC_MSG_ERROR([tag name $tagname already exists])
1546    fi
1547
1548    # Update the list of available tags.
1549    if test -n "$tagname"; then
1550      echo appending configuration tag \"$tagname\" to $ofile
1551
1552      case $tagname in
1553      CXX)
1554        AC_LIBTOOL_LANG_CXX_CONFIG
1555        ;;
1556
1557      GCJ)
1558        AC_LIBTOOL_LANG_GCJ_CONFIG
1559        ;;
1560
1561      *)
1562        AC_MSG_ERROR([Unsupported tag name: $tagname])
1563        ;;
1564      esac
1565
1566      # Append the new tag name to the list of available tags.
1567      available_tags="$available_tags $tagname"
1568    fi
1569  done
1570  IFS="$lt_save_ifs"
1571
1572  # Now substitute the updated list of available tags.
1573  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1574    mv "${ofile}T" "$ofile"
1575    chmod +x "$ofile"
1576  else
1577    rm -f "${ofile}T"
1578    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1579  fi
1580fi
1581])# _LT_AC_TAGCONFIG
1582
1583
1584# AC_LIBTOOL_DLOPEN
1585# -----------------
1586# enable checks for dlopen support
1587AC_DEFUN([AC_LIBTOOL_DLOPEN],
1588 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1589])# AC_LIBTOOL_DLOPEN
1590
1591
1592# AC_LIBTOOL_WIN32_DLL
1593# --------------------
1594# declare package support for building win32 dll's
1595AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1596[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1597])# AC_LIBTOOL_WIN32_DLL
1598
1599
1600# AC_ENABLE_SHARED([DEFAULT])
1601# ---------------------------
1602# implement the --enable-shared flag
1603# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1604AC_DEFUN([AC_ENABLE_SHARED],
1605[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1606define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1607AC_ARG_ENABLE([shared],
1608    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1609        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1610    [p=${PACKAGE-default}
1611    case $enableval in
1612    yes) enable_shared=yes ;;
1613    no) enable_shared=no ;;
1614    *)
1615      enable_shared=no
1616      # Look at the argument we got.  We use all the common list separators.
1617      IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
1618      for pkg in $enableval; do
1619        IFS="$lt_save_ifs"
1620        if test "X$pkg" = "X$p"; then
1621          enable_shared=yes
1622        fi
1623      done
1624      IFS="$lt_save_ifs"
1625      ;;
1626    esac],
1627    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1628])# AC_ENABLE_SHARED
1629
1630
1631# AC_DISABLE_SHARED
1632# -----------------
1633#- set the default shared flag to --disable-shared
1634AC_DEFUN([AC_DISABLE_SHARED],
1635[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1636AC_ENABLE_SHARED(no)
1637])# AC_DISABLE_SHARED
1638
1639
1640# AC_ENABLE_STATIC([DEFAULT])
1641# ---------------------------
1642# implement the --enable-static flag
1643# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1644AC_DEFUN([AC_ENABLE_STATIC],
1645[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1646define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1647AC_ARG_ENABLE([static],
1648    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1649        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1650    [p=${PACKAGE-default}
1651    case $enableval in
1652    yes) enable_static=yes ;;
1653    no) enable_static=no ;;
1654    *)
1655     enable_static=no
1656      # Look at the argument we got.  We use all the common list separators.
1657      IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
1658      for pkg in $enableval; do
1659        IFS="$lt_save_ifs"
1660        if test "X$pkg" = "X$p"; then
1661          enable_static=yes
1662        fi
1663      done
1664      IFS="$lt_save_ifs"
1665      ;;
1666    esac],
1667    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1668])# AC_ENABLE_STATIC
1669
1670
1671# AC_DISABLE_STATIC
1672# -----------------
1673# set the default static flag to --disable-static
1674AC_DEFUN([AC_DISABLE_STATIC],
1675[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1676AC_ENABLE_STATIC(no)
1677])# AC_DISABLE_STATIC
1678
1679
1680# AC_ENABLE_FAST_INSTALL([DEFAULT])
1681# ---------------------------------
1682# implement the --enable-fast-install flag
1683# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1684AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1685[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1686define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1687AC_ARG_ENABLE([fast-install],
1688    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1689    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1690    [p=${PACKAGE-default}
1691    case $enableval in
1692    yes) enable_fast_install=yes ;;
1693    no) enable_fast_install=no ;;
1694    *)
1695      enable_fast_install=no
1696      # Look at the argument we got.  We use all the common list separators.
1697      IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:},"
1698      for pkg in $enableval; do
1699        IFS="$lt_save_ifs"
1700        if test "X$pkg" = "X$p"; then
1701          enable_fast_install=yes
1702        fi
1703      done
1704      IFS="$lt_save_ifs"
1705      ;;
1706    esac],
1707    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1708])# AC_ENABLE_FAST_INSTALL
1709
1710
1711# AC_DISABLE_FAST_INSTALL
1712# -----------------------
1713# set the default to --disable-fast-install
1714AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1715[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1716AC_ENABLE_FAST_INSTALL(no)
1717])# AC_DISABLE_FAST_INSTALL
1718
1719
1720# AC_LIBTOOL_PICMODE([MODE])
1721# --------------------------
1722# implement the --with-pic flag
1723# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
1724AC_DEFUN([AC_LIBTOOL_PICMODE],
1725[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1726pic_mode=ifelse($#,1,$1,default)
1727])# AC_LIBTOOL_PICMODE
1728
1729
1730# AC_PATH_TOOL_PREFIX
1731# -------------------
1732# find a file program which can recognise shared library
1733AC_DEFUN([AC_PATH_TOOL_PREFIX],
1734[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1735AC_MSG_CHECKING([for $1])
1736AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1737[case $MAGIC_CMD in
1738[\\/*] |  ?:[\\/]*)
1739  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1740  ;;
1741*)
1742  lt_save_MAGIC_CMD="$MAGIC_CMD"
1743  IFS="${IFS=   }"; lt_save_ifs="$IFS"; IFS="${PATH_SEPARATOR-:}"
1744dnl $ac_dummy forces splitting on constant user-supplied paths.
1745dnl POSIX.2 word splitting is done only on the output of word expansions,
1746dnl not every word.  This closes a longstanding sh security hole.
1747  ac_dummy="ifelse([$2], , $PATH, [$2])"
1748  for ac_dir in $ac_dummy; do
1749    IFS="$lt_save_ifs"
1750    test -z "$ac_dir" && ac_dir=.
1751    if test -f $ac_dir/$1; then
1752      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1753      if test -n "$file_magic_test_file"; then
1754	case $deplibs_check_method in
1755	"file_magic "*)
1756	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1757	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1758	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1759	    egrep "$file_magic_regex" > /dev/null; then
1760	    :
1761	  else
1762	    cat <<EOF 1>&2
1763
1764*** Warning: the command libtool uses to detect shared libraries,
1765*** $file_magic_cmd, produces output that libtool cannot recognize.
1766*** The result is that libtool may fail to recognize shared libraries
1767*** as such.  This will affect the creation of libtool libraries that
1768*** depend on shared libraries, but programs linked with such libtool
1769*** libraries will work regardless of this problem.  Nevertheless, you
1770*** may want to report the problem to your system manager and/or to
1771*** bug-libtool@gnu.org
1772
1773EOF
1774	  fi ;;
1775	esac
1776      fi
1777      break
1778    fi
1779  done
1780  IFS="$lt_save_ifs"
1781  MAGIC_CMD="$lt_save_MAGIC_CMD"
1782  ;;
1783esac])
1784MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1785if test -n "$MAGIC_CMD"; then
1786  AC_MSG_RESULT($MAGIC_CMD)
1787else
1788  AC_MSG_RESULT(no)
1789fi
1790])# AC_PATH_TOOL_PREFIX
1791
1792
1793# AC_PATH_MAGIC
1794# -------------
1795# find a file program which can recognise a shared library
1796AC_DEFUN([AC_PATH_MAGIC],
1797[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1798AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin${PATH_SEPARATOR-:}$PATH)
1799if test -z "$lt_cv_path_MAGIC_CMD"; then
1800  if test -n "$ac_tool_prefix"; then
1801    AC_PATH_TOOL_PREFIX(file, /usr/bin${PATH_SEPARATOR-:}$PATH)
1802  else
1803    MAGIC_CMD=:
1804  fi
1805fi
1806])# AC_PATH_MAGIC
1807
1808
1809# AC_PROG_LD
1810# ----------
1811# find the path to the GNU or non-GNU linker
1812AC_DEFUN([AC_PROG_LD],
1813[AC_ARG_WITH([gnu-ld],
1814    [AC_HELP_STRING([--with-gnu-ld],
1815        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1816    [test "$withval" = no || with_gnu_ld=yes],
1817    [with_gnu_ld=no])
1818AC_REQUIRE([AC_PROG_CC])dnl
1819AC_REQUIRE([AC_CANONICAL_HOST])dnl
1820AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1821AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
1822ac_prog=ld
1823if test "$GCC" = yes; then
1824  # Check if gcc -print-prog-name=ld gives a path.
1825  AC_MSG_CHECKING([for ld used by GCC])
1826  case $host in
1827  *-*-mingw*)
1828    # gcc leaves a trailing carriage return which upsets mingw
1829    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1830  *)
1831    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1832  esac
1833  case $ac_prog in
1834    # Accept absolute paths.
1835    [[\\/]]* | ?:[[\\/]]*)
1836      [re_direlt='/[^/][^/]*/\.\./']
1837      # Canonicalize the path of ld
1838      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1839      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1840	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1841      done
1842      test -z "$LD" && LD="$ac_prog"
1843      ;;
1844  "")
1845    # If it fails, then pretend we aren't using GCC.
1846    ac_prog=ld
1847    ;;
1848  *)
1849    # If it is relative, then search for the first ld in PATH.
1850    with_gnu_ld=unknown
1851    ;;
1852  esac
1853elif test "$with_gnu_ld" = yes; then
1854  AC_MSG_CHECKING([for GNU ld])
1855else
1856  AC_MSG_CHECKING([for non-GNU ld])
1857fi
1858AC_CACHE_VAL(lt_cv_path_LD,
1859[if test -z "$LD"; then
1860  IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1861  for ac_dir in $PATH; do
1862    IFS="$lt_save_ifs"
1863    test -z "$ac_dir" && ac_dir=.
1864    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1865      lt_cv_path_LD="$ac_dir/$ac_prog"
1866      # Check to see if the program is GNU ld.  I'd rather use --version,
1867      # but apparently some GNU ld's only accept -v.
1868      # Break only if it was the GNU/non-GNU ld that we prefer.
1869      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1870	test "$with_gnu_ld" != no && break
1871      else
1872	test "$with_gnu_ld" != yes && break
1873      fi
1874    fi
1875  done
1876  IFS="$lt_save_ifs"
1877else
1878  lt_cv_path_LD="$LD" # Let the user override the test with a path.
1879fi])
1880LD="$lt_cv_path_LD"
1881if test -n "$LD"; then
1882  AC_MSG_RESULT($LD)
1883else
1884  AC_MSG_RESULT(no)
1885fi
1886test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1887AC_PROG_LD_GNU
1888])# AC_PROG_LD
1889
1890
1891# AC_PROG_LD_GNU
1892# --------------
1893AC_DEFUN([AC_PROG_LD_GNU],
1894[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1895[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1896if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1897  lt_cv_prog_gnu_ld=yes
1898else
1899  lt_cv_prog_gnu_ld=no
1900fi])
1901with_gnu_ld=$lt_cv_prog_gnu_ld
1902])# AC_PROG_LD_GNU
1903
1904
1905# AC_PROG_LD_RELOAD_FLAG
1906# ----------------------
1907# find reload flag for linker
1908#   -- PORTME Some linkers may need a different reload flag.
1909AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
1910[AC_CACHE_CHECK([for $LD option to reload object files],
1911  lt_cv_ld_reload_flag,
1912  [lt_cv_ld_reload_flag='-r'])
1913reload_flag=$lt_cv_ld_reload_flag
1914case $reload_flag in
1915"" | " "*) ;;
1916*) reload_flag=" $reload_flag" ;;
1917esac
1918reload_cmds='$LD$reload_flag -o $output$reload_objs'
1919])# AC_PROG_LD_RELOAD_FLAG
1920
1921
1922# AC_DEPLIBS_CHECK_METHOD
1923# -----------------------
1924# how to check for library dependencies
1925#  -- PORTME fill in with the dynamic library characteristics
1926AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1927[AC_CACHE_CHECK([how to recognise dependant libraries],
1928lt_cv_deplibs_check_method,
1929[lt_cv_file_magic_cmd='$MAGIC_CMD'
1930lt_cv_file_magic_test_file=
1931lt_cv_deplibs_check_method='unknown'
1932# Need to set the preceding variable on all platforms that support
1933# interlibrary dependencies.
1934# 'none' -- dependencies not supported.
1935# `unknown' -- same as none, but documents that we really don't know.
1936# 'pass_all' -- all dependencies passed with no checks.
1937# 'test_compile' -- check by making test program.
1938# ['file_magic [regex]'] -- check by looking for files in library path
1939# which responds to the $file_magic_cmd with a given egrep regex.
1940# If you have `file' or equivalent on your system and you're not sure
1941# whether `pass_all' will *always* work, you probably want this one.
1942
1943case $host_os in
1944aix4* | aix5*)
1945  lt_cv_deplibs_check_method=pass_all
1946  ;;
1947
1948beos*)
1949  lt_cv_deplibs_check_method=pass_all
1950  ;;
1951
1952bsdi4*)
1953  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
1954  lt_cv_file_magic_cmd='/usr/bin/file -L'
1955  lt_cv_file_magic_test_file=/shlib/libc.so
1956  ;;
1957
1958cygwin* | mingw* | pw32*)
1959  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1960  lt_cv_file_magic_cmd='$OBJDUMP -f'
1961  ;;
1962
1963darwin* | rhapsody*)
1964  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1965  lt_cv_file_magic_cmd='/usr/bin/file -L'
1966  case "$host_os" in
1967  rhapsody* | darwin1.[012])
1968    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
1969    ;;
1970  *) # Darwin 1.3 on
1971    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1972    ;;
1973  esac
1974  ;;
1975
1976freebsd*)
1977  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1978    case $host_cpu in
1979    i*86 )
1980      # Not sure whether the presence of OpenBSD here was a mistake.
1981      # Let's accept both of them until this is cleared up.
1982      [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
1983      lt_cv_file_magic_cmd=/usr/bin/file
1984      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1985      ;;
1986    esac
1987  else
1988    lt_cv_deplibs_check_method=pass_all
1989  fi
1990  ;;
1991
1992gnu*)
1993  lt_cv_deplibs_check_method=pass_all
1994  ;;
1995
1996hpux10.20* | hpux11*)
1997  lt_cv_file_magic_cmd=/usr/bin/file
1998  if test "$host_cpu" = ia64; then
1999    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
2000    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2001  else
2002    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
2003    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2004  fi
2005  ;;
2006
2007irix5* | irix6*)
2008  case $host_os in
2009  irix5*)
2010    # this will be overridden with pass_all, but let us keep it just in case
2011    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2012    ;;
2013  *)
2014    case $LD in
2015    *-32|*"-32 ") libmagic=32-bit;;
2016    *-n32|*"-n32 ") libmagic=N32;;
2017    *-64|*"-64 ") libmagic=64-bit;;
2018    *) libmagic=never-match;;
2019    esac
2020    # this will be overridden with pass_all, but let us keep it just in case
2021    [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
2022    ;;
2023  esac
2024  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2025  lt_cv_deplibs_check_method=pass_all
2026  ;;
2027
2028# This must be Linux ELF.
2029linux*)
2030  case $host_cpu in
2031  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
2032    lt_cv_deplibs_check_method=pass_all ;;
2033  *)
2034    # glibc up to 2.1.1 does not perform some relocations on ARM
2035    [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
2036  esac
2037  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2038  ;;
2039
2040netbsd*)
2041  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2042    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
2043  else
2044    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
2045  fi
2046  ;;
2047
2048newos6*)
2049  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
2050  lt_cv_file_magic_cmd=/usr/bin/file
2051  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2052  ;;
2053
2054nto-qnx)
2055  lt_cv_deplibs_check_method=unknown
2056  ;;
2057
2058osf3* | osf4* | osf5*)
2059  # this will be overridden with pass_all, but let us keep it just in case
2060  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2061  lt_cv_file_magic_test_file=/shlib/libc.so
2062  lt_cv_deplibs_check_method=pass_all
2063  ;;
2064
2065sco3.2v5*)
2066  lt_cv_deplibs_check_method=pass_all
2067  ;;
2068
2069solaris*)
2070  lt_cv_deplibs_check_method=pass_all
2071  lt_cv_file_magic_test_file=/lib/libc.so
2072  ;;
2073
2074sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2075  case $host_vendor in
2076  motorola)
2077    [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]']
2078    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2079    ;;
2080  ncr)
2081    lt_cv_deplibs_check_method=pass_all
2082    ;;
2083  sequent)
2084    lt_cv_file_magic_cmd='/bin/file'
2085    [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
2086    ;;
2087  sni)
2088    lt_cv_file_magic_cmd='/bin/file'
2089    [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
2090    lt_cv_file_magic_test_file=/lib/libc.so
2091    ;;
2092  esac
2093  ;;
2094
2095sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2096  lt_cv_deplibs_check_method=pass_all
2097  ;;
2098esac
2099])
2100file_magic_cmd=$lt_cv_file_magic_cmd
2101deplibs_check_method=$lt_cv_deplibs_check_method
2102test -z "$deplibs_check_method" && deplibs_check_method=unknown
2103])# AC_DEPLIBS_CHECK_METHOD
2104
2105
2106# AC_PROG_NM
2107# ----------
2108# find the path to a BSD-compatible name lister
2109AC_DEFUN([AC_PROG_NM],
2110[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2111[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
2112if test -n "$NM"; then
2113  # Let the user override the test.
2114  lt_cv_path_NM="$NM"
2115else
2116  IFS="${IFS= 	}"; lt_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2117  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2118    IFS="$lt_save_ifs"
2119    test -z "$ac_dir" && ac_dir=.
2120    tmp_nm=$ac_dir/${ac_tool_prefix}nm
2121    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2122      # Check to see if the nm accepts a BSD-compat flag.
2123      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2124      #   nm: unknown option "B" ignored
2125      # Tru64's nm complains that /dev/null is an invalid object file
2126      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2127	lt_cv_path_NM="$tmp_nm -B"
2128	break
2129      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2130	lt_cv_path_NM="$tmp_nm -p"
2131	break
2132      else
2133	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2134	continue # so that we can try to find one that supports BSD flags
2135      fi
2136    fi
2137  done
2138  IFS="$lt_save_ifs"
2139  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2140fi])
2141NM="$lt_cv_path_NM"
2142])# AC_PROG_NM
2143
2144
2145# AC_CHECK_LIBM
2146# -------------
2147# check for math library
2148AC_DEFUN([AC_CHECK_LIBM],
2149[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2150LIBM=
2151case $host in
2152*-*-beos* | *-*-cygwin* | *-*-pw32*)
2153  # These system don't have libm
2154  ;;
2155*-ncr-sysv4.3*)
2156  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2157  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2158  ;;
2159*)
2160  AC_CHECK_LIB(m, main, LIBM="-lm")
2161  ;;
2162esac
2163])# AC_CHECK_LIBM
2164
2165
2166# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2167# -----------------------------------
2168# sets LIBLTDL to the link flags for the libltdl convenience library and
2169# INCLTDL to the include flags for the libltdl header and adds
2170# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2171# and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2172# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2173# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed with
2174# '${top_srcdir}/' (note the single quotes!).  If your package is not
2175# flat and you're not using automake, define top_builddir and
2176# top_srcdir appropriately in the Makefiles.
2177AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2178[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2179  case $enable_ltdl_convenience in
2180  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2181  "") enable_ltdl_convenience=yes
2182      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2183  esac
2184  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2185  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2186])# AC_LIBLTDL_CONVENIENCE
2187
2188
2189# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2190# -----------------------------------
2191# sets LIBLTDL to the link flags for the libltdl installable library and
2192# INCLTDL to the include flags for the libltdl header and adds
2193# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2194# and INCLTDL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2195# DIRECTORY is not provided and an installed libltdl is not found, it is
2196# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2197# and INCLTDL will be prefixed with '${top_srcdir}/' (note the single
2198# quotes!).  If your package is not flat and you're not using automake,
2199# define top_builddir and top_srcdir appropriately in the Makefiles.
2200# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2201AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2202[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2203  AC_CHECK_LIB(ltdl, main,
2204  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2205  [if test x"$enable_ltdl_install" = xno; then
2206     AC_MSG_WARN([libltdl not installed, but installation disabled])
2207   else
2208     enable_ltdl_install=yes
2209   fi
2210  ])
2211  if test x"$enable_ltdl_install" = x"yes"; then
2212    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2213    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2214    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2215  else
2216    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2217    LIBLTDL="-lltdl"
2218    INCLTDL=
2219  fi
2220])# AC_LIBLTDL_INSTALLABLE
2221
2222
2223# If this macro is not defined by Autoconf, define it here.
2224ifdef([AC_PROVIDE_IFELSE],
2225      [],
2226      [define([AC_PROVIDE_IFELSE],
2227              [ifdef([AC_PROVIDE_$1],
2228                     [$2], [$3])])])
2229
2230
2231# AC_LIBTOOL_CXX
2232# --------------
2233# enable support for C++ libraries
2234AC_DEFUN([AC_LIBTOOL_CXX],
2235[AC_REQUIRE([_LT_AC_LANG_CXX])
2236])# AC_LIBTOOL_CXX
2237
2238
2239# _LT_AC_LANG_CXX
2240# ---------------
2241AC_DEFUN([_LT_AC_LANG_CXX],
2242[AC_REQUIRE([AC_PROG_CXX])
2243AC_REQUIRE([AC_PROG_CXXCPP])
2244])# _LT_AC_LANG_CXX
2245
2246
2247# AC_LIBTOOL_GCJ
2248# --------------
2249# enable support for GCJ libraries
2250AC_DEFUN([AC_LIBTOOL_GCJ],
2251[AC_REQUIRE([_LT_AC_LANG_GCJ])
2252])# AC_LIBTOOL_GCJ
2253
2254
2255# _LT_AC_LANG_GCJ
2256# ---------------
2257AC_DEFUN([_LT_AC_LANG_GCJ],
2258[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2259  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2260    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2261      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2262         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2263           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2264])# _LT_AC_LANG_GCJ
2265
2266
2267# AC_LIBTOOL_LANG_C_CONFIG
2268# ------------------------
2269# Ensure that the configuration vars for the C compiler are
2270# suitably defined.  Those variables are subsequently used by
2271# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2272AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2273AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2274[lt_save_CC="$CC"
2275AC_LANG_PUSH(C)
2276
2277# Source file extension for C test sources.
2278ac_ext=c
2279
2280# Object file extension for compiled C test sources.
2281objext=o
2282_LT_AC_TAGVAR(objext, $1)=$objext
2283
2284# Code to be used in simple compile tests
2285lt_simple_compile_test_code="int some_variable = 0;"
2286
2287# Code to be used in simple link tests
2288lt_simple_link_test_code='main(){return(0);}'
2289
2290_LT_AC_SYS_COMPILER
2291
2292#
2293# Check for any special shared library compilation flags.
2294#
2295_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2296if test "$GCC" = no; then
2297  case $host_os in
2298  sco3.2v5*)
2299    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2300    ;;
2301  esac
2302fi
2303if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2304  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2305  if echo "$old_CC $old_CFLAGS " | [egrep -e "[ 	]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ 	]"] >/dev/null; then :
2306  else
2307    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2308    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2309  fi
2310fi
2311
2312
2313#
2314# Check to make sure the static flag actually works.
2315#
2316AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2317  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2318  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2319  [],
2320  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2321
2322
2323AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2324AC_LIBTOOL_PROG_COMPILER_PIC($1)
2325AC_LIBTOOL_PROG_CC_C_O($1)
2326AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2327AC_LIBTOOL_PROG_LD_SHLIBS($1)
2328AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2329AC_LIBTOOL_SYS_LIB_STRIP
2330AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2331AC_LIBTOOL_DLOPEN_SELF($1)
2332
2333# Report which librarie types wil actually be built
2334AC_MSG_CHECKING([if libtool supports shared libraries])
2335AC_MSG_RESULT([$can_build_shared])
2336
2337AC_MSG_CHECKING([whether to build shared libraries])
2338test "$can_build_shared" = "no" && enable_shared=no
2339
2340# On AIX, shared libraries and static libraries use the same namespace, and
2341# are all built from PIC.
2342case "$host_os" in
2343aix3*)
2344  test "$enable_shared" = yes && enable_static=no
2345  if test -n "$RANLIB"; then
2346    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2347    postinstall_cmds='$RANLIB $lib'
2348  fi
2349  ;;
2350
2351aix4*)
2352  test "$enable_shared" = yes && enable_static=no
2353  ;;
2354esac
2355AC_MSG_RESULT([$enable_shared])
2356
2357AC_MSG_CHECKING([whether to build static libraries])
2358# Make sure either enable_shared or enable_static is yes.
2359test "$enable_shared" = yes || enable_static=yes
2360AC_MSG_RESULT([$enable_static])
2361
2362AC_LIBTOOL_CONFIG($1)
2363
2364AC_LANG_POP
2365CC="$lt_save_CC"
2366])# AC_LIBTOOL_LANG_C_CONFIG
2367
2368
2369# AC_LIBTOOL_LANG_CXX_CONFIG
2370# --------------------------
2371# Ensure that the configuration vars for the C compiler are
2372# suitably defined.  Those variables are subsequently used by
2373# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2374AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2375AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2376[AC_LANG_PUSH(C++)
2377AC_REQUIRE([AC_PROG_CXX])
2378AC_REQUIRE([AC_PROG_CXXCPP])
2379
2380_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2381_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2382_LT_AC_TAGVAR(always_export_symbols, $1)=no
2383_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2384_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2385_LT_AC_TAGVAR(hardcode_direct, $1)=no
2386_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2387_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2388_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2389_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2390_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2391_LT_AC_TAGVAR(no_undefined_flag, $1)=
2392_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2393
2394# Dependencies to place before and after the object being linked:
2395_LT_AC_TAGVAR(predep_objects, $1)=
2396_LT_AC_TAGVAR(postdep_objects, $1)=
2397_LT_AC_TAGVAR(predeps, $1)=
2398_LT_AC_TAGVAR(postdeps, $1)=
2399_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2400
2401# Source file extension for C test sources.
2402ac_ext=cc
2403
2404# Object file extension for compiled C test sources.
2405objext=o
2406_LT_AC_TAGVAR(objext, $1)=$objext
2407
2408# Code to be used in simple compile tests
2409lt_simple_compile_test_code="int some_variable = 0;"
2410
2411# Code to be used in simple link tests
2412lt_simple_link_test_code='int main(int char *[]) { return(0); }'
2413
2414# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2415_LT_AC_SYS_COMPILER
2416
2417# Allow CC to be a program name with arguments.
2418lt_save_CC="$CC"
2419CC=${CXX-"c++"}
2420set dummy $CC
2421compiler="[$]2"
2422_LT_AC_TAGVAR(compiler, $1)=$CC
2423cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2424
2425# We don't want -fno-exception wen compiling C++ code, so set the
2426# no_builtin_flag separately
2427if test "$GXX" = yes; then
2428  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2429else
2430  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2431fi
2432
2433if test "$GXX" = yes; then
2434  # Set up default GNU C++ configuration
2435
2436  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2437  # archiving commands below assume that GNU ld is being used.
2438  if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2439      egrep 'GNU ld' > /dev/null; then
2440    with_gnu_ld=yes
2441
2442    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2443    _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'
2444
2445    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2446    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2447
2448    # If archive_cmds runs LD, not CC, wlarc should be empty
2449    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2450    #     investigate it a little bit more. (MM)
2451    wlarc='${wl}'
2452
2453    # ancient GNU ld didn't support --whole-archive et. al.
2454    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2455        egrep 'no-whole-archive' > /dev/null; then
2456      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2457    else
2458      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2459    fi
2460  else
2461    with_gnu_ld=no
2462    wlarc=
2463
2464    # A generic and very simple default shared library creation
2465    # command for GNU C++ for the case where it uses the native
2466    # linker, instead of GNU ld.  If possible, this setting should
2467    # overridden to take advantage of the native linker features on
2468    # the platform it is being used on.
2469    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2470  fi
2471
2472  # Commands to make compiler produce verbose output that lists
2473  # what "hidden" libraries, object files and flags are used when
2474  # linking a shared library.
2475  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2476
2477else
2478  GXX=no
2479  with_gnu_ld=no
2480  wlarc=
2481fi
2482
2483# PORTME: fill in a description of your system's C++ link characteristics
2484AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2485_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2486case $host_os in
2487  aix3*)
2488    # FIXME: insert proper C++ library support
2489    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2490    ;;
2491  aix4* | aix5*)
2492    if test "$host_cpu" = ia64; then
2493      # On IA64, the linker does run time linking by default, so we don't
2494      # have to do anything special.
2495      aix_use_runtimelinking=no
2496      exp_sym_flag='-Bexport'
2497      no_entry_flag=""
2498    else
2499      aix_use_runtimelinking=no
2500
2501      # Test if we are trying to use run time linking or normal
2502      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2503      # need to do runtime linking.
2504      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2505        for ld_flag in $LDFLAGS; do
2506	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2507	    aix_use_runtimelinking=yes
2508	    break
2509	  fi
2510        done
2511      esac
2512
2513      exp_sym_flag='-bexport'
2514      no_entry_flag='-bnoentry'
2515    fi
2516
2517    # When large executables or shared objects are built, AIX ld can
2518    # have problems creating the table of contents.  If linking a library
2519    # or program results in "error TOC overflow" add -mminimal-toc to
2520    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2521    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2522
2523    _LT_AC_TAGVAR(archive_cmds, $1)=''
2524    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2525    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2526    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2527
2528    if test "$GXX" = yes; then
2529      case $host_os in aix4.[012]|aix4.[012].*)
2530      # We only want to do this on AIX 4.2 and lower, the check
2531      # below for broken collect2 doesn't work under 4.3+
2532        collect2name=`${CC} -print-prog-name=collect2`
2533        if test -f "$collect2name" && \
2534	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2535        then
2536	  # We have reworked collect2
2537	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2538        else
2539	  # We have old collect2
2540	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2541	  # It fails to find uninstalled libraries when the uninstalled
2542	  # path is not listed in the libpath.  Setting hardcode_minus_L
2543	  # to unsupported forces relinking
2544	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2545	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2546	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2547        fi
2548      esac
2549      shared_flag='-shared'
2550    else
2551      # not using gcc
2552      if test "$host_cpu" = ia64; then
2553	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2554	# chokes on -Wl,-G. The following line is correct:
2555        shared_flag='-G'
2556      else
2557	if test "$aix_use_runtimelinking" = yes; then
2558          shared_flag='${wl}-G'
2559        else
2560          shared_flag='${wl}-bM:SRE'
2561	fi
2562      fi
2563    fi
2564
2565    # It seems that -bexpall does not export symbols beginning with
2566    # underscore (_), so it is better to generate a list of symbols to export.
2567    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2568    if test "$aix_use_runtimelinking" = yes; then
2569      # Warning - without using the other runtime loading flags (-brtl),
2570      # -berok will link without error, but may produce a broken library.
2571      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2572      # Determine the default libpath from the value encoded in an empty executable.
2573      _LT_AC_SYS_LIBPATH_AIX
2574      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2575
2576      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2577     else
2578      if test "$host_cpu" = ia64; then
2579        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2580        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2581        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2582      else
2583        # Determine the default libpath from the value encoded in an empty executable.
2584        _LT_AC_SYS_LIBPATH_AIX
2585        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2586        # Warning - without using the other run time loading flags,
2587        # -berok will link without error, but may produce a broken library.
2588        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2589        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2590        # -bexpall does not export symbols beginning with underscore (_)
2591        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2592        # Exported symbols can be pulled into shared objects from archives
2593        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2594        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2595        # This is similar to how AIX traditionally builds it's shared libraries.
2596        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2597      fi
2598    fi
2599    ;;
2600  chorus*)
2601    case $cc_basename in
2602      *)
2603        # FIXME: insert proper C++ library support
2604        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2605        ;;
2606    esac
2607    ;;
2608  dgux*)
2609    case $cc_basename in
2610      ec++)
2611        # FIXME: insert proper C++ library support
2612        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2613        ;;
2614      ghcx)
2615        # Green Hills C++ Compiler
2616        # FIXME: insert proper C++ library support
2617        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2618        ;;
2619      *)
2620        # FIXME: insert proper C++ library support
2621        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2622        ;;
2623    esac
2624    ;;
2625  freebsd[12]*)
2626    # C++ shared libraries reported to be fairly broken before switch to ELF
2627    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2628    ;;
2629  freebsd-elf*)
2630    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2631    ;;
2632  freebsd*)
2633    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2634    # conventions
2635    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2636    ;;
2637  gnu*)
2638    ;;
2639  hpux*)
2640    if test $with_gnu_ld = no; then
2641      if test "$host_cpu" = ia64; then
2642        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2643      else
2644        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2645        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2646        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2647      fi
2648    fi
2649    if test "$host_cpu" = ia64; then
2650      _LT_AC_TAGVAR(hardcode_direct, $1)=no
2651      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2652    else
2653      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2654    fi
2655    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, but as the default
2656			 # location of the library.
2657
2658    case $cc_basename in
2659      CC)
2660        # FIXME: insert proper C++ library support
2661        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2662        ;;
2663      aCC)
2664	case $host_os in
2665        hpux9*)
2666            _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'
2667          ;;
2668      *)
2669          if test "$host_cpu" = ia64; then
2670            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2671          else
2672            _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'
2673          fi
2674          ;;
2675	esac
2676        # Commands to make compiler produce verbose output that lists
2677        # what "hidden" libraries, object files and flags are used when
2678        # linking a shared library.
2679        #
2680        # There doesn't appear to be a way to prevent this compiler from
2681        # explicitly linking system object files so we need to strip them
2682        # from the output so that they don't get included in the library
2683        # dependencies.
2684        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2685        ;;
2686      *)
2687        if test $GXX = yes; then
2688	  if test $with_gnu_ld = no; then
2689	    case "$host_os" in
2690            hpux9*)
2691                _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'
2692                ;;
2693          *)
2694                if test "$host_cpu" = ia64; then
2695                  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2696                else
2697                  _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'
2698                fi
2699                ;;
2700	    esac
2701	  fi
2702	else
2703	  # FIXME: insert proper C++ library support
2704          _LT_AC_TAGVAR(ld_shlibs, $1)=no
2705	fi
2706        ;;
2707    esac
2708    ;;
2709  irix5* | irix6*)
2710    case $cc_basename in
2711      CC)
2712        # SGI C++
2713        _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 ${objdir}/so_locations -o $lib'
2714
2715	# Archives containing C++ object files must be created using
2716	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
2717	# necessary to make sure instantiated templates are included
2718	# in the archive.
2719	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
2720	;;
2721      *)
2722        if test "$GXX" = yes; then
2723          if test "$with_gnu_ld" = no; then
2724            _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}${objdir}/so_locations -o $lib'
2725          else
2726            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
2727          fi
2728        fi
2729        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2730        ;;
2731    esac
2732    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2733    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2734    ;;
2735  linux*)
2736    case $cc_basename in
2737      KCC)
2738        # Kuck and Associates, Inc. (KAI) C++ Compiler
2739
2740        # KCC will only create a shared library if the output file
2741        # ends with ".so" (or ".sl" for HP-UX), so rename the library
2742        # to its proper name (with version) after linking.
2743        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2744        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2745
2746        # Commands to make compiler produce verbose output that lists
2747        # what "hidden" libraries, object files and flags are used when
2748        # linking a shared library.
2749        #
2750        # There doesn't appear to be a way to prevent this compiler from
2751        # explicitly linking system object files so we need to strip them
2752        # from the output so that they don't get included in the library
2753        # dependencies.
2754        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2755
2756        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
2757        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2758
2759	# Archives containing C++ object files must be created using
2760	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
2761        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2762        ;;
2763      cxx)
2764        # Compaq C++
2765        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2766        _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'
2767
2768        runpath_var=LD_RUN_PATH
2769        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2770        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2771
2772        # Commands to make compiler produce verbose output that lists
2773        # what "hidden" libraries, object files and flags are used when
2774        # linking a shared library.
2775        #
2776        # There doesn't appear to be a way to prevent this compiler from
2777        # explicitly linking system object files so we need to strip them
2778        # from the output so that they don't get included in the library
2779        # dependencies.
2780        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'
2781        ;;
2782    esac
2783    ;;
2784  lynxos*)
2785    # FIXME: insert proper C++ library support
2786    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2787    ;;
2788  m88k*)
2789    # FIXME: insert proper C++ library support
2790    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2791    ;;
2792  mvs*)
2793    case $cc_basename in
2794      cxx)
2795        # FIXME: insert proper C++ library support
2796        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2797        ;;
2798      *)
2799        # FIXME: insert proper C++ library support
2800        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2801        ;;
2802    esac
2803    ;;
2804  netbsd*)
2805    # NetBSD uses g++ - do we need to do anything?
2806    ;;
2807  osf3*)
2808    case $cc_basename in
2809      KCC)
2810        # Kuck and Associates, Inc. (KAI) C++ Compiler
2811
2812        # KCC will only create a shared library if the output file
2813        # ends with ".so" (or ".sl" for HP-UX), so rename the library
2814        # to its proper name (with version) after linking.
2815        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2816
2817        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2818        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2819
2820	# Archives containing C++ object files must be created using
2821	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
2822        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2823
2824        ;;
2825      RCC)
2826        # Rational C++ 2.4.1
2827        # FIXME: insert proper C++ library support
2828        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2829        ;;
2830      cxx)
2831        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2832        _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 ${objdir}/so_locations -o $lib'
2833
2834        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2835        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2836
2837        # Commands to make compiler produce verbose output that lists
2838        # what "hidden" libraries, object files and flags are used when
2839        # linking a shared library.
2840        #
2841        # There doesn't appear to be a way to prevent this compiler from
2842        # explicitly linking system object files so we need to strip them
2843        # from the output so that they don't get included in the library
2844        # dependencies.
2845        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'
2846        ;;
2847      *)
2848        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2849          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2850          _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}${objdir}/so_locations -o $lib'
2851
2852          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2853          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2854
2855          # Commands to make compiler produce verbose output that lists
2856          # what "hidden" libraries, object files and flags are used when
2857          # linking a shared library.
2858          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2859
2860	else
2861          # FIXME: insert proper C++ library support
2862          _LT_AC_TAGVAR(ld_shlibs, $1)=no
2863        fi
2864        ;;
2865    esac
2866    ;;
2867  osf4* | osf5*)
2868    case $cc_basename in
2869      KCC)
2870        # Kuck and Associates, Inc. (KAI) C++ Compiler
2871
2872        # KCC will only create a shared library if the output file
2873        # ends with ".so" (or ".sl" for HP-UX), so rename the library
2874        # to its proper name (with version) after linking.
2875        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2876
2877        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2878        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2879
2880	# Archives containing C++ object files must be created using
2881	# the KAI C++ compiler.
2882        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
2883        ;;
2884      RCC)
2885        # Rational C++ 2.4.1
2886        # FIXME: insert proper C++ library support
2887        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2888        ;;
2889      cxx)
2890        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
2891        _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 ${objdir}/so_locations -o $lib'
2892	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
2893	  echo "-hidden">> $lib.exp~
2894	  $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 $objdir/so_locations -o $lib~
2895	  $rm $lib.exp'
2896
2897        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2898        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2899
2900        # Commands to make compiler produce verbose output that lists
2901        # what "hidden" libraries, object files and flags are used when
2902        # linking a shared library.
2903        #
2904        # There doesn't appear to be a way to prevent this compiler from
2905        # explicitly linking system object files so we need to strip them
2906        # from the output so that they don't get included in the library
2907        # dependencies.
2908        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'
2909        ;;
2910      *)
2911        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2912          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2913         _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}${objdir}/so_locations -o $lib'
2914
2915          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2916          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2917
2918          # Commands to make compiler produce verbose output that lists
2919          # what "hidden" libraries, object files and flags are used when
2920          # linking a shared library.
2921          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2922
2923	else
2924          # FIXME: insert proper C++ library support
2925          _LT_AC_TAGVAR(ld_shlibs, $1)=no
2926	fi
2927        ;;
2928    esac
2929    ;;
2930  psos*)
2931    # FIXME: insert proper C++ library support
2932    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2933    ;;
2934  sco*)
2935    case $cc_basename in
2936      CC)
2937        # FIXME: insert proper C++ library support
2938        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2939        ;;
2940      *)
2941        # FIXME: insert proper C++ library support
2942        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2943        ;;
2944    esac
2945    ;;
2946  sunos4*)
2947    case $cc_basename in
2948      CC)
2949        # Sun C++ 4.x
2950        # FIXME: insert proper C++ library support
2951        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2952        ;;
2953      lcc)
2954        # Lucid
2955        # FIXME: insert proper C++ library support
2956        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2957        ;;
2958      *)
2959        # FIXME: insert proper C++ library support
2960        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2961        ;;
2962    esac
2963    ;;
2964  solaris*)
2965    case $cc_basename in
2966      CC)
2967	# Sun C++ 4.2, 5.x and Centerline C++
2968        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
2969        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2970        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2971        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
2972
2973        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2974        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2975        case $host_os in
2976          solaris2.[0-5] | solaris2.[0-5].*) ;;
2977          *)
2978            # The C++ compiler is used as linker so we must use $wl
2979            # flag to pass the commands to the underlying system
2980            # linker.
2981            # Supported since Solaris 2.6 (maybe 2.5.1?)
2982            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
2983            ;;
2984        esac
2985        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2986
2987        # Commands to make compiler produce verbose output that lists
2988        # what "hidden" libraries, object files and flags are used when
2989        # linking a shared library.
2990        #
2991        # There doesn't appear to be a way to prevent this compiler from
2992        # explicitly linking system object files so we need to strip them
2993        # from the output so that they don't get included in the library
2994        # dependencies.
2995        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2996
2997	# Archives containing C++ object files must be created using
2998	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
2999        # necessary to make sure instantiated templates are included
3000        # in the archive.
3001        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3002        ;;
3003      gcx)
3004        # Green Hills C++ Compiler
3005        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3006
3007        # The C++ compiler must be used to create the archive.
3008        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3009        ;;
3010      *)
3011        # GNU C++ compiler with Solaris linker
3012        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3013	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3014          if $CC --version | egrep -v '^2\.7' > /dev/null; then
3015            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3016            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3017		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3018
3019            # Commands to make compiler produce verbose output that lists
3020            # what "hidden" libraries, object files and flags are used when
3021            # linking a shared library.
3022            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3023          else
3024            # g++ 2.7 appears to require `-G' NOT `-shared' on this
3025            # platform.
3026            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3027            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3028		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3029
3030            # Commands to make compiler produce verbose output that lists
3031            # what "hidden" libraries, object files and flags are used when
3032            # linking a shared library.
3033            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3034          fi
3035
3036          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3037        fi
3038        ;;
3039    esac
3040    ;;
3041  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3042    _LT_AC_TAGVAR(archive_cmds_need_lc, $2)=no
3043    ;;
3044  tandem*)
3045    case $cc_basename in
3046      NCC)
3047        # NonStop-UX NCC 3.20
3048        # FIXME: insert proper C++ library support
3049        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3050        ;;
3051      *)
3052        # FIXME: insert proper C++ library support
3053        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3054        ;;
3055    esac
3056    ;;
3057  vxworks*)
3058    # FIXME: insert proper C++ library support
3059    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3060    ;;
3061  *)
3062    # FIXME: insert proper C++ library support
3063    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3064    ;;
3065esac
3066AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3067test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3068
3069# Figure out "hidden" C++ library dependencies from verbose
3070# compiler output whening linking a shared library.
3071cat > conftest.$ac_ext <<EOF
3072class Foo
3073{
3074public:
3075  Foo (void) { a = 0; }
3076private:
3077  int a;
3078};
3079EOF
3080
3081
3082if AC_TRY_EVAL(ac_compile); then
3083  # Parse the compiler output and extract the necessary
3084  # objects, libraries and library flags.
3085
3086  # Sentinel used to keep track of whether or not we are before
3087  # the conftest object file.
3088  pre_test_object_deps_done=no
3089
3090  # The `*' in the case matches for architectures that use `case' in
3091  # $output_verbose_cmd can trigger glob expansion during the loop
3092  # eval without this substitution.
3093  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3094
3095  for p in `eval $output_verbose_link_cmd`; do
3096    case $p in
3097
3098    -L* | -R* | -l*)
3099       # Some compilers place space between "-{L,R}" and the path.
3100       # Remove the space.
3101       if test $p = "-L" \
3102          || test $p = "-R"; then
3103         prev=$p
3104         continue
3105       else
3106         prev=
3107       fi
3108
3109       if test "$pre_test_object_deps_done" = no; then
3110         case $p in
3111	 -L* | -R*)
3112	   # Internal compiler library paths should come after those
3113	   # provided the user.  The postdeps already come after the
3114	   # user supplied libs so there is no need to process them.
3115           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3116             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3117           else
3118             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3119           fi
3120           ;;
3121         # The "-l" case would never come before the object being
3122         # linked, so don't bother handling this case.
3123         esac
3124       else
3125         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3126           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3127         else
3128           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3129         fi
3130       fi
3131       ;;
3132
3133    *.$objext)
3134       # This assumes that the test object file only shows up
3135       # once in the compiler output.
3136       if test "$p" = "conftest.$objext"; then
3137         pre_test_object_deps_done=yes
3138         continue
3139       fi
3140
3141       if test "$pre_test_object_deps_done" = no; then
3142         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3143           _LT_AC_TAGVAR(predep_objects, $1)="$p"
3144         else
3145           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3146         fi
3147       else
3148         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3149           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3150         else
3151           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3152         fi
3153       fi
3154       ;;
3155
3156    *) ;; # Ignore the rest.
3157
3158    esac
3159  done
3160
3161  # Clean up.
3162  rm -f a.out
3163else
3164  echo "ltcf-cxx.sh: error: problem compiling test program"
3165fi
3166
3167$rm -f confest.$objext
3168
3169case " $_LT_AC_TAGVAR(postdeps, $1) " in
3170*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3171*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3172esac
3173
3174_LT_AC_TAGVAR(GCC, $1)="$GXX"
3175_LT_AC_TAGVAR(LD, $1)="$LD"
3176
3177AC_LIBTOOL_PROG_COMPILER_PIC($1)
3178AC_LIBTOOL_PROG_CC_C_O($1)
3179AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3180AC_LIBTOOL_PROG_LD_SHLIBS($1)
3181AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3182AC_LIBTOOL_SYS_LIB_STRIP
3183AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3184AC_LIBTOOL_DLOPEN_SELF($1)
3185
3186AC_LIBTOOL_CONFIG($1)
3187
3188AC_LANG_POP
3189CC="$lt_save_CC"
3190])# AC_LIBTOOL_LANG_CXX_CONFIG
3191
3192
3193# AC_LIBTOOL_LANG_GCJ_CONFIG
3194# --------------------------
3195# Ensure that the configuration vars for the C compiler are
3196# suitably defined.  Those variables are subsequently used by
3197# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3198AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3199AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3200[AC_LANG_SAVE
3201
3202# Source file extension for C test sources.
3203ac_ext=java
3204
3205# Object file extension for compiled C test sources.
3206objext=o
3207_LT_AC_TAGVAR(objext, $1)=$objext
3208
3209# Code to be used in simple compile tests
3210lt_simple_compile_test_code="class foo {}"
3211
3212# Code to be used in simple link tests
3213lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
3214
3215# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3216_LT_AC_SYS_COMPILER
3217
3218# Allow CC to be a program name with arguments.
3219lt_save_CC="$CC"
3220CC=${GCJ-"gcj"}
3221set dummy $CC
3222compiler="[$]2"
3223_LT_AC_TAGVAR(compiler, $1)=$CC
3224
3225# GCJ did not exist at the time GCC didn't implicitly link libc in.
3226_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3227
3228AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3229AC_LIBTOOL_PROG_COMPILER_PIC($1)
3230AC_LIBTOOL_PROG_CC_C_O($1)
3231AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3232AC_LIBTOOL_PROG_LD_SHLIBS($1)
3233AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3234AC_LIBTOOL_SYS_LIB_STRIP
3235AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3236AC_LIBTOOL_DLOPEN_SELF($1)
3237
3238AC_LIBTOOL_CONFIG($1)
3239
3240AC_LANG_RESTORE
3241CC="$lt_save_CC"
3242])# AC_LIBTOOL_LANG_GCJ_CONFIG
3243
3244
3245# AC_LIBTOOL_CONFIG([TAGNAME])
3246# ----------------------------
3247# If TAGNAME is not passed, then create an initial libtool script
3248# with a default configuration from the untagged config vars.  Otherwise
3249# add code to config.status for appending the configuration named by
3250# TAGNAME from the matching tagged config vars.
3251AC_DEFUN([AC_LIBTOOL_CONFIG],
3252[# The else clause should only fire when bootstrapping the
3253# libtool distribution, otherwise you forgot to ship ltmain.sh
3254# with your package, and you will get complaints that there are
3255# no rules to generate ltmain.sh.
3256if test -f "$ltmain"; then
3257  # Now quote all the things that may contain metacharacters while being
3258  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3259  # variables and quote the copies for generation of the libtool script.
3260  for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S NM SHELL \
3261    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3262    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3263    deplibs_check_method reload_flag reload_cmds need_locks \
3264    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
3265    lt_cv_sys_global_symbol_to_c_name_address \
3266    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3267    old_postinstall_cmds old_postuninstall_cmds \
3268    _LT_AC_TAGVAR(compiler, $1) \
3269    _LT_AC_TAGVAR(CC, $1) \
3270    _LT_AC_TAGVAR(LD, $1) \
3271    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
3272    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
3273    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
3274    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
3275    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3276    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3277    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
3278    _LT_AC_TAGVAR(old_archive_cmds, $1) \
3279    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3280    _LT_AC_TAGVAR(predep_objects, $1) \
3281    _LT_AC_TAGVAR(postdep_objects, $1) \
3282    _LT_AC_TAGVAR(predeps, $1) \
3283    _LT_AC_TAGVAR(postdeps, $1) \
3284    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
3285    _LT_AC_TAGVAR(archive_cmds, $1) \
3286    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
3287    _LT_AC_TAGVAR(postinstall_cmds, $1) \
3288    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
3289    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
3290    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
3291    _LT_AC_TAGVAR(no_undefined_flag, $1) \
3292    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
3293    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
3294    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
3295    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3296    _LT_AC_TAGVAR(exclude_expsyms, $1) \
3297    _LT_AC_TAGVAR(include_expsyms, $1); do
3298
3299    case $var in
3300    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
3301    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3302    _LT_AC_TAGVAR(archive_cmds, $1) | \
3303    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3304    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3305    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3306    extract_expsyms_cmds | reload_cmds | finish_cmds | \
3307    postinstall_cmds | postuninstall_cmds | \
3308    old_postinstall_cmds | old_postuninstall_cmds | \
3309    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3310      # Double-quote double-evaled strings.
3311      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3312      ;;
3313    *)
3314      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3315      ;;
3316    esac
3317  done
3318
3319  case $lt_echo in
3320  *'\[$]0 --fallback-echo"')
3321    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
3322    ;;
3323  esac
3324
3325ifelse([$1], [],
3326  [cfgfile="${ofile}T"
3327  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
3328  $rm -f "$cfgfile"
3329  AC_MSG_NOTICE([creating $ofile])],
3330  [cfgfile="$ofile"])
3331
3332  cat <<__EOF__ >> "$cfgfile"
3333ifelse([$1], [],
3334[#! $SHELL
3335
3336# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3337# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3338# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3339#
3340# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3341# Free Software Foundation, Inc.
3342#
3343# This file is part of GNU Libtool:
3344# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3345#
3346# This program is free software; you can redistribute it and/or modify
3347# it under the terms of the GNU General Public License as published by
3348# the Free Software Foundation; either version 2 of the License, or
3349# (at your option) any later version.
3350#
3351# This program is distributed in the hope that it will be useful, but
3352# WITHOUT ANY WARRANTY; without even the implied warranty of
3353# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3354# General Public License for more details.
3355#
3356# You should have received a copy of the GNU General Public License
3357# along with this program; if not, write to the Free Software
3358# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3359#
3360# As a special exception to the GNU General Public License, if you
3361# distribute this file as part of a program that contains a
3362# configuration script generated by Autoconf, you may include it under
3363# the same distribution terms that you use for the rest of that program.
3364
3365# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3366Xsed="sed -e s/^X//"
3367
3368# The HP-UX ksh and POSIX shell print the target directory to stdout
3369# if CDPATH is set.
3370if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3371
3372# The names of the tagged configurations supported by this script.
3373available_tags=
3374
3375# ### BEGIN LIBTOOL CONFIG],
3376[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3377
3378# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3379
3380# Shell to use when invoking shell scripts.
3381SHELL=$lt_SHELL
3382
3383# Whether or not to build shared libraries.
3384build_libtool_libs=$enable_shared
3385
3386# Whether or not to build static libraries.
3387build_old_libs=$enable_static
3388
3389# Whether or not to add -lc for building shared libraries.
3390build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
3391
3392# Whether or not to optimize for fast installation.
3393fast_install=$enable_fast_install
3394
3395# The host system.
3396host_alias=$host_alias
3397host=$host
3398
3399# An echo program that does not interpret backslashes.
3400echo=$lt_echo
3401
3402# The archiver.
3403AR=$lt_AR
3404AR_FLAGS=$lt_AR_FLAGS
3405
3406# A C compiler.
3407LTCC=$LTCC
3408
3409# A language-specific compiler.
3410CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3411
3412# Is the compiler the GNU C compiler?
3413with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3414
3415# The linker used to build libraries.
3416LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3417
3418# Whether we need hard or soft links.
3419LN_S=$lt_LN_S
3420
3421# A BSD-compatible nm program.
3422NM=$lt_NM
3423
3424# A symbol stripping program
3425STRIP=$STRIP
3426
3427# Used to examine libraries when file_magic_cmd begins "file"
3428MAGIC_CMD=$MAGIC_CMD
3429
3430# Used on cygwin: DLL creation program.
3431DLLTOOL="$DLLTOOL"
3432
3433# Used on cygwin: object dumper.
3434OBJDUMP="$OBJDUMP"
3435
3436# Used on cygwin: assembler.
3437AS="$AS"
3438
3439# The name of the directory that contains temporary libtool files.
3440objdir=$objdir
3441
3442# How to create reloadable object files.
3443reload_flag=$lt_reload_flag
3444reload_cmds=$lt_reload_cmds
3445
3446# How to pass a linker flag through the compiler.
3447wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3448
3449# Object file suffix (normally "o").
3450objext="$ac_objext"
3451
3452# Old archive suffix (normally "a").
3453libext="$libext"
3454
3455# Executable file suffix (normally "").
3456exeext="$exeext"
3457
3458# Additional compiler flags for building library objects.
3459pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3460pic_mode=$pic_mode
3461
3462# What is the maximum length of a command?
3463max_cmd_len=$lt_cv_sys_max_cmd_len
3464
3465# Does compiler simultaneously support -c and -o options?
3466compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3467
3468# Must we lock files when doing compilation ?
3469need_locks=$lt_need_locks
3470
3471# Do we need the lib prefix for modules?
3472need_lib_prefix=$need_lib_prefix
3473
3474# Do we need a version for libraries?
3475need_version=$need_version
3476
3477# Whether dlopen is supported.
3478dlopen_support=$enable_dlopen
3479
3480# Whether dlopen of programs is supported.
3481dlopen_self=$enable_dlopen_self
3482
3483# Whether dlopen of statically linked programs is supported.
3484dlopen_self_static=$enable_dlopen_self_static
3485
3486# Compiler flag to prevent dynamic linking.
3487link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3488
3489# Compiler flag to turn off builtin functions.
3490no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3491
3492# Compiler flag to allow reflexive dlopens.
3493export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3494
3495# Compiler flag to generate shared objects directly from archives.
3496whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3497
3498# Compiler flag to generate thread-safe objects.
3499thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3500
3501# Library versioning type.
3502version_type=$version_type
3503
3504# Format of library name prefix.
3505libname_spec=$lt_libname_spec
3506
3507# List of archive names.  First name is the real one, the rest are links.
3508# The last name is the one that the linker finds with -lNAME.
3509library_names_spec=$lt_library_names_spec
3510
3511# The coded name of the library, if different from the real name.
3512soname_spec=$lt_soname_spec
3513
3514# Commands used to build and install an old-style archive.
3515RANLIB=$lt_RANLIB
3516old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3517old_postinstall_cmds=$lt_old_postinstall_cmds
3518old_postuninstall_cmds=$lt_old_postuninstall_cmds
3519
3520# Create an old-style archive from a shared archive.
3521old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3522
3523# Create a temporary old-style archive to link instead of a shared archive.
3524old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3525
3526# Commands used to build and install a shared archive.
3527archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3528archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3529postinstall_cmds=$lt_postinstall_cmds
3530postuninstall_cmds=$lt_postuninstall_cmds
3531
3532# Commands to strip libraries.
3533old_striplib=$lt_old_striplib
3534striplib=$lt_striplib
3535
3536# Dependencies to place before the objects being linked to create a
3537# shared library.
3538predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3539
3540# Dependencies to place after the objects being linked to create a
3541# shared library.
3542postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3543
3544# Dependencies to place before the objects being linked to create a
3545# shared library.
3546predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3547
3548# Dependencies to place after the objects being linked to create a
3549# shared library.
3550postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3551
3552# The library search path used internally by the compiler when linking
3553# a shared library.
3554compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3555
3556# Method to check whether dependent libraries are shared objects.
3557deplibs_check_method=$lt_deplibs_check_method
3558
3559# Command to use when deplibs_check_method == file_magic.
3560file_magic_cmd=$lt_file_magic_cmd
3561
3562# Flag that allows shared libraries with undefined symbols to be built.
3563allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3564
3565# Flag that forces no undefined symbols.
3566no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3567
3568# Commands used to finish a libtool library installation in a directory.
3569finish_cmds=$lt_finish_cmds
3570
3571# Same as above, but a single script fragment to be evaled but not shown.
3572finish_eval=$lt_finish_eval
3573
3574# Take the output of nm and produce a listing of raw symbols and C names.
3575global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3576
3577# Transform the output of nm in a proper C declaration
3578global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3579
3580# Transform the output of nm in a C name address pair
3581global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3582
3583# This is the shared library runtime path variable.
3584runpath_var=$runpath_var
3585
3586# This is the shared library path variable.
3587shlibpath_var=$shlibpath_var
3588
3589# Is shlibpath searched before the hard-coded library search path?
3590shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3591
3592# How to hardcode a shared library path into an executable.
3593hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3594
3595# Whether we should hardcode library paths into libraries.
3596hardcode_into_libs=$hardcode_into_libs
3597
3598# Flag to hardcode \$libdir into a binary during linking.
3599# This must work even if \$libdir does not exist.
3600hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3601
3602# Whether we need a single -rpath flag with a separated argument.
3603hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3604
3605# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3606# resulting binary.
3607hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3608
3609# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3610# resulting binary.
3611hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3612
3613# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3614# the resulting binary.
3615hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3616
3617# Variables whose values should be saved in libtool wrapper scripts and
3618# restored at relink time.
3619variables_saved_for_relink="$variables_saved_for_relink"
3620
3621# Whether libtool must link a program against all its dependency libraries.
3622link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3623
3624# Compile-time system search path for libraries
3625sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3626
3627# Run-time system search path for libraries
3628sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3629
3630# Fix the shell variable \$srcfile for the compiler.
3631fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3632
3633# Set to yes if exported symbols are required.
3634always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3635
3636# The commands to list exported symbols.
3637export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3638
3639# The commands to extract the exported symbol list from a shared archive.
3640extract_expsyms_cmds=$lt_extract_expsyms_cmds
3641
3642# Symbols that should not be listed in the preloaded symbols.
3643exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3644
3645# Symbols that must always be exported.
3646include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3647
3648ifelse([$1],[],
3649[# ### END LIBTOOL CONFIG],
3650[# ### END LIBTOOL TAG CONFIG: $tagname])
3651
3652__EOF__
3653
3654ifelse([$1],[], [
3655  case $host_os in
3656  aix3*)
3657    cat <<\EOF >> "$cfgfile"
3658
3659# AIX sometimes has problems with the GCC collect2 program.  For some
3660# reason, if we set the COLLECT_NAMES environment variable, the problems
3661# vanish in a puff of smoke.
3662if test "X${COLLECT_NAMES+set}" != Xset; then
3663  COLLECT_NAMES=
3664  export COLLECT_NAMES
3665fi
3666EOF
3667    ;;
3668
3669  cygwin* | mingw* | pw32* | os2*)
3670    cat <<'EOF' >> "$cfgfile"
3671    # This is a source program that is used to create dlls on Windows
3672    # Don't remove nor modify the starting and closing comments
3673    _LT_AC_FILE_LTDLL_C
3674    # This is a source program that is used to create import libraries
3675    # on Windows for dlls which lack them. Don't remove nor modify the
3676    # starting and closing comments
3677    _LT_AC_FILE_IMPGEN_C
3678EOF
3679    ;;
3680  esac
3681
3682  # We use sed instead of cat because bash on DJGPP gets confused if
3683  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3684  # text mode, it properly converts lines to CR/LF.  This bash problem
3685  # is reportedly fixed, but why not run on old versions too?
3686  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3687
3688  mv -f "$cfgfile" "$ofile" || \
3689    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3690  chmod +x "$ofile"
3691])
3692else
3693  # If there is no Makefile yet, we rely on a make rule to execute
3694  # `config.status --recheck' to rerun these tests and create the
3695  # libtool script then.
3696  test -f Makefile && make "$ltmain"
3697fi
3698])# AC_LIBTOOL_CONFIG
3699
3700
3701# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
3702# -------------------------------------------
3703AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
3704[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3705
3706_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3707
3708if test "$GCC" = yes; then
3709  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3710
3711  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3712    lt_cv_prog_compiler_rtti_exceptions,
3713    [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
3714    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3715fi
3716])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3717
3718
3719# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3720# ---------------------------------
3721AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
3722[AC_REQUIRE([AC_CANONICAL_HOST])
3723AC_REQUIRE([AC_PROG_NM])
3724AC_REQUIRE([AC_OBJEXT])
3725# Check for command to grab the raw symbol name followed by C symbol from nm.
3726AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3727AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3728[
3729# These are sane defaults that work on at least a few old systems.
3730# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3731
3732# Character class describing NM global symbol codes.
3733[symcode='[BCDEGRST]']
3734
3735# Regexp to match symbols that can be accessed directly from C.
3736[sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
3737
3738# Transform the above into a raw symbol and a C symbol.
3739symxfrm='\1 \2\3 \3'
3740
3741# Transform an extracted symbol line into a proper C declaration
3742lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
3743
3744# Transform an extracted symbol line into symbol name and symbol address
3745lt_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'"
3746
3747# Define system-specific variables.
3748case $host_os in
3749aix*)
3750  [symcode='[BCDT]']
3751  ;;
3752cygwin* | mingw* | pw32*)
3753  [symcode='[ABCDGISTW]']
3754  ;;
3755hpux*) # Its linker distinguishes data from code symbols
3756  if test "$host_cpu" = ia64; then
3757    [symcode='[ABCDEGRST]']
3758  fi
3759  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3760  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'"
3761  ;;
3762irix*)
3763  [symcode='[BCDEGRST]']
3764  ;;
3765solaris* | sysv5*)
3766  [symcode='[BDT]']
3767  ;;
3768sysv4)
3769  [symcode='[DFNSTU]']
3770  ;;
3771esac
3772
3773# Handle CRLF in mingw tool chain
3774opt_cr=
3775case $host_os in
3776mingw*)
3777  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3778  ;;
3779esac
3780
3781# If we're using GNU nm, then use its standard symbol codes.
3782if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3783  [symcode='[ABCDGISTW]']
3784fi
3785
3786# Try without a prefix undercore, then with it.
3787for ac_symprfx in "" "_"; do
3788
3789  # Write the raw and C identifiers.
3790lt_cv_sys_global_symbol_pipe=["sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
3791
3792  # Check to see that the pipe works correctly.
3793  pipe_works=no
3794
3795  rm -f conftest*
3796  cat > conftest.$ac_ext <<EOF
3797#ifdef __cplusplus
3798extern "C" {
3799#endif
3800char nm_test_var;
3801void nm_test_func(){}
3802#ifdef __cplusplus
3803}
3804#endif
3805int main(){nm_test_var='a';nm_test_func();return(0);}
3806EOF
3807
3808  if AC_TRY_EVAL(ac_compile); then
3809    # Now try to grab the symbols.
3810    nlist=conftest.nm
3811    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3812      # Try sorting and uniquifying the output.
3813      if sort "$nlist" | uniq > "$nlist"T; then
3814	mv -f "$nlist"T "$nlist"
3815      else
3816	rm -f "$nlist"T
3817      fi
3818
3819      # Make sure that we snagged all the symbols we need.
3820      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3821	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3822	  cat <<EOF > conftest.$ac_ext
3823#ifdef __cplusplus
3824extern "C" {
3825#endif
3826
3827EOF
3828	  # Now generate the symbol file.
3829	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3830
3831	  cat <<EOF >> conftest.$ac_ext
3832#if defined (__STDC__) && __STDC__
3833# define lt_ptr_t void *
3834#else
3835# define lt_ptr_t char *
3836# define const
3837#endif
3838
3839/* The mapping between symbol names and symbols. */
3840const struct {
3841  const char *name;
3842  lt_ptr_t address;
3843}
3844[lt_preloaded_symbols[] =]
3845{
3846EOF
3847	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
3848	  cat <<\EOF >> conftest.$ac_ext
3849  {0, (lt_ptr_t) 0}
3850};
3851
3852#ifdef __cplusplus
3853}
3854#endif
3855EOF
3856	  # Now try linking the two files.
3857	  mv conftest.$ac_objext conftstm.$ac_objext
3858	  lt_save_LIBS="$LIBS"
3859	  lt_save_CFLAGS="$CFLAGS"
3860	  LIBS="conftstm.$ac_objext"
3861	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3862	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3863	    pipe_works=yes
3864	  fi
3865	  LIBS="$lt_save_LIBS"
3866	  CFLAGS="$lt_save_CFLAGS"
3867	else
3868	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3869	fi
3870      else
3871	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3872      fi
3873    else
3874      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3875    fi
3876  else
3877    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3878    cat conftest.$ac_ext >&5
3879  fi
3880  rm -f conftest* conftst*
3881
3882  # Do not use the global_symbol_pipe unless it works.
3883  if test "$pipe_works" = yes; then
3884    break
3885  else
3886    lt_cv_sys_global_symbol_pipe=
3887  fi
3888done
3889])
3890if test -z "$lt_cv_sys_global_symbol_pipe"; then
3891  lt_cv_sys_global_symbol_to_cdecl=
3892fi
3893if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3894  AC_MSG_RESULT(failed)
3895else
3896  AC_MSG_RESULT(ok)
3897fi
3898]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3899
3900
3901# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
3902# ---------------------------------------
3903AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
3904[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
3905_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3906_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
3907
3908ifelse([$1],[CXX],[
3909  # C++ specific cases for pic, static, wl, etc.
3910  if test "$GXX" = yes; then
3911    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3912    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3913
3914    case $host_os in
3915    aix*)
3916      # All AIX code is PIC.
3917      if test "$host_cpu" = ia64; then
3918        # AIX 5 now supports IA64 processor
3919        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3920      fi
3921      ;;
3922    amigaos*)
3923      # FIXME: we need at least 68020 code to build shared libraries, but
3924      # adding the `-m68020' flag to GCC prevents building anything better,
3925      # like `-m68040'.
3926      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3927      ;;
3928    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
3929      # PIC is the default for these OSes.
3930      ;;
3931    cygwin* | mingw* | os2*)
3932      # This hack is so that the source file can tell whether it is being
3933      # built for inclusion in a dll (and should export symbols for example).
3934      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3935      ;;
3936    darwin* | rhapsody*)
3937      # PIC is the default on this platform
3938      # Common symbols not allowed in MH_DYLIB files
3939      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3940      ;;
3941    *djgpp*)
3942      # DJGPP does not support shared libraries at all
3943      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3944      ;;
3945    sysv4*MP*)
3946      if test -d /usr/nec; then
3947        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3948      fi
3949      ;;
3950    hpux*)
3951      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
3952      if test "$host_cpu" != ia64; then
3953        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3954      fi
3955      ;;
3956    *)
3957      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3958      ;;
3959    esac
3960  else
3961    case $host_os in
3962      aix4* | aix5*)
3963        # All AIX code is PIC.
3964        if test "$host_cpu" = ia64; then
3965          # AIX 5 now supports IA64 processor
3966          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3967        else
3968          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3969        fi
3970        ;;
3971      chorus*)
3972        case $cc_basename in
3973        cxch68)
3974          # Green Hills C++ Compiler
3975          # _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"
3976          ;;
3977        esac
3978        ;;
3979      dgux*)
3980        case $cc_basename in
3981          ec++)
3982            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3983            ;;
3984          ghcx)
3985            # Green Hills C++ Compiler
3986            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3987            ;;
3988          *)
3989            ;;
3990        esac
3991        ;;
3992      freebsd*)
3993        # FreeBSD uses GNU C++
3994        ;;
3995      hpux9* | hpux10* | hpux11*)
3996        case $cc_basename in
3997          CC)
3998            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3999            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4000            if test "$host_cpu" != ia64; then
4001              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4002            fi
4003            ;;
4004          aCC)
4005            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4006            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4007            if test "$host_cpu" != ia64; then
4008              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4009            fi
4010            ;;
4011          *)
4012            ;;
4013        esac
4014        ;;
4015      irix5* | irix6*)
4016        case $cc_basename in
4017          CC)
4018            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4019            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4020	    # CC pic flag -KPIC is the default.
4021            ;;
4022          *)
4023            ;;
4024        esac
4025        ;;
4026      linux*)
4027        case $cc_basename in
4028          KCC)
4029            # KAI C++ Compiler
4030            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4031            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4032            ;;
4033          cxx)
4034            # Compaq C++
4035            # Make sure the PIC flag is empty.  It appears that all Alpha
4036            # Linux and Compaq Tru64 Unix objects are PIC.
4037            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4038            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4039            ;;
4040          *)
4041            ;;
4042        esac
4043        ;;
4044      lynxos*)
4045        ;;
4046      m88k*)
4047        ;;
4048      mvs*)
4049        case $cc_basename in
4050          cxx)
4051            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4052            ;;
4053          *)
4054            ;;
4055        esac
4056        ;;
4057      netbsd*)
4058        ;;
4059      osf3* | osf4* | osf5*)
4060        case $cc_basename in
4061          KCC)
4062            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4063            ;;
4064          RCC)
4065            # Rational C++ 2.4.1
4066            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4067            ;;
4068          cxx)
4069            # Digital/Compaq C++
4070            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4071            # Make sure the PIC flag is empty.  It appears that all Alpha
4072            # Linux and Compaq Tru64 Unix objects are PIC.
4073            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4074            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4075            ;;
4076          *)
4077            ;;
4078        esac
4079        ;;
4080      psos*)
4081        ;;
4082      sco*)
4083        case $cc_basename in
4084          CC)
4085            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4086            ;;
4087          *)
4088            ;;
4089        esac
4090        ;;
4091      solaris*)
4092        case $cc_basename in
4093          CC)
4094            # Sun C++ 4.2, 5.x and Centerline C++
4095            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4096            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4097            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4098            ;;
4099          gcx)
4100            # Green Hills C++ Compiler
4101            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4102            ;;
4103          *)
4104            ;;
4105        esac
4106        ;;
4107      sunos4*)
4108        case $cc_basename in
4109          CC)
4110            # Sun C++ 4.x
4111            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4112            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4113            ;;
4114          lcc)
4115            # Lucid
4116            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4117            ;;
4118          *)
4119            ;;
4120        esac
4121        ;;
4122      tandem*)
4123        case $cc_basename in
4124          NCC)
4125            # NonStop-UX NCC 3.20
4126            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4127            ;;
4128          *)
4129            ;;
4130        esac
4131        ;;
4132      unixware*)
4133        ;;
4134      vxworks*)
4135        ;;
4136      *)
4137        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4138        ;;
4139    esac
4140  fi
4141],
4142[AC_MSG_CHECKING([for $compiler option to produce PIC])
4143  if test "$GCC" = yes; then
4144    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4145    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4146
4147    case $host_os in
4148      aix*)
4149      # All AIX code is PIC.
4150      if test "$host_cpu" = ia64; then
4151        # AIX 5 now supports IA64 processor
4152        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4153      fi
4154      ;;
4155
4156    amigaos*)
4157      # FIXME: we need at least 68020 code to build shared libraries, but
4158      # adding the `-m68020' flag to GCC prevents building anything better,
4159      # like `-m68040'.
4160      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4161      ;;
4162
4163    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4164      # PIC is the default for these OSes.
4165      ;;
4166
4167    cygwin* | mingw* | pw32* | os2*)
4168      # This hack is so that the source file can tell whether it is being
4169      # built for inclusion in a dll (and should export symbols for example).
4170      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4171      ;;
4172
4173    darwin* | rhapsody*)
4174      # PIC is the default on this platform
4175      # Common symbols not allowed in MH_DYLIB files
4176      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4177      ;;
4178
4179    msdosdjgpp*)
4180      # Just because we use GCC doesn't mean we suddenly get shared libraries
4181      # on systems that don't support them.
4182      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4183      enable_shared=no
4184      ;;
4185
4186    sysv4*MP*)
4187      if test -d /usr/nec; then
4188        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4189      fi
4190      ;;
4191
4192    hpux*)
4193      # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4194      if test "$host_cpu" != ia64; then
4195        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4196      fi
4197      ;;
4198
4199    *)
4200      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4201      ;;
4202    esac
4203  else
4204    # PORTME Check for flag to pass linker flags through the system compiler.
4205    case $host_os in
4206    aix*)
4207      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4208      if test "$host_cpu" = ia64; then
4209        # AIX 5 now supports IA64 processor
4210        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4211      else
4212        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4213      fi
4214      ;;
4215
4216    cygwin* | mingw* | pw32* | os2*)
4217      # This hack is so that the source file can tell whether it is being
4218      # built for inclusion in a dll (and should export symbols for example).
4219      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4220      ;;
4221
4222    hpux9* | hpux10* | hpux11*)
4223      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4224      if test "$host_cpu" != ia64; then
4225        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4226      fi
4227      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4228      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4229      ;;
4230
4231    irix5* | irix6*)
4232      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4233      # PIC (with -KPIC) is the default.
4234      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4235      ;;
4236
4237    newsos6)
4238      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4239      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4240      ;;
4241
4242    osf3* | osf4* | osf5*)
4243      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4244      # All OSF/1 code is PIC.
4245      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4246      ;;
4247
4248    sco3.2v5*)
4249      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4250      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4251      ;;
4252
4253    solaris*)
4254      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4255      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4256      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4257      ;;
4258
4259    sunos4*)
4260      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4261      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4262      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4263      ;;
4264
4265    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4266      if test "x$host_vendor" = xsni; then
4267        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4268      else
4269        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4270      fi
4271      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4272      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4273      ;;
4274
4275    sysv4*MP*)
4276      if test -d /usr/nec ;then
4277        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4278        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4279      fi
4280      ;;
4281
4282    uts4*)
4283      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4284      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4285      ;;
4286
4287    *)
4288      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4289      ;;
4290    esac
4291  fi
4292])
4293AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4294
4295#
4296# Check to make sure the PIC flag actually works.
4297#
4298if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4299  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4300    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4301    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
4302    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4303     "" | " "*) ;;
4304     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4305     esac],
4306    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4307     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4308fi
4309case "$host_os" in
4310  # For platforms which do not support PIC, -DPIC is meaningless:
4311  *djgpp*)
4312    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4313    ;;
4314  *)
4315    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
4316    ;;
4317esac
4318])
4319
4320
4321# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4322# ------------------------------------
4323# See if the linker supports building shared libraries.
4324AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4325[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4326ifelse([$1],[CXX],[],[
4327  runpath_var=
4328  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4329
4330  _LT_AC_TAGVAR(archive_cmds, $1)=
4331  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4332  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4333  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4334  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4335  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4336  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4337  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4338  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4339  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4340  _LT_AC_TAGVAR(hardcode_direct, $1)=no
4341  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4342  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4343  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4344  _LT_AC_TAGVAR(always_export_symbols, $1)=no
4345  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4346  # include_expsyms should be a list of space-separated symbols to be *always*
4347  # included in the symbol list
4348  _LT_AC_TAGVAR(include_expsyms, $1)=
4349  # exclude_expsyms can be an egrep regular expression of symbols to exclude
4350  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4351  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4352  # as well as any symbol that contains `d'.
4353  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4354  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4355  # platforms (ab)use it in PIC code, but their linkers get confused if
4356  # the symbol is explicitly referenced.  Since portable code cannot
4357  # rely on this symbol name, it's probably fine to never include it in
4358  # preloaded symbol tables.
4359  extract_expsyms_cmds=
4360
4361  case $host_os in
4362  cygwin* | mingw* | pw32*)
4363    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4364    # When not using gcc, we currently assume that we are using
4365    # Microsoft Visual C++.
4366    if test "$GCC" != yes; then
4367      with_gnu_ld=no
4368    fi
4369    ;;
4370  openbsd*)
4371    with_gnu_ld=no
4372    ;;
4373  esac
4374
4375  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4376  if test "$with_gnu_ld" = yes; then
4377    # If archive_cmds runs LD, not CC, wlarc should be empty
4378    wlarc='${wl}'
4379
4380    # See if GNU ld supports shared libraries.
4381    case $host_os in
4382    aix3* | aix4* | aix5*)
4383      # On AIX/PPC, the GNU linker is very broken
4384      if test "$host_cpu" != ia64; then
4385        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4386        cat <<EOF 1>&2
4387
4388*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4389*** to be unable to reliably create shared libraries on AIX.
4390*** Therefore, libtool is disabling shared libraries support.  If you
4391*** really care for shared libraries, you may want to modify your PATH
4392*** so that a non-GNU linker is found, and then restart.
4393
4394EOF
4395      fi
4396      ;;
4397
4398    amigaos*)
4399      _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)'
4400      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4401      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4402
4403      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4404      # that the semantics of dynamic libraries on AmigaOS, at least up
4405      # to version 4, is to share data among multiple programs linked
4406      # with the same dynamic library.  Since this doesn't match the
4407      # behavior of shared libraries on other platforms, we can't use
4408      # them.
4409      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4410      ;;
4411
4412    beos*)
4413      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4414        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4415        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4416        # support --undefined.  This deserves some investigation.  FIXME
4417        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4418      else
4419        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4420      fi
4421      ;;
4422
4423    cygwin* | mingw* | pw32*)
4424      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4425      # no search path for DLLs.
4426      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4427      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4428      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4429
4430      extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4431        sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4432        test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4433        if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4434        else $CC -o impgen impgen.c ; fi)~
4435        $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4436
4437      _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4438
4439      # cygwin and mingw dlls have different entry points and sets of symbols
4440      # to exclude.
4441      # FIXME: what about values for MSVC?
4442      dll_entry=__cygwin_dll_entry@12
4443      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4444      case $host_os in
4445      mingw*)
4446        # mingw values
4447        dll_entry=_DllMainCRTStartup@12
4448        dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
4449        ;;
4450      esac
4451
4452      # mingw and cygwin differ, and it's simplest to just exclude the union
4453      # of the two symbol sets.
4454      dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4455
4456      # recent cygwin and mingw systems supply a stub DllMain which the user
4457      # can override, but on older systems we have to supply one (in ltdll.c)
4458      if test "x$lt_cv_need_dllmain" = "xyes"; then
4459        ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4460        ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
4461  	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4462      else
4463        ltdll_obj=
4464        ltdll_cmds=
4465      fi
4466
4467      # Extract the symbol export list from an `--export-all' def file,
4468      # then regenerate the def file from the symbol export list, so that
4469      # the compiled dll only exports the symbol export list.
4470      # Be careful not to strip the DATA tag left by newer dlltools.
4471      _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
4472        $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4473        [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
4474
4475      # If the export-symbols file already is a .def file (1st line
4476      # is EXPORTS), use it as is.
4477      # If DATA tags from a recent dlltool are present, honour them!
4478      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
4479          cp $export_symbols $output_objdir/$soname-def;
4480        else
4481          echo EXPORTS > $output_objdir/$soname-def;
4482          _lt_hint=1;
4483          cat $export_symbols | while read symbol; do
4484           set dummy \$symbol;
4485           case \[$]# in
4486             2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4487             *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
4488           esac;
4489           _lt_hint=`expr 1 + \$_lt_hint`;
4490          done;
4491        fi~
4492        '"$ltdll_cmds"'
4493        $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4494        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
4495        $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4496        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
4497        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
4498      ;;
4499
4500    darwin* | rhapsody*)
4501      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4502      # FIXME: Relying on posixy $() will cause problems for
4503      #        cross-compilation, but unfortunately the echo tests do not
4504      #        yet detect zsh echo's removal of \ escapes.
4505      _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
4506      # We need to add '_' to the symbols in $export_symbols first
4507      #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
4508      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4509      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4510      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4511      ;;
4512
4513    netbsd*)
4514      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4515        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4516        wlarc=
4517      else
4518        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4519        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4520      fi
4521      ;;
4522
4523    solaris* | sysv5*)
4524      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
4525        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4526        cat <<EOF 1>&2
4527
4528*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4529*** create shared libraries on Solaris systems.  Therefore, libtool
4530*** is disabling shared libraries support.  We urge you to upgrade GNU
4531*** binutils to release 2.9.1 or newer.  Another option is to modify
4532*** your PATH or compiler configuration so that the native linker is
4533*** used, and then restart.
4534
4535EOF
4536      elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4537        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4538        _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'
4539      else
4540        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4541      fi
4542      ;;
4543
4544    sunos4*)
4545      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4546      wlarc=
4547      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4548      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4549      ;;
4550
4551    *)
4552      if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4553        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4554        _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'
4555      else
4556        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4557      fi
4558      ;;
4559    esac
4560
4561    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
4562      runpath_var=LD_RUN_PATH
4563      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4564      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4565      case $host_os in
4566      cygwin* | mingw* | pw32*)
4567        # dlltool doesn't understand --whole-archive et. al.
4568        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4569        ;;
4570      *)
4571        # ancient GNU ld didn't support --whole-archive et. al.
4572        if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
4573  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4574        else
4575  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4576        fi
4577        ;;
4578      esac
4579    fi
4580  else
4581    # PORTME fill in a description of your system's linker (not GNU ld)
4582    case $host_os in
4583    aix3*)
4584      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4585      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4586      _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'
4587      # Note: this linker hardcodes the directories in LIBPATH if there
4588      # are no directories specified by -L.
4589      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4590      if test "$GCC" = yes && test -z "$link_static_flag"; then
4591        # Neither direct hardcoding nor static linking is supported with a
4592        # broken collect2.
4593        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4594      fi
4595      ;;
4596
4597    aix4* | aix5*)
4598      if test "$host_cpu" = ia64; then
4599        # On IA64, the linker does run time linking by default, so we don't
4600        # have to do anything special.
4601        aix_use_runtimelinking=no
4602        exp_sym_flag='-Bexport'
4603        no_entry_flag=""
4604      else
4605        aix_use_runtimelinking=no
4606
4607        # Test if we are trying to use run time linking or normal
4608        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4609        # need to do runtime linking.
4610        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4611          for ld_flag in $LDFLAGS; do
4612  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4613  	    aix_use_runtimelinking=yes
4614  	    break
4615  	  fi
4616          done
4617        esac
4618
4619        exp_sym_flag='-bexport'
4620        no_entry_flag='-bnoentry'
4621      fi
4622
4623      # When large executables or shared objects are built, AIX ld can
4624      # have problems creating the table of contents.  If linking a library
4625      # or program results in "error TOC overflow" add -mminimal-toc to
4626      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4627      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4628
4629      _LT_AC_TAGVAR(archive_cmds, $1)=''
4630      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4631      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4632      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4633
4634      if test "$GCC" = yes; then
4635        case $host_os in aix4.[012]|aix4.[012].*)
4636        # We only want to do this on AIX 4.2 and lower, the check
4637        # below for broken collect2 doesn't work under 4.3+
4638          collect2name=`${CC} -print-prog-name=collect2`
4639          if test -f "$collect2name" && \
4640  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4641          then
4642  	  # We have reworked collect2
4643  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4644          else
4645  	  # We have old collect2
4646  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4647  	  # It fails to find uninstalled libraries when the uninstalled
4648  	  # path is not listed in the libpath.  Setting hardcode_minus_L
4649  	  # to unsupported forces relinking
4650  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4651  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4652  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4653          fi
4654        esac
4655        shared_flag='-shared'
4656      else
4657        # not using gcc
4658        if test "$host_cpu" = ia64; then
4659  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4660  	# chokes on -Wl,-G. The following line is correct:
4661          shared_flag='-G'
4662        else
4663  	if test "$aix_use_runtimelinking" = yes; then
4664            shared_flag='${wl}-G'
4665          else
4666            shared_flag='${wl}-bM:SRE'
4667  	fi
4668        fi
4669      fi
4670
4671      # It seems that -bexpall does not export symbols beginning with
4672      # underscore (_), so it is better to generate a list of symbols to export.
4673      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4674      if test "$aix_use_runtimelinking" = yes; then
4675        # Warning - without using the other runtime loading flags (-brtl),
4676        # -berok will link without error, but may produce a broken library.
4677        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4678       # Determine the default libpath from the value encoded in an empty executable.
4679       _LT_AC_SYS_LIBPATH_AIX
4680       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4681        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4682       else
4683        if test "$host_cpu" = ia64; then
4684          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4685          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4686          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4687        else
4688         # Determine the default libpath from the value encoded in an empty executable.
4689         _LT_AC_SYS_LIBPATH_AIX
4690         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4691          # Warning - without using the other run time loading flags,
4692          # -berok will link without error, but may produce a broken library.
4693          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4694          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4695          # -bexpall does not export symbols beginning with underscore (_)
4696          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4697          # Exported symbols can be pulled into shared objects from archives
4698          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4699          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4700          # This is similar to how AIX traditionally builds it's shared libraries.
4701          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4702        fi
4703      fi
4704      ;;
4705
4706    amigaos*)
4707      _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)'
4708      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4709      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4710      # see comment about different semantics on the GNU ld section
4711      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4712      ;;
4713
4714    bsdi4*)
4715      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4716      ;;
4717
4718    cygwin* | mingw* | pw32*)
4719      # When not using gcc, we currently assume that we are using
4720      # Microsoft Visual C++.
4721      # hardcode_libdir_flag_spec is actually meaningless, as there is
4722      # no search path for DLLs.
4723      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4724      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4725      # Tell ltmain to make .lib files, not .a files.
4726      libext=lib
4727      # FIXME: Setting linknames here is a bad hack.
4728      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4729      # The linker will automatically build a .lib file if we build a DLL.
4730      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4731      # FIXME: Should let the user specify the lib program.
4732      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4733      fix_srcfile_path='`cygpath -w "$srcfile"`'
4734      ;;
4735
4736    dgux*)
4737      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4738      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4739      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4740      ;;
4741
4742    freebsd1*)
4743      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4744      ;;
4745
4746    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4747    # support.  Future versions do this automatically, but an explicit c++rt0.o
4748    # does not break anything, and helps significantly (at the cost of a little
4749    # extra space).
4750    freebsd2.2*)
4751      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4752      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4753      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4754      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4755      ;;
4756
4757    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4758    freebsd2*)
4759      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4760      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4761      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4762      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4763      ;;
4764
4765    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4766    freebsd*)
4767      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4768      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4769      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4770      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4771      ;;
4772
4773    hpux9* | hpux10* | hpux11*)
4774      if test $GXX = yes; then
4775        case $host_os in
4776          hpux9*)
4777            _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'
4778            ;;
4779        *)
4780            if test "$host_cpu" = ia64; then
4781              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4782            else
4783              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4784            fi
4785            ;;
4786        esac
4787      else
4788        case $host_os in
4789          hpux9*)
4790            _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'
4791            ;;
4792          *)
4793            if test "$host_cpu" = ia64; then
4794              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4795            else
4796              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4797            fi
4798            ;;
4799        esac
4800      fi
4801      if test "$host_cpu" = ia64; then
4802        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4803        _LT_AC_TAGVAR(hardcode_direct, $1)=no
4804        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4805      else
4806        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4807        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4808        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4809      fi
4810      # hardcode_minus_L: Not really in the search PATH,
4811      # but as the default location of the library.
4812      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4813      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4814      ;;
4815
4816    irix5* | irix6*)
4817      if test "$GCC" = yes; then
4818        _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'
4819      else
4820        _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'
4821      fi
4822      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4823      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4824      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4825      ;;
4826
4827    netbsd*)
4828      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4829        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4830      else
4831        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4832      fi
4833      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4834      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4835      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4836      ;;
4837
4838    newsos6)
4839      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
4840      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4841      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4842      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4843      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4844      ;;
4845
4846    openbsd*)
4847      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4848      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4849
4850      case "$host_os" in
4851        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
4852          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4853          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4854        ;;
4855        *)
4856          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4857          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4858          if [ "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" -o "$host_os-$host_cpu" = "openbsd2.8-powerpc" ]; then
4859           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4860          fi
4861        ;;
4862      esac
4863      ;;
4864
4865    os2*)
4866      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4867      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4868      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4869      _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'
4870      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4871      ;;
4872
4873    osf3*)
4874      if test "$GCC" = yes; then
4875        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4876        _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'
4877      else
4878        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4879        _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'
4880      fi
4881      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4882      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4883      ;;
4884
4885    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4886      if test "$GCC" = yes; then
4887        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4888        _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'
4889        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4890      else
4891        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4892        _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'
4893        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4894        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
4895
4896        # Both c and cxx compiler support -rpath directly
4897        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4898      fi
4899      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4900      ;;
4901
4902    sco3.2v5*)
4903      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4904      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4905      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4906      runpath_var=LD_RUN_PATH
4907      hardcode_runpath_var=yes
4908      ;;
4909
4910    solaris*)
4911      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
4912      if test "$GXX" = yes; then
4913        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4914        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4915          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4916      else
4917        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4918        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4919  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4920      fi
4921      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4922      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4923      case $host_os in
4924      [solaris2.[0-5] | solaris2.[0-5].*]) ;;
4925      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
4926        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4927      esac
4928      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4929      ;;
4930
4931    sunos4*)
4932      if test "x$host_vendor" = xsequent; then
4933        # Use $CC to link under sequent, because it throws in some extra .o
4934        # files that make .init and .fini sections work.
4935        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4936      else
4937        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4938      fi
4939      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4940      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4941      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4942      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4943      ;;
4944
4945    sysv4)
4946      if test "x$host_vendor" = xsni; then
4947        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
4948        _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4949      else
4950        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4951        _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4952      fi
4953      runpath_var='LD_RUN_PATH'
4954      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4955      ;;
4956
4957    sysv4.3*)
4958      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4959      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4960      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4961      ;;
4962
4963    sysv4*MP*)
4964      if test -d /usr/nec; then
4965        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4966        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4967        runpath_var=LD_RUN_PATH
4968        hardcode_runpath_var=yes
4969        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4970      fi
4971      ;;
4972
4973    sysv4.2uw2*)
4974      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4975      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4976      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4977      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4978      hardcode_runpath_var=yes
4979      runpath_var=LD_RUN_PATH
4980      ;;
4981
4982   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
4983      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
4984      if test "$GCC" = yes; then
4985        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4986      else
4987        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4988      fi
4989      runpath_var='LD_RUN_PATH'
4990      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4991      ;;
4992
4993    sysv5*)
4994      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4995      # $CC -shared without GNU ld will not create a library from C++
4996      # object files and a static libstdc++, better avoid it by now
4997      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4998      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4999  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5000      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5001      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5002      runpath_var='LD_RUN_PATH'
5003      ;;
5004
5005    uts4*)
5006      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5007      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5008      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5009      ;;
5010
5011    *)
5012      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5013      ;;
5014    esac
5015  fi
5016])
5017AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5018test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5019
5020variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5021if test "$GCC" = yes; then
5022  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5023fi
5024
5025#
5026# Do we need to explicitly link libc?
5027#
5028_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5029if test "$enable_shared" = yes && test "$GCC" = yes; then
5030  case $_LT_AC_TAGVAR(archive_cmds, $1) in
5031  *'~'*)
5032    # FIXME: we may have to deal with multi-command sequences.
5033    ;;
5034  '$CC '*)
5035    # Test whether the compiler implicitly links with -lc since on some
5036    # systems, -lgcc has to come before -lc. If gcc already passes -lc
5037    # to ld, don't add -lc before -lgcc.
5038    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5039    $rm conftest*
5040    echo 'static int dummy;' > conftest.$ac_ext
5041
5042    if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5043      soname=conftest
5044      lib=conftest
5045      libobjs=conftest.$ac_objext
5046      deplibs=
5047      wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5048      compiler_flags=-v
5049      linker_flags=-v
5050      verstring=
5051      output_objdir=.
5052      libname=conftest
5053      lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5054      _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5055      if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5056      then
5057	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5058      else
5059	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5060      fi
5061      _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5062    else
5063      cat conftest.err 1>&5
5064    fi
5065    $rm conftest*
5066    AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5067    ;;
5068  esac
5069fi
5070])# AC_LIBTOOL_PROG_LD_SHLIBS
5071
5072
5073# _LT_AC_FILE_LTDLL_C
5074# -------------------
5075AC_DEFUN([_LT_AC_FILE_LTDLL_C],
5076[# /* ltdll.c starts here */
5077# #define WIN32_LEAN_AND_MEAN
5078# #include <windows.h>
5079# #undef WIN32_LEAN_AND_MEAN
5080# #include <stdio.h>
5081#
5082# #ifndef __CYGWIN__
5083# #  ifdef __CYGWIN32__
5084# #    define __CYGWIN__ __CYGWIN32__
5085# #  endif
5086# #endif
5087#
5088# #ifdef __cplusplus
5089# extern "C" {
5090# #endif
5091# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5092# #ifdef __cplusplus
5093# }
5094# #endif
5095#
5096# #ifdef __CYGWIN__
5097# #include <cygwin/cygwin_dll.h>
5098# DECLARE_CYGWIN_DLL( DllMain );
5099# #endif
5100# HINSTANCE __hDllInstance_base;
5101#
5102# BOOL APIENTRY
5103# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5104# {
5105#   __hDllInstance_base = hInst;
5106#   return TRUE;
5107# }
5108# /* ltdll.c ends here */
5109])# _LT_AC_FILE_LTDLL_C
5110
5111
5112# _LT_AC_FILE_IMPGEN_C
5113# --------------------
5114AC_DEFUN([_LT_AC_FILE_IMPGEN_C],
5115[# /* impgen.c starts here */
5116# /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5117#
5118#  This file is part of GNU libtool.
5119#
5120#  This program is free software; you can redistribute it and/or modify
5121#  it under the terms of the GNU General Public License as published by
5122#  the Free Software Foundation; either version 2 of the License, or
5123#  (at your option) any later version.
5124#
5125#  This program is distributed in the hope that it will be useful,
5126#  but WITHOUT ANY WARRANTY; without even the implied warranty of
5127#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5128#  GNU General Public License for more details.
5129#
5130#  You should have received a copy of the GNU General Public License
5131#  along with this program; if not, write to the Free Software
5132#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5133#  */
5134#
5135# #include <stdio.h>		/* for printf() */
5136# #include <unistd.h>		/* for open(), lseek(), read() */
5137# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
5138# #include <string.h>		/* for strdup() */
5139#
5140# /* O_BINARY isn't required (or even defined sometimes) under Unix */
5141# #ifndef O_BINARY
5142# #define O_BINARY 0
5143# #endif
5144#
5145# static unsigned int
5146# pe_get16 (fd, offset)
5147#      int fd;
5148#      int offset;
5149# {
5150#   unsigned char b[2];
5151#   lseek (fd, offset, SEEK_SET);
5152#   read (fd, b, 2);
5153#   return b[0] + (b[1]<<8);
5154# }
5155#
5156# static unsigned int
5157# pe_get32 (fd, offset)
5158#     int fd;
5159#     int offset;
5160# {
5161#   unsigned char b[4];
5162#   lseek (fd, offset, SEEK_SET);
5163#   read (fd, b, 4);
5164#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5165# }
5166#
5167# static unsigned int
5168# pe_as32 (ptr)
5169#      void *ptr;
5170# {
5171#   unsigned char *b = ptr;
5172#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5173# }
5174#
5175# int
5176# main (argc, argv)
5177#     int argc;
5178#     char *argv[];
5179# {
5180#     int dll;
5181#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5182#     unsigned long export_rva, export_size, nsections, secptr, expptr;
5183#     unsigned long name_rvas, nexp;
5184#     unsigned char *expdata, *erva;
5185#     char *filename, *dll_name;
5186#
5187#     filename = argv[1];
5188#
5189#     dll = open(filename, O_RDONLY|O_BINARY);
5190#     if (dll < 1)
5191# 	return 1;
5192#
5193#     dll_name = filename;
5194#
5195#     for (i=0; filename[i]; i++)
5196# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
5197# 	    dll_name = filename + i +1;
5198#
5199#     pe_header_offset = pe_get32 (dll, 0x3c);
5200#     opthdr_ofs = pe_header_offset + 4 + 20;
5201#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
5202#
5203#     if (num_entries < 1) /* no exports */
5204# 	return 1;
5205#
5206#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
5207#     export_size = pe_get32 (dll, opthdr_ofs + 100);
5208#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5209#     secptr = (pe_header_offset + 4 + 20 +
5210# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
5211#
5212#     expptr = 0;
5213#     for (i = 0; i < nsections; i++)
5214#     {
5215# 	char sname[8];
5216# 	unsigned long secptr1 = secptr + 40 * i;
5217# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5218# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5219# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5220# 	lseek(dll, secptr1, SEEK_SET);
5221# 	read(dll, sname, 8);
5222# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
5223# 	{
5224# 	    expptr = fptr + (export_rva - vaddr);
5225# 	    if (export_rva + export_size > vaddr + vsize)
5226# 		export_size = vsize - (export_rva - vaddr);
5227# 	    break;
5228# 	}
5229#     }
5230#
5231#     expdata = (unsigned char*)malloc(export_size);
5232#     lseek (dll, expptr, SEEK_SET);
5233#     read (dll, expdata, export_size);
5234#     erva = expdata - export_rva;
5235#
5236#     nexp = pe_as32 (expdata+24);
5237#     name_rvas = pe_as32 (expdata+32);
5238#
5239#     printf ("EXPORTS\n");
5240#     for (i = 0; i<nexp; i++)
5241#     {
5242# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5243# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5244#     }
5245#
5246#     return 0;
5247# }
5248# /* impgen.c ends here */
5249])# _LT_AC_FILE_IMPGEN_C
5250
5251# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5252# ---------------------------------
5253AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5254
5255
5256# old names
5257AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
5258AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
5259AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
5260AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5261AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5262AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
5263AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
5264
5265# This is just to silence aclocal about the macro not being used
5266ifelse([AC_DISABLE_FAST_INSTALL])
5267
5268AC_DEFUN([LT_AC_PROG_GCJ],
5269[AC_CHECK_TOOL(GCJ, gcj, no)
5270  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5271  AC_SUBST(GCJFLAGS)
5272])
5273
5274