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