1 # Local macros for the SDL configure.in script
3 dnl Function to link an architecture specific file
4 dnl LINK_ARCH_SRC(source_dir, arch, source_file)
5 AC_DEFUN([COPY_ARCH_SRC],
10 echo "Creating directory $1"
13 echo "Copying $old -> $new"
15 /* WARNING: This file was automatically generated!
22 ##############################################################################
23 dnl Configure Paths for Alsa
24 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
25 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
26 dnl Jaroslav Kysela <perex@suse.cz>
27 dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
28 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
29 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
30 dnl enables arguments --with-alsa-prefix=
31 dnl --with-alsa-enc-prefix=
32 dnl --disable-alsatest
34 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
35 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
37 AC_DEFUN([AM_PATH_ALSA],
38 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
39 alsa_save_CFLAGS="$CFLAGS"
40 alsa_save_LDFLAGS="$LDFLAGS"
41 alsa_save_LIBS="$LIBS"
45 dnl Get the cflags and libraries for alsa
47 AC_ARG_WITH(alsa-prefix,
48 [ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
49 [alsa_prefix="$withval"], [alsa_prefix=""])
51 AC_ARG_WITH(alsa-inc-prefix,
52 [ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
53 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
55 dnl FIXME: this is not yet implemented
56 AC_ARG_ENABLE(alsatest,
57 [ --disable-alsatest Do not try to compile and run a test Alsa program],
58 [enable_alsatest="$enableval"],
59 [enable_alsatest=yes])
61 dnl Add any special include directories
62 AC_MSG_CHECKING(for ALSA CFLAGS)
63 if test "$alsa_inc_prefix" != "" ; then
64 ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
65 CFLAGS="$CFLAGS -I$alsa_inc_prefix"
67 AC_MSG_RESULT($ALSA_CFLAGS)
69 dnl add any special lib dirs
70 AC_MSG_CHECKING(for ALSA LDFLAGS)
71 if test "$alsa_prefix" != "" ; then
72 ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
73 LDFLAGS="$LDFLAGS $ALSA_LIBS"
76 dnl add the alsa library
77 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
78 LIBS=`echo $LIBS | sed 's/-lm//'`
79 LIBS=`echo $LIBS | sed 's/-ldl//'`
80 LIBS=`echo $LIBS | sed 's/-lpthread//'`
81 LIBS=`echo $LIBS | sed 's/ //'`
82 LIBS="$ALSA_LIBS $LIBS"
83 AC_MSG_RESULT($ALSA_LIBS)
85 dnl Check for a working version of libasound that is of the right version.
86 min_alsa_version=ifelse([$1], ,0.1.1,$1)
87 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
89 alsa_min_major_version=`echo $min_alsa_version | \
90 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
91 alsa_min_minor_version=`echo $min_alsa_version | \
92 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
93 alsa_min_micro_version=`echo $min_alsa_version | \
94 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
99 #include <alsa/asoundlib.h>
101 /* ensure backward compatibility */
102 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
103 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
105 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
106 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
108 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
109 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
112 # if(SND_LIB_MAJOR > $alsa_min_major_version)
115 # if(SND_LIB_MAJOR < $alsa_min_major_version)
119 # if(SND_LIB_MINOR > $alsa_min_minor_version)
122 # if(SND_LIB_MINOR < $alsa_min_minor_version)
126 # if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
133 [AC_MSG_RESULT(found.)],
134 [AC_MSG_RESULT(not present.)
135 ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
140 dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
141 if test "x$enable_alsatest" = "xyes"; then
142 AC_CHECK_LIB([asound], [snd_ctl_open],,
143 [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
148 if test "x$alsa_found" = "xyes" ; then
149 ifelse([$2], , :, [$2])
150 LIBS=`echo $LIBS | sed 's/-lasound//g'`
151 LIBS=`echo $LIBS | sed 's/ //'`
152 LIBS="-lasound $LIBS"
154 if test "x$alsa_found" = "xno" ; then
155 ifelse([$3], , :, [$3])
156 CFLAGS="$alsa_save_CFLAGS"
157 LDFLAGS="$alsa_save_LDFLAGS"
158 LIBS="$alsa_save_LIBS"
163 dnl That should be it. Now just export out symbols:
164 AC_SUBST(ALSA_CFLAGS)
168 ##############################################################################
172 # Configure paths for ESD
173 # Manish Singh 98-9-30
174 # stolen back from Frank Belew
175 # stolen from Manish Singh
176 # Shamelessly stolen from Owen Taylor
178 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
179 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
181 AC_DEFUN([AM_PATH_ESD],
183 dnl Get the cflags and libraries from the esd-config script
185 AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
186 esd_prefix="$withval", esd_prefix="")
187 AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
188 esd_exec_prefix="$withval", esd_exec_prefix="")
189 AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
190 , enable_esdtest=yes)
192 if test x$esd_exec_prefix != x ; then
193 esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
194 if test x${ESD_CONFIG+set} != xset ; then
195 ESD_CONFIG=$esd_exec_prefix/bin/esd-config
198 if test x$esd_prefix != x ; then
199 esd_args="$esd_args --prefix=$esd_prefix"
200 if test x${ESD_CONFIG+set} != xset ; then
201 ESD_CONFIG=$esd_prefix/bin/esd-config
205 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
206 min_esd_version=ifelse([$1], ,0.2.7,$1)
207 AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
209 if test "$ESD_CONFIG" = "no" ; then
212 ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
213 ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
215 esd_major_version=`$ESD_CONFIG $esd_args --version | \
216 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
217 esd_minor_version=`$ESD_CONFIG $esd_args --version | \
218 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
219 esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
220 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
221 if test "x$enable_esdtest" = "xyes" ; then
222 ac_save_CFLAGS="$CFLAGS"
224 CFLAGS="$CFLAGS $ESD_CFLAGS"
225 LIBS="$LIBS $ESD_LIBS"
227 dnl Now check if the installed ESD is sufficiently new. (Also sanity
228 dnl checks the results of esd-config to some extent
238 my_strdup (char *str)
244 new_str = malloc ((strlen (str) + 1) * sizeof(char));
245 strcpy (new_str, str);
255 int major, minor, micro;
258 system ("touch conf.esdtest");
260 /* HP/UX 9 (%@#!) writes to sscanf strings */
261 tmp_version = my_strdup("$min_esd_version");
262 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
263 printf("%s, bad version string\n", "$min_esd_version");
267 if (($esd_major_version > major) ||
268 (($esd_major_version == major) && ($esd_minor_version > minor)) ||
269 (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
275 printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
276 printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
277 printf("*** best to upgrade to the required version.\n");
278 printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
279 printf("*** to point to the correct copy of esd-config, and remove the file\n");
280 printf("*** config.cache before re-running configure\n");
285 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
286 CFLAGS="$ac_save_CFLAGS"
290 if test "x$no_esd" = x ; then
292 ifelse([$2], , :, [$2])
295 if test "$ESD_CONFIG" = "no" ; then
296 echo "*** The esd-config script installed by ESD could not be found"
297 echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
298 echo "*** your path, or set the ESD_CONFIG environment variable to the"
299 echo "*** full path to esd-config."
301 if test -f conf.esdtest ; then
304 echo "*** Could not run ESD test program, checking why..."
305 CFLAGS="$CFLAGS $ESD_CFLAGS"
306 LIBS="$LIBS $ESD_LIBS"
311 [ echo "*** The test program compiled, but did not run. This usually means"
312 echo "*** that the run-time linker is not finding ESD or finding the wrong"
313 echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
314 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
315 echo "*** to the installed location Also, make sure you have run ldconfig if that"
316 echo "*** is required on your system"
318 echo "*** If you have an old version installed, it is best to remove it, although"
319 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
320 [ echo "*** The test program failed to compile or link. See the file config.log for the"
321 echo "*** exact error that occured. This usually means ESD was incorrectly installed"
322 echo "*** or that you have moved ESD since it was installed. In the latter case, you"
323 echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
324 CFLAGS="$ac_save_CFLAGS"
330 ifelse([$3], , :, [$3])
337 ##############################################################################
338 # Based on libtool-1.5.8
339 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
340 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
341 ## Free Software Foundation, Inc.
342 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
344 ## This program is free software; you can redistribute it and/or modify
345 ## it under the terms of the GNU General Public License as published by
346 ## the Free Software Foundation; either version 2 of the License, or
347 ## (at your option) any later version.
349 ## This program is distributed in the hope that it will be useful, but
350 ## WITHOUT ANY WARRANTY; without even the implied warranty of
351 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
352 ## General Public License for more details.
354 ## You should have received a copy of the GNU General Public License
355 ## along with this program; if not, write to the Free Software
356 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
358 ## As a special exception to the GNU General Public License, if you
359 ## distribute this file as part of a program that contains a
360 ## configuration script generated by Autoconf, you may include it under
361 ## the same distribution terms that you use for the rest of that program.
363 # serial 47 AC_PROG_LIBTOOL
366 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
367 # -----------------------------------------------------------
368 # If this macro is not defined by Autoconf, define it here.
369 m4_ifdef([AC_PROVIDE_IFELSE],
371 [m4_define([AC_PROVIDE_IFELSE],
372 [m4_ifdef([AC_PROVIDE_$1],
378 AC_DEFUN([AC_PROG_LIBTOOL],
379 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
380 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
381 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
382 AC_PROVIDE_IFELSE([AC_PROG_CXX],
384 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
386 dnl And a similar setup for Fortran 77 support
387 AC_PROVIDE_IFELSE([AC_PROG_F77],
389 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
392 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
393 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
394 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
395 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
397 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
399 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
401 [ifdef([AC_PROG_GCJ],
402 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
403 ifdef([A][M_PROG_GCJ],
404 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
405 ifdef([LT_AC_PROG_GCJ],
406 [define([LT_AC_PROG_GCJ],
407 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
408 ])])# AC_PROG_LIBTOOL
413 AC_DEFUN([_AC_PROG_LIBTOOL],
414 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
415 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
416 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
417 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
419 # This can be used to rebuild libtool when needed
420 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
422 # Always use our own libtool.
423 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
426 # Prevent multiple expansion
427 define([AC_PROG_LIBTOOL], [])
433 AC_DEFUN([AC_LIBTOOL_SETUP],
435 AC_REQUIRE([AC_ENABLE_SHARED])dnl
436 AC_REQUIRE([AC_ENABLE_STATIC])dnl
437 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
438 AC_REQUIRE([AC_CANONICAL_HOST])dnl
439 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
440 AC_REQUIRE([AC_PROG_CC])dnl
441 AC_REQUIRE([AC_PROG_LD])dnl
442 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
443 AC_REQUIRE([AC_PROG_NM])dnl
445 AC_REQUIRE([AC_PROG_LN_S])dnl
446 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
447 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
448 AC_REQUIRE([AC_OBJEXT])dnl
449 AC_REQUIRE([AC_EXEEXT])dnl
452 AC_LIBTOOL_SYS_MAX_CMD_LEN
453 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
456 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
457 _LT_AC_PROG_ECHO_BACKSLASH
461 # AIX sometimes has problems with the GCC collect2 program. For some
462 # reason, if we set the COLLECT_NAMES environment variable, the problems
463 # vanish in a puff of smoke.
464 if test "X${COLLECT_NAMES+set}" != Xset; then
471 # Sed substitution that helps us do robust quoting. It backslashifies
472 # metacharacters that are still active within double-quoted strings.
474 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
476 # Same as above, but do not quote variable references.
477 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
479 # Sed substitution to delay expansion of an escaped shell variable in a
480 # double_quote_subst'ed string.
481 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
483 # Sed substitution to avoid accidental globbing in evaled expressions
484 no_glob_subst='s/\*/\\\*/g'
490 default_ofile=libtool
493 # All known linkers require a `.a' archive for static linking (except M$VC,
494 # which needs '.lib').
496 ltmain="$ac_aux_dir/ltmain.sh"
497 ofile="$default_ofile"
498 with_gnu_ld="$lt_cv_prog_gnu_ld"
500 AC_CHECK_TOOL(AR, ar, false)
501 AC_CHECK_TOOL(RANLIB, ranlib, :)
502 AC_CHECK_TOOL(STRIP, strip, :)
507 # Set sane defaults for various variables
508 test -z "$AR" && AR=ar
509 test -z "$AR_FLAGS" && AR_FLAGS=cru
510 test -z "$AS" && AS=as
511 test -z "$CC" && CC=cc
512 test -z "$LTCC" && LTCC=$CC
513 test -z "$DLLTOOL" && DLLTOOL=dlltool
514 test -z "$LD" && LD=ld
515 test -z "$LN_S" && LN_S="ln -s"
516 test -z "$MAGIC_CMD" && MAGIC_CMD=file
517 test -z "$NM" && NM=nm
518 test -z "$SED" && SED=sed
519 test -z "$OBJDUMP" && OBJDUMP=objdump
520 test -z "$RANLIB" && RANLIB=:
521 test -z "$STRIP" && STRIP=:
522 test -z "$ac_objext" && ac_objext=o
524 # Determine commands to create old-style static archives.
525 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
526 old_postinstall_cmds='chmod 644 $oldlib'
527 old_postuninstall_cmds=
529 if test -n "$RANLIB"; then
532 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
535 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
538 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
541 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
543 # Only perform the check for file, if the check method requires it
544 case $deplibs_check_method in
546 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
552 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
553 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
554 enable_win32_dll=yes, enable_win32_dll=no)
556 AC_ARG_ENABLE([libtool-lock],
557 [AC_HELP_STRING([--disable-libtool-lock],
558 [avoid locking (might break parallel builds)])])
559 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
562 [AC_HELP_STRING([--with-pic],
563 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
564 [pic_mode="$withval"],
566 test -z "$pic_mode" && pic_mode=default
568 # Use C for the default configuration in the libtool script
570 AC_LIBTOOL_LANG_C_CONFIG
575 # _LT_AC_SYS_COMPILER
576 # -------------------
577 AC_DEFUN([_LT_AC_SYS_COMPILER],
578 [AC_REQUIRE([AC_PROG_CC])dnl
580 # If no C compiler was specified, use CC.
583 # Allow CC to be a program name with arguments.
585 ])# _LT_AC_SYS_COMPILER
588 # _LT_AC_SYS_LIBPATH_AIX
589 # ----------------------
590 # Links a minimal program and checks the executable
591 # for the system default hardcoded library path. In most cases,
592 # this is /usr/lib:/lib, but when the MPI compilers are used
593 # the location of the communication and MPI libs are included too.
594 # If we don't find anything, use the default library path according
595 # to the aix ld manual.
596 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
597 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
598 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
600 # Check for a 64-bit object if we didn't find anything.
601 if 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; }
603 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
604 ])# _LT_AC_SYS_LIBPATH_AIX
607 # _LT_AC_SHELL_INIT(ARG)
608 # ----------------------
609 AC_DEFUN([_LT_AC_SHELL_INIT],
610 [ifdef([AC_DIVERSION_NOTICE],
611 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
612 [AC_DIVERT_PUSH(NOTICE)])
615 ])# _LT_AC_SHELL_INIT
618 # _LT_AC_PROG_ECHO_BACKSLASH
619 # --------------------------
620 # Add some code to the start of the generated configure script which
621 # will find an echo command which doesn't interpret backslashes.
622 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
624 # Check that we are running under the correct shell.
625 SHELL=${CONFIG_SHELL-/bin/sh}
629 # Remove one level of quotation (which was required for Make).
630 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
635 if test "X[$]1" = X--no-reexec; then
636 # Discard the --no-reexec flag, and continue.
638 elif test "X[$]1" = X--fallback-echo; then
639 # Avoid inline document here, it may be left over
641 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
642 # Yippee, $echo works!
645 # Restart under the correct shell.
646 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
649 if test "X[$]1" = X--fallback-echo; then
650 # used as fallback echo
658 # The HP-UX ksh and POSIX shell print the target directory to stdout
660 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
662 if test -z "$ECHO"; then
663 if test "X${echo_test_string+set}" != Xset; then
664 # find a string as large as possible, as long as the shell can cope with it
665 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
666 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
667 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
668 echo_test_string="`eval $cmd`" &&
669 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
676 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
677 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
678 test "X$echo_testing_string" = "X$echo_test_string"; then
681 # The Solaris, AIX, and Digital Unix default echo programs unquote
682 # backslashes. This makes it impossible to quote backslashes using
683 # echo "$something" | sed 's/\\/\\\\/g'
685 # So, first we look for a working echo in the user's PATH.
687 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
688 for dir in $PATH /usr/ucb; do
690 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
691 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
692 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
693 test "X$echo_testing_string" = "X$echo_test_string"; then
700 if test "X$echo" = Xecho; then
701 # We didn't find a better echo, so look for alternatives.
702 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
703 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
704 test "X$echo_testing_string" = "X$echo_test_string"; then
705 # This shell has a builtin print -r that does the trick.
707 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
708 test "X$CONFIG_SHELL" != X/bin/ksh; then
709 # If we have ksh, try running configure again with it.
710 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
711 export ORIGINAL_CONFIG_SHELL
712 CONFIG_SHELL=/bin/ksh
714 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
718 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
719 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
720 test "X$echo_testing_string" = "X$echo_test_string"; then
723 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
724 test "X$echo_testing_string" = 'X\t' &&
725 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
726 test "X$echo_testing_string" = "X$echo_test_string"; then
727 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
729 SHELL="$CONFIG_SHELL"
731 echo="$CONFIG_SHELL [$]0 --fallback-echo"
732 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
733 test "X$echo_testing_string" = 'X\t' &&
734 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
735 test "X$echo_testing_string" = "X$echo_test_string"; then
736 echo="$CONFIG_SHELL [$]0 --fallback-echo"
738 # maybe with a smaller string...
741 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
742 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
749 if test "$prev" != 'sed 50q "[$]0"'; then
750 echo_test_string=`eval $prev`
751 export echo_test_string
752 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
754 # Oops. We lost completely, so just stick with echo.
763 # Copy echo and quote the copy suitably for passing to libtool from
764 # the Makefile, instead of quoting the original, which is used later.
766 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
767 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
771 ])])# _LT_AC_PROG_ECHO_BACKSLASH
776 AC_DEFUN([_LT_AC_LOCK],
777 [AC_ARG_ENABLE([libtool-lock],
778 [AC_HELP_STRING([--disable-libtool-lock],
779 [avoid locking (might break parallel builds)])])
780 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
782 # Some flags need to be propagated to the compiler or linker for good
786 # Find out which ABI we are using.
787 echo 'int i;' > conftest.$ac_ext
788 if AC_TRY_EVAL(ac_compile); then
789 case `/usr/bin/file conftest.$ac_objext` in
801 # Find out which ABI we are using.
802 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
803 if AC_TRY_EVAL(ac_compile); then
804 if test "$lt_cv_prog_gnu_ld" = yes; then
805 case `/usr/bin/file conftest.$ac_objext` in
807 LD="${LD-ld} -melf32bsmip"
810 LD="${LD-ld} -melf32bmipn32"
813 LD="${LD-ld} -melf64bmip"
817 case `/usr/bin/file conftest.$ac_objext` in
833 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
834 # Find out which ABI we are using.
835 echo 'int i;' > conftest.$ac_ext
836 if AC_TRY_EVAL(ac_compile); then
837 case "`/usr/bin/file conftest.o`" in
841 LD="${LD-ld} -m elf_i386"
843 ppc64-*linux*|powerpc64-*linux*)
844 LD="${LD-ld} -m elf32ppclinux"
847 LD="${LD-ld} -m elf_s390"
850 LD="${LD-ld} -m elf32_sparc"
857 LD="${LD-ld} -m elf_x86_64"
859 ppc*-*linux*|powerpc*-*linux*)
860 LD="${LD-ld} -m elf64ppc"
863 LD="${LD-ld} -m elf64_s390"
866 LD="${LD-ld} -m elf64_sparc"
876 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
877 SAVE_CFLAGS="$CFLAGS"
878 CFLAGS="$CFLAGS -belf"
879 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
881 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
883 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
884 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
885 CFLAGS="$SAVE_CFLAGS"
888 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
889 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
890 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
891 AC_CHECK_TOOL(AS, as, false)
892 AC_CHECK_TOOL(OBJDUMP, objdump, false)
897 need_locks="$enable_libtool_lock"
902 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
903 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
904 # ----------------------------------------------------------------
905 # Check whether the given compiler option works
906 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
907 [AC_REQUIRE([LT_AC_PROG_SED])
908 AC_CACHE_CHECK([$1], [$2],
910 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
911 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
912 lt_compiler_flag="$3"
913 # Insert the option either (1) after the last *FLAGS variable, or
914 # (2) before a word containing "conftest.", or (3) at the end.
915 # Note that $ac_compile itself does not contain backslashes and begins
916 # with a dollar sign (not a hyphen), so the echo should work correctly.
917 # The option is referenced via a variable to avoid confusing sed.
918 lt_compile=`echo "$ac_compile" | $SED \
919 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
920 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
921 -e 's:$: $lt_compiler_flag:'`
922 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
923 (eval "$lt_compile" 2>conftest.err)
925 cat conftest.err >&AS_MESSAGE_LOG_FD
926 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
927 if (exit $ac_status) && test -s "$ac_outfile"; then
928 # The compiler can only warn and ignore the option if not recognized
929 # So say no if there are warnings
930 if test ! -s conftest.err; then
937 if test x"[$]$2" = xyes; then
938 ifelse([$5], , :, [$5])
940 ifelse([$6], , :, [$6])
942 ])# AC_LIBTOOL_COMPILER_OPTION
945 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
946 # [ACTION-SUCCESS], [ACTION-FAILURE])
947 # ------------------------------------------------------------
948 # Check whether the given compiler option works
949 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
950 [AC_CACHE_CHECK([$1], [$2],
952 save_LDFLAGS="$LDFLAGS"
953 LDFLAGS="$LDFLAGS $3"
954 printf "$lt_simple_link_test_code" > conftest.$ac_ext
955 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
956 # The compiler can only warn and ignore the option if not recognized
957 # So say no if there are warnings
958 if test -s conftest.err; then
959 # Append any errors to the config.log.
960 cat conftest.err 1>&AS_MESSAGE_LOG_FD
966 LDFLAGS="$save_LDFLAGS"
969 if test x"[$]$2" = xyes; then
970 ifelse([$4], , :, [$4])
972 ifelse([$5], , :, [$5])
974 ])# AC_LIBTOOL_LINKER_OPTION
977 # AC_LIBTOOL_SYS_MAX_CMD_LEN
978 # --------------------------
979 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
980 [# find the maximum length of command line arguments
981 AC_MSG_CHECKING([the maximum length of command line arguments])
982 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
988 # On DJGPP, this test can blow up pretty badly due to problems in libc
989 # (any single argument exceeding 2000 bytes causes a buffer overrun
990 # during glob expansion). Even if it were fixed, the result of this
991 # check would be larger than it should be.
992 lt_cv_sys_max_cmd_len=12288; # 12K is about right
996 # Under GNU Hurd, this test is not required because there is
997 # no limit to the length of command line arguments.
998 # Libtool will interpret -1 as no limit whatsoever
999 lt_cv_sys_max_cmd_len=-1;
1003 # On Win9x/ME, this test blows up -- it succeeds, but takes
1004 # about 5 minutes as the teststring grows exponentially.
1005 # Worse, since 9x/ME are not pre-emptively multitasking,
1006 # you end up with a "frozen" computer, even though with patience
1007 # the test eventually succeeds (with a max line length of 256k).
1008 # Instead, let's just punt: use the minimum linelength reported by
1009 # all of the supported platforms: 8192 (on NT/2K/XP).
1010 lt_cv_sys_max_cmd_len=8192;
1014 # On AmigaOS with pdksh, this test takes hours, literally.
1015 # So we just punt and use a minimum line length of 8192.
1016 lt_cv_sys_max_cmd_len=8192;
1019 netbsd* | freebsd* | openbsd* | darwin* )
1020 # This has been around since 386BSD, at least. Likely further.
1021 if test -x /sbin/sysctl; then
1022 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1023 elif test -x /usr/sbin/sysctl; then
1024 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1026 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
1028 # And add a safety zone
1029 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1033 # If test is not a shell built-in, we'll probably end up computing a
1034 # maximum length that is only half of the actual maximum length, but
1036 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1037 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1038 = "XX$teststring") >/dev/null 2>&1 &&
1039 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1040 lt_cv_sys_max_cmd_len=$new_result &&
1041 test $i != 17 # 1/2 MB should be enough
1044 teststring=$teststring$teststring
1047 # Add a significant safety factor because C++ compilers can tack on massive
1048 # amounts of additional arguments before passing them to the linker.
1049 # It appears as though 1/2 is a usable value.
1050 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1054 if test -n $lt_cv_sys_max_cmd_len ; then
1055 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1059 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1062 # _LT_AC_CHECK_DLFCN
1063 # --------------------
1064 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1065 [AC_CHECK_HEADERS(dlfcn.h)dnl
1066 ])# _LT_AC_CHECK_DLFCN
1069 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1070 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1071 # ------------------------------------------------------------------
1072 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1073 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1074 if test "$cross_compiling" = yes; then :
1077 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1078 lt_status=$lt_dlunknown
1079 cat > conftest.$ac_ext <<EOF
1080 [#line __oline__ "configure"
1081 #include "confdefs.h"
1090 # define LT_DLGLOBAL RTLD_GLOBAL
1093 # define LT_DLGLOBAL DL_GLOBAL
1095 # define LT_DLGLOBAL 0
1099 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1100 find out it does not work in some platform. */
1101 #ifndef LT_DLLAZY_OR_NOW
1103 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1106 # define LT_DLLAZY_OR_NOW DL_LAZY
1109 # define LT_DLLAZY_OR_NOW RTLD_NOW
1112 # define LT_DLLAZY_OR_NOW DL_NOW
1114 # define LT_DLLAZY_OR_NOW 0
1122 extern "C" void exit (int);
1125 void fnord() { int i=42;}
1128 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1129 int status = $lt_dlunknown;
1133 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1134 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1135 /* dlclose (self); */
1141 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1142 (./conftest; exit; ) 2>/dev/null
1145 x$lt_dlno_uscore) $1 ;;
1146 x$lt_dlneed_uscore) $2 ;;
1147 x$lt_unknown|x*) $3 ;;
1150 # compilation failed
1155 ])# _LT_AC_TRY_DLOPEN_SELF
1158 # AC_LIBTOOL_DLOPEN_SELF
1159 # -------------------
1160 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1161 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1162 if test "x$enable_dlopen" != xyes; then
1163 enable_dlopen=unknown
1164 enable_dlopen_self=unknown
1165 enable_dlopen_self_static=unknown
1172 lt_cv_dlopen="load_add_on"
1174 lt_cv_dlopen_self=yes
1178 lt_cv_dlopen="LoadLibrary"
1183 lt_cv_dlopen="dlopen"
1188 # if libdl is installed we need to link against it
1189 AC_CHECK_LIB([dl], [dlopen],
1190 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1193 lt_cv_dlopen_self=yes
1198 AC_CHECK_FUNC([shl_load],
1199 [lt_cv_dlopen="shl_load"],
1200 [AC_CHECK_LIB([dld], [shl_load],
1201 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1202 [AC_CHECK_FUNC([dlopen],
1203 [lt_cv_dlopen="dlopen"],
1204 [AC_CHECK_LIB([dl], [dlopen],
1205 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1206 [AC_CHECK_LIB([svld], [dlopen],
1207 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1208 [AC_CHECK_LIB([dld], [dld_link],
1209 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1218 if test "x$lt_cv_dlopen" != xno; then
1224 case $lt_cv_dlopen in
1226 save_CPPFLAGS="$CPPFLAGS"
1227 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1229 save_LDFLAGS="$LDFLAGS"
1230 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1233 LIBS="$lt_cv_dlopen_libs $LIBS"
1235 AC_CACHE_CHECK([whether a program can dlopen itself],
1236 lt_cv_dlopen_self, [dnl
1237 _LT_AC_TRY_DLOPEN_SELF(
1238 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1239 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1242 if test "x$lt_cv_dlopen_self" = xyes; then
1243 LDFLAGS="$LDFLAGS $link_static_flag"
1244 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1245 lt_cv_dlopen_self_static, [dnl
1246 _LT_AC_TRY_DLOPEN_SELF(
1247 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1248 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1252 CPPFLAGS="$save_CPPFLAGS"
1253 LDFLAGS="$save_LDFLAGS"
1258 case $lt_cv_dlopen_self in
1259 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1260 *) enable_dlopen_self=unknown ;;
1263 case $lt_cv_dlopen_self_static in
1264 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1265 *) enable_dlopen_self_static=unknown ;;
1268 ])# AC_LIBTOOL_DLOPEN_SELF
1271 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1272 # ---------------------------------
1273 # Check to see if options -c and -o are simultaneously supported by compiler
1274 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1275 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1276 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1277 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1278 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1279 $rm -r conftest 2>/dev/null
1283 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1285 lt_compiler_flag="-o out/conftest2.$ac_objext"
1286 # Insert the option either (1) after the last *FLAGS variable, or
1287 # (2) before a word containing "conftest.", or (3) at the end.
1288 # Note that $ac_compile itself does not contain backslashes and begins
1289 # with a dollar sign (not a hyphen), so the echo should work correctly.
1290 lt_compile=`echo "$ac_compile" | $SED \
1291 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1292 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1293 -e 's:$: $lt_compiler_flag:'`
1294 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1295 (eval "$lt_compile" 2>out/conftest.err)
1297 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1298 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1299 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1301 # The compiler can only warn and ignore the option if not recognized
1302 # So say no if there are warnings
1303 if test ! -s out/conftest.err; then
1304 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1309 # SGI C++ compiler will create directory out/ii_files/ for
1310 # template instantiation
1311 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1312 $rm out/* && rmdir out
1317 ])# AC_LIBTOOL_PROG_CC_C_O
1320 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1321 # -----------------------------------------
1322 # Check to see if we can do hard links to lock some files if needed
1323 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1324 [AC_REQUIRE([_LT_AC_LOCK])dnl
1326 hard_links="nottested"
1327 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1328 # do not overwrite the value of need_locks provided by the user
1329 AC_MSG_CHECKING([if we can lock with hard links])
1332 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1334 ln conftest.a conftest.b 2>&5 || hard_links=no
1335 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1336 AC_MSG_RESULT([$hard_links])
1337 if test "$hard_links" = no; then
1338 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1344 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1349 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1350 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1351 [rm -f .libs 2>/dev/null
1352 mkdir .libs 2>/dev/null
1353 if test -d .libs; then
1356 # MS-DOS does not allow filenames that begin with a dot.
1359 rmdir .libs 2>/dev/null])
1360 objdir=$lt_cv_objdir
1361 ])# AC_LIBTOOL_OBJDIR
1364 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1365 # ----------------------------------------------
1366 # Check hardcoding attributes.
1367 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1368 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1369 _LT_AC_TAGVAR(hardcode_action, $1)=
1370 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1371 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1372 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1374 # We can hardcode non-existant directories.
1375 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1376 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1377 # have to relink, otherwise we might link with an installed library
1378 # when we should be linking with a yet-to-be-installed one
1379 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1380 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1381 # Linking always hardcodes the temporary library directory.
1382 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1384 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1385 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1388 # We cannot hardcode anything, or else we can only hardcode existing
1390 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1392 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1394 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1395 # Fast installation is not supported
1396 enable_fast_install=no
1397 elif test "$shlibpath_overrides_runpath" = yes ||
1398 test "$enable_shared" = no; then
1399 # Fast installation is not necessary
1400 enable_fast_install=needless
1402 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1405 # AC_LIBTOOL_SYS_LIB_STRIP
1406 # ------------------------
1407 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1410 AC_MSG_CHECKING([whether stripping libraries is possible])
1411 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1412 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1413 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1414 AC_MSG_RESULT([yes])
1416 # FIXME - insert some real tests, host_os isn't really good enough
1419 if test -n "$STRIP" ; then
1420 striplib="$STRIP -x"
1421 AC_MSG_RESULT([yes])
1431 ])# AC_LIBTOOL_SYS_LIB_STRIP
1434 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1435 # -----------------------------
1436 # PORTME Fill in your ld.so characteristics
1437 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1438 [AC_MSG_CHECKING([dynamic linker characteristics])
1440 libname_spec='lib$name'
1448 shlibpath_overrides_runpath=unknown
1450 dynamic_linker="$host_os ld.so"
1451 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1452 if test "$GCC" = yes; then
1453 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1454 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1455 # if the path contains ";" then we assume it to be the separator
1456 # otherwise default to the standard path separator (i.e. ":") - it is
1457 # assumed that no part of a normal pathname contains ";" but that should
1458 # okay in the real world where ";" in dirpaths is itself problematic.
1459 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1461 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1464 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1466 need_lib_prefix=unknown
1467 hardcode_into_libs=no
1469 # when you set need_version to no, make sure it does not cause -set_version
1470 # flags to be left without arguments
1471 need_version=unknown
1476 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1477 shlibpath_var=LIBPATH
1479 # AIX 3 has no versioning support, so we append a major version to the name.
1480 soname_spec='${libname}${release}${shared_ext}$major'
1487 hardcode_into_libs=yes
1488 if test "$host_cpu" = ia64; then
1489 # AIX 5 supports IA64
1490 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1491 shlibpath_var=LD_LIBRARY_PATH
1493 # With GCC up to 2.95.x, collect2 would create an import file
1494 # for dependence libraries. The import file would start with
1495 # the line `#! .'. This would cause the generated library to
1496 # depend on `.', always an invalid library. This was fixed in
1497 # development snapshots of GCC prior to 3.0.
1499 aix4 | aix4.[[01]] | aix4.[[01]].*)
1500 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1502 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1509 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1510 # soname into executable. Probably we can add versioning support to
1511 # collect2, so additional links can be useful in future.
1512 if test "$aix_use_runtimelinking" = yes; then
1513 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1514 # instead of lib<name>.a to let people know that these are not
1515 # typical AIX shared libraries.
1516 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1518 # We preserve .a as extension for shared libraries through AIX4.2
1519 # and later when we are not doing run time linking.
1520 library_names_spec='${libname}${release}.a $libname.a'
1521 soname_spec='${libname}${release}${shared_ext}$major'
1523 shlibpath_var=LIBPATH
1528 library_names_spec='$libname.ixlibrary $libname.a'
1529 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1530 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'
1534 library_names_spec='${libname}${shared_ext}'
1535 dynamic_linker="$host_os ld.so"
1536 shlibpath_var=LIBRARY_PATH
1542 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1543 soname_spec='${libname}${release}${shared_ext}$major'
1544 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1545 shlibpath_var=LD_LIBRARY_PATH
1546 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1547 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1548 # the default ld.so.conf also contains /usr/contrib/lib and
1549 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1550 # libtool to hard-code these into programs
1553 cygwin* | mingw* | pw32*)
1554 version_type=windows
1559 case $GCC,$host_os in
1560 yes,cygwin* | yes,mingw* | yes,pw32*)
1561 library_names_spec='$libname.dll.a'
1562 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1563 postinstall_cmds='base_file=`basename \${file}`~
1564 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1565 dldir=$destdir/`dirname \$dlpath`~
1566 test -d \$dldir || mkdir -p \$dldir~
1567 $install_prog $dir/$dlname \$dldir/$dlname'
1568 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1569 dlpath=$dir/\$dldll~
1571 shlibpath_overrides_runpath=yes
1575 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1576 #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1577 soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
1578 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1581 # MinGW DLLs use traditional 'lib' prefix
1582 #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1583 soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
1584 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1585 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1586 # It is most probably a Windows format PATH printed by
1587 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1588 # path with ; separators, and with drive letters. We can handle the
1589 # drive letters (cygwin fileutils understands them), so leave them,
1590 # especially as we might pass files found there to a mingw objdump,
1591 # which wouldn't understand a cygwinified path. Ahh.
1592 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1594 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1598 # pw32 DLLs use 'pw' prefix rather than 'lib'
1599 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1605 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1608 dynamic_linker='Win32 ld.exe'
1609 # FIXME: first we should search . and the directory the executable is in
1613 darwin* | rhapsody*)
1614 dynamic_linker="$host_os dyld"
1618 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1619 soname_spec='${libname}${release}${major}$shared_ext'
1620 shlibpath_overrides_runpath=yes
1621 shlibpath_var=DYLD_LIBRARY_PATH
1622 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1623 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1624 if test "$GCC" = yes; then
1625 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"`
1627 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1629 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1636 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1637 soname_spec='${libname}${release}${shared_ext}$major'
1638 shlibpath_var=LD_LIBRARY_PATH
1649 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1650 soname_spec='${libname}${release}${shared_ext}$major'
1651 shlibpath_var=LD_LIBRARY_PATH
1652 shlibpath_overrides_runpath=no
1653 hardcode_into_libs=yes
1654 dynamic_linker='GNU ld.so'
1658 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1659 version_type=freebsd-$objformat
1660 case $version_type in
1662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1667 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1671 shlibpath_var=LD_LIBRARY_PATH
1674 shlibpath_overrides_runpath=yes
1676 freebsd3.[01]* | freebsdelf3.[01]*)
1677 shlibpath_overrides_runpath=yes
1678 hardcode_into_libs=yes
1681 shlibpath_overrides_runpath=no
1682 hardcode_into_libs=yes
1691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1692 soname_spec='${libname}${release}${shared_ext}$major'
1693 shlibpath_var=LD_LIBRARY_PATH
1694 hardcode_into_libs=yes
1697 hpux9* | hpux10* | hpux11*)
1698 # Give a soname corresponding to the major version so that dld.sl refuses to
1699 # link against other versions.
1706 hardcode_into_libs=yes
1707 dynamic_linker="$host_os dld.so"
1708 shlibpath_var=LD_LIBRARY_PATH
1709 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1710 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1711 soname_spec='${libname}${release}${shared_ext}$major'
1712 if test "X$HPUX_IA64_MODE" = X32; then
1713 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1715 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1717 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1721 hardcode_into_libs=yes
1722 dynamic_linker="$host_os dld.sl"
1723 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1724 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1726 soname_spec='${libname}${release}${shared_ext}$major'
1727 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1728 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1732 dynamic_linker="$host_os dld.sl"
1733 shlibpath_var=SHLIB_PATH
1734 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1735 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1736 soname_spec='${libname}${release}${shared_ext}$major'
1739 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1740 postinstall_cmds='chmod 555 $lib'
1743 irix5* | irix6* | nonstopux*)
1745 nonstopux*) version_type=nonstopux ;;
1747 if test "$lt_cv_prog_gnu_ld" = yes; then
1755 soname_spec='${libname}${release}${shared_ext}$major'
1756 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1758 irix5* | nonstopux*)
1762 case $LD in # libtool.m4 will add one of these switches to LD
1763 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1764 libsuff= shlibsuff= libmagic=32-bit;;
1765 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1766 libsuff=32 shlibsuff=N32 libmagic=N32;;
1767 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1768 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1769 *) libsuff= shlibsuff= libmagic=never-match;;
1773 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1774 shlibpath_overrides_runpath=no
1775 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1776 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1777 hardcode_into_libs=yes
1780 # No shared lib support for Linux oldld, aout, or coff.
1781 linux*oldld* | linux*aout* | linux*coff*)
1785 # This must be Linux ELF.
1790 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1791 soname_spec='${libname}${release}${shared_ext}$major'
1792 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1793 shlibpath_var=LD_LIBRARY_PATH
1794 shlibpath_overrides_runpath=no
1795 # This implies no fast_install, which is unacceptable.
1796 # Some rework will be needed to allow for fast_install
1797 # before this can be enabled.
1798 hardcode_into_libs=yes
1800 # Append ld.so.conf contents to the search path
1801 if test -f /etc/ld.so.conf; then
1802 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1803 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1806 # We used to test for /lib/ld.so.1 and disable shared libraries on
1807 # powerpc, because MkLinux only supported shared libraries with the
1808 # GNU dynamic linker. Since this was broken with cross compilers,
1809 # most powerpc-linux boxes support dynamic linking these days and
1810 # people can always --disable-shared, the test was removed, and we
1811 # assume the GNU/Linux dynamic linker is in use.
1812 dynamic_linker='GNU/Linux ld.so'
1819 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1820 soname_spec='${libname}${release}${shared_ext}$major'
1821 shlibpath_var=LD_LIBRARY_PATH
1822 shlibpath_overrides_runpath=no
1823 hardcode_into_libs=yes
1824 dynamic_linker='GNU ld.so'
1831 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1832 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1833 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1834 dynamic_linker='NetBSD (a.out) ld.so'
1836 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1837 soname_spec='${libname}${release}${shared_ext}$major'
1838 dynamic_linker='NetBSD ld.elf_so'
1840 shlibpath_var=LD_LIBRARY_PATH
1841 shlibpath_overrides_runpath=yes
1842 hardcode_into_libs=yes
1847 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1848 shlibpath_var=LD_LIBRARY_PATH
1849 shlibpath_overrides_runpath=yes
1856 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1857 soname_spec='${libname}${release}${shared_ext}$major'
1858 shlibpath_var=LD_LIBRARY_PATH
1859 shlibpath_overrides_runpath=yes
1866 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1867 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1868 shlibpath_var=LD_LIBRARY_PATH
1869 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1871 openbsd2.[[89]] | openbsd2.[[89]].*)
1872 shlibpath_overrides_runpath=no
1875 shlibpath_overrides_runpath=yes
1879 shlibpath_overrides_runpath=yes
1884 libname_spec='$name'
1887 library_names_spec='$libname${shared_ext} $libname.a'
1888 dynamic_linker='OS/2 ld.exe'
1889 shlibpath_var=LIBPATH
1892 osf3* | osf4* | osf5*)
1896 soname_spec='${libname}${release}${shared_ext}$major'
1897 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1898 shlibpath_var=LD_LIBRARY_PATH
1899 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1900 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1905 soname_spec='${libname}${release}${shared_ext}$major'
1906 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1907 shlibpath_var=LD_LIBRARY_PATH
1914 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1915 soname_spec='${libname}${release}${shared_ext}$major'
1916 shlibpath_var=LD_LIBRARY_PATH
1917 shlibpath_overrides_runpath=yes
1918 hardcode_into_libs=yes
1919 # ldd complains unless libraries are executable
1920 postinstall_cmds='chmod +x $lib'
1925 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1926 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1927 shlibpath_var=LD_LIBRARY_PATH
1928 shlibpath_overrides_runpath=yes
1929 if test "$with_gnu_ld" = yes; then
1935 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1937 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1938 soname_spec='${libname}${release}${shared_ext}$major'
1939 shlibpath_var=LD_LIBRARY_PATH
1940 case $host_vendor in
1942 shlibpath_overrides_runpath=no
1944 export_dynamic_flag_spec='${wl}-Blargedynsym'
1945 runpath_var=LD_RUN_PATH
1953 shlibpath_overrides_runpath=no
1954 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1960 if test -d /usr/nec ;then
1962 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1963 soname_spec='$libname${shared_ext}.$major'
1964 shlibpath_var=LD_LIBRARY_PATH
1970 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1971 soname_spec='${libname}${release}${shared_ext}$major'
1972 shlibpath_var=LD_LIBRARY_PATH
1979 AC_MSG_RESULT([$dynamic_linker])
1980 test "$dynamic_linker" = no && can_build_shared=no
1981 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1986 AC_DEFUN([_LT_AC_TAGCONFIG],
1987 [AC_ARG_WITH([tags],
1988 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1989 [include additional configurations @<:@automatic@:>@])],
1990 [tagnames="$withval"])
1992 if test -f "$ltmain" && test -n "$tagnames"; then
1993 if test ! -f "${ofile}"; then
1994 AC_MSG_WARN([output file `$ofile' does not exist])
1997 if test -z "$LTCC"; then
1998 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1999 if test -z "$LTCC"; then
2000 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2002 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2006 # Extract list of available tagged configurations in $ofile.
2007 # Note that this assumes the entire list is on one line.
2008 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2010 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2011 for tagname in $tagnames; do
2013 # Check whether tagname contains only valid characters
2014 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2016 *) AC_MSG_ERROR([invalid tag name: $tagname])
2020 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2022 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2025 # Update the list of available tags.
2026 if test -n "$tagname"; then
2027 echo appending configuration tag \"$tagname\" to $ofile
2031 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2032 AC_LIBTOOL_LANG_CXX_CONFIG
2039 if test -n "$F77" && test "X$F77" != "Xno"; then
2040 AC_LIBTOOL_LANG_F77_CONFIG
2047 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2048 AC_LIBTOOL_LANG_GCJ_CONFIG
2055 AC_LIBTOOL_LANG_RC_CONFIG
2059 AC_MSG_ERROR([Unsupported tag name: $tagname])
2063 # Append the new tag name to the list of available tags.
2064 if test -n "$tagname" ; then
2065 available_tags="$available_tags $tagname"
2071 # Now substitute the updated list of available tags.
2072 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2073 mv "${ofile}T" "$ofile"
2077 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2080 ])# _LT_AC_TAGCONFIG
2085 # enable checks for dlopen support
2086 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2087 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2088 ])# AC_LIBTOOL_DLOPEN
2091 # AC_LIBTOOL_WIN32_DLL
2092 # --------------------
2093 # declare package support for building win32 dll's
2094 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2095 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2096 ])# AC_LIBTOOL_WIN32_DLL
2099 # AC_ENABLE_SHARED([DEFAULT])
2100 # ---------------------------
2101 # implement the --enable-shared flag
2102 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2103 AC_DEFUN([AC_ENABLE_SHARED],
2104 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2105 AC_ARG_ENABLE([shared],
2106 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2107 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2108 [p=${PACKAGE-default}
2110 yes) enable_shared=yes ;;
2111 no) enable_shared=no ;;
2114 # Look at the argument we got. We use all the common list separators.
2115 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2116 for pkg in $enableval; do
2118 if test "X$pkg" = "X$p"; then
2125 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2126 ])# AC_ENABLE_SHARED
2131 #- set the default shared flag to --disable-shared
2132 AC_DEFUN([AC_DISABLE_SHARED],
2133 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2134 AC_ENABLE_SHARED(no)
2135 ])# AC_DISABLE_SHARED
2138 # AC_ENABLE_STATIC([DEFAULT])
2139 # ---------------------------
2140 # implement the --enable-static flag
2141 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2142 AC_DEFUN([AC_ENABLE_STATIC],
2143 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2144 AC_ARG_ENABLE([static],
2145 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2146 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2147 [p=${PACKAGE-default}
2149 yes) enable_static=yes ;;
2150 no) enable_static=no ;;
2153 # Look at the argument we got. We use all the common list separators.
2154 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2155 for pkg in $enableval; do
2157 if test "X$pkg" = "X$p"; then
2164 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2165 ])# AC_ENABLE_STATIC
2170 # set the default static flag to --disable-static
2171 AC_DEFUN([AC_DISABLE_STATIC],
2172 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2173 AC_ENABLE_STATIC(no)
2174 ])# AC_DISABLE_STATIC
2177 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2178 # ---------------------------------
2179 # implement the --enable-fast-install flag
2180 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2181 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2182 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2183 AC_ARG_ENABLE([fast-install],
2184 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2185 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2186 [p=${PACKAGE-default}
2188 yes) enable_fast_install=yes ;;
2189 no) enable_fast_install=no ;;
2191 enable_fast_install=no
2192 # Look at the argument we got. We use all the common list separators.
2193 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2194 for pkg in $enableval; do
2196 if test "X$pkg" = "X$p"; then
2197 enable_fast_install=yes
2203 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2204 ])# AC_ENABLE_FAST_INSTALL
2207 # AC_DISABLE_FAST_INSTALL
2208 # -----------------------
2209 # set the default to --disable-fast-install
2210 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2211 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2212 AC_ENABLE_FAST_INSTALL(no)
2213 ])# AC_DISABLE_FAST_INSTALL
2216 # AC_LIBTOOL_PICMODE([MODE])
2217 # --------------------------
2218 # implement the --with-pic flag
2219 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2220 AC_DEFUN([AC_LIBTOOL_PICMODE],
2221 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2222 pic_mode=ifelse($#,1,$1,default)
2223 ])# AC_LIBTOOL_PICMODE
2228 # This is predefined starting with Autoconf 2.54, so this conditional
2229 # definition can be removed once we require Autoconf 2.54 or later.
2230 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2231 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2232 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2233 then ac_cv_prog_egrep='grep -E'
2234 else ac_cv_prog_egrep='egrep'
2236 EGREP=$ac_cv_prog_egrep
2241 # AC_PATH_TOOL_PREFIX
2242 # -------------------
2243 # find a file program which can recognise shared library
2244 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2245 [AC_REQUIRE([AC_PROG_EGREP])dnl
2246 AC_MSG_CHECKING([for $1])
2247 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2249 [[\\/*] | ?:[\\/]*])
2250 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2253 lt_save_MAGIC_CMD="$MAGIC_CMD"
2254 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2255 dnl $ac_dummy forces splitting on constant user-supplied paths.
2256 dnl POSIX.2 word splitting is done only on the output of word expansions,
2257 dnl not every word. This closes a longstanding sh security hole.
2258 ac_dummy="ifelse([$2], , $PATH, [$2])"
2259 for ac_dir in $ac_dummy; do
2261 test -z "$ac_dir" && ac_dir=.
2262 if test -f $ac_dir/$1; then
2263 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2264 if test -n "$file_magic_test_file"; then
2265 case $deplibs_check_method in
2267 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2268 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2269 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2270 $EGREP "$file_magic_regex" > /dev/null; then
2275 *** Warning: the command libtool uses to detect shared libraries,
2276 *** $file_magic_cmd, produces output that libtool cannot recognize.
2277 *** The result is that libtool may fail to recognize shared libraries
2278 *** as such. This will affect the creation of libtool libraries that
2279 *** depend on shared libraries, but programs linked with such libtool
2280 *** libraries will work regardless of this problem. Nevertheless, you
2281 *** may want to report the problem to your system manager and/or to
2282 *** bug-libtool@gnu.org
2292 MAGIC_CMD="$lt_save_MAGIC_CMD"
2295 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2296 if test -n "$MAGIC_CMD"; then
2297 AC_MSG_RESULT($MAGIC_CMD)
2301 ])# AC_PATH_TOOL_PREFIX
2306 # find a file program which can recognise a shared library
2307 AC_DEFUN([AC_PATH_MAGIC],
2308 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2309 if test -z "$lt_cv_path_MAGIC_CMD"; then
2310 if test -n "$ac_tool_prefix"; then
2311 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2321 # find the pathname to the GNU or non-GNU linker
2322 AC_DEFUN([AC_PROG_LD],
2323 [AC_ARG_WITH([gnu-ld],
2324 [AC_HELP_STRING([--with-gnu-ld],
2325 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2326 [test "$withval" = no || with_gnu_ld=yes],
2328 AC_REQUIRE([LT_AC_PROG_SED])dnl
2329 AC_REQUIRE([AC_PROG_CC])dnl
2330 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2331 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2333 if test "$GCC" = yes; then
2334 # Check if gcc -print-prog-name=ld gives a path.
2335 AC_MSG_CHECKING([for ld used by $CC])
2338 # gcc leaves a trailing carriage return which upsets mingw
2339 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2341 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2344 # Accept absolute paths.
2345 [[\\/]]* | ?:[[\\/]]*)
2346 re_direlt='/[[^/]][[^/]]*/\.\./'
2347 # Canonicalize the pathname of ld
2348 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2349 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2350 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2352 test -z "$LD" && LD="$ac_prog"
2355 # If it fails, then pretend we aren't using GCC.
2359 # If it is relative, then search for the first ld in PATH.
2363 elif test "$with_gnu_ld" = yes; then
2364 AC_MSG_CHECKING([for GNU ld])
2366 AC_MSG_CHECKING([for non-GNU ld])
2368 AC_CACHE_VAL(lt_cv_path_LD,
2369 [if test -z "$LD"; then
2370 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2371 for ac_dir in $PATH; do
2373 test -z "$ac_dir" && ac_dir=.
2374 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2375 lt_cv_path_LD="$ac_dir/$ac_prog"
2376 # Check to see if the program is GNU ld. I'd rather use --version,
2377 # but apparently some GNU ld's only accept -v.
2378 # Break only if it was the GNU/non-GNU ld that we prefer.
2379 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2380 *GNU* | *'with BFD'*)
2381 test "$with_gnu_ld" != no && break
2384 test "$with_gnu_ld" != yes && break
2391 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2394 if test -n "$LD"; then
2399 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2406 AC_DEFUN([AC_PROG_LD_GNU],
2407 [AC_REQUIRE([AC_PROG_EGREP])dnl
2408 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2409 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2410 case `$LD -v 2>&1 </dev/null` in
2411 *GNU* | *'with BFD'*)
2412 lt_cv_prog_gnu_ld=yes
2415 lt_cv_prog_gnu_ld=no
2418 with_gnu_ld=$lt_cv_prog_gnu_ld
2422 # AC_PROG_LD_RELOAD_FLAG
2423 # ----------------------
2424 # find reload flag for linker
2425 # -- PORTME Some linkers may need a different reload flag.
2426 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2427 [AC_CACHE_CHECK([for $LD option to reload object files],
2428 lt_cv_ld_reload_flag,
2429 [lt_cv_ld_reload_flag='-r'])
2430 reload_flag=$lt_cv_ld_reload_flag
2431 case $reload_flag in
2433 *) reload_flag=" $reload_flag" ;;
2435 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2438 if test "$GCC" = yes; then
2439 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2441 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2445 ])# AC_PROG_LD_RELOAD_FLAG
2448 # AC_DEPLIBS_CHECK_METHOD
2449 # -----------------------
2450 # how to check for library dependencies
2451 # -- PORTME fill in with the dynamic library characteristics
2452 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2453 [AC_CACHE_CHECK([how to recognise dependent libraries],
2454 lt_cv_deplibs_check_method,
2455 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2456 lt_cv_file_magic_test_file=
2457 lt_cv_deplibs_check_method='unknown'
2458 # Need to set the preceding variable on all platforms that support
2459 # interlibrary dependencies.
2460 # 'none' -- dependencies not supported.
2461 # `unknown' -- same as none, but documents that we really don't know.
2462 # 'pass_all' -- all dependencies passed with no checks.
2463 # 'test_compile' -- check by making test program.
2464 # 'file_magic [[regex]]' -- check by looking for files in library path
2465 # which responds to the $file_magic_cmd with a given extended regex.
2466 # If you have `file' or equivalent on your system and you're not sure
2467 # whether `pass_all' will *always* work, you probably want this one.
2471 lt_cv_deplibs_check_method=pass_all
2475 lt_cv_deplibs_check_method=pass_all
2479 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2480 lt_cv_file_magic_cmd='/usr/bin/file -L'
2481 lt_cv_file_magic_test_file=/shlib/libc.so
2485 # func_win32_libid is a shell function defined in ltmain.sh
2486 #lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2487 lt_cv_deplibs_check_method=pass_all
2488 lt_cv_file_magic_cmd='func_win32_libid'
2492 # Base MSYS/MinGW do not provide the 'file' command needed by
2493 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2494 #lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2495 lt_cv_deplibs_check_method=pass_all
2496 lt_cv_file_magic_cmd='$OBJDUMP -f'
2499 darwin* | rhapsody*)
2500 lt_cv_deplibs_check_method=pass_all
2503 freebsd* | kfreebsd*-gnu)
2504 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2507 # Not sure whether the presence of OpenBSD here was a mistake.
2508 # Let's accept both of them until this is cleared up.
2509 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2510 lt_cv_file_magic_cmd=/usr/bin/file
2511 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2515 lt_cv_deplibs_check_method=pass_all
2520 lt_cv_deplibs_check_method=pass_all
2523 hpux10.20* | hpux11*)
2524 lt_cv_file_magic_cmd=/usr/bin/file
2527 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2528 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2531 [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]']
2532 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2535 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2536 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2541 irix5* | irix6* | nonstopux*)
2543 *-32|*"-32 ") libmagic=32-bit;;
2544 *-n32|*"-n32 ") libmagic=N32;;
2545 *-64|*"-64 ") libmagic=64-bit;;
2546 *) libmagic=never-match;;
2548 lt_cv_deplibs_check_method=pass_all
2551 # This must be Linux ELF.
2554 alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
2555 lt_cv_deplibs_check_method=pass_all ;;
2557 # glibc up to 2.1.1 does not perform some relocations on ARM
2558 # this will be overridden with pass_all, but let us keep it just in case
2559 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2561 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2562 lt_cv_deplibs_check_method=pass_all
2566 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2567 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2569 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2574 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2575 lt_cv_file_magic_cmd=/usr/bin/file
2576 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2580 lt_cv_deplibs_check_method=unknown
2584 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2585 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2587 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2591 osf3* | osf4* | osf5*)
2592 lt_cv_deplibs_check_method=pass_all
2596 lt_cv_deplibs_check_method=pass_all
2600 lt_cv_deplibs_check_method=pass_all
2603 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2604 case $host_vendor in
2606 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]]'
2607 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2610 lt_cv_deplibs_check_method=pass_all
2613 lt_cv_file_magic_cmd='/bin/file'
2614 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2617 lt_cv_file_magic_cmd='/bin/file'
2618 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2619 lt_cv_file_magic_test_file=/lib/libc.so
2622 lt_cv_deplibs_check_method=pass_all
2627 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2628 lt_cv_deplibs_check_method=pass_all
2632 file_magic_cmd=$lt_cv_file_magic_cmd
2633 deplibs_check_method=$lt_cv_deplibs_check_method
2634 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2635 ])# AC_DEPLIBS_CHECK_METHOD
2640 # find the pathname to a BSD-compatible name lister
2641 AC_DEFUN([AC_PROG_NM],
2642 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2643 [if test -n "$NM"; then
2644 # Let the user override the test.
2647 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2648 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2650 test -z "$ac_dir" && ac_dir=.
2651 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2652 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2653 # Check to see if the nm accepts a BSD-compat flag.
2654 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2655 # nm: unknown option "B" ignored
2656 # Tru64's nm complains that /dev/null is an invalid object file
2657 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2658 */dev/null* | *'Invalid file or object type'*)
2659 lt_cv_path_NM="$tmp_nm -B"
2663 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2665 lt_cv_path_NM="$tmp_nm -p"
2669 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2670 continue # so that we can try to find one that supports BSD flags
2677 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2685 # check for math library
2686 AC_DEFUN([AC_CHECK_LIBM],
2687 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2690 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2691 # These system don't have libm, or don't need it
2694 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2695 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2698 AC_CHECK_LIB(m, cos, LIBM="-lm")
2704 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2705 # -----------------------------------
2706 # sets LIBLTDL to the link flags for the libltdl convenience library and
2707 # LTDLINCL to the include flags for the libltdl header and adds
2708 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2709 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2710 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2711 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2712 # '${top_srcdir}/' (note the single quotes!). If your package is not
2713 # flat and you're not using automake, define top_builddir and
2714 # top_srcdir appropriately in the Makefiles.
2715 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2716 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2717 case $enable_ltdl_convenience in
2718 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2719 "") enable_ltdl_convenience=yes
2720 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2722 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2723 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2724 # For backwards non-gettext consistent compatibility...
2726 ])# AC_LIBLTDL_CONVENIENCE
2729 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2730 # -----------------------------------
2731 # sets LIBLTDL to the link flags for the libltdl installable library and
2732 # LTDLINCL to the include flags for the libltdl header and adds
2733 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2734 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2735 # DIRECTORY is not provided and an installed libltdl is not found, it is
2736 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2737 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2738 # quotes!). If your package is not flat and you're not using automake,
2739 # define top_builddir and top_srcdir appropriately in the Makefiles.
2740 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2741 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2742 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2743 AC_CHECK_LIB(ltdl, lt_dlinit,
2744 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2745 [if test x"$enable_ltdl_install" = xno; then
2746 AC_MSG_WARN([libltdl not installed, but installation disabled])
2748 enable_ltdl_install=yes
2751 if test x"$enable_ltdl_install" = x"yes"; then
2752 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2753 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2754 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2756 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2760 # For backwards non-gettext consistent compatibility...
2762 ])# AC_LIBLTDL_INSTALLABLE
2767 # enable support for C++ libraries
2768 AC_DEFUN([AC_LIBTOOL_CXX],
2769 [AC_REQUIRE([_LT_AC_LANG_CXX])
2775 AC_DEFUN([_LT_AC_LANG_CXX],
2776 [AC_REQUIRE([AC_PROG_CXX])
2777 AC_REQUIRE([AC_PROG_CXXCPP])
2778 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2784 # enable support for Fortran 77 libraries
2785 AC_DEFUN([AC_LIBTOOL_F77],
2786 [AC_REQUIRE([_LT_AC_LANG_F77])
2792 AC_DEFUN([_LT_AC_LANG_F77],
2793 [AC_REQUIRE([AC_PROG_F77])
2794 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2800 # enable support for GCJ libraries
2801 AC_DEFUN([AC_LIBTOOL_GCJ],
2802 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2808 AC_DEFUN([_LT_AC_LANG_GCJ],
2809 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2810 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2811 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2812 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2813 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2814 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2815 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2821 # enable support for Windows resource files
2822 AC_DEFUN([AC_LIBTOOL_RC],
2823 [AC_REQUIRE([LT_AC_PROG_RC])
2824 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2828 # AC_LIBTOOL_LANG_C_CONFIG
2829 # ------------------------
2830 # Ensure that the configuration vars for the C compiler are
2831 # suitably defined. Those variables are subsequently used by
2832 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2833 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2834 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2838 # Source file extension for C test sources.
2841 # Object file extension for compiled C test sources.
2843 _LT_AC_TAGVAR(objext, $1)=$objext
2845 # Code to be used in simple compile tests
2846 lt_simple_compile_test_code="int some_variable = 0;\n"
2848 # Code to be used in simple link tests
2849 lt_simple_link_test_code='int main(){return(0);}\n'
2854 # Check for any special shared library compilation flags.
2856 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2857 if test "$GCC" = no; then
2860 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2864 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2865 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2866 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2868 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2869 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2875 # Check to make sure the static flag actually works.
2877 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2878 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2879 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2881 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2885 ## There is no encapsulation within the following macros, do not change
2886 ## the running order or otherwise move them around unless you know exactly
2887 ## what you are doing...
2888 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2889 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2890 AC_LIBTOOL_PROG_CC_C_O($1)
2891 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2892 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2893 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2894 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2895 AC_LIBTOOL_SYS_LIB_STRIP
2896 AC_LIBTOOL_DLOPEN_SELF($1)
2898 # Report which librarie types wil actually be built
2899 AC_MSG_CHECKING([if libtool supports shared libraries])
2900 AC_MSG_RESULT([$can_build_shared])
2902 AC_MSG_CHECKING([whether to build shared libraries])
2903 test "$can_build_shared" = "no" && enable_shared=no
2905 # On AIX, shared libraries and static libraries use the same namespace, and
2906 # are all built from PIC.
2909 test "$enable_shared" = yes && enable_static=no
2910 if test -n "$RANLIB"; then
2911 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2912 postinstall_cmds='$RANLIB $lib'
2917 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2918 test "$enable_shared" = yes && enable_static=no
2922 AC_MSG_RESULT([$enable_shared])
2924 AC_MSG_CHECKING([whether to build static libraries])
2925 # Make sure either enable_shared or enable_static is yes.
2926 test "$enable_shared" = yes || enable_static=yes
2927 AC_MSG_RESULT([$enable_static])
2929 AC_LIBTOOL_CONFIG($1)
2933 ])# AC_LIBTOOL_LANG_C_CONFIG
2936 # AC_LIBTOOL_LANG_CXX_CONFIG
2937 # --------------------------
2938 # Ensure that the configuration vars for the C compiler are
2939 # suitably defined. Those variables are subsequently used by
2940 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2941 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2942 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2944 AC_REQUIRE([AC_PROG_CXX])
2945 AC_REQUIRE([AC_PROG_CXXCPP])
2947 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2948 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2949 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2950 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2951 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2952 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2953 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2954 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2955 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2956 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2957 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2958 _LT_AC_TAGVAR(module_cmds, $1)=
2959 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2960 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2961 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2962 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2963 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2964 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2966 # Dependencies to place before and after the object being linked:
2967 _LT_AC_TAGVAR(predep_objects, $1)=
2968 _LT_AC_TAGVAR(postdep_objects, $1)=
2969 _LT_AC_TAGVAR(predeps, $1)=
2970 _LT_AC_TAGVAR(postdeps, $1)=
2971 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2973 # Source file extension for C++ test sources.
2976 # Object file extension for compiled C++ test sources.
2978 _LT_AC_TAGVAR(objext, $1)=$objext
2980 # Code to be used in simple compile tests
2981 lt_simple_compile_test_code="int some_variable = 0;\n"
2983 # Code to be used in simple link tests
2984 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2986 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2989 # Allow CC to be a program name with arguments.
2994 lt_save_with_gnu_ld=$with_gnu_ld
2995 lt_save_path_LD=$lt_cv_path_LD
2996 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2997 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2999 unset lt_cv_prog_gnu_ld
3001 if test -n "${lt_cv_path_LDCXX+set}"; then
3002 lt_cv_path_LD=$lt_cv_path_LDCXX
3006 test -z "${LDCXX+set}" || LD=$LDCXX
3009 _LT_AC_TAGVAR(compiler, $1)=$CC
3010 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3012 # We don't want -fno-exception wen compiling C++ code, so set the
3013 # no_builtin_flag separately
3014 if test "$GXX" = yes; then
3015 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3017 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3020 if test "$GXX" = yes; then
3021 # Set up default GNU C++ configuration
3025 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3026 # archiving commands below assume that GNU ld is being used.
3027 if test "$with_gnu_ld" = yes; then
3028 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3029 _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'
3031 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3032 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3034 # If archive_cmds runs LD, not CC, wlarc should be empty
3035 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3036 # investigate it a little bit more. (MM)
3039 # ancient GNU ld didn't support --whole-archive et. al.
3040 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3041 grep 'no-whole-archive' > /dev/null; then
3042 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3044 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3050 # A generic and very simple default shared library creation
3051 # command for GNU C++ for the case where it uses the native
3052 # linker, instead of GNU ld. If possible, this setting should
3053 # overridden to take advantage of the native linker features on
3054 # the platform it is being used on.
3055 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3058 # Commands to make compiler produce verbose output that lists
3059 # what "hidden" libraries, object files and flags are used when
3060 # linking a shared library.
3061 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3069 # PORTME: fill in a description of your system's C++ link characteristics
3070 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3071 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3074 # FIXME: insert proper C++ library support
3075 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3078 if test "$host_cpu" = ia64; then
3079 # On IA64, the linker does run time linking by default, so we don't
3080 # have to do anything special.
3081 aix_use_runtimelinking=no
3082 exp_sym_flag='-Bexport'
3085 aix_use_runtimelinking=no
3087 # Test if we are trying to use run time linking or normal
3088 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3089 # need to do runtime linking.
3090 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3091 for ld_flag in $LDFLAGS; do
3094 aix_use_runtimelinking=yes
3101 exp_sym_flag='-bexport'
3102 no_entry_flag='-bnoentry'
3105 # When large executables or shared objects are built, AIX ld can
3106 # have problems creating the table of contents. If linking a library
3107 # or program results in "error TOC overflow" add -mminimal-toc to
3108 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3109 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3111 _LT_AC_TAGVAR(archive_cmds, $1)=''
3112 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3113 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3114 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3116 if test "$GXX" = yes; then
3117 case $host_os in aix4.[012]|aix4.[012].*)
3118 # We only want to do this on AIX 4.2 and lower, the check
3119 # below for broken collect2 doesn't work under 4.3+
3120 collect2name=`${CC} -print-prog-name=collect2`
3121 if test -f "$collect2name" && \
3122 strings "$collect2name" | grep resolve_lib_name >/dev/null
3124 # We have reworked collect2
3125 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3127 # We have old collect2
3128 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3129 # It fails to find uninstalled libraries when the uninstalled
3130 # path is not listed in the libpath. Setting hardcode_minus_L
3131 # to unsupported forces relinking
3132 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3133 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3134 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3137 shared_flag='-shared'
3140 if test "$host_cpu" = ia64; then
3141 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3142 # chokes on -Wl,-G. The following line is correct:
3145 if test "$aix_use_runtimelinking" = yes; then
3146 shared_flag='${wl}-G'
3148 shared_flag='${wl}-bM:SRE'
3153 # It seems that -bexpall does not export symbols beginning with
3154 # underscore (_), so it is better to generate a list of symbols to export.
3155 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3156 if test "$aix_use_runtimelinking" = yes; then
3157 # Warning - without using the other runtime loading flags (-brtl),
3158 # -berok will link without error, but may produce a broken library.
3159 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3160 # Determine the default libpath from the value encoded in an empty executable.
3161 _LT_AC_SYS_LIBPATH_AIX
3162 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3164 _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"
3166 if test "$host_cpu" = ia64; then
3167 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3168 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3169 _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"
3171 # Determine the default libpath from the value encoded in an empty executable.
3172 _LT_AC_SYS_LIBPATH_AIX
3173 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3174 # Warning - without using the other run time loading flags,
3175 # -berok will link without error, but may produce a broken library.
3176 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3177 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3178 # -bexpall does not export symbols beginning with underscore (_)
3179 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3180 # Exported symbols can be pulled into shared objects from archives
3181 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3182 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3183 # This is similar to how AIX traditionally builds it's shared libraries.
3184 _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'
3189 case $cc_basename in
3191 # FIXME: insert proper C++ library support
3192 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3198 cygwin* | mingw* | pw32*)
3199 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3200 # as there is no search path for DLLs.
3201 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3202 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3203 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3204 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3206 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3207 ## _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'
3208 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
3209 # If the export-symbols file already is a .def file (1st line
3210 # is EXPORTS), use it as is; otherwise, prepend...
3211 ## _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3212 ## cp $export_symbols $output_objdir/$soname.def;
3214 ## echo EXPORTS > $output_objdir/$soname.def;
3215 ## cat $export_symbols >> $output_objdir/$soname.def;
3217 ## $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'
3218 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3219 cp $export_symbols $output_objdir/$soname.def;
3221 echo EXPORTS > $output_objdir/$soname.def;
3222 cat $export_symbols >> $output_objdir/$soname.def;
3224 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
3226 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3229 darwin* | rhapsody*)
3231 rhapsody* | darwin1.[[012]])
3232 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3235 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3236 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3238 case ${MACOSX_DEPLOYMENT_TARGET} in
3240 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3243 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3249 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3250 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3251 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3252 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3253 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3254 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3256 if test "$GXX" = yes ; then
3257 lt_int_apple_cc_single_mod=no
3258 output_verbose_link_cmd='echo'
3259 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3260 lt_int_apple_cc_single_mod=yes
3262 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3263 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3265 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3267 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3268 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3269 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3270 _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}'
3272 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3274 _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}'
3276 case "$cc_basename" in
3278 output_verbose_link_cmd='echo'
3279 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3280 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3281 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3282 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3283 _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}'
3286 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3293 case $cc_basename in
3295 # FIXME: insert proper C++ library support
3296 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3299 # Green Hills C++ Compiler
3300 # FIXME: insert proper C++ library support
3301 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3304 # FIXME: insert proper C++ library support
3305 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3310 # C++ shared libraries reported to be fairly broken before switch to ELF
3311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3314 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3316 freebsd* | kfreebsd*-gnu)
3317 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3319 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3324 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3325 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3326 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3327 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3328 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3329 # but as the default
3330 # location of the library.
3332 case $cc_basename in
3334 # FIXME: insert proper C++ library support
3335 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3338 _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'
3339 # Commands to make compiler produce verbose output that lists
3340 # what "hidden" libraries, object files and flags are used when
3341 # linking a shared library.
3343 # There doesn't appear to be a way to prevent this compiler from
3344 # explicitly linking system object files so we need to strip them
3345 # from the output so that they don't get included in the library
3347 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'
3350 if test "$GXX" = yes; then
3351 _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'
3353 # FIXME: insert proper C++ library support
3354 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3360 if test $with_gnu_ld = no; then
3363 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3364 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3365 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3371 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3372 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3373 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3379 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3380 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3383 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3384 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3385 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3386 # but as the default
3387 # location of the library.
3390 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3391 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3392 # but as the default
3393 # location of the library.
3397 case $cc_basename in
3399 # FIXME: insert proper C++ library support
3400 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3405 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3408 _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'
3411 # Commands to make compiler produce verbose output that lists
3412 # what "hidden" libraries, object files and flags are used when
3413 # linking a shared library.
3415 # There doesn't appear to be a way to prevent this compiler from
3416 # explicitly linking system object files so we need to strip them
3417 # from the output so that they don't get included in the library
3419 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'
3422 if test "$GXX" = yes; then
3423 if test $with_gnu_ld = no; then
3426 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3429 _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'
3434 # FIXME: insert proper C++ library support
3435 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3441 case $cc_basename in
3444 _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'
3446 # Archives containing C++ object files must be created using
3447 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3448 # necessary to make sure instantiated templates are included
3450 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3453 if test "$GXX" = yes; then
3454 if test "$with_gnu_ld" = no; then
3455 _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'
3457 _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'
3460 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3463 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3464 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3467 case $cc_basename in
3469 # Kuck and Associates, Inc. (KAI) C++ Compiler
3471 # KCC will only create a shared library if the output file
3472 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3473 # to its proper name (with version) after linking.
3474 _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'
3475 _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'
3476 # Commands to make compiler produce verbose output that lists
3477 # what "hidden" libraries, object files and flags are used when
3478 # linking a shared library.
3480 # There doesn't appear to be a way to prevent this compiler from
3481 # explicitly linking system object files so we need to strip them
3482 # from the output so that they don't get included in the library
3484 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'
3486 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3487 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3489 # Archives containing C++ object files must be created using
3490 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3491 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3496 # version 8.0 and above of icpc choke on multiply defined symbols
3497 # if we add $predep_objects and $postdep_objects, however 7.1 and
3498 # earlier do not add the objects themselves.
3499 case `$CC -V 2>&1` in
3501 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3502 _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'
3504 *) # Version 8.0 or newer
3505 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3506 _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'
3509 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3510 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3511 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3512 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3516 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3517 _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'
3519 runpath_var=LD_RUN_PATH
3520 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3521 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3523 # Commands to make compiler produce verbose output that lists
3524 # what "hidden" libraries, object files and flags are used when
3525 # linking a shared library.
3527 # There doesn't appear to be a way to prevent this compiler from
3528 # explicitly linking system object files so we need to strip them
3529 # from the output so that they don't get included in the library
3531 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'
3536 # FIXME: insert proper C++ library support
3537 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3540 # FIXME: insert proper C++ library support
3541 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3544 case $cc_basename in
3546 # FIXME: insert proper C++ library support
3547 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3550 # FIXME: insert proper C++ library support
3551 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3556 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3557 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3559 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3560 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3561 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3563 # Workaround some broken pre-1.5 toolchains
3564 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3567 # C++ shared libraries are fairly broken
3568 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3571 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3572 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3573 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3574 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3575 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3576 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3578 output_verbose_link_cmd='echo'
3581 case $cc_basename in
3583 # Kuck and Associates, Inc. (KAI) C++ Compiler
3585 # KCC will only create a shared library if the output file
3586 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3587 # to its proper name (with version) after linking.
3588 _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'
3590 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3591 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3593 # Archives containing C++ object files must be created using
3594 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3595 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3599 # Rational C++ 2.4.1
3600 # FIXME: insert proper C++ library support
3601 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3604 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3605 _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'
3607 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3608 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3610 # Commands to make compiler produce verbose output that lists
3611 # what "hidden" libraries, object files and flags are used when
3612 # linking a shared library.
3614 # There doesn't appear to be a way to prevent this compiler from
3615 # explicitly linking system object files so we need to strip them
3616 # from the output so that they don't get included in the library
3618 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'
3621 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3622 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3623 _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'
3625 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3626 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3628 # Commands to make compiler produce verbose output that lists
3629 # what "hidden" libraries, object files and flags are used when
3630 # linking a shared library.
3631 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3634 # FIXME: insert proper C++ library support
3635 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3641 case $cc_basename in
3643 # Kuck and Associates, Inc. (KAI) C++ Compiler
3645 # KCC will only create a shared library if the output file
3646 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3647 # to its proper name (with version) after linking.
3648 _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'
3650 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3651 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3653 # Archives containing C++ object files must be created using
3654 # the KAI C++ compiler.
3655 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3658 # Rational C++ 2.4.1
3659 # FIXME: insert proper C++ library support
3660 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3663 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3664 _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'
3665 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3666 echo "-hidden">> $lib.exp~
3667 $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~
3670 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3671 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3673 # Commands to make compiler produce verbose output that lists
3674 # what "hidden" libraries, object files and flags are used when
3675 # linking a shared library.
3677 # There doesn't appear to be a way to prevent this compiler from
3678 # explicitly linking system object files so we need to strip them
3679 # from the output so that they don't get included in the library
3681 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'
3684 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3685 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3686 _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'
3688 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3689 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3691 # Commands to make compiler produce verbose output that lists
3692 # what "hidden" libraries, object files and flags are used when
3693 # linking a shared library.
3694 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3697 # FIXME: insert proper C++ library support
3698 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3704 # FIXME: insert proper C++ library support
3705 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3708 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3709 case $cc_basename in
3711 # FIXME: insert proper C++ library support
3712 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3715 # FIXME: insert proper C++ library support
3716 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3721 case $cc_basename in
3724 # FIXME: insert proper C++ library support
3725 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3729 # FIXME: insert proper C++ library support
3730 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3733 # FIXME: insert proper C++ library support
3734 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3739 case $cc_basename in
3741 # Sun C++ 4.2, 5.x and Centerline C++
3742 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3743 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3744 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3745 $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'
3747 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3748 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3750 solaris2.[0-5] | solaris2.[0-5].*) ;;
3752 # The C++ compiler is used as linker so we must use $wl
3753 # flag to pass the commands to the underlying system
3755 # Supported since Solaris 2.6 (maybe 2.5.1?)
3756 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3759 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3761 # Commands to make compiler produce verbose output that lists
3762 # what "hidden" libraries, object files and flags are used when
3763 # linking a shared library.
3765 # There doesn't appear to be a way to prevent this compiler from
3766 # explicitly linking system object files so we need to strip them
3767 # from the output so that they don't get included in the library
3769 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'
3771 # Archives containing C++ object files must be created using
3772 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3773 # necessary to make sure instantiated templates are included
3775 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3778 # Green Hills C++ Compiler
3779 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3781 # The C++ compiler must be used to create the archive.
3782 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3785 # GNU C++ compiler with Solaris linker
3786 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3787 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3788 if $CC --version | grep -v '^2\.7' > /dev/null; then
3789 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3790 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3791 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3793 # Commands to make compiler produce verbose output that lists
3794 # what "hidden" libraries, object files and flags are used when
3795 # linking a shared library.
3796 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3798 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3800 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3801 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3802 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3804 # Commands to make compiler produce verbose output that lists
3805 # what "hidden" libraries, object files and flags are used when
3806 # linking a shared library.
3807 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3815 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3816 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3819 case $cc_basename in
3821 # NonStop-UX NCC 3.20
3822 # FIXME: insert proper C++ library support
3823 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3826 # FIXME: insert proper C++ library support
3827 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3832 # FIXME: insert proper C++ library support
3833 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3836 # FIXME: insert proper C++ library support
3837 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3840 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3841 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3843 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3844 _LT_AC_TAGVAR(LD, $1)="$LD"
3847 ## There is no encapsulation within the following macros, do not change
3848 ## the running order or otherwise move them around unless you know exactly
3849 ## what you are doing...
3850 AC_LIBTOOL_POSTDEP_PREDEP($1)
3851 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3852 AC_LIBTOOL_PROG_CC_C_O($1)
3853 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3854 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3855 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3856 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3857 AC_LIBTOOL_SYS_LIB_STRIP
3858 AC_LIBTOOL_DLOPEN_SELF($1)
3860 AC_LIBTOOL_CONFIG($1)
3867 with_gnu_ldcxx=$with_gnu_ld
3868 with_gnu_ld=$lt_save_with_gnu_ld
3869 lt_cv_path_LDCXX=$lt_cv_path_LD
3870 lt_cv_path_LD=$lt_save_path_LD
3871 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3872 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3873 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3875 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3876 # ------------------------
3877 # Figure out "hidden" library dependencies from verbose
3878 # compiler output when linking a shared library.
3879 # Parse the compiler output and extract the necessary
3880 # objects, libraries and library flags.
3881 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3882 dnl we can't use the lt_simple_compile_test_code here,
3883 dnl because it contains code intended for an executable,
3884 dnl not a library. It's possible we should let each
3885 dnl tag define a new lt_????_link_test_code variable,
3886 dnl but it's only used here...
3887 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3889 void foo (void) { a = 0; }
3891 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3895 Foo (void) { a = 0; }
3900 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3908 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3911 public void bar (void) {
3917 dnl Parse the compiler output and extract the necessary
3918 dnl objects, libraries and library flags.
3919 if AC_TRY_EVAL(ac_compile); then
3920 # Parse the compiler output and extract the necessary
3921 # objects, libraries and library flags.
3923 # Sentinel used to keep track of whether or not we are before
3924 # the conftest object file.
3925 pre_test_object_deps_done=no
3927 # The `*' in the case matches for architectures that use `case' in
3928 # $output_verbose_cmd can trigger glob expansion during the loop
3929 # eval without this substitution.
3930 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3932 for p in `eval $output_verbose_link_cmd`; do
3936 # Some compilers place space between "-{L,R}" and the path.
3939 || test $p = "-R"; then
3946 if test "$pre_test_object_deps_done" = no; then
3949 # Internal compiler library paths should come after those
3950 # provided the user. The postdeps already come after the
3951 # user supplied libs so there is no need to process them.
3952 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3953 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3955 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3958 # The "-l" case would never come before the object being
3959 # linked, so don't bother handling this case.
3962 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3963 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3965 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3971 # This assumes that the test object file only shows up
3972 # once in the compiler output.
3973 if test "$p" = "conftest.$objext"; then
3974 pre_test_object_deps_done=yes
3978 if test "$pre_test_object_deps_done" = no; then
3979 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3980 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3982 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3985 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3986 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3988 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3993 *) ;; # Ignore the rest.
4001 echo "libtool.m4: error: problem compiling $1 test program"
4004 $rm -f confest.$objext
4006 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4007 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4009 ])# AC_LIBTOOL_POSTDEP_PREDEP
4011 # AC_LIBTOOL_LANG_F77_CONFIG
4012 # ------------------------
4013 # Ensure that the configuration vars for the C compiler are
4014 # suitably defined. Those variables are subsequently used by
4015 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4016 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4017 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4018 [AC_REQUIRE([AC_PROG_F77])
4019 AC_LANG_PUSH(Fortran 77)
4021 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4022 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4023 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4024 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4025 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4026 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4029 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4030 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4031 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4032 _LT_AC_TAGVAR(module_cmds, $1)=
4033 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4034 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4035 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4036 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4037 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4038 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4040 # Source file extension for f77 test sources.
4043 # Object file extension for compiled f77 test sources.
4045 _LT_AC_TAGVAR(objext, $1)=$objext
4047 # Code to be used in simple compile tests
4048 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4050 # Code to be used in simple link tests
4051 lt_simple_link_test_code=" program t\n end\n"
4053 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4056 # Allow CC to be a program name with arguments.
4060 _LT_AC_TAGVAR(compiler, $1)=$CC
4061 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4063 AC_MSG_CHECKING([if libtool supports shared libraries])
4064 AC_MSG_RESULT([$can_build_shared])
4066 AC_MSG_CHECKING([whether to build shared libraries])
4067 test "$can_build_shared" = "no" && enable_shared=no
4069 # On AIX, shared libraries and static libraries use the same namespace, and
4070 # are all built from PIC.
4073 test "$enable_shared" = yes && enable_static=no
4074 if test -n "$RANLIB"; then
4075 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4076 postinstall_cmds='$RANLIB $lib'
4080 test "$enable_shared" = yes && enable_static=no
4083 AC_MSG_RESULT([$enable_shared])
4085 AC_MSG_CHECKING([whether to build static libraries])
4086 # Make sure either enable_shared or enable_static is yes.
4087 test "$enable_shared" = yes || enable_static=yes
4088 AC_MSG_RESULT([$enable_static])
4090 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4092 _LT_AC_TAGVAR(GCC, $1)="$G77"
4093 _LT_AC_TAGVAR(LD, $1)="$LD"
4095 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4096 AC_LIBTOOL_PROG_CC_C_O($1)
4097 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4098 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4099 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4100 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4101 AC_LIBTOOL_SYS_LIB_STRIP
4104 AC_LIBTOOL_CONFIG($1)
4108 ])# AC_LIBTOOL_LANG_F77_CONFIG
4111 # AC_LIBTOOL_LANG_GCJ_CONFIG
4112 # --------------------------
4113 # Ensure that the configuration vars for the C compiler are
4114 # suitably defined. Those variables are subsequently used by
4115 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4116 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4117 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4120 # Source file extension for Java test sources.
4123 # Object file extension for compiled Java test sources.
4125 _LT_AC_TAGVAR(objext, $1)=$objext
4127 # Code to be used in simple compile tests
4128 lt_simple_compile_test_code="class foo {}\n"
4130 # Code to be used in simple link tests
4131 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4133 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4136 # Allow CC to be a program name with arguments.
4140 _LT_AC_TAGVAR(compiler, $1)=$CC
4142 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4143 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4146 ## There is no encapsulation within the following macros, do not change
4147 ## the running order or otherwise move them around unless you know exactly
4148 ## what you are doing...
4149 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4150 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4151 AC_LIBTOOL_PROG_CC_C_O($1)
4152 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4153 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4154 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4155 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4156 AC_LIBTOOL_SYS_LIB_STRIP
4157 AC_LIBTOOL_DLOPEN_SELF($1)
4159 AC_LIBTOOL_CONFIG($1)
4163 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4166 # AC_LIBTOOL_LANG_RC_CONFIG
4167 # --------------------------
4168 # Ensure that the configuration vars for the Windows resource compiler are
4169 # suitably defined. Those variables are subsequently used by
4170 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4171 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4172 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4175 # Source file extension for RC test sources.
4178 # Object file extension for compiled RC test sources.
4180 _LT_AC_TAGVAR(objext, $1)=$objext
4182 # Code to be used in simple compile tests
4183 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4185 # Code to be used in simple link tests
4186 lt_simple_link_test_code="$lt_simple_compile_test_code"
4188 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4191 # Allow CC to be a program name with arguments.
4195 _LT_AC_TAGVAR(compiler, $1)=$CC
4196 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4198 AC_LIBTOOL_CONFIG($1)
4202 ])# AC_LIBTOOL_LANG_RC_CONFIG
4205 # AC_LIBTOOL_CONFIG([TAGNAME])
4206 # ----------------------------
4207 # If TAGNAME is not passed, then create an initial libtool script
4208 # with a default configuration from the untagged config vars. Otherwise
4209 # add code to config.status for appending the configuration named by
4210 # TAGNAME from the matching tagged config vars.
4211 AC_DEFUN([AC_LIBTOOL_CONFIG],
4212 [# The else clause should only fire when bootstrapping the
4213 # libtool distribution, otherwise you forgot to ship ltmain.sh
4214 # with your package, and you will get complaints that there are
4215 # no rules to generate ltmain.sh.
4216 if test -f "$ltmain"; then
4217 # See if we are running on zsh, and set the options which allow our commands through
4218 # without removal of \ escapes.
4219 if test -n "${ZSH_VERSION+set}" ; then
4220 setopt NO_GLOB_SUBST
4222 # Now quote all the things that may contain metacharacters while being
4223 # careful not to overquote the AC_SUBSTed values. We take copies of the
4224 # variables and quote the copies for generation of the libtool script.
4225 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4227 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4228 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4229 deplibs_check_method reload_flag reload_cmds need_locks \
4230 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4231 lt_cv_sys_global_symbol_to_c_name_address \
4232 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4233 old_postinstall_cmds old_postuninstall_cmds \
4234 _LT_AC_TAGVAR(compiler, $1) \
4235 _LT_AC_TAGVAR(CC, $1) \
4236 _LT_AC_TAGVAR(LD, $1) \
4237 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4238 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4239 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4240 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4241 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4242 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4243 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4244 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4245 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4246 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4247 _LT_AC_TAGVAR(predep_objects, $1) \
4248 _LT_AC_TAGVAR(postdep_objects, $1) \
4249 _LT_AC_TAGVAR(predeps, $1) \
4250 _LT_AC_TAGVAR(postdeps, $1) \
4251 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4252 _LT_AC_TAGVAR(archive_cmds, $1) \
4253 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4254 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4255 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4256 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4257 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4258 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4259 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4260 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4261 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4262 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4263 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4264 _LT_AC_TAGVAR(module_cmds, $1) \
4265 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4266 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4267 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4268 _LT_AC_TAGVAR(include_expsyms, $1); do
4271 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4272 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4273 _LT_AC_TAGVAR(archive_cmds, $1) | \
4274 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4275 _LT_AC_TAGVAR(module_cmds, $1) | \
4276 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4277 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4278 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4279 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4280 postinstall_cmds | postuninstall_cmds | \
4281 old_postinstall_cmds | old_postuninstall_cmds | \
4282 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4283 # Double-quote double-evaled strings.
4284 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4287 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4293 *'\[$]0 --fallback-echo"')
4294 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4299 [cfgfile="${ofile}T"
4300 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4302 AC_MSG_NOTICE([creating $ofile])],
4305 cat <<__EOF__ >> "$cfgfile"
4309 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4310 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4311 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4313 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4314 # Free Software Foundation, Inc.
4316 # This file is part of GNU Libtool:
4317 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4319 # This program is free software; you can redistribute it and/or modify
4320 # it under the terms of the GNU General Public License as published by
4321 # the Free Software Foundation; either version 2 of the License, or
4322 # (at your option) any later version.
4324 # This program is distributed in the hope that it will be useful, but
4325 # WITHOUT ANY WARRANTY; without even the implied warranty of
4326 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4327 # General Public License for more details.
4329 # You should have received a copy of the GNU General Public License
4330 # along with this program; if not, write to the Free Software
4331 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4333 # As a special exception to the GNU General Public License, if you
4334 # distribute this file as part of a program that contains a
4335 # configuration script generated by Autoconf, you may include it under
4336 # the same distribution terms that you use for the rest of that program.
4338 # A sed program that does not truncate output.
4341 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4342 Xsed="$SED -e s/^X//"
4344 # The HP-UX ksh and POSIX shell print the target directory to stdout
4346 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4348 # The names of the tagged configurations supported by this script.
4351 # ### BEGIN LIBTOOL CONFIG],
4352 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4354 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4356 # Shell to use when invoking shell scripts.
4359 # Whether or not to build shared libraries.
4360 build_libtool_libs=$enable_shared
4362 # Whether or not to build static libraries.
4363 build_old_libs=$enable_static
4365 # Whether or not to add -lc for building shared libraries.
4366 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4368 # Whether or not to disallow shared libs when runtime libs are static
4369 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4371 # Whether or not to optimize for fast installation.
4372 fast_install=$enable_fast_install
4375 host_alias=$host_alias
4378 # An echo program that does not interpret backslashes.
4383 AR_FLAGS=$lt_AR_FLAGS
4388 # A language-specific compiler.
4389 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4391 # Is the compiler the GNU C compiler?
4392 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4397 # The linker used to build libraries.
4398 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4400 # Whether we need hard or soft links.
4403 # A BSD-compatible nm program.
4406 # A symbol stripping program
4409 # Used to examine libraries when file_magic_cmd begins "file"
4410 MAGIC_CMD=$MAGIC_CMD
4412 # Used on cygwin: DLL creation program.
4415 # Used on cygwin: object dumper.
4418 # Used on cygwin: assembler.
4421 # The name of the directory that contains temporary libtool files.
4424 # How to create reloadable object files.
4425 reload_flag=$lt_reload_flag
4426 reload_cmds=$lt_reload_cmds
4428 # How to pass a linker flag through the compiler.
4429 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4431 # Object file suffix (normally "o").
4434 # Old archive suffix (normally "a").
4437 # Shared library suffix (normally ".so").
4438 shrext_cmds='$shrext_cmds'
4440 # Executable file suffix (normally "").
4443 # Additional compiler flags for building library objects.
4444 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4447 # What is the maximum length of a command?
4448 max_cmd_len=$lt_cv_sys_max_cmd_len
4450 # Does compiler simultaneously support -c and -o options?
4451 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4453 # Must we lock files when doing compilation ?
4454 need_locks=$lt_need_locks
4456 # Do we need the lib prefix for modules?
4457 need_lib_prefix=$need_lib_prefix
4459 # Do we need a version for libraries?
4460 need_version=$need_version
4462 # Whether dlopen is supported.
4463 dlopen_support=$enable_dlopen
4465 # Whether dlopen of programs is supported.
4466 dlopen_self=$enable_dlopen_self
4468 # Whether dlopen of statically linked programs is supported.
4469 dlopen_self_static=$enable_dlopen_self_static
4471 # Compiler flag to prevent dynamic linking.
4472 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4474 # Compiler flag to turn off builtin functions.
4475 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4477 # Compiler flag to allow reflexive dlopens.
4478 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4480 # Compiler flag to generate shared objects directly from archives.
4481 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4483 # Compiler flag to generate thread-safe objects.
4484 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4486 # Library versioning type.
4487 version_type=$version_type
4489 # Format of library name prefix.
4490 libname_spec=$lt_libname_spec
4492 # List of archive names. First name is the real one, the rest are links.
4493 # The last name is the one that the linker finds with -lNAME.
4494 library_names_spec=$lt_library_names_spec
4496 # The coded name of the library, if different from the real name.
4497 soname_spec=$lt_soname_spec
4499 # Commands used to build and install an old-style archive.
4501 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4502 old_postinstall_cmds=$lt_old_postinstall_cmds
4503 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4505 # Create an old-style archive from a shared archive.
4506 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4508 # Create a temporary old-style archive to link instead of a shared archive.
4509 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4511 # Commands used to build and install a shared archive.
4512 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4513 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4514 postinstall_cmds=$lt_postinstall_cmds
4515 postuninstall_cmds=$lt_postuninstall_cmds
4517 # Commands used to build a loadable module (assumed same as above if empty)
4518 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4519 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4521 # Commands to strip libraries.
4522 old_striplib=$lt_old_striplib
4523 striplib=$lt_striplib
4525 # Dependencies to place before the objects being linked to create a
4527 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4529 # Dependencies to place after the objects being linked to create a
4531 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4533 # Dependencies to place before the objects being linked to create a
4535 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4537 # Dependencies to place after the objects being linked to create a
4539 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4541 # The library search path used internally by the compiler when linking
4543 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4545 # Method to check whether dependent libraries are shared objects.
4546 deplibs_check_method=$lt_deplibs_check_method
4548 # Command to use when deplibs_check_method == file_magic.
4549 file_magic_cmd=$lt_file_magic_cmd
4551 # Flag that allows shared libraries with undefined symbols to be built.
4552 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4554 # Flag that forces no undefined symbols.
4555 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4557 # Commands used to finish a libtool library installation in a directory.
4558 finish_cmds=$lt_finish_cmds
4560 # Same as above, but a single script fragment to be evaled but not shown.
4561 finish_eval=$lt_finish_eval
4563 # Take the output of nm and produce a listing of raw symbols and C names.
4564 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4566 # Transform the output of nm in a proper C declaration
4567 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4569 # Transform the output of nm in a C name address pair
4570 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4572 # This is the shared library runtime path variable.
4573 runpath_var=$runpath_var
4575 # This is the shared library path variable.
4576 shlibpath_var=$shlibpath_var
4578 # Is shlibpath searched before the hard-coded library search path?
4579 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4581 # How to hardcode a shared library path into an executable.
4582 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4584 # Whether we should hardcode library paths into libraries.
4585 hardcode_into_libs=$hardcode_into_libs
4587 # Flag to hardcode \$libdir into a binary during linking.
4588 # This must work even if \$libdir does not exist.
4589 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4591 # If ld is used when linking, flag to hardcode \$libdir into
4592 # a binary during linking. This must work even if \$libdir does
4594 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4596 # Whether we need a single -rpath flag with a separated argument.
4597 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4599 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4601 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4603 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4605 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4607 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4608 # the resulting binary.
4609 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4611 # Set to yes if building a shared library automatically hardcodes DIR into the library
4612 # and all subsequent libraries and executables linked against it.
4613 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4615 # Variables whose values should be saved in libtool wrapper scripts and
4616 # restored at relink time.
4617 variables_saved_for_relink="$variables_saved_for_relink"
4619 # Whether libtool must link a program against all its dependency libraries.
4620 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4622 # Compile-time system search path for libraries
4623 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4625 # Run-time system search path for libraries
4626 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4628 # Fix the shell variable \$srcfile for the compiler.
4629 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4631 # Set to yes if exported symbols are required.
4632 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4634 # The commands to list exported symbols.
4635 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4637 # The commands to extract the exported symbol list from a shared archive.
4638 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4640 # Symbols that should not be listed in the preloaded symbols.
4641 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4643 # Symbols that must always be exported.
4644 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4647 [# ### END LIBTOOL CONFIG],
4648 [# ### END LIBTOOL TAG CONFIG: $tagname])
4655 cat <<\EOF >> "$cfgfile"
4657 # AIX sometimes has problems with the GCC collect2 program. For some
4658 # reason, if we set the COLLECT_NAMES environment variable, the problems
4659 # vanish in a puff of smoke.
4660 if test "X${COLLECT_NAMES+set}" != Xset; then
4662 export COLLECT_NAMES
4668 # We use sed instead of cat because bash on DJGPP gets confused if
4669 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4670 # text mode, it properly converts lines to CR/LF. This bash problem
4671 # is reportedly fixed, but why not run on old versions too?
4672 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4674 mv -f "$cfgfile" "$ofile" || \
4675 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4679 # If there is no Makefile yet, we rely on a make rule to execute
4680 # `config.status --recheck' to rerun these tests and create the
4681 # libtool script then.
4682 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4683 if test -f "$ltmain_in"; then
4684 test -f Makefile && make "$ltmain"
4687 ])# AC_LIBTOOL_CONFIG
4690 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4691 # -------------------------------------------
4692 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4693 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4695 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4697 if test "$GCC" = yes; then
4698 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4700 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4701 lt_cv_prog_compiler_rtti_exceptions,
4702 [-fno-rtti -fno-exceptions], [],
4703 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4705 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4708 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4709 # ---------------------------------
4710 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4711 [AC_REQUIRE([AC_CANONICAL_HOST])
4712 AC_REQUIRE([AC_PROG_NM])
4713 AC_REQUIRE([AC_OBJEXT])
4714 # Check for command to grab the raw symbol name followed by C symbol from nm.
4715 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4716 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4718 # These are sane defaults that work on at least a few old systems.
4719 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4721 # Character class describing NM global symbol codes.
4722 symcode='[[BCDEGRST]]'
4724 # Regexp to match symbols that can be accessed directly from C.
4725 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4727 # Transform the above into a raw symbol and a C symbol.
4728 symxfrm='\1 \2\3 \3'
4730 # Transform an extracted symbol line into a proper C declaration
4731 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4733 # Transform an extracted symbol line into symbol name and symbol address
4734 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'"
4736 # Define system-specific variables.
4741 cygwin* | mingw* | pw32*)
4742 symcode='[[ABCDGISTW]]'
4744 hpux*) # Its linker distinguishes data from code symbols
4745 if test "$host_cpu" = ia64; then
4746 symcode='[[ABCDEGRST]]'
4748 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4749 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'"
4752 symcode='[[BCDEGRST]]'
4755 symcode='[[BCDEGQRST]]'
4761 symcode='[[DFNSTU]]'
4765 # Handle CRLF in mingw tool chain
4769 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4773 # If we're using GNU nm, then use its standard symbol codes.
4774 case `$NM -V 2>&1` in
4775 *GNU* | *'with BFD'*)
4776 symcode='[[ABCDGIRSTW]]' ;;
4779 # Try without a prefix undercore, then with it.
4780 for ac_symprfx in "" "_"; do
4782 # Write the raw and C identifiers.
4783 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4785 # Check to see that the pipe works correctly.
4789 cat > conftest.$ac_ext <<EOF
4794 void nm_test_func(){}
4798 int main(){nm_test_var='a';nm_test_func();return(0);}
4801 if AC_TRY_EVAL(ac_compile); then
4802 # Now try to grab the symbols.
4804 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4805 # Try sorting and uniquifying the output.
4806 if sort "$nlist" | uniq > "$nlist"T; then
4807 mv -f "$nlist"T "$nlist"
4812 # Make sure that we snagged all the symbols we need.
4813 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4814 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4815 cat <<EOF > conftest.$ac_ext
4821 # Now generate the symbol file.
4822 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4824 cat <<EOF >> conftest.$ac_ext
4825 #if defined (__STDC__) && __STDC__
4826 # define lt_ptr_t void *
4828 # define lt_ptr_t char *
4832 /* The mapping between symbol names and symbols. */
4837 lt_preloaded_symbols[[]] =
4840 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4841 cat <<\EOF >> conftest.$ac_ext
4849 # Now try linking the two files.
4850 mv conftest.$ac_objext conftstm.$ac_objext
4851 lt_save_LIBS="$LIBS"
4852 lt_save_CFLAGS="$CFLAGS"
4853 LIBS="conftstm.$ac_objext"
4854 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4855 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4858 LIBS="$lt_save_LIBS"
4859 CFLAGS="$lt_save_CFLAGS"
4861 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4864 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4867 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4870 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4871 cat conftest.$ac_ext >&5
4873 rm -f conftest* conftst*
4875 # Do not use the global_symbol_pipe unless it works.
4876 if test "$pipe_works" = yes; then
4879 lt_cv_sys_global_symbol_pipe=
4883 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4884 lt_cv_sys_global_symbol_to_cdecl=
4886 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4887 AC_MSG_RESULT(failed)
4891 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4894 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4895 # ---------------------------------------
4896 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4897 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4898 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4899 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4901 AC_MSG_CHECKING([for $compiler option to produce PIC])
4903 # C++ specific cases for pic, static, wl, etc.
4904 if test "$GXX" = yes; then
4905 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4906 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4910 # All AIX code is PIC.
4911 if test "$host_cpu" = ia64; then
4912 # AIX 5 now supports IA64 processor
4913 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4917 # FIXME: we need at least 68020 code to build shared libraries, but
4918 # adding the `-m68020' flag to GCC prevents building anything better,
4920 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4922 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4923 # PIC is the default for these OSes.
4925 mingw* | os2* | pw32*)
4926 # This hack is so that the source file can tell whether it is being
4927 # built for inclusion in a dll (and should export symbols for example).
4928 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4930 darwin* | rhapsody*)
4931 # PIC is the default on this platform
4932 # Common symbols not allowed in MH_DYLIB files
4933 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4936 # DJGPP does not support shared libraries at all
4937 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4940 if test -d /usr/nec; then
4941 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4945 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4951 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4956 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4962 # All AIX code is PIC.
4963 if test "$host_cpu" = ia64; then
4964 # AIX 5 now supports IA64 processor
4965 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4967 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4971 case $cc_basename in
4973 # Green Hills C++ Compiler
4974 # _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"
4979 # PIC is the default on this platform
4980 # Common symbols not allowed in MH_DYLIB files
4981 case "$cc_basename" in
4983 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4984 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4989 case $cc_basename in
4991 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4994 # Green Hills C++ Compiler
4995 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5001 freebsd* | kfreebsd*-gnu)
5002 # FreeBSD uses GNU C++
5004 hpux9* | hpux10* | hpux11*)
5005 case $cc_basename in
5007 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5008 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5009 if test "$host_cpu" != ia64; then
5010 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5014 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5015 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5021 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5029 irix5* | irix6* | nonstopux*)
5030 case $cc_basename in
5032 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5033 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5034 # CC pic flag -KPIC is the default.
5041 case $cc_basename in
5044 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5045 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5049 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5050 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5051 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5055 # Make sure the PIC flag is empty. It appears that all Alpha
5056 # Linux and Compaq Tru64 Unix objects are PIC.
5057 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5058 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5069 case $cc_basename in
5071 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5079 osf3* | osf4* | osf5*)
5080 case $cc_basename in
5082 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5085 # Rational C++ 2.4.1
5086 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5089 # Digital/Compaq C++
5090 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5091 # Make sure the PIC flag is empty. It appears that all Alpha
5092 # Linux and Compaq Tru64 Unix objects are PIC.
5093 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5094 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5103 case $cc_basename in
5105 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5112 case $cc_basename in
5114 # Sun C++ 4.2, 5.x and Centerline C++
5115 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5116 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5117 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5120 # Green Hills C++ Compiler
5121 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5128 case $cc_basename in
5131 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5132 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5136 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5143 case $cc_basename in
5145 # NonStop-UX NCC 3.20
5146 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5157 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5163 if test "$GCC" = yes; then
5164 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5165 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5169 # All AIX code is PIC.
5170 if test "$host_cpu" = ia64; then
5171 # AIX 5 now supports IA64 processor
5172 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5177 # FIXME: we need at least 68020 code to build shared libraries, but
5178 # adding the `-m68020' flag to GCC prevents building anything better,
5180 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5183 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5184 # PIC is the default for these OSes.
5187 mingw* | pw32* | os2*)
5188 # This hack is so that the source file can tell whether it is being
5189 # built for inclusion in a dll (and should export symbols for example).
5190 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5193 darwin* | rhapsody*)
5194 # PIC is the default on this platform
5195 # Common symbols not allowed in MH_DYLIB files
5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5200 # Just because we use GCC doesn't mean we suddenly get shared libraries
5201 # on systems that don't support them.
5202 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5207 if test -d /usr/nec; then
5208 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5213 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5220 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5226 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5230 # PORTME Check for flag to pass linker flags through the system compiler.
5233 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5234 if test "$host_cpu" = ia64; then
5235 # AIX 5 now supports IA64 processor
5236 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5238 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5242 # PIC is the default on this platform
5243 # Common symbols not allowed in MH_DYLIB files
5244 case "$cc_basename" in
5246 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5247 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5252 mingw* | pw32* | os2*)
5253 # This hack is so that the source file can tell whether it is being
5254 # built for inclusion in a dll (and should export symbols for example).
5255 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5258 hpux9* | hpux10* | hpux11*)
5259 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5260 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5267 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5270 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5271 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5274 irix5* | irix6* | nonstopux*)
5275 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5276 # PIC (with -KPIC) is the default.
5277 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5281 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5282 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5288 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5289 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5290 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5293 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5294 # All Alpha code is PIC.
5295 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5300 osf3* | osf4* | osf5*)
5301 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5302 # All OSF/1 code is PIC.
5303 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5307 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5308 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5312 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5313 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5314 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5318 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5319 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5320 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5323 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5324 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5325 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5326 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5330 if test -d /usr/nec ;then
5331 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5332 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5337 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5338 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5342 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5347 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5350 # Check to make sure the PIC flag actually works.
5352 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5353 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5354 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5355 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5356 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5358 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5360 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5361 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5364 # For platforms which do not support PIC, -DPIC is meaningless:
5366 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5369 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5375 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5376 # ------------------------------------
5377 # See if the linker supports building shared libraries.
5378 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5379 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5381 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5384 # If we're using GNU nm, then we don't want the "-C" option.
5385 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5386 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5387 _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'
5389 _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'
5393 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5396 _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'
5399 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5404 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5405 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5406 _LT_AC_TAGVAR(archive_cmds, $1)=
5407 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5408 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5409 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5410 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5411 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5412 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5413 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5415 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5416 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5417 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5418 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5419 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5420 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5421 _LT_AC_TAGVAR(module_cmds, $1)=
5422 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5423 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5424 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5425 # include_expsyms should be a list of space-separated symbols to be *always*
5426 # included in the symbol list
5427 _LT_AC_TAGVAR(include_expsyms, $1)=
5428 # exclude_expsyms can be an extended regexp of symbols to exclude
5429 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5430 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5431 # as well as any symbol that contains `d'.
5432 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5433 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5434 # platforms (ab)use it in PIC code, but their linkers get confused if
5435 # the symbol is explicitly referenced. Since portable code cannot
5436 # rely on this symbol name, it's probably fine to never include it in
5437 # preloaded symbol tables.
5438 extract_expsyms_cmds=
5441 cygwin* | mingw* | pw32*)
5442 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5443 # When not using gcc, we currently assume that we are using
5444 # Microsoft Visual C++.
5445 if test "$GCC" != yes; then
5454 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5455 if test "$with_gnu_ld" = yes; then
5456 # If archive_cmds runs LD, not CC, wlarc should be empty
5459 # See if GNU ld supports shared libraries.
5461 aix3* | aix4* | aix5*)
5462 # On AIX/PPC, the GNU linker is very broken
5463 if test "$host_cpu" != ia64; then
5464 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5467 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5468 *** to be unable to reliably create shared libraries on AIX.
5469 *** Therefore, libtool is disabling shared libraries support. If you
5470 *** really care for shared libraries, you may want to modify your PATH
5471 *** so that a non-GNU linker is found, and then restart.
5478 _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)'
5479 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5480 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5482 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5483 # that the semantics of dynamic libraries on AmigaOS, at least up
5484 # to version 4, is to share data among multiple programs linked
5485 # with the same dynamic library. Since this doesn't match the
5486 # behavior of shared libraries on other platforms, we can't use
5488 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5492 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5493 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5494 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5495 # support --undefined. This deserves some investigation. FIXME
5496 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5498 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5502 cygwin* | mingw* | pw32*)
5503 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5504 # as there is no search path for DLLs.
5505 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5506 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5507 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5508 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5509 _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'
5511 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5512 ## _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5513 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
5514 # If the export-symbols file already is a .def file (1st line
5515 # is EXPORTS), use it as is; otherwise, prepend...
5516 ## _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5517 ## cp $export_symbols $output_objdir/$soname.def;
5519 ## echo EXPORTS > $output_objdir/$soname.def;
5520 ## cat $export_symbols >> $output_objdir/$soname.def;
5522 ## $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5523 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5524 cp $export_symbols $output_objdir/$soname.def;
5526 echo EXPORTS > $output_objdir/$soname.def;
5527 cat $export_symbols >> $output_objdir/$soname.def;
5529 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base ${wl}--out-implib,$lib'
5536 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5537 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5540 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5541 _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'
5546 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5547 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5550 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5551 *** create shared libraries on Solaris systems. Therefore, libtool
5552 *** is disabling shared libraries support. We urge you to upgrade GNU
5553 *** binutils to release 2.9.1 or newer. Another option is to modify
5554 *** your PATH or compiler configuration so that the native linker is
5555 *** used, and then restart.
5558 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5559 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5560 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5562 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5567 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5569 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5570 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5574 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5575 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5576 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5577 supports_anon_versioning=no
5578 case `$LD -v 2>/dev/null` in
5579 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5580 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5581 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5582 *\ 2.11.*) ;; # other 2.11 versions
5583 *) supports_anon_versioning=yes ;;
5585 if test $supports_anon_versioning = yes; then
5586 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5587 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5588 $echo "local: *; };" >> $output_objdir/$libname.ver~
5589 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5591 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5594 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5599 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5600 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5601 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5603 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5608 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5609 runpath_var=LD_RUN_PATH
5610 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5611 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5612 # ancient GNU ld didn't support --whole-archive et. al.
5613 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5614 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5616 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5620 # PORTME fill in a description of your system's linker (not GNU ld)
5623 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5624 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5625 _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'
5626 # Note: this linker hardcodes the directories in LIBPATH if there
5627 # are no directories specified by -L.
5628 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5629 if test "$GCC" = yes && test -z "$link_static_flag"; then
5630 # Neither direct hardcoding nor static linking is supported with a
5632 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5637 if test "$host_cpu" = ia64; then
5638 # On IA64, the linker does run time linking by default, so we don't
5639 # have to do anything special.
5640 aix_use_runtimelinking=no
5641 exp_sym_flag='-Bexport'
5644 # If we're using GNU nm, then we don't want the "-C" option.
5645 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5646 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5647 _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'
5649 _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'
5651 aix_use_runtimelinking=no
5653 # Test if we are trying to use run time linking or normal
5654 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5655 # need to do runtime linking.
5656 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5657 for ld_flag in $LDFLAGS; do
5658 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5659 aix_use_runtimelinking=yes
5665 exp_sym_flag='-bexport'
5666 no_entry_flag='-bnoentry'
5669 # When large executables or shared objects are built, AIX ld can
5670 # have problems creating the table of contents. If linking a library
5671 # or program results in "error TOC overflow" add -mminimal-toc to
5672 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5673 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5675 _LT_AC_TAGVAR(archive_cmds, $1)=''
5676 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5677 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5678 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5680 if test "$GCC" = yes; then
5681 case $host_os in aix4.[012]|aix4.[012].*)
5682 # We only want to do this on AIX 4.2 and lower, the check
5683 # below for broken collect2 doesn't work under 4.3+
5684 collect2name=`${CC} -print-prog-name=collect2`
5685 if test -f "$collect2name" && \
5686 strings "$collect2name" | grep resolve_lib_name >/dev/null
5688 # We have reworked collect2
5689 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5691 # We have old collect2
5692 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5693 # It fails to find uninstalled libraries when the uninstalled
5694 # path is not listed in the libpath. Setting hardcode_minus_L
5695 # to unsupported forces relinking
5696 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5697 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5698 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5701 shared_flag='-shared'
5704 if test "$host_cpu" = ia64; then
5705 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5706 # chokes on -Wl,-G. The following line is correct:
5709 if test "$aix_use_runtimelinking" = yes; then
5710 shared_flag='${wl}-G'
5712 shared_flag='${wl}-bM:SRE'
5717 # It seems that -bexpall does not export symbols beginning with
5718 # underscore (_), so it is better to generate a list of symbols to export.
5719 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5720 if test "$aix_use_runtimelinking" = yes; then
5721 # Warning - without using the other runtime loading flags (-brtl),
5722 # -berok will link without error, but may produce a broken library.
5723 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5724 # Determine the default libpath from the value encoded in an empty executable.
5725 _LT_AC_SYS_LIBPATH_AIX
5726 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5727 _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"
5729 if test "$host_cpu" = ia64; then
5730 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5731 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5732 _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"
5734 # Determine the default libpath from the value encoded in an empty executable.
5735 _LT_AC_SYS_LIBPATH_AIX
5736 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5737 # Warning - without using the other run time loading flags,
5738 # -berok will link without error, but may produce a broken library.
5739 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5740 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5741 # -bexpall does not export symbols beginning with underscore (_)
5742 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5743 # Exported symbols can be pulled into shared objects from archives
5744 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5745 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5746 # This is similar to how AIX traditionally builds it's shared libraries.
5747 _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'
5753 _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)'
5754 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5755 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5756 # see comment about different semantics on the GNU ld section
5757 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5761 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5764 cygwin* | mingw* | pw32*)
5765 # When not using gcc, we currently assume that we are using
5766 # Microsoft Visual C++.
5767 # hardcode_libdir_flag_spec is actually meaningless, as there is
5768 # no search path for DLLs.
5769 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5770 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5771 # Tell ltmain to make .lib files, not .a files.
5773 # Tell ltmain to make .dll files, not .so files.
5775 # FIXME: Setting linknames here is a bad hack.
5776 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5777 # The linker will automatically build a .lib file if we build a DLL.
5778 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5779 # FIXME: Should let the user specify the lib program.
5780 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5781 fix_srcfile_path='`cygpath -w "$srcfile"`'
5782 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5785 darwin* | rhapsody*)
5787 rhapsody* | darwin1.[[012]])
5788 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5791 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5792 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5794 case ${MACOSX_DEPLOYMENT_TARGET} in
5796 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5799 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5805 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5806 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5807 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5808 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5809 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5810 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5811 if test "$GCC" = yes ; then
5812 output_verbose_link_cmd='echo'
5813 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5814 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5815 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5816 _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}'
5817 _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}'
5819 case "$cc_basename" in
5821 output_verbose_link_cmd='echo'
5822 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5823 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5824 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5825 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5826 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5829 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5836 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5837 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5838 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5842 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5845 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5846 # support. Future versions do this automatically, but an explicit c++rt0.o
5847 # does not break anything, and helps significantly (at the cost of a little
5850 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5851 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5852 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5853 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5856 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5858 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5859 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5860 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5861 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5864 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5865 freebsd* | kfreebsd*-gnu)
5866 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5867 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5868 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5869 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5873 if test "$GCC" = yes; then
5874 _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'
5876 _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'
5878 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5879 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5880 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5882 # hardcode_minus_L: Not really in the search PATH,
5883 # but as the default location of the library.
5884 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5885 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5889 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5892 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5895 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5901 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5904 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5908 if test "$with_gnu_ld" = no; then
5911 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5912 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5913 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5914 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5915 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5918 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5919 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5920 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5922 # hardcode_minus_L: Not really in the search PATH,
5923 # but as the default location of the library.
5924 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5927 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5928 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5929 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5930 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5932 # hardcode_minus_L: Not really in the search PATH,
5933 # but as the default location of the library.
5934 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5940 irix5* | irix6* | nonstopux*)
5941 if test "$GCC" = yes; then
5942 _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'
5944 _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'
5945 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5947 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5948 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5949 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5953 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5954 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5956 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5958 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5959 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5960 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5964 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5965 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5966 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5967 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5968 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5972 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5973 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5974 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5975 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5976 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5978 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5981 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5982 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5983 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5986 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5987 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5994 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5995 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5996 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5997 _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'
5998 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6002 if test "$GCC" = yes; then
6003 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6004 _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'
6006 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6007 _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'
6009 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6010 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6013 osf4* | osf5*) # as osf3* with the addition of -msym flag
6014 if test "$GCC" = yes; then
6015 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6016 _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'
6017 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6019 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6020 _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'
6021 _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~
6022 $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'
6024 # Both c and cxx compiler support -rpath directly
6025 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6027 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6031 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6032 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6033 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6034 runpath_var=LD_RUN_PATH
6035 hardcode_runpath_var=yes
6039 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6040 if test "$GCC" = yes; then
6041 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6042 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6043 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6045 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6046 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6047 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6049 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6050 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6052 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6053 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6054 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6056 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6060 if test "x$host_vendor" = xsequent; then
6061 # Use $CC to link under sequent, because it throws in some extra .o
6062 # files that make .init and .fini sections work.
6063 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6065 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6067 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6068 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6069 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6070 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6074 case $host_vendor in
6076 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6077 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6080 ## LD is ld it makes a PLAMLIB
6081 ## CC just makes a GrossModule.
6082 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6083 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6084 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6087 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6088 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6091 runpath_var='LD_RUN_PATH'
6092 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6096 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6097 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6098 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6102 if test -d /usr/nec; then
6103 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6104 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6105 runpath_var=LD_RUN_PATH
6106 hardcode_runpath_var=yes
6107 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6112 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6113 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6114 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6115 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6116 hardcode_runpath_var=yes
6117 runpath_var=LD_RUN_PATH
6120 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6121 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6122 if test "$GCC" = yes; then
6123 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6125 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6127 runpath_var='LD_RUN_PATH'
6128 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6132 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6133 # $CC -shared without GNU ld will not create a library from C++
6134 # object files and a static libstdc++, better avoid it by now
6135 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6136 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6137 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6138 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6139 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6140 runpath_var='LD_RUN_PATH'
6144 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6145 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6146 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6155 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6156 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6158 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6159 if test "$GCC" = yes; then
6160 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6164 # Do we need to explicitly link libc?
6166 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6168 # Assume -lc should be added
6169 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6171 if test "$enable_shared" = yes && test "$GCC" = yes; then
6172 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6174 # FIXME: we may have to deal with multi-command sequences.
6177 # Test whether the compiler implicitly links with -lc since on some
6178 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6179 # to ld, don't add -lc before -lgcc.
6180 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6182 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6184 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6187 libobjs=conftest.$ac_objext
6189 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6195 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6196 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6197 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6199 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6201 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6203 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6205 cat conftest.err 1>&5
6208 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6214 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6217 # _LT_AC_FILE_LTDLL_C
6218 # -------------------
6219 # Be careful that the start marker always follows a newline.
6220 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6221 # /* ltdll.c starts here */
6222 # #define WIN32_LEAN_AND_MEAN
6223 # #include <windows.h>
6224 # #undef WIN32_LEAN_AND_MEAN
6225 # #include <stdio.h>
6227 # #ifndef __CYGWIN__
6228 # # ifdef __CYGWIN32__
6229 # # define __CYGWIN__ __CYGWIN32__
6233 # #ifdef __cplusplus
6236 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6237 # #ifdef __cplusplus
6242 # #include <cygwin/cygwin_dll.h>
6243 # DECLARE_CYGWIN_DLL( DllMain );
6245 # HINSTANCE __hDllInstance_base;
6248 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6250 # __hDllInstance_base = hInst;
6253 # /* ltdll.c ends here */
6254 ])# _LT_AC_FILE_LTDLL_C
6257 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6258 # ---------------------------------
6259 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6263 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6264 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6265 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6266 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6267 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6268 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6269 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6271 # This is just to silence aclocal about the macro not being used
6272 ifelse([AC_DISABLE_FAST_INSTALL])
6274 AC_DEFUN([LT_AC_PROG_GCJ],
6275 [AC_CHECK_TOOL(GCJ, gcj, no)
6276 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6280 AC_DEFUN([LT_AC_PROG_RC],
6281 [AC_CHECK_TOOL(RC, windres, no)
6284 ############################################################
6285 # NOTE: This macro has been submitted for inclusion into #
6286 # GNU Autoconf as AC_PROG_SED. When it is available in #
6287 # a released version of Autoconf we should remove this #
6288 # macro and use it instead. #
6289 ############################################################
6292 # Check for a fully-functional sed program, that truncates
6293 # as few characters as possible. Prefer GNU sed if found.
6294 AC_DEFUN([LT_AC_PROG_SED],
6295 [AC_MSG_CHECKING([for a sed that does not truncate output])
6296 AC_CACHE_VAL(lt_cv_path_SED,
6297 [# Loop through the user's path and test for sed and gsed.
6298 # Then use that list of sed's as ones to test for truncation.
6299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6303 test -z "$as_dir" && as_dir=.
6304 for lt_ac_prog in sed gsed; do
6305 for ac_exec_ext in '' $ac_executable_extensions; do
6306 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6307 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6314 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6315 # along with /bin/sed that truncates output.
6316 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6317 test ! -f $lt_ac_sed && break
6318 cat /dev/null > conftest.in
6320 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6321 # Check for GNU sed and select it if it is found.
6322 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6323 lt_cv_path_SED=$lt_ac_sed
6327 cat conftest.in conftest.in >conftest.tmp
6328 mv conftest.tmp conftest.in
6329 cp conftest.in conftest.nl
6331 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6332 cmp -s conftest.out conftest.nl || break
6333 # 10000 chars as input seems more than enough
6334 test $lt_ac_count -gt 10 && break
6335 lt_ac_count=`expr $lt_ac_count + 1`
6336 if test $lt_ac_count -gt $lt_ac_max; then
6337 lt_ac_max=$lt_ac_count
6338 lt_cv_path_SED=$lt_ac_sed
6344 AC_MSG_RESULT([$SED])