1 # generated automatically by aclocal 1.8.5 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
15 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
17 # This file is free software, distributed under the terms of the GNU
18 # General Public License. As a special exception to the GNU General
19 # Public License, this file may be distributed as part of a program
20 # that contains a configuration script generated by Autoconf, under
21 # the same distribution terms as the rest of that program.
23 # This file can be copied and used freely without restrictions. It can
24 # be used in projects which are not available under the GNU Public License
25 # but which still want to provide support for the GNU gettext functionality.
27 # Macro to add for using GNU gettext.
28 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
30 # Modified to never use included libintl.
31 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
33 # Major rework to remove unused code
34 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
36 # Added better handling of ALL_LINGUAS from GNU gettext version
37 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
39 # Modified to require ngettext
40 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
42 # We need this here as well, since someone might use autoconf-2.5x
43 # to configure GLib then an older version to configure a package
44 # using AM_GLIB_GNU_GETTEXT
48 dnl We go to great lengths to make sure that aclocal won't
49 dnl try to pull in the installed version of these macros
50 dnl when running aclocal in the glib directory.
52 m4_copy([AC_DEFUN],[glib_DEFUN])
53 m4_copy([AC_REQUIRE],[glib_REQUIRE])
55 dnl At the end, if we're not within glib, we'll define the public
56 dnl definitions in terms of our private definitions.
61 glib_DEFUN([GLIB_LC_MESSAGES],
62 [AC_CHECK_HEADERS([locale.h])
63 if test $ac_cv_header_locale_h = yes; then
64 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
65 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
66 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
67 if test $am_cv_val_LC_MESSAGES = yes; then
68 AC_DEFINE(HAVE_LC_MESSAGES, 1,
69 [Define if your <locale.h> file defines LC_MESSAGES.])
73 # GLIB_PATH_PROG_WITH_TEST
74 #----------------------------
75 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
76 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
77 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
78 [# Extract the first word of "$2", so it can be a program name with args.
79 set dummy $2; ac_word=[$]2
80 AC_MSG_CHECKING([for $ac_word])
81 AC_CACHE_VAL(ac_cv_path_$1,
84 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
87 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
88 for ac_dir in ifelse([$5], , $PATH, [$5]); do
89 test -z "$ac_dir" && ac_dir=.
90 if test -f $ac_dir/$ac_word; then
92 ac_cv_path_$1="$ac_dir/$ac_word"
98 dnl If no 4th arg is given, leave the cache variable unset,
99 dnl so AC_PATH_PROGS will keep looking.
100 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
105 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115 glib_DEFUN([GLIB_WITH_NLS],
116 dnl NLS is obligatory
120 gt_cv_have_gettext=no
126 AC_CHECK_HEADER(libintl.h,
127 [gt_cv_func_dgettext_libintl="no"
128 libintl_extra_libs=""
131 # First check in libc
133 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
137 [return !ngettext ("","", 1)],
138 gt_cv_func_ngettext_libc=yes,
139 gt_cv_func_ngettext_libc=no)
142 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
143 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
147 [return !dgettext ("","")],
148 gt_cv_func_dgettext_libc=yes,
149 gt_cv_func_dgettext_libc=no)
153 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
154 AC_CHECK_FUNCS(bind_textdomain_codeset)
158 # If we don't have everything we want, check in libintl
160 if test "$gt_cv_func_dgettext_libc" != "yes" \
161 || test "$gt_cv_func_ngettext_libc" != "yes" \
162 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
164 AC_CHECK_LIB(intl, bindtextdomain,
165 [AC_CHECK_LIB(intl, ngettext,
166 [AC_CHECK_LIB(intl, dgettext,
167 gt_cv_func_dgettext_libintl=yes)])])
169 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
170 AC_MSG_CHECKING([if -liconv is needed to use gettext])
172 AC_CHECK_LIB(intl, ngettext,
173 [AC_CHECK_LIB(intl, dcgettext,
174 [gt_cv_func_dgettext_libintl=yes
175 libintl_extra_libs=-liconv],
181 # If we found libintl, then check in it for bind_textdomain_codeset();
182 # we'll prefer libc if neither have bind_textdomain_codeset(),
183 # and both have dgettext and ngettext
185 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
186 glib_save_LIBS="$LIBS"
187 LIBS="$LIBS -lintl $libintl_extra_libs"
188 unset ac_cv_func_bind_textdomain_codeset
189 AC_CHECK_FUNCS(bind_textdomain_codeset)
190 LIBS="$glib_save_LIBS"
192 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
193 gt_cv_func_dgettext_libc=no
195 if test "$gt_cv_func_dgettext_libc" = "yes" \
196 && test "$gt_cv_func_ngettext_libc" = "yes"; then
197 gt_cv_func_dgettext_libintl=no
203 if test "$gt_cv_func_dgettext_libc" = "yes" \
204 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
205 gt_cv_have_gettext=yes
208 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
209 INTLLIBS="-lintl $libintl_extra_libs"
212 if test "$gt_cv_have_gettext" = "yes"; then
213 AC_DEFINE(HAVE_GETTEXT,1,
214 [Define if the GNU gettext() function is already present or preinstalled.])
215 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
216 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
217 if test "$MSGFMT" != "no"; then
218 glib_save_LIBS="$LIBS"
219 LIBS="$LIBS $INTLLIBS"
220 AC_CHECK_FUNCS(dcgettext)
222 AC_MSG_CHECKING([if msgfmt accepts -c])
223 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
226 "Content-Type: text/plain; charset=UTF-8\n"
227 "Project-Id-Version: test 1.0\n"
228 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
229 "Last-Translator: test <foo@bar.xx>\n"
230 "Language-Team: C <LL@li.org>\n"
231 "MIME-Version: 1.0\n"
232 "Content-Transfer-Encoding: 8bit\n"
233 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
234 AC_SUBST(MSGFMT_OPTS)
235 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
236 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
237 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
238 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
239 return _nl_msg_cat_cntr],
244 dnl On Solaris, if bind_textdomain_codeset is in libc,
245 dnl GNU format message catalog is always supported,
246 dnl since both are added to the libc all together.
247 dnl Hence, we'd like to go with DATADIRNAME=share and
248 dnl and CATOBJEXT=.gmo in this case.
249 AC_CHECK_FUNC(bind_textdomain_codeset,
260 LIBS="$glib_save_LIBS"
263 gt_cv_have_gettext=no
268 if test "$gt_cv_have_gettext" = "yes" ; then
269 AC_DEFINE(ENABLE_NLS, 1,
270 [always defined to indicate that i18n is enabled])
273 dnl Test whether we really found GNU xgettext.
274 if test "$XGETTEXT" != ":"; then
275 dnl If it is not GNU xgettext we define it as : so that the
276 dnl Makefiles still can work.
277 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
281 [found xgettext program is not GNU xgettext; ignore it])
286 # We need to process the po/ directory.
290 [case "$CONFIG_FILES" in *po/Makefile.in*)
291 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
294 dnl These rules are solely for the distribution goal. While doing this
295 dnl we only have to keep exactly one list of the available catalogs
297 for lang in $ALL_LINGUAS; do
298 GMOFILES="$GMOFILES $lang.gmo"
299 POFILES="$POFILES $lang.po"
302 dnl Make all variables we use known to autoconf.
305 AC_SUBST(DATADIRNAME)
309 AC_SUBST(PO_IN_DATADIR_TRUE)
310 AC_SUBST(PO_IN_DATADIR_FALSE)
315 # AM_GLIB_GNU_GETTEXT
316 # -------------------
317 # Do checks necessary for use of gettext. If a suitable implementation
318 # of gettext is found in either in libintl or in the C library,
319 # it will set INTLLIBS to the libraries needed for use of gettext
320 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
321 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
322 # on various variables needed by the Makefile.in.in installed by
325 glib_DEFUN([GLIB_GNU_GETTEXT],
326 [AC_REQUIRE([AC_PROG_CC])dnl
327 AC_REQUIRE([AC_HEADER_STDC])dnl
332 if test "$gt_cv_have_gettext" = "yes"; then
333 if test "x$ALL_LINGUAS" = "x"; then
336 AC_MSG_CHECKING(for catalogs to be installed)
338 for presentlang in $ALL_LINGUAS; do
340 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
341 desiredlanguages="$LINGUAS"
343 desiredlanguages="$ALL_LINGUAS"
345 for desiredlang in $desiredlanguages; do
346 # Use the presentlang catalog if desiredlang is
347 # a. equal to presentlang, or
348 # b. a variant of presentlang (because in this case,
349 # presentlang can be used as a fallback for messages
350 # which are not translated in the desiredlang catalog).
351 case "$desiredlang" in
352 "$presentlang"*) useit=yes;;
355 if test $useit = yes; then
356 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
360 AC_MSG_RESULT($LINGUAS)
363 dnl Construct list of names of catalog files to be constructed.
364 if test -n "$LINGUAS"; then
365 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
369 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
370 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
371 dnl Try to locate is.
373 if test -n "$ac_aux_dir"; then
374 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
376 if test -z "$MKINSTALLDIRS"; then
377 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
379 AC_SUBST(MKINSTALLDIRS)
381 dnl Generate list of files to be processed by xgettext which will
382 dnl be included in po/Makefile.
383 test -d po || mkdir po
384 if test "x$srcdir" != "x."; then
385 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
386 posrcprefix="$srcdir/"
388 posrcprefix="../$srcdir/"
394 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
395 < $srcdir/po/POTFILES.in > po/POTFILES
398 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
399 # -------------------------------
400 # Define VARIABLE to the location where catalog files will
401 # be installed by po/Makefile.
402 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
403 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
404 glib_save_prefix="$prefix"
405 glib_save_exec_prefix="$exec_prefix"
406 glib_save_datarootdir="$datarootdir"
407 test "x$prefix" = xNONE && prefix=$ac_default_prefix
408 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
409 datarootdir=`eval echo "${datarootdir}"`
410 if test "x$CATOBJEXT" = "x.mo" ; then
411 localedir=`eval echo "${libdir}/locale"`
413 localedir=`eval echo "${datadir}/locale"`
415 prefix="$glib_save_prefix"
416 exec_prefix="$glib_save_exec_prefix"
417 datarootdir="$glib_save_datarootdir"
418 AC_DEFINE_UNQUOTED($1, "$localedir",
419 [Define the location where the catalogs will be installed])
423 dnl Now the definitions that aclocal will find
425 ifdef(glib_configure_in,[],[
426 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
427 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
430 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
432 # Create a temporary file with TEST-FILE as its contents and pass the
433 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
434 # 0 and perform ACTION-IF-FAIL for any other exit status.
435 AC_DEFUN([GLIB_RUN_PROG],
436 [cat >conftest.foo <<_ACEOF
439 if AC_RUN_LOG([$1 conftest.foo]); then
440 m4_ifval([$3], [$3], [:])
441 m4_ifvaln([$4], [else $4])dnl
442 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
443 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
447 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
449 # serial 47 AC_PROG_LIBTOOL
452 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
453 # -----------------------------------------------------------
454 # If this macro is not defined by Autoconf, define it here.
455 m4_ifdef([AC_PROVIDE_IFELSE],
457 [m4_define([AC_PROVIDE_IFELSE],
458 [m4_ifdef([AC_PROVIDE_$1],
464 AC_DEFUN([AC_PROG_LIBTOOL],
465 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
466 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
467 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
468 AC_PROVIDE_IFELSE([AC_PROG_CXX],
470 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
472 dnl And a similar setup for Fortran 77 support
473 AC_PROVIDE_IFELSE([AC_PROG_F77],
475 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
478 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
479 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
480 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
481 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
483 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
485 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
487 [ifdef([AC_PROG_GCJ],
488 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
489 ifdef([A][M_PROG_GCJ],
490 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
491 ifdef([LT_AC_PROG_GCJ],
492 [define([LT_AC_PROG_GCJ],
493 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
494 ])])# AC_PROG_LIBTOOL
499 AC_DEFUN([_AC_PROG_LIBTOOL],
500 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
501 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
502 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
503 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
505 # This can be used to rebuild libtool when needed
506 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
508 # Always use our own libtool.
509 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
512 # Prevent multiple expansion
513 define([AC_PROG_LIBTOOL], [])
519 AC_DEFUN([AC_LIBTOOL_SETUP],
521 AC_REQUIRE([AC_ENABLE_SHARED])dnl
522 AC_REQUIRE([AC_ENABLE_STATIC])dnl
523 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
524 AC_REQUIRE([AC_CANONICAL_HOST])dnl
525 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
526 AC_REQUIRE([AC_PROG_CC])dnl
527 AC_REQUIRE([AC_PROG_LD])dnl
528 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
529 AC_REQUIRE([AC_PROG_NM])dnl
531 AC_REQUIRE([AC_PROG_LN_S])dnl
532 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
533 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
534 AC_REQUIRE([AC_OBJEXT])dnl
535 AC_REQUIRE([AC_EXEEXT])dnl
538 AC_LIBTOOL_SYS_MAX_CMD_LEN
539 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
542 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
543 _LT_AC_PROG_ECHO_BACKSLASH
547 # AIX sometimes has problems with the GCC collect2 program. For some
548 # reason, if we set the COLLECT_NAMES environment variable, the problems
549 # vanish in a puff of smoke.
550 if test "X${COLLECT_NAMES+set}" != Xset; then
557 # Sed substitution that helps us do robust quoting. It backslashifies
558 # metacharacters that are still active within double-quoted strings.
559 Xsed='sed -e 1s/^X//'
560 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
562 # Same as above, but do not quote variable references.
563 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
565 # Sed substitution to delay expansion of an escaped shell variable in a
566 # double_quote_subst'ed string.
567 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
569 # Sed substitution to avoid accidental globbing in evaled expressions
570 no_glob_subst='s/\*/\\\*/g'
576 default_ofile=libtool
579 # All known linkers require a `.a' archive for static linking (except MSVC,
580 # which needs '.lib').
582 ltmain="$ac_aux_dir/ltmain.sh"
583 ofile="$default_ofile"
584 with_gnu_ld="$lt_cv_prog_gnu_ld"
586 AC_CHECK_TOOL(AR, ar, false)
587 AC_CHECK_TOOL(RANLIB, ranlib, :)
588 AC_CHECK_TOOL(STRIP, strip, :)
593 # Set sane defaults for various variables
594 test -z "$AR" && AR=ar
595 test -z "$AR_FLAGS" && AR_FLAGS=cru
596 test -z "$AS" && AS=as
597 test -z "$CC" && CC=cc
598 test -z "$LTCC" && LTCC=$CC
599 test -z "$DLLTOOL" && DLLTOOL=dlltool
600 test -z "$LD" && LD=ld
601 test -z "$LN_S" && LN_S="ln -s"
602 test -z "$MAGIC_CMD" && MAGIC_CMD=file
603 test -z "$NM" && NM=nm
604 test -z "$SED" && SED=sed
605 test -z "$OBJDUMP" && OBJDUMP=objdump
606 test -z "$RANLIB" && RANLIB=:
607 test -z "$STRIP" && STRIP=:
608 test -z "$ac_objext" && ac_objext=o
610 # Determine commands to create old-style static archives.
611 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
612 old_postinstall_cmds='chmod 644 $oldlib'
613 old_postuninstall_cmds=
615 if test -n "$RANLIB"; then
618 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
621 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
624 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
627 _LT_CC_BASENAME([$compiler])
629 # Only perform the check for file, if the check method requires it
630 case $deplibs_check_method in
632 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
638 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
639 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
640 enable_win32_dll=yes, enable_win32_dll=no)
642 AC_ARG_ENABLE([libtool-lock],
643 [AC_HELP_STRING([--disable-libtool-lock],
644 [avoid locking (might break parallel builds)])])
645 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
648 [AC_HELP_STRING([--with-pic],
649 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
650 [pic_mode="$withval"],
652 test -z "$pic_mode" && pic_mode=default
654 # Use C for the default configuration in the libtool script
656 AC_LIBTOOL_LANG_C_CONFIG
661 # _LT_AC_SYS_COMPILER
662 # -------------------
663 AC_DEFUN([_LT_AC_SYS_COMPILER],
664 [AC_REQUIRE([AC_PROG_CC])dnl
666 # If no C compiler was specified, use CC.
669 # Allow CC to be a program name with arguments.
671 ])# _LT_AC_SYS_COMPILER
674 # _LT_CC_BASENAME(CC)
675 # -------------------
676 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
677 AC_DEFUN([_LT_CC_BASENAME],
678 [for cc_temp in $1""; do
680 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
681 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
686 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
690 # _LT_COMPILER_BOILERPLATE
691 # ------------------------
692 # Check for compiler boilerplate output or warnings with
693 # the simple compiler test code.
694 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
695 [ac_outfile=conftest.$ac_objext
696 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
697 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
698 _lt_compiler_boilerplate=`cat conftest.err`
700 ])# _LT_COMPILER_BOILERPLATE
703 # _LT_LINKER_BOILERPLATE
704 # ----------------------
705 # Check for linker boilerplate output or warnings with
706 # the simple link test code.
707 AC_DEFUN([_LT_LINKER_BOILERPLATE],
708 [ac_outfile=conftest.$ac_objext
709 printf "$lt_simple_link_test_code" >conftest.$ac_ext
710 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
711 _lt_linker_boilerplate=`cat conftest.err`
713 ])# _LT_LINKER_BOILERPLATE
716 # _LT_AC_SYS_LIBPATH_AIX
717 # ----------------------
718 # Links a minimal program and checks the executable
719 # for the system default hardcoded library path. In most cases,
720 # this is /usr/lib:/lib, but when the MPI compilers are used
721 # the location of the communication and MPI libs are included too.
722 # If we don't find anything, use the default library path according
723 # to the aix ld manual.
724 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
725 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
726 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
728 # Check for a 64-bit object if we didn't find anything.
729 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; }
731 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
732 ])# _LT_AC_SYS_LIBPATH_AIX
735 # _LT_AC_SHELL_INIT(ARG)
736 # ----------------------
737 AC_DEFUN([_LT_AC_SHELL_INIT],
738 [ifdef([AC_DIVERSION_NOTICE],
739 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
740 [AC_DIVERT_PUSH(NOTICE)])
743 ])# _LT_AC_SHELL_INIT
746 # _LT_AC_PROG_ECHO_BACKSLASH
747 # --------------------------
748 # Add some code to the start of the generated configure script which
749 # will find an echo command which doesn't interpret backslashes.
750 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
752 # Check that we are running under the correct shell.
753 SHELL=${CONFIG_SHELL-/bin/sh}
757 # Remove one level of quotation (which was required for Make).
758 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
763 if test "X[$]1" = X--no-reexec; then
764 # Discard the --no-reexec flag, and continue.
766 elif test "X[$]1" = X--fallback-echo; then
767 # Avoid inline document here, it may be left over
769 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
770 # Yippee, $echo works!
773 # Restart under the correct shell.
774 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
777 if test "X[$]1" = X--fallback-echo; then
778 # used as fallback echo
786 # The HP-UX ksh and POSIX shell print the target directory to stdout
788 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
790 if test -z "$ECHO"; then
791 if test "X${echo_test_string+set}" != Xset; then
792 # find a string as large as possible, as long as the shell can cope with it
793 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
794 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
795 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
796 echo_test_string=`eval $cmd` &&
797 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
804 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
805 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
806 test "X$echo_testing_string" = "X$echo_test_string"; then
809 # The Solaris, AIX, and Digital Unix default echo programs unquote
810 # backslashes. This makes it impossible to quote backslashes using
811 # echo "$something" | sed 's/\\/\\\\/g'
813 # So, first we look for a working echo in the user's PATH.
815 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
816 for dir in $PATH /usr/ucb; do
818 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
819 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
820 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
821 test "X$echo_testing_string" = "X$echo_test_string"; then
828 if test "X$echo" = Xecho; then
829 # We didn't find a better echo, so look for alternatives.
830 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
831 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
832 test "X$echo_testing_string" = "X$echo_test_string"; then
833 # This shell has a builtin print -r that does the trick.
835 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
836 test "X$CONFIG_SHELL" != X/bin/ksh; then
837 # If we have ksh, try running configure again with it.
838 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
839 export ORIGINAL_CONFIG_SHELL
840 CONFIG_SHELL=/bin/ksh
842 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
846 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
847 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
848 test "X$echo_testing_string" = "X$echo_test_string"; then
851 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
852 test "X$echo_testing_string" = 'X\t' &&
853 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
854 test "X$echo_testing_string" = "X$echo_test_string"; then
855 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
857 SHELL="$CONFIG_SHELL"
859 echo="$CONFIG_SHELL [$]0 --fallback-echo"
860 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
861 test "X$echo_testing_string" = 'X\t' &&
862 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
863 test "X$echo_testing_string" = "X$echo_test_string"; then
864 echo="$CONFIG_SHELL [$]0 --fallback-echo"
866 # maybe with a smaller string...
869 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
870 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
877 if test "$prev" != 'sed 50q "[$]0"'; then
878 echo_test_string=`eval $prev`
879 export echo_test_string
880 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
882 # Oops. We lost completely, so just stick with echo.
891 # Copy echo and quote the copy suitably for passing to libtool from
892 # the Makefile, instead of quoting the original, which is used later.
894 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
895 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
899 ])])# _LT_AC_PROG_ECHO_BACKSLASH
904 AC_DEFUN([_LT_AC_LOCK],
905 [AC_ARG_ENABLE([libtool-lock],
906 [AC_HELP_STRING([--disable-libtool-lock],
907 [avoid locking (might break parallel builds)])])
908 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
910 # Some flags need to be propagated to the compiler or linker for good
914 # Find out which ABI we are using.
915 echo 'int i;' > conftest.$ac_ext
916 if AC_TRY_EVAL(ac_compile); then
917 case `/usr/bin/file conftest.$ac_objext` in
929 # Find out which ABI we are using.
930 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
931 if AC_TRY_EVAL(ac_compile); then
932 if test "$lt_cv_prog_gnu_ld" = yes; then
933 case `/usr/bin/file conftest.$ac_objext` in
935 LD="${LD-ld} -melf32bsmip"
938 LD="${LD-ld} -melf32bmipn32"
941 LD="${LD-ld} -melf64bmip"
945 case `/usr/bin/file conftest.$ac_objext` in
961 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
962 # Find out which ABI we are using.
963 echo 'int i;' > conftest.$ac_ext
964 if AC_TRY_EVAL(ac_compile); then
965 case `/usr/bin/file conftest.o` in
969 LD="${LD-ld} -m elf_i386"
971 ppc64-*linux*|powerpc64-*linux*)
972 LD="${LD-ld} -m elf32ppclinux"
975 LD="${LD-ld} -m elf_s390"
978 LD="${LD-ld} -m elf32_sparc"
985 LD="${LD-ld} -m elf_x86_64"
987 ppc*-*linux*|powerpc*-*linux*)
988 LD="${LD-ld} -m elf64ppc"
991 LD="${LD-ld} -m elf64_s390"
994 LD="${LD-ld} -m elf64_sparc"
1004 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1005 SAVE_CFLAGS="$CFLAGS"
1006 CFLAGS="$CFLAGS -belf"
1007 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1009 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1011 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1012 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1013 CFLAGS="$SAVE_CFLAGS"
1016 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1017 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1018 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1019 AC_CHECK_TOOL(AS, as, false)
1020 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1025 need_locks="$enable_libtool_lock"
1030 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1031 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1032 # ----------------------------------------------------------------
1033 # Check whether the given compiler option works
1034 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1035 [AC_REQUIRE([LT_AC_PROG_SED])
1036 AC_CACHE_CHECK([$1], [$2],
1038 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1039 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1040 lt_compiler_flag="$3"
1041 # Insert the option either (1) after the last *FLAGS variable, or
1042 # (2) before a word containing "conftest.", or (3) at the end.
1043 # Note that $ac_compile itself does not contain backslashes and begins
1044 # with a dollar sign (not a hyphen), so the echo should work correctly.
1045 # The option is referenced via a variable to avoid confusing sed.
1046 lt_compile=`echo "$ac_compile" | $SED \
1047 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1048 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1049 -e 's:$: $lt_compiler_flag:'`
1050 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1051 (eval "$lt_compile" 2>conftest.err)
1053 cat conftest.err >&AS_MESSAGE_LOG_FD
1054 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1055 if (exit $ac_status) && test -s "$ac_outfile"; then
1056 # The compiler can only warn and ignore the option if not recognized
1057 # So say no if there are warnings other than the usual output.
1058 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
1059 $SED '/^$/d' conftest.err >conftest.er2
1060 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
1067 if test x"[$]$2" = xyes; then
1068 ifelse([$5], , :, [$5])
1070 ifelse([$6], , :, [$6])
1072 ])# AC_LIBTOOL_COMPILER_OPTION
1075 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1076 # [ACTION-SUCCESS], [ACTION-FAILURE])
1077 # ------------------------------------------------------------
1078 # Check whether the given compiler option works
1079 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1080 [AC_CACHE_CHECK([$1], [$2],
1082 save_LDFLAGS="$LDFLAGS"
1083 LDFLAGS="$LDFLAGS $3"
1084 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1085 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1086 # The linker can only warn and ignore the option if not recognized
1087 # So say no if there are warnings
1088 if test -s conftest.err; then
1089 # Append any errors to the config.log.
1090 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1091 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
1092 $SED '/^$/d' conftest.err >conftest.er2
1093 if diff conftest.exp conftest.er2 >/dev/null; then
1101 LDFLAGS="$save_LDFLAGS"
1104 if test x"[$]$2" = xyes; then
1105 ifelse([$4], , :, [$4])
1107 ifelse([$5], , :, [$5])
1109 ])# AC_LIBTOOL_LINKER_OPTION
1112 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1113 # --------------------------
1114 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1115 [# find the maximum length of command line arguments
1116 AC_MSG_CHECKING([the maximum length of command line arguments])
1117 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1123 # On DJGPP, this test can blow up pretty badly due to problems in libc
1124 # (any single argument exceeding 2000 bytes causes a buffer overrun
1125 # during glob expansion). Even if it were fixed, the result of this
1126 # check would be larger than it should be.
1127 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1131 # Under GNU Hurd, this test is not required because there is
1132 # no limit to the length of command line arguments.
1133 # Libtool will interpret -1 as no limit whatsoever
1134 lt_cv_sys_max_cmd_len=-1;
1138 # On Win9x/ME, this test blows up -- it succeeds, but takes
1139 # about 5 minutes as the teststring grows exponentially.
1140 # Worse, since 9x/ME are not pre-emptively multitasking,
1141 # you end up with a "frozen" computer, even though with patience
1142 # the test eventually succeeds (with a max line length of 256k).
1143 # Instead, let's just punt: use the minimum linelength reported by
1144 # all of the supported platforms: 8192 (on NT/2K/XP).
1145 lt_cv_sys_max_cmd_len=8192;
1149 # On AmigaOS with pdksh, this test takes hours, literally.
1150 # So we just punt and use a minimum line length of 8192.
1151 lt_cv_sys_max_cmd_len=8192;
1154 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1155 # This has been around since 386BSD, at least. Likely further.
1156 if test -x /sbin/sysctl; then
1157 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1158 elif test -x /usr/sbin/sysctl; then
1159 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1161 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1163 # And add a safety zone
1164 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1165 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1168 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1169 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1170 # nice to cause kernel panics so lets avoid the loop below.
1171 # First set a reasonable default.
1172 lt_cv_sys_max_cmd_len=16384
1174 if test -x /sbin/sysconfig; then
1175 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1176 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1181 # If test is not a shell built-in, we'll probably end up computing a
1182 # maximum length that is only half of the actual maximum length, but
1184 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1185 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1186 = "XX$teststring") >/dev/null 2>&1 &&
1187 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1188 lt_cv_sys_max_cmd_len=$new_result &&
1189 test $i != 17 # 1/2 MB should be enough
1192 teststring=$teststring$teststring
1195 # Add a significant safety factor because C++ compilers can tack on massive
1196 # amounts of additional arguments before passing them to the linker.
1197 # It appears as though 1/2 is a usable value.
1198 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1202 if test -n $lt_cv_sys_max_cmd_len ; then
1203 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1207 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1210 # _LT_AC_CHECK_DLFCN
1211 # --------------------
1212 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1213 [AC_CHECK_HEADERS(dlfcn.h)dnl
1214 ])# _LT_AC_CHECK_DLFCN
1217 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1218 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1219 # ------------------------------------------------------------------
1220 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1221 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1222 if test "$cross_compiling" = yes; then :
1225 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1226 lt_status=$lt_dlunknown
1227 cat > conftest.$ac_ext <<EOF
1228 [#line __oline__ "configure"
1229 #include "confdefs.h"
1238 # define LT_DLGLOBAL RTLD_GLOBAL
1241 # define LT_DLGLOBAL DL_GLOBAL
1243 # define LT_DLGLOBAL 0
1247 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1248 find out it does not work in some platform. */
1249 #ifndef LT_DLLAZY_OR_NOW
1251 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1254 # define LT_DLLAZY_OR_NOW DL_LAZY
1257 # define LT_DLLAZY_OR_NOW RTLD_NOW
1260 # define LT_DLLAZY_OR_NOW DL_NOW
1262 # define LT_DLLAZY_OR_NOW 0
1270 extern "C" void exit (int);
1273 void fnord() { int i=42;}
1276 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1277 int status = $lt_dlunknown;
1281 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1282 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1283 /* dlclose (self); */
1289 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1290 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1293 x$lt_dlno_uscore) $1 ;;
1294 x$lt_dlneed_uscore) $2 ;;
1295 x$lt_unknown|x*) $3 ;;
1298 # compilation failed
1303 ])# _LT_AC_TRY_DLOPEN_SELF
1306 # AC_LIBTOOL_DLOPEN_SELF
1307 # -------------------
1308 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1309 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1310 if test "x$enable_dlopen" != xyes; then
1311 enable_dlopen=unknown
1312 enable_dlopen_self=unknown
1313 enable_dlopen_self_static=unknown
1320 lt_cv_dlopen="load_add_on"
1322 lt_cv_dlopen_self=yes
1326 lt_cv_dlopen="LoadLibrary"
1331 lt_cv_dlopen="dlopen"
1336 # if libdl is installed we need to link against it
1337 AC_CHECK_LIB([dl], [dlopen],
1338 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1341 lt_cv_dlopen_self=yes
1346 AC_CHECK_FUNC([shl_load],
1347 [lt_cv_dlopen="shl_load"],
1348 [AC_CHECK_LIB([dld], [shl_load],
1349 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1350 [AC_CHECK_FUNC([dlopen],
1351 [lt_cv_dlopen="dlopen"],
1352 [AC_CHECK_LIB([dl], [dlopen],
1353 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1354 [AC_CHECK_LIB([svld], [dlopen],
1355 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1356 [AC_CHECK_LIB([dld], [dld_link],
1357 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1366 if test "x$lt_cv_dlopen" != xno; then
1372 case $lt_cv_dlopen in
1374 save_CPPFLAGS="$CPPFLAGS"
1375 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1377 save_LDFLAGS="$LDFLAGS"
1378 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1381 LIBS="$lt_cv_dlopen_libs $LIBS"
1383 AC_CACHE_CHECK([whether a program can dlopen itself],
1384 lt_cv_dlopen_self, [dnl
1385 _LT_AC_TRY_DLOPEN_SELF(
1386 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1387 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1390 if test "x$lt_cv_dlopen_self" = xyes; then
1391 LDFLAGS="$LDFLAGS $link_static_flag"
1392 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1393 lt_cv_dlopen_self_static, [dnl
1394 _LT_AC_TRY_DLOPEN_SELF(
1395 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1396 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1400 CPPFLAGS="$save_CPPFLAGS"
1401 LDFLAGS="$save_LDFLAGS"
1406 case $lt_cv_dlopen_self in
1407 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1408 *) enable_dlopen_self=unknown ;;
1411 case $lt_cv_dlopen_self_static in
1412 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1413 *) enable_dlopen_self_static=unknown ;;
1416 ])# AC_LIBTOOL_DLOPEN_SELF
1419 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1420 # ---------------------------------
1421 # Check to see if options -c and -o are simultaneously supported by compiler
1422 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1423 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1424 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1425 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1426 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1427 $rm -r conftest 2>/dev/null
1431 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1433 lt_compiler_flag="-o out/conftest2.$ac_objext"
1434 # Insert the option either (1) after the last *FLAGS variable, or
1435 # (2) before a word containing "conftest.", or (3) at the end.
1436 # Note that $ac_compile itself does not contain backslashes and begins
1437 # with a dollar sign (not a hyphen), so the echo should work correctly.
1438 lt_compile=`echo "$ac_compile" | $SED \
1439 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1440 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1441 -e 's:$: $lt_compiler_flag:'`
1442 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1443 (eval "$lt_compile" 2>out/conftest.err)
1445 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1446 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1447 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1449 # The compiler can only warn and ignore the option if not recognized
1450 # So say no if there are warnings
1451 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1452 $SED '/^$/d' out/conftest.err >out/conftest.er2
1453 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1454 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1457 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1459 # SGI C++ compiler will create directory out/ii_files/ for
1460 # template instantiation
1461 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1462 $rm out/* && rmdir out
1467 ])# AC_LIBTOOL_PROG_CC_C_O
1470 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1471 # -----------------------------------------
1472 # Check to see if we can do hard links to lock some files if needed
1473 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1474 [AC_REQUIRE([_LT_AC_LOCK])dnl
1476 hard_links="nottested"
1477 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1478 # do not overwrite the value of need_locks provided by the user
1479 AC_MSG_CHECKING([if we can lock with hard links])
1482 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1484 ln conftest.a conftest.b 2>&5 || hard_links=no
1485 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1486 AC_MSG_RESULT([$hard_links])
1487 if test "$hard_links" = no; then
1488 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1494 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1499 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1500 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1501 [rm -f .libs 2>/dev/null
1502 mkdir .libs 2>/dev/null
1503 if test -d .libs; then
1506 # MS-DOS does not allow filenames that begin with a dot.
1509 rmdir .libs 2>/dev/null])
1510 objdir=$lt_cv_objdir
1511 ])# AC_LIBTOOL_OBJDIR
1514 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1515 # ----------------------------------------------
1516 # Check hardcoding attributes.
1517 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1518 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1519 _LT_AC_TAGVAR(hardcode_action, $1)=
1520 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1521 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1522 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1524 # We can hardcode non-existant directories.
1525 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1526 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1527 # have to relink, otherwise we might link with an installed library
1528 # when we should be linking with a yet-to-be-installed one
1529 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1530 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1531 # Linking always hardcodes the temporary library directory.
1532 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1534 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1535 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1538 # We cannot hardcode anything, or else we can only hardcode existing
1540 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1542 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1544 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1545 # Fast installation is not supported
1546 enable_fast_install=no
1547 elif test "$shlibpath_overrides_runpath" = yes ||
1548 test "$enable_shared" = no; then
1549 # Fast installation is not necessary
1550 enable_fast_install=needless
1552 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1555 # AC_LIBTOOL_SYS_LIB_STRIP
1556 # ------------------------
1557 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1560 AC_MSG_CHECKING([whether stripping libraries is possible])
1561 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1562 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1563 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1564 AC_MSG_RESULT([yes])
1566 # FIXME - insert some real tests, host_os isn't really good enough
1569 if test -n "$STRIP" ; then
1570 striplib="$STRIP -x"
1571 AC_MSG_RESULT([yes])
1581 ])# AC_LIBTOOL_SYS_LIB_STRIP
1584 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1585 # -----------------------------
1586 # PORTME Fill in your ld.so characteristics
1587 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1588 [AC_MSG_CHECKING([dynamic linker characteristics])
1590 libname_spec='lib$name'
1598 shlibpath_overrides_runpath=unknown
1600 dynamic_linker="$host_os ld.so"
1601 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1602 if test "$GCC" = yes; then
1603 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1604 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1605 # if the path contains ";" then we assume it to be the separator
1606 # otherwise default to the standard path separator (i.e. ":") - it is
1607 # assumed that no part of a normal pathname contains ";" but that should
1608 # okay in the real world where ";" in dirpaths is itself problematic.
1609 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1611 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1614 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1616 need_lib_prefix=unknown
1617 hardcode_into_libs=no
1619 # when you set need_version to no, make sure it does not cause -set_version
1620 # flags to be left without arguments
1621 need_version=unknown
1626 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1627 shlibpath_var=LIBPATH
1629 # AIX 3 has no versioning support, so we append a major version to the name.
1630 soname_spec='${libname}${release}${shared_ext}$major'
1637 hardcode_into_libs=yes
1638 if test "$host_cpu" = ia64; then
1639 # AIX 5 supports IA64
1640 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1641 shlibpath_var=LD_LIBRARY_PATH
1643 # With GCC up to 2.95.x, collect2 would create an import file
1644 # for dependence libraries. The import file would start with
1645 # the line `#! .'. This would cause the generated library to
1646 # depend on `.', always an invalid library. This was fixed in
1647 # development snapshots of GCC prior to 3.0.
1649 aix4 | aix4.[[01]] | aix4.[[01]].*)
1650 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1652 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1659 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1660 # soname into executable. Probably we can add versioning support to
1661 # collect2, so additional links can be useful in future.
1662 if test "$aix_use_runtimelinking" = yes; then
1663 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1664 # instead of lib<name>.a to let people know that these are not
1665 # typical AIX shared libraries.
1666 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1668 # We preserve .a as extension for shared libraries through AIX4.2
1669 # and later when we are not doing run time linking.
1670 library_names_spec='${libname}${release}.a $libname.a'
1671 soname_spec='${libname}${release}${shared_ext}$major'
1673 shlibpath_var=LIBPATH
1678 library_names_spec='$libname.ixlibrary $libname.a'
1679 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1680 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'
1684 library_names_spec='${libname}${shared_ext}'
1685 dynamic_linker="$host_os ld.so"
1686 shlibpath_var=LIBRARY_PATH
1692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1693 soname_spec='${libname}${release}${shared_ext}$major'
1694 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1695 shlibpath_var=LD_LIBRARY_PATH
1696 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1697 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1698 # the default ld.so.conf also contains /usr/contrib/lib and
1699 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1700 # libtool to hard-code these into programs
1703 cygwin* | mingw* | pw32*)
1704 version_type=windows
1709 case $GCC,$host_os in
1710 yes,cygwin* | yes,mingw* | yes,pw32*)
1711 library_names_spec='$libname.dll.a'
1712 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1713 postinstall_cmds='base_file=`basename \${file}`~
1714 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1715 dldir=$destdir/`dirname \$dlpath`~
1716 test -d \$dldir || mkdir -p \$dldir~
1717 $install_prog $dir/$dlname \$dldir/$dlname~
1718 chmod a+x \$dldir/$dlname'
1719 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1720 dlpath=$dir/\$dldll~
1722 shlibpath_overrides_runpath=yes
1726 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1727 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1728 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1731 # MinGW DLLs use traditional 'lib' prefix
1732 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1733 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1734 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1735 # It is most probably a Windows format PATH printed by
1736 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1737 # path with ; separators, and with drive letters. We can handle the
1738 # drive letters (cygwin fileutils understands them), so leave them,
1739 # especially as we might pass files found there to a mingw objdump,
1740 # which wouldn't understand a cygwinified path. Ahh.
1741 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1743 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1747 # pw32 DLLs use 'pw' prefix rather than 'lib'
1748 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1754 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1757 dynamic_linker='Win32 ld.exe'
1758 # FIXME: first we should search . and the directory the executable is in
1762 darwin* | rhapsody*)
1763 dynamic_linker="$host_os dyld"
1767 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1768 soname_spec='${libname}${release}${major}$shared_ext'
1769 shlibpath_overrides_runpath=yes
1770 shlibpath_var=DYLD_LIBRARY_PATH
1771 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1772 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1773 if test "$GCC" = yes; then
1774 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"`
1776 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1778 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1785 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1786 soname_spec='${libname}${release}${shared_ext}$major'
1787 shlibpath_var=LD_LIBRARY_PATH
1798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1799 soname_spec='${libname}${release}${shared_ext}$major'
1800 shlibpath_var=LD_LIBRARY_PATH
1801 shlibpath_overrides_runpath=no
1802 hardcode_into_libs=yes
1803 dynamic_linker='GNU ld.so'
1806 freebsd* | dragonfly*)
1807 # DragonFly does not have aout. When/if they implement a new
1808 # versioning mechanism, adjust this.
1809 if test -x /usr/bin/objformat; then
1810 objformat=`/usr/bin/objformat`
1813 freebsd[[123]]*) objformat=aout ;;
1817 version_type=freebsd-$objformat
1818 case $version_type in
1820 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1825 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1829 shlibpath_var=LD_LIBRARY_PATH
1832 shlibpath_overrides_runpath=yes
1834 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1835 shlibpath_overrides_runpath=yes
1836 hardcode_into_libs=yes
1839 shlibpath_overrides_runpath=no
1840 hardcode_into_libs=yes
1849 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1850 soname_spec='${libname}${release}${shared_ext}$major'
1851 shlibpath_var=LD_LIBRARY_PATH
1852 hardcode_into_libs=yes
1855 hpux9* | hpux10* | hpux11*)
1856 # Give a soname corresponding to the major version so that dld.sl refuses to
1857 # link against other versions.
1864 hardcode_into_libs=yes
1865 dynamic_linker="$host_os dld.so"
1866 shlibpath_var=LD_LIBRARY_PATH
1867 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1868 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1869 soname_spec='${libname}${release}${shared_ext}$major'
1870 if test "X$HPUX_IA64_MODE" = X32; then
1871 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1873 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1875 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1879 hardcode_into_libs=yes
1880 dynamic_linker="$host_os dld.sl"
1881 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1882 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1883 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1884 soname_spec='${libname}${release}${shared_ext}$major'
1885 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1886 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1890 dynamic_linker="$host_os dld.sl"
1891 shlibpath_var=SHLIB_PATH
1892 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1894 soname_spec='${libname}${release}${shared_ext}$major'
1897 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1898 postinstall_cmds='chmod 555 $lib'
1901 irix5* | irix6* | nonstopux*)
1903 nonstopux*) version_type=nonstopux ;;
1905 if test "$lt_cv_prog_gnu_ld" = yes; then
1913 soname_spec='${libname}${release}${shared_ext}$major'
1914 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1916 irix5* | nonstopux*)
1920 case $LD in # libtool.m4 will add one of these switches to LD
1921 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1922 libsuff= shlibsuff= libmagic=32-bit;;
1923 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1924 libsuff=32 shlibsuff=N32 libmagic=N32;;
1925 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1926 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1927 *) libsuff= shlibsuff= libmagic=never-match;;
1931 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1932 shlibpath_overrides_runpath=no
1933 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1934 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1935 hardcode_into_libs=yes
1938 # No shared lib support for Linux oldld, aout, or coff.
1939 linux*oldld* | linux*aout* | linux*coff*)
1943 # This must be Linux ELF.
1948 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1949 soname_spec='${libname}${release}${shared_ext}$major'
1950 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1951 shlibpath_var=LD_LIBRARY_PATH
1952 shlibpath_overrides_runpath=no
1953 # This implies no fast_install, which is unacceptable.
1954 # Some rework will be needed to allow for fast_install
1955 # before this can be enabled.
1956 hardcode_into_libs=yes
1958 # Append ld.so.conf contents to the search path
1959 if test -f /etc/ld.so.conf; then
1960 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1961 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1964 # We used to test for /lib/ld.so.1 and disable shared libraries on
1965 # powerpc, because MkLinux only supported shared libraries with the
1966 # GNU dynamic linker. Since this was broken with cross compilers,
1967 # most powerpc-linux boxes support dynamic linking these days and
1968 # people can always --disable-shared, the test was removed, and we
1969 # assume the GNU/Linux dynamic linker is in use.
1970 dynamic_linker='GNU/Linux ld.so'
1977 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1978 soname_spec='${libname}${release}${shared_ext}$major'
1979 shlibpath_var=LD_LIBRARY_PATH
1980 shlibpath_overrides_runpath=no
1981 hardcode_into_libs=yes
1982 dynamic_linker='GNU ld.so'
1989 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1990 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1991 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1992 dynamic_linker='NetBSD (a.out) ld.so'
1994 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1995 soname_spec='${libname}${release}${shared_ext}$major'
1996 dynamic_linker='NetBSD ld.elf_so'
1998 shlibpath_var=LD_LIBRARY_PATH
1999 shlibpath_overrides_runpath=yes
2000 hardcode_into_libs=yes
2005 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2006 shlibpath_var=LD_LIBRARY_PATH
2007 shlibpath_overrides_runpath=yes
2014 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2015 soname_spec='${libname}${release}${shared_ext}$major'
2016 shlibpath_var=LD_LIBRARY_PATH
2017 shlibpath_overrides_runpath=yes
2023 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2025 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2026 *) need_version=no ;;
2028 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2029 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2030 shlibpath_var=LD_LIBRARY_PATH
2031 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2033 openbsd2.[[89]] | openbsd2.[[89]].*)
2034 shlibpath_overrides_runpath=no
2037 shlibpath_overrides_runpath=yes
2041 shlibpath_overrides_runpath=yes
2046 libname_spec='$name'
2049 library_names_spec='$libname${shared_ext} $libname.a'
2050 dynamic_linker='OS/2 ld.exe'
2051 shlibpath_var=LIBPATH
2054 osf3* | osf4* | osf5*)
2058 soname_spec='${libname}${release}${shared_ext}$major'
2059 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2060 shlibpath_var=LD_LIBRARY_PATH
2061 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2062 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2067 soname_spec='${libname}${release}${shared_ext}$major'
2068 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2069 shlibpath_var=LD_LIBRARY_PATH
2076 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2077 soname_spec='${libname}${release}${shared_ext}$major'
2078 shlibpath_var=LD_LIBRARY_PATH
2079 shlibpath_overrides_runpath=yes
2080 hardcode_into_libs=yes
2081 # ldd complains unless libraries are executable
2082 postinstall_cmds='chmod +x $lib'
2087 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2088 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2089 shlibpath_var=LD_LIBRARY_PATH
2090 shlibpath_overrides_runpath=yes
2091 if test "$with_gnu_ld" = yes; then
2097 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2099 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2100 soname_spec='${libname}${release}${shared_ext}$major'
2101 shlibpath_var=LD_LIBRARY_PATH
2102 case $host_vendor in
2104 shlibpath_overrides_runpath=no
2106 export_dynamic_flag_spec='${wl}-Blargedynsym'
2107 runpath_var=LD_RUN_PATH
2115 shlibpath_overrides_runpath=no
2116 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2122 if test -d /usr/nec ;then
2124 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2125 soname_spec='$libname${shared_ext}.$major'
2126 shlibpath_var=LD_LIBRARY_PATH
2132 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2133 soname_spec='${libname}${release}${shared_ext}$major'
2134 shlibpath_var=LD_LIBRARY_PATH
2141 AC_MSG_RESULT([$dynamic_linker])
2142 test "$dynamic_linker" = no && can_build_shared=no
2143 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2148 AC_DEFUN([_LT_AC_TAGCONFIG],
2149 [AC_ARG_WITH([tags],
2150 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2151 [include additional configurations @<:@automatic@:>@])],
2152 [tagnames="$withval"])
2154 if test -f "$ltmain" && test -n "$tagnames"; then
2155 if test ! -f "${ofile}"; then
2156 AC_MSG_WARN([output file `$ofile' does not exist])
2159 if test -z "$LTCC"; then
2160 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2161 if test -z "$LTCC"; then
2162 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2164 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2168 # Extract list of available tagged configurations in $ofile.
2169 # Note that this assumes the entire list is on one line.
2170 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2172 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2173 for tagname in $tagnames; do
2175 # Check whether tagname contains only valid characters
2176 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2178 *) AC_MSG_ERROR([invalid tag name: $tagname])
2182 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2184 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2187 # Update the list of available tags.
2188 if test -n "$tagname"; then
2189 echo appending configuration tag \"$tagname\" to $ofile
2193 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2194 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2195 (test "X$CXX" != "Xg++"))) ; then
2196 AC_LIBTOOL_LANG_CXX_CONFIG
2203 if test -n "$F77" && test "X$F77" != "Xno"; then
2204 AC_LIBTOOL_LANG_F77_CONFIG
2211 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2212 AC_LIBTOOL_LANG_GCJ_CONFIG
2219 AC_LIBTOOL_LANG_RC_CONFIG
2223 AC_MSG_ERROR([Unsupported tag name: $tagname])
2227 # Append the new tag name to the list of available tags.
2228 if test -n "$tagname" ; then
2229 available_tags="$available_tags $tagname"
2235 # Now substitute the updated list of available tags.
2236 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2237 mv "${ofile}T" "$ofile"
2241 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2244 ])# _LT_AC_TAGCONFIG
2249 # enable checks for dlopen support
2250 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2251 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2252 ])# AC_LIBTOOL_DLOPEN
2255 # AC_LIBTOOL_WIN32_DLL
2256 # --------------------
2257 # declare package support for building win32 DLLs
2258 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2259 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2260 ])# AC_LIBTOOL_WIN32_DLL
2263 # AC_ENABLE_SHARED([DEFAULT])
2264 # ---------------------------
2265 # implement the --enable-shared flag
2266 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2267 AC_DEFUN([AC_ENABLE_SHARED],
2268 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2269 AC_ARG_ENABLE([shared],
2270 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2271 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2272 [p=${PACKAGE-default}
2274 yes) enable_shared=yes ;;
2275 no) enable_shared=no ;;
2278 # Look at the argument we got. We use all the common list separators.
2279 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2280 for pkg in $enableval; do
2282 if test "X$pkg" = "X$p"; then
2289 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2290 ])# AC_ENABLE_SHARED
2295 #- set the default shared flag to --disable-shared
2296 AC_DEFUN([AC_DISABLE_SHARED],
2297 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2298 AC_ENABLE_SHARED(no)
2299 ])# AC_DISABLE_SHARED
2302 # AC_ENABLE_STATIC([DEFAULT])
2303 # ---------------------------
2304 # implement the --enable-static flag
2305 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2306 AC_DEFUN([AC_ENABLE_STATIC],
2307 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2308 AC_ARG_ENABLE([static],
2309 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2310 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2311 [p=${PACKAGE-default}
2313 yes) enable_static=yes ;;
2314 no) enable_static=no ;;
2317 # Look at the argument we got. We use all the common list separators.
2318 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2319 for pkg in $enableval; do
2321 if test "X$pkg" = "X$p"; then
2328 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2329 ])# AC_ENABLE_STATIC
2334 # set the default static flag to --disable-static
2335 AC_DEFUN([AC_DISABLE_STATIC],
2336 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2337 AC_ENABLE_STATIC(no)
2338 ])# AC_DISABLE_STATIC
2341 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2342 # ---------------------------------
2343 # implement the --enable-fast-install flag
2344 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2345 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2346 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2347 AC_ARG_ENABLE([fast-install],
2348 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2349 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2350 [p=${PACKAGE-default}
2352 yes) enable_fast_install=yes ;;
2353 no) enable_fast_install=no ;;
2355 enable_fast_install=no
2356 # Look at the argument we got. We use all the common list separators.
2357 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2358 for pkg in $enableval; do
2360 if test "X$pkg" = "X$p"; then
2361 enable_fast_install=yes
2367 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2368 ])# AC_ENABLE_FAST_INSTALL
2371 # AC_DISABLE_FAST_INSTALL
2372 # -----------------------
2373 # set the default to --disable-fast-install
2374 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2375 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2376 AC_ENABLE_FAST_INSTALL(no)
2377 ])# AC_DISABLE_FAST_INSTALL
2380 # AC_LIBTOOL_PICMODE([MODE])
2381 # --------------------------
2382 # implement the --with-pic flag
2383 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2384 AC_DEFUN([AC_LIBTOOL_PICMODE],
2385 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2386 pic_mode=ifelse($#,1,$1,default)
2387 ])# AC_LIBTOOL_PICMODE
2392 # This is predefined starting with Autoconf 2.54, so this conditional
2393 # definition can be removed once we require Autoconf 2.54 or later.
2394 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2395 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2396 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2397 then ac_cv_prog_egrep='grep -E'
2398 else ac_cv_prog_egrep='egrep'
2400 EGREP=$ac_cv_prog_egrep
2405 # AC_PATH_TOOL_PREFIX
2406 # -------------------
2407 # find a file program which can recognise shared library
2408 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2409 [AC_REQUIRE([AC_PROG_EGREP])dnl
2410 AC_MSG_CHECKING([for $1])
2411 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2413 [[\\/*] | ?:[\\/]*])
2414 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2417 lt_save_MAGIC_CMD="$MAGIC_CMD"
2418 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2419 dnl $ac_dummy forces splitting on constant user-supplied paths.
2420 dnl POSIX.2 word splitting is done only on the output of word expansions,
2421 dnl not every word. This closes a longstanding sh security hole.
2422 ac_dummy="ifelse([$2], , $PATH, [$2])"
2423 for ac_dir in $ac_dummy; do
2425 test -z "$ac_dir" && ac_dir=.
2426 if test -f $ac_dir/$1; then
2427 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2428 if test -n "$file_magic_test_file"; then
2429 case $deplibs_check_method in
2431 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2432 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2433 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2434 $EGREP "$file_magic_regex" > /dev/null; then
2439 *** Warning: the command libtool uses to detect shared libraries,
2440 *** $file_magic_cmd, produces output that libtool cannot recognize.
2441 *** The result is that libtool may fail to recognize shared libraries
2442 *** as such. This will affect the creation of libtool libraries that
2443 *** depend on shared libraries, but programs linked with such libtool
2444 *** libraries will work regardless of this problem. Nevertheless, you
2445 *** may want to report the problem to your system manager and/or to
2446 *** bug-libtool@gnu.org
2456 MAGIC_CMD="$lt_save_MAGIC_CMD"
2459 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2460 if test -n "$MAGIC_CMD"; then
2461 AC_MSG_RESULT($MAGIC_CMD)
2465 ])# AC_PATH_TOOL_PREFIX
2470 # find a file program which can recognise a shared library
2471 AC_DEFUN([AC_PATH_MAGIC],
2472 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2473 if test -z "$lt_cv_path_MAGIC_CMD"; then
2474 if test -n "$ac_tool_prefix"; then
2475 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2485 # find the pathname to the GNU or non-GNU linker
2486 AC_DEFUN([AC_PROG_LD],
2487 [AC_ARG_WITH([gnu-ld],
2488 [AC_HELP_STRING([--with-gnu-ld],
2489 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2490 [test "$withval" = no || with_gnu_ld=yes],
2492 AC_REQUIRE([LT_AC_PROG_SED])dnl
2493 AC_REQUIRE([AC_PROG_CC])dnl
2494 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2495 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2497 if test "$GCC" = yes; then
2498 # Check if gcc -print-prog-name=ld gives a path.
2499 AC_MSG_CHECKING([for ld used by $CC])
2502 # gcc leaves a trailing carriage return which upsets mingw
2503 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2505 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2508 # Accept absolute paths.
2509 [[\\/]]* | ?:[[\\/]]*)
2510 re_direlt='/[[^/]][[^/]]*/\.\./'
2511 # Canonicalize the pathname of ld
2512 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2513 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2514 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2516 test -z "$LD" && LD="$ac_prog"
2519 # If it fails, then pretend we aren't using GCC.
2523 # If it is relative, then search for the first ld in PATH.
2527 elif test "$with_gnu_ld" = yes; then
2528 AC_MSG_CHECKING([for GNU ld])
2530 AC_MSG_CHECKING([for non-GNU ld])
2532 AC_CACHE_VAL(lt_cv_path_LD,
2533 [if test -z "$LD"; then
2534 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2535 for ac_dir in $PATH; do
2537 test -z "$ac_dir" && ac_dir=.
2538 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2539 lt_cv_path_LD="$ac_dir/$ac_prog"
2540 # Check to see if the program is GNU ld. I'd rather use --version,
2541 # but apparently some variants of GNU ld only accept -v.
2542 # Break only if it was the GNU/non-GNU ld that we prefer.
2543 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2544 *GNU* | *'with BFD'*)
2545 test "$with_gnu_ld" != no && break
2548 test "$with_gnu_ld" != yes && break
2555 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2558 if test -n "$LD"; then
2563 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2570 AC_DEFUN([AC_PROG_LD_GNU],
2571 [AC_REQUIRE([AC_PROG_EGREP])dnl
2572 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2573 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2574 case `$LD -v 2>&1 </dev/null` in
2575 *GNU* | *'with BFD'*)
2576 lt_cv_prog_gnu_ld=yes
2579 lt_cv_prog_gnu_ld=no
2582 with_gnu_ld=$lt_cv_prog_gnu_ld
2586 # AC_PROG_LD_RELOAD_FLAG
2587 # ----------------------
2588 # find reload flag for linker
2589 # -- PORTME Some linkers may need a different reload flag.
2590 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2591 [AC_CACHE_CHECK([for $LD option to reload object files],
2592 lt_cv_ld_reload_flag,
2593 [lt_cv_ld_reload_flag='-r'])
2594 reload_flag=$lt_cv_ld_reload_flag
2595 case $reload_flag in
2597 *) reload_flag=" $reload_flag" ;;
2599 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2602 if test "$GCC" = yes; then
2603 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2605 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2609 ])# AC_PROG_LD_RELOAD_FLAG
2612 # AC_DEPLIBS_CHECK_METHOD
2613 # -----------------------
2614 # how to check for library dependencies
2615 # -- PORTME fill in with the dynamic library characteristics
2616 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2617 [AC_CACHE_CHECK([how to recognise dependent libraries],
2618 lt_cv_deplibs_check_method,
2619 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2620 lt_cv_file_magic_test_file=
2621 lt_cv_deplibs_check_method='unknown'
2622 # Need to set the preceding variable on all platforms that support
2623 # interlibrary dependencies.
2624 # 'none' -- dependencies not supported.
2625 # `unknown' -- same as none, but documents that we really don't know.
2626 # 'pass_all' -- all dependencies passed with no checks.
2627 # 'test_compile' -- check by making test program.
2628 # 'file_magic [[regex]]' -- check by looking for files in library path
2629 # which responds to the $file_magic_cmd with a given extended regex.
2630 # If you have `file' or equivalent on your system and you're not sure
2631 # whether `pass_all' will *always* work, you probably want this one.
2635 lt_cv_deplibs_check_method=pass_all
2639 lt_cv_deplibs_check_method=pass_all
2643 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2644 lt_cv_file_magic_cmd='/usr/bin/file -L'
2645 lt_cv_file_magic_test_file=/shlib/libc.so
2649 # func_win32_libid is a shell function defined in ltmain.sh
2650 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2651 lt_cv_file_magic_cmd='func_win32_libid'
2655 # Base MSYS/MinGW do not provide the 'file' command needed by
2656 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2657 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2658 lt_cv_file_magic_cmd='$OBJDUMP -f'
2661 darwin* | rhapsody*)
2662 lt_cv_deplibs_check_method=pass_all
2665 freebsd* | kfreebsd*-gnu | dragonfly*)
2666 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2669 # Not sure whether the presence of OpenBSD here was a mistake.
2670 # Let's accept both of them until this is cleared up.
2671 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2672 lt_cv_file_magic_cmd=/usr/bin/file
2673 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2677 lt_cv_deplibs_check_method=pass_all
2682 lt_cv_deplibs_check_method=pass_all
2685 hpux10.20* | hpux11*)
2686 lt_cv_file_magic_cmd=/usr/bin/file
2689 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2690 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2693 [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]']
2694 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2697 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2698 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2703 irix5* | irix6* | nonstopux*)
2705 *-32|*"-32 ") libmagic=32-bit;;
2706 *-n32|*"-n32 ") libmagic=N32;;
2707 *-64|*"-64 ") libmagic=64-bit;;
2708 *) libmagic=never-match;;
2710 lt_cv_deplibs_check_method=pass_all
2713 # This must be Linux ELF.
2715 lt_cv_deplibs_check_method=pass_all
2719 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2720 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2722 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2727 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2728 lt_cv_file_magic_cmd=/usr/bin/file
2729 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2733 lt_cv_deplibs_check_method=unknown
2737 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2738 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2740 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2744 osf3* | osf4* | osf5*)
2745 lt_cv_deplibs_check_method=pass_all
2749 lt_cv_deplibs_check_method=pass_all
2753 lt_cv_deplibs_check_method=pass_all
2756 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2757 case $host_vendor in
2759 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]]'
2760 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2763 lt_cv_deplibs_check_method=pass_all
2766 lt_cv_file_magic_cmd='/bin/file'
2767 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2770 lt_cv_file_magic_cmd='/bin/file'
2771 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2772 lt_cv_file_magic_test_file=/lib/libc.so
2775 lt_cv_deplibs_check_method=pass_all
2780 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2781 lt_cv_deplibs_check_method=pass_all
2785 file_magic_cmd=$lt_cv_file_magic_cmd
2786 deplibs_check_method=$lt_cv_deplibs_check_method
2787 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2788 ])# AC_DEPLIBS_CHECK_METHOD
2793 # find the pathname to a BSD-compatible name lister
2794 AC_DEFUN([AC_PROG_NM],
2795 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2796 [if test -n "$NM"; then
2797 # Let the user override the test.
2800 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2801 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2803 test -z "$ac_dir" && ac_dir=.
2804 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2805 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2806 # Check to see if the nm accepts a BSD-compat flag.
2807 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2808 # nm: unknown option "B" ignored
2809 # Tru64's nm complains that /dev/null is an invalid object file
2810 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2811 */dev/null* | *'Invalid file or object type'*)
2812 lt_cv_path_NM="$tmp_nm -B"
2816 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2818 lt_cv_path_NM="$tmp_nm -p"
2822 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2823 continue # so that we can try to find one that supports BSD flags
2830 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2838 # check for math library
2839 AC_DEFUN([AC_CHECK_LIBM],
2840 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2843 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2844 # These system don't have libm, or don't need it
2847 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2848 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2851 AC_CHECK_LIB(m, cos, LIBM="-lm")
2857 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2858 # -----------------------------------
2859 # sets LIBLTDL to the link flags for the libltdl convenience library and
2860 # LTDLINCL to the include flags for the libltdl header and adds
2861 # --enable-ltdl-convenience to the configure arguments. Note that
2862 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2863 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2864 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2865 # (note the single quotes!). If your package is not flat and you're not
2866 # using automake, define top_builddir and top_srcdir appropriately in
2868 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2869 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2870 case $enable_ltdl_convenience in
2871 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2872 "") enable_ltdl_convenience=yes
2873 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2875 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2876 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2877 # For backwards non-gettext consistent compatibility...
2879 ])# AC_LIBLTDL_CONVENIENCE
2882 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2883 # -----------------------------------
2884 # sets LIBLTDL to the link flags for the libltdl installable library and
2885 # LTDLINCL to the include flags for the libltdl header and adds
2886 # --enable-ltdl-install to the configure arguments. Note that
2887 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2888 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2889 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2890 # '${top_srcdir}/' (note the single quotes!). If your package is not
2891 # flat and you're not using automake, define top_builddir and top_srcdir
2892 # appropriately in the Makefiles.
2893 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2894 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2895 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2896 AC_CHECK_LIB(ltdl, lt_dlinit,
2897 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2898 [if test x"$enable_ltdl_install" = xno; then
2899 AC_MSG_WARN([libltdl not installed, but installation disabled])
2901 enable_ltdl_install=yes
2904 if test x"$enable_ltdl_install" = x"yes"; then
2905 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2906 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2907 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2909 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2913 # For backwards non-gettext consistent compatibility...
2915 ])# AC_LIBLTDL_INSTALLABLE
2920 # enable support for C++ libraries
2921 AC_DEFUN([AC_LIBTOOL_CXX],
2922 [AC_REQUIRE([_LT_AC_LANG_CXX])
2928 AC_DEFUN([_LT_AC_LANG_CXX],
2929 [AC_REQUIRE([AC_PROG_CXX])
2930 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2931 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2934 # _LT_AC_PROG_CXXCPP
2936 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2938 AC_REQUIRE([AC_PROG_CXX])
2939 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2940 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2941 (test "X$CXX" != "Xg++"))) ; then
2944 ])# _LT_AC_PROG_CXXCPP
2948 # enable support for Fortran 77 libraries
2949 AC_DEFUN([AC_LIBTOOL_F77],
2950 [AC_REQUIRE([_LT_AC_LANG_F77])
2956 AC_DEFUN([_LT_AC_LANG_F77],
2957 [AC_REQUIRE([AC_PROG_F77])
2958 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2964 # enable support for GCJ libraries
2965 AC_DEFUN([AC_LIBTOOL_GCJ],
2966 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2972 AC_DEFUN([_LT_AC_LANG_GCJ],
2973 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2974 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2975 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2976 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2977 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2978 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2979 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2985 # enable support for Windows resource files
2986 AC_DEFUN([AC_LIBTOOL_RC],
2987 [AC_REQUIRE([LT_AC_PROG_RC])
2988 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2992 # AC_LIBTOOL_LANG_C_CONFIG
2993 # ------------------------
2994 # Ensure that the configuration vars for the C compiler are
2995 # suitably defined. Those variables are subsequently used by
2996 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2997 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2998 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3002 # Source file extension for C test sources.
3005 # Object file extension for compiled C test sources.
3007 _LT_AC_TAGVAR(objext, $1)=$objext
3009 # Code to be used in simple compile tests
3010 lt_simple_compile_test_code="int some_variable = 0;\n"
3012 # Code to be used in simple link tests
3013 lt_simple_link_test_code='int main(){return(0);}\n'
3017 # save warnings/boilerplate of simple test code
3018 _LT_COMPILER_BOILERPLATE
3019 _LT_LINKER_BOILERPLATE
3022 # Check for any special shared library compilation flags.
3024 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3025 if test "$GCC" = no; then
3028 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3032 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3033 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3034 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3036 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3037 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3043 # Check to make sure the static flag actually works.
3045 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3046 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3047 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3049 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3052 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3053 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3054 AC_LIBTOOL_PROG_CC_C_O($1)
3055 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3056 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3057 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3058 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3059 AC_LIBTOOL_SYS_LIB_STRIP
3060 AC_LIBTOOL_DLOPEN_SELF($1)
3062 # Report which librarie types wil actually be built
3063 AC_MSG_CHECKING([if libtool supports shared libraries])
3064 AC_MSG_RESULT([$can_build_shared])
3066 AC_MSG_CHECKING([whether to build shared libraries])
3067 test "$can_build_shared" = "no" && enable_shared=no
3069 # On AIX, shared libraries and static libraries use the same namespace, and
3070 # are all built from PIC.
3073 test "$enable_shared" = yes && enable_static=no
3074 if test -n "$RANLIB"; then
3075 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3076 postinstall_cmds='$RANLIB $lib'
3081 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3082 test "$enable_shared" = yes && enable_static=no
3086 AC_MSG_RESULT([$enable_shared])
3088 AC_MSG_CHECKING([whether to build static libraries])
3089 # Make sure either enable_shared or enable_static is yes.
3090 test "$enable_shared" = yes || enable_static=yes
3091 AC_MSG_RESULT([$enable_static])
3093 AC_LIBTOOL_CONFIG($1)
3097 ])# AC_LIBTOOL_LANG_C_CONFIG
3100 # AC_LIBTOOL_LANG_CXX_CONFIG
3101 # --------------------------
3102 # Ensure that the configuration vars for the C compiler are
3103 # suitably defined. Those variables are subsequently used by
3104 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3105 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3106 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3108 AC_REQUIRE([AC_PROG_CXX])
3109 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3111 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3112 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3113 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3114 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3115 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3116 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3118 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3119 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3120 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3121 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3122 _LT_AC_TAGVAR(module_cmds, $1)=
3123 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3124 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3125 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3126 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3127 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3128 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3130 # Dependencies to place before and after the object being linked:
3131 _LT_AC_TAGVAR(predep_objects, $1)=
3132 _LT_AC_TAGVAR(postdep_objects, $1)=
3133 _LT_AC_TAGVAR(predeps, $1)=
3134 _LT_AC_TAGVAR(postdeps, $1)=
3135 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3137 # Source file extension for C++ test sources.
3140 # Object file extension for compiled C++ test sources.
3142 _LT_AC_TAGVAR(objext, $1)=$objext
3144 # Code to be used in simple compile tests
3145 lt_simple_compile_test_code="int some_variable = 0;\n"
3147 # Code to be used in simple link tests
3148 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3150 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3153 # save warnings/boilerplate of simple test code
3154 _LT_COMPILER_BOILERPLATE
3155 _LT_LINKER_BOILERPLATE
3157 # Allow CC to be a program name with arguments.
3162 lt_save_with_gnu_ld=$with_gnu_ld
3163 lt_save_path_LD=$lt_cv_path_LD
3164 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3165 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3167 unset lt_cv_prog_gnu_ld
3169 if test -n "${lt_cv_path_LDCXX+set}"; then
3170 lt_cv_path_LD=$lt_cv_path_LDCXX
3174 test -z "${LDCXX+set}" || LD=$LDCXX
3177 _LT_AC_TAGVAR(compiler, $1)=$CC
3178 _LT_CC_BASENAME([$compiler])
3180 # We don't want -fno-exception wen compiling C++ code, so set the
3181 # no_builtin_flag separately
3182 if test "$GXX" = yes; then
3183 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3185 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3188 if test "$GXX" = yes; then
3189 # Set up default GNU C++ configuration
3193 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3194 # archiving commands below assume that GNU ld is being used.
3195 if test "$with_gnu_ld" = yes; then
3196 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3197 _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'
3199 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3200 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3202 # If archive_cmds runs LD, not CC, wlarc should be empty
3203 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3204 # investigate it a little bit more. (MM)
3207 # ancient GNU ld didn't support --whole-archive et. al.
3208 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3209 grep 'no-whole-archive' > /dev/null; then
3210 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3212 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3218 # A generic and very simple default shared library creation
3219 # command for GNU C++ for the case where it uses the native
3220 # linker, instead of GNU ld. If possible, this setting should
3221 # overridden to take advantage of the native linker features on
3222 # the platform it is being used on.
3223 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3226 # Commands to make compiler produce verbose output that lists
3227 # what "hidden" libraries, object files and flags are used when
3228 # linking a shared library.
3229 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3237 # PORTME: fill in a description of your system's C++ link characteristics
3238 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3239 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3242 # FIXME: insert proper C++ library support
3243 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3246 if test "$host_cpu" = ia64; then
3247 # On IA64, the linker does run time linking by default, so we don't
3248 # have to do anything special.
3249 aix_use_runtimelinking=no
3250 exp_sym_flag='-Bexport'
3253 aix_use_runtimelinking=no
3255 # Test if we are trying to use run time linking or normal
3256 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3257 # need to do runtime linking.
3258 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3259 for ld_flag in $LDFLAGS; do
3262 aix_use_runtimelinking=yes
3269 exp_sym_flag='-bexport'
3270 no_entry_flag='-bnoentry'
3273 # When large executables or shared objects are built, AIX ld can
3274 # have problems creating the table of contents. If linking a library
3275 # or program results in "error TOC overflow" add -mminimal-toc to
3276 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3277 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3279 _LT_AC_TAGVAR(archive_cmds, $1)=''
3280 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3281 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3282 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3284 if test "$GXX" = yes; then
3285 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3286 # We only want to do this on AIX 4.2 and lower, the check
3287 # below for broken collect2 doesn't work under 4.3+
3288 collect2name=`${CC} -print-prog-name=collect2`
3289 if test -f "$collect2name" && \
3290 strings "$collect2name" | grep resolve_lib_name >/dev/null
3292 # We have reworked collect2
3293 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3295 # We have old collect2
3296 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3297 # It fails to find uninstalled libraries when the uninstalled
3298 # path is not listed in the libpath. Setting hardcode_minus_L
3299 # to unsupported forces relinking
3300 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3301 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3302 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3305 shared_flag='-shared'
3306 if test "$aix_use_runtimelinking" = yes; then
3307 shared_flag="$shared_flag "'${wl}-G'
3311 if test "$host_cpu" = ia64; then
3312 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3313 # chokes on -Wl,-G. The following line is correct:
3316 if test "$aix_use_runtimelinking" = yes; then
3317 shared_flag='${wl}-G'
3319 shared_flag='${wl}-bM:SRE'
3324 # It seems that -bexpall does not export symbols beginning with
3325 # underscore (_), so it is better to generate a list of symbols to export.
3326 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3327 if test "$aix_use_runtimelinking" = yes; then
3328 # Warning - without using the other runtime loading flags (-brtl),
3329 # -berok will link without error, but may produce a broken library.
3330 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3331 # Determine the default libpath from the value encoded in an empty executable.
3332 _LT_AC_SYS_LIBPATH_AIX
3333 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3335 _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"
3337 if test "$host_cpu" = ia64; then
3338 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3339 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3340 _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"
3342 # Determine the default libpath from the value encoded in an empty executable.
3343 _LT_AC_SYS_LIBPATH_AIX
3344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3345 # Warning - without using the other run time loading flags,
3346 # -berok will link without error, but may produce a broken library.
3347 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3348 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3349 # -bexpall does not export symbols beginning with underscore (_)
3350 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3351 # Exported symbols can be pulled into shared objects from archives
3352 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3353 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3354 # This is similar to how AIX traditionally builds its shared libraries.
3355 _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'
3360 case $cc_basename in
3362 # FIXME: insert proper C++ library support
3363 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3369 cygwin* | mingw* | pw32*)
3370 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3371 # as there is no search path for DLLs.
3372 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3373 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3374 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3375 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3377 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3378 _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'
3379 # If the export-symbols file already is a .def file (1st line
3380 # is EXPORTS), use it as is; otherwise, prepend...
3381 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3382 cp $export_symbols $output_objdir/$soname.def;
3384 echo EXPORTS > $output_objdir/$soname.def;
3385 cat $export_symbols >> $output_objdir/$soname.def;
3387 $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'
3389 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3392 darwin* | rhapsody*)
3394 rhapsody* | darwin1.[[012]])
3395 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3398 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3399 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3401 case ${MACOSX_DEPLOYMENT_TARGET} in
3403 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3406 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3412 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3413 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3414 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3415 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3416 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3417 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3419 if test "$GXX" = yes ; then
3420 lt_int_apple_cc_single_mod=no
3421 output_verbose_link_cmd='echo'
3422 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3423 lt_int_apple_cc_single_mod=yes
3425 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3428 _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'
3430 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3431 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3432 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3433 _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}'
3435 _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}'
3437 _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}'
3439 case $cc_basename in
3441 output_verbose_link_cmd='echo'
3442 _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'
3443 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3444 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3445 _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}'
3446 _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}'
3449 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3456 case $cc_basename in
3458 # FIXME: insert proper C++ library support
3459 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3462 # Green Hills C++ Compiler
3463 # FIXME: insert proper C++ library support
3464 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3467 # FIXME: insert proper C++ library support
3468 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3473 # C++ shared libraries reported to be fairly broken before switch to ELF
3474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3477 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3479 freebsd* | kfreebsd*-gnu | dragonfly*)
3480 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3482 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3487 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3488 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3489 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3490 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3491 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3492 # but as the default
3493 # location of the library.
3495 case $cc_basename in
3497 # FIXME: insert proper C++ library support
3498 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3501 _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'
3502 # Commands to make compiler produce verbose output that lists
3503 # what "hidden" libraries, object files and flags are used when
3504 # linking a shared library.
3506 # There doesn't appear to be a way to prevent this compiler from
3507 # explicitly linking system object files so we need to strip them
3508 # from the output so that they don't get included in the library
3510 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'
3513 if test "$GXX" = yes; then
3514 _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'
3516 # FIXME: insert proper C++ library support
3517 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3523 if test $with_gnu_ld = no; then
3526 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3527 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3528 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3531 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3534 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3535 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3536 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3542 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3543 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3546 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3547 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3548 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3549 # but as the default
3550 # location of the library.
3553 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3554 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3555 # but as the default
3556 # location of the library.
3560 case $cc_basename in
3562 # FIXME: insert proper C++ library support
3563 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3568 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3571 _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'
3574 # Commands to make compiler produce verbose output that lists
3575 # what "hidden" libraries, object files and flags are used when
3576 # linking a shared library.
3578 # There doesn't appear to be a way to prevent this compiler from
3579 # explicitly linking system object files so we need to strip them
3580 # from the output so that they don't get included in the library
3582 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'
3585 if test "$GXX" = yes; then
3586 if test $with_gnu_ld = no; then
3589 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3592 _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'
3597 # FIXME: insert proper C++ library support
3598 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3604 case $cc_basename in
3607 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3609 # Archives containing C++ object files must be created using
3610 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3611 # necessary to make sure instantiated templates are included
3613 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3616 if test "$GXX" = yes; then
3617 if test "$with_gnu_ld" = no; then
3618 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3620 _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'
3623 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3626 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3627 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3630 case $cc_basename in
3632 # Kuck and Associates, Inc. (KAI) C++ Compiler
3634 # KCC will only create a shared library if the output file
3635 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3636 # to its proper name (with version) after linking.
3637 _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'
3638 _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'
3639 # Commands to make compiler produce verbose output that lists
3640 # what "hidden" libraries, object files and flags are used when
3641 # linking a shared library.
3643 # There doesn't appear to be a way to prevent this compiler from
3644 # explicitly linking system object files so we need to strip them
3645 # from the output so that they don't get included in the library
3647 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'
3649 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3650 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3652 # Archives containing C++ object files must be created using
3653 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3654 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3659 # version 8.0 and above of icpc choke on multiply defined symbols
3660 # if we add $predep_objects and $postdep_objects, however 7.1 and
3661 # earlier do not add the objects themselves.
3662 case `$CC -V 2>&1` in
3664 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3665 _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'
3667 *) # Version 8.0 or newer
3670 ia64*) tmp_idyn=' -i_dynamic';;
3672 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3673 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3676 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3677 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3678 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3679 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3682 # Portland Group C++ compiler
3683 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3684 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3686 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3687 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3688 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3692 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3693 _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'
3695 runpath_var=LD_RUN_PATH
3696 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3697 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3699 # Commands to make compiler produce verbose output that lists
3700 # what "hidden" libraries, object files and flags are used when
3701 # linking a shared library.
3703 # There doesn't appear to be a way to prevent this compiler from
3704 # explicitly linking system object files so we need to strip them
3705 # from the output so that they don't get included in the library
3707 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'
3712 # FIXME: insert proper C++ library support
3713 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3716 # FIXME: insert proper C++ library support
3717 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3720 case $cc_basename in
3722 # FIXME: insert proper C++ library support
3723 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3726 # FIXME: insert proper C++ library support
3727 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3732 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3733 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3735 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3736 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3737 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3739 # Workaround some broken pre-1.5 toolchains
3740 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3743 # C++ shared libraries are fairly broken
3744 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3747 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3748 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3749 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3750 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3751 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3752 _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'
3753 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3754 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3756 output_verbose_link_cmd='echo'
3759 case $cc_basename in
3761 # Kuck and Associates, Inc. (KAI) C++ Compiler
3763 # KCC will only create a shared library if the output file
3764 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3765 # to its proper name (with version) after linking.
3766 _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'
3768 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3769 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3771 # Archives containing C++ object files must be created using
3772 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3773 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3777 # Rational C++ 2.4.1
3778 # FIXME: insert proper C++ library support
3779 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3782 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3783 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3785 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3786 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3788 # Commands to make compiler produce verbose output that lists
3789 # what "hidden" libraries, object files and flags are used when
3790 # linking a shared library.
3792 # There doesn't appear to be a way to prevent this compiler from
3793 # explicitly linking system object files so we need to strip them
3794 # from the output so that they don't get included in the library
3796 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'
3799 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3800 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3801 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3803 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3804 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3806 # Commands to make compiler produce verbose output that lists
3807 # what "hidden" libraries, object files and flags are used when
3808 # linking a shared library.
3809 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3812 # FIXME: insert proper C++ library support
3813 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3819 case $cc_basename in
3821 # Kuck and Associates, Inc. (KAI) C++ Compiler
3823 # KCC will only create a shared library if the output file
3824 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3825 # to its proper name (with version) after linking.
3826 _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'
3828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3829 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3831 # Archives containing C++ object files must be created using
3832 # the KAI C++ compiler.
3833 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3836 # Rational C++ 2.4.1
3837 # FIXME: insert proper C++ library support
3838 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3841 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3842 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3843 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3844 echo "-hidden">> $lib.exp~
3845 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3848 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3849 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3851 # Commands to make compiler produce verbose output that lists
3852 # what "hidden" libraries, object files and flags are used when
3853 # linking a shared library.
3855 # There doesn't appear to be a way to prevent this compiler from
3856 # explicitly linking system object files so we need to strip them
3857 # from the output so that they don't get included in the library
3859 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'
3862 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3863 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3864 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3867 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3869 # Commands to make compiler produce verbose output that lists
3870 # what "hidden" libraries, object files and flags are used when
3871 # linking a shared library.
3872 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3875 # FIXME: insert proper C++ library support
3876 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3882 # FIXME: insert proper C++ library support
3883 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3886 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3887 case $cc_basename in
3889 # FIXME: insert proper C++ library support
3890 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3893 # FIXME: insert proper C++ library support
3894 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3899 case $cc_basename in
3902 # FIXME: insert proper C++ library support
3903 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3907 # FIXME: insert proper C++ library support
3908 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3911 # FIXME: insert proper C++ library support
3912 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3917 case $cc_basename in
3919 # Sun C++ 4.2, 5.x and Centerline C++
3920 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3921 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3922 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3923 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3924 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3927 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3929 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3931 # The C++ compiler is used as linker so we must use $wl
3932 # flag to pass the commands to the underlying system
3933 # linker. We must also pass each convience library through
3934 # to the system linker between allextract/defaultextract.
3935 # The C++ compiler will combine linker options so we
3936 # cannot just pass the convience library names through
3938 # Supported since Solaris 2.6 (maybe 2.5.1?)
3939 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3942 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3944 output_verbose_link_cmd='echo'
3946 # Archives containing C++ object files must be created using
3947 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3948 # necessary to make sure instantiated templates are included
3950 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3953 # Green Hills C++ Compiler
3954 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3956 # The C++ compiler must be used to create the archive.
3957 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3960 # GNU C++ compiler with Solaris linker
3961 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3962 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3963 if $CC --version | grep -v '^2\.7' > /dev/null; then
3964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3965 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3966 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3968 # Commands to make compiler produce verbose output that lists
3969 # what "hidden" libraries, object files and flags are used when
3970 # linking a shared library.
3971 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3973 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3975 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3976 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3977 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3979 # Commands to make compiler produce verbose output that lists
3980 # what "hidden" libraries, object files and flags are used when
3981 # linking a shared library.
3982 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3985 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3990 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3991 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3994 case $cc_basename in
3996 # NonStop-UX NCC 3.20
3997 # FIXME: insert proper C++ library support
3998 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4001 # FIXME: insert proper C++ library support
4002 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4007 # FIXME: insert proper C++ library support
4008 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4011 # FIXME: insert proper C++ library support
4012 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4015 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4016 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4018 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4019 _LT_AC_TAGVAR(LD, $1)="$LD"
4021 AC_LIBTOOL_POSTDEP_PREDEP($1)
4022 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4023 AC_LIBTOOL_PROG_CC_C_O($1)
4024 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4025 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4026 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4027 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4028 AC_LIBTOOL_SYS_LIB_STRIP
4029 AC_LIBTOOL_DLOPEN_SELF($1)
4031 AC_LIBTOOL_CONFIG($1)
4038 with_gnu_ldcxx=$with_gnu_ld
4039 with_gnu_ld=$lt_save_with_gnu_ld
4040 lt_cv_path_LDCXX=$lt_cv_path_LD
4041 lt_cv_path_LD=$lt_save_path_LD
4042 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4043 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4044 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4046 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4047 # ------------------------
4048 # Figure out "hidden" library dependencies from verbose
4049 # compiler output when linking a shared library.
4050 # Parse the compiler output and extract the necessary
4051 # objects, libraries and library flags.
4052 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4053 dnl we can't use the lt_simple_compile_test_code here,
4054 dnl because it contains code intended for an executable,
4055 dnl not a library. It's possible we should let each
4056 dnl tag define a new lt_????_link_test_code variable,
4057 dnl but it's only used here...
4058 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4060 void foo (void) { a = 0; }
4062 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4066 Foo (void) { a = 0; }
4071 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4079 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4082 public void bar (void) {
4088 dnl Parse the compiler output and extract the necessary
4089 dnl objects, libraries and library flags.
4090 if AC_TRY_EVAL(ac_compile); then
4091 # Parse the compiler output and extract the necessary
4092 # objects, libraries and library flags.
4094 # Sentinel used to keep track of whether or not we are before
4095 # the conftest object file.
4096 pre_test_object_deps_done=no
4098 # The `*' in the case matches for architectures that use `case' in
4099 # $output_verbose_cmd can trigger glob expansion during the loop
4100 # eval without this substitution.
4101 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4103 for p in `eval $output_verbose_link_cmd`; do
4107 # Some compilers place space between "-{L,R}" and the path.
4110 || test $p = "-R"; then
4117 if test "$pre_test_object_deps_done" = no; then
4120 # Internal compiler library paths should come after those
4121 # provided the user. The postdeps already come after the
4122 # user supplied libs so there is no need to process them.
4123 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4124 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4126 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4129 # The "-l" case would never come before the object being
4130 # linked, so don't bother handling this case.
4133 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4134 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4136 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4142 # This assumes that the test object file only shows up
4143 # once in the compiler output.
4144 if test "$p" = "conftest.$objext"; then
4145 pre_test_object_deps_done=yes
4149 if test "$pre_test_object_deps_done" = no; then
4150 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4151 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4153 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4156 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4157 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4159 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4164 *) ;; # Ignore the rest.
4172 echo "libtool.m4: error: problem compiling $1 test program"
4175 $rm -f confest.$objext
4177 # PORTME: override above test on systems where it is broken
4181 case $cc_basename in
4183 # Adding this requires a known-good setup of shared libraries for
4184 # Sun compiler versions before 5.6, else PIC objects from an old
4185 # archive will be linked into the output, leading to subtle bugs.
4186 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4192 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4193 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4195 ])# AC_LIBTOOL_POSTDEP_PREDEP
4197 # AC_LIBTOOL_LANG_F77_CONFIG
4198 # ------------------------
4199 # Ensure that the configuration vars for the C compiler are
4200 # suitably defined. Those variables are subsequently used by
4201 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4202 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4203 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4204 [AC_REQUIRE([AC_PROG_F77])
4205 AC_LANG_PUSH(Fortran 77)
4207 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4208 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4209 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4210 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4211 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4212 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4213 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4215 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4216 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4217 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4218 _LT_AC_TAGVAR(module_cmds, $1)=
4219 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4220 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4221 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4222 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4223 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4224 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4226 # Source file extension for f77 test sources.
4229 # Object file extension for compiled f77 test sources.
4231 _LT_AC_TAGVAR(objext, $1)=$objext
4233 # Code to be used in simple compile tests
4234 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4236 # Code to be used in simple link tests
4237 lt_simple_link_test_code=" program t\n end\n"
4239 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4242 # save warnings/boilerplate of simple test code
4243 _LT_COMPILER_BOILERPLATE
4244 _LT_LINKER_BOILERPLATE
4246 # Allow CC to be a program name with arguments.
4250 _LT_AC_TAGVAR(compiler, $1)=$CC
4251 _LT_CC_BASENAME([$compiler])
4253 AC_MSG_CHECKING([if libtool supports shared libraries])
4254 AC_MSG_RESULT([$can_build_shared])
4256 AC_MSG_CHECKING([whether to build shared libraries])
4257 test "$can_build_shared" = "no" && enable_shared=no
4259 # On AIX, shared libraries and static libraries use the same namespace, and
4260 # are all built from PIC.
4263 test "$enable_shared" = yes && enable_static=no
4264 if test -n "$RANLIB"; then
4265 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4266 postinstall_cmds='$RANLIB $lib'
4270 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4271 test "$enable_shared" = yes && enable_static=no
4275 AC_MSG_RESULT([$enable_shared])
4277 AC_MSG_CHECKING([whether to build static libraries])
4278 # Make sure either enable_shared or enable_static is yes.
4279 test "$enable_shared" = yes || enable_static=yes
4280 AC_MSG_RESULT([$enable_static])
4282 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4284 _LT_AC_TAGVAR(GCC, $1)="$G77"
4285 _LT_AC_TAGVAR(LD, $1)="$LD"
4287 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4288 AC_LIBTOOL_PROG_CC_C_O($1)
4289 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4290 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4291 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4292 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4293 AC_LIBTOOL_SYS_LIB_STRIP
4296 AC_LIBTOOL_CONFIG($1)
4300 ])# AC_LIBTOOL_LANG_F77_CONFIG
4303 # AC_LIBTOOL_LANG_GCJ_CONFIG
4304 # --------------------------
4305 # Ensure that the configuration vars for the C compiler are
4306 # suitably defined. Those variables are subsequently used by
4307 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4308 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4309 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4312 # Source file extension for Java test sources.
4315 # Object file extension for compiled Java test sources.
4317 _LT_AC_TAGVAR(objext, $1)=$objext
4319 # Code to be used in simple compile tests
4320 lt_simple_compile_test_code="class foo {}\n"
4322 # Code to be used in simple link tests
4323 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4325 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4328 # save warnings/boilerplate of simple test code
4329 _LT_COMPILER_BOILERPLATE
4330 _LT_LINKER_BOILERPLATE
4332 # Allow CC to be a program name with arguments.
4336 _LT_AC_TAGVAR(compiler, $1)=$CC
4337 _LT_CC_BASENAME([$compiler])
4339 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4340 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4342 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4344 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4345 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4346 AC_LIBTOOL_PROG_CC_C_O($1)
4347 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4348 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4349 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4350 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4351 AC_LIBTOOL_SYS_LIB_STRIP
4352 AC_LIBTOOL_DLOPEN_SELF($1)
4354 AC_LIBTOOL_CONFIG($1)
4358 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4361 # AC_LIBTOOL_LANG_RC_CONFIG
4362 # --------------------------
4363 # Ensure that the configuration vars for the Windows resource compiler are
4364 # suitably defined. Those variables are subsequently used by
4365 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4366 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4367 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4370 # Source file extension for RC test sources.
4373 # Object file extension for compiled RC test sources.