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.
4375 _LT_AC_TAGVAR(objext, $1)=$objext
4377 # Code to be used in simple compile tests
4378 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4380 # Code to be used in simple link tests
4381 lt_simple_link_test_code="$lt_simple_compile_test_code"
4383 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4386 # save warnings/boilerplate of simple test code
4387 _LT_COMPILER_BOILERPLATE
4388 _LT_LINKER_BOILERPLATE
4390 # Allow CC to be a program name with arguments.
4394 _LT_AC_TAGVAR(compiler, $1)=$CC
4395 _LT_CC_BASENAME([$compiler])
4396 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4398 AC_LIBTOOL_CONFIG($1)
4402 ])# AC_LIBTOOL_LANG_RC_CONFIG
4405 # AC_LIBTOOL_CONFIG([TAGNAME])
4406 # ----------------------------
4407 # If TAGNAME is not passed, then create an initial libtool script
4408 # with a default configuration from the untagged config vars. Otherwise
4409 # add code to config.status for appending the configuration named by
4410 # TAGNAME from the matching tagged config vars.
4411 AC_DEFUN([AC_LIBTOOL_CONFIG],
4412 [# The else clause should only fire when bootstrapping the
4413 # libtool distribution, otherwise you forgot to ship ltmain.sh
4414 # with your package, and you will get complaints that there are
4415 # no rules to generate ltmain.sh.
4416 if test -f "$ltmain"; then
4417 # See if we are running on zsh, and set the options which allow our commands through
4418 # without removal of \ escapes.
4419 if test -n "${ZSH_VERSION+set}" ; then
4420 setopt NO_GLOB_SUBST
4422 # Now quote all the things that may contain metacharacters while being
4423 # careful not to overquote the AC_SUBSTed values. We take copies of the
4424 # variables and quote the copies for generation of the libtool script.
4425 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4427 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4428 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4429 deplibs_check_method reload_flag reload_cmds need_locks \
4430 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4431 lt_cv_sys_global_symbol_to_c_name_address \
4432 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4433 old_postinstall_cmds old_postuninstall_cmds \
4434 _LT_AC_TAGVAR(compiler, $1) \
4435 _LT_AC_TAGVAR(CC, $1) \
4436 _LT_AC_TAGVAR(LD, $1) \
4437 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4438 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4439 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4440 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4441 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4442 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4443 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4444 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4445 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4446 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4447 _LT_AC_TAGVAR(predep_objects, $1) \
4448 _LT_AC_TAGVAR(postdep_objects, $1) \
4449 _LT_AC_TAGVAR(predeps, $1) \
4450 _LT_AC_TAGVAR(postdeps, $1) \
4451 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4452 _LT_AC_TAGVAR(archive_cmds, $1) \
4453 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4454 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4455 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4456 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4457 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4458 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4459 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4460 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4461 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4462 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4463 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4464 _LT_AC_TAGVAR(module_cmds, $1) \
4465 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4466 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4467 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4468 _LT_AC_TAGVAR(include_expsyms, $1); do
4471 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4472 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4473 _LT_AC_TAGVAR(archive_cmds, $1) | \
4474 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4475 _LT_AC_TAGVAR(module_cmds, $1) | \
4476 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4477 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4478 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4479 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4480 postinstall_cmds | postuninstall_cmds | \
4481 old_postinstall_cmds | old_postuninstall_cmds | \
4482 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4483 # Double-quote double-evaled strings.
4484 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4487 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4493 *'\[$]0 --fallback-echo"')
4494 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4499 [cfgfile="${ofile}T"
4500 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4502 AC_MSG_NOTICE([creating $ofile])],
4505 cat <<__EOF__ >> "$cfgfile"
4509 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4510 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4511 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4513 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4514 # Free Software Foundation, Inc.
4516 # This file is part of GNU Libtool:
4517 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4519 # This program is free software; you can redistribute it and/or modify
4520 # it under the terms of the GNU General Public License as published by
4521 # the Free Software Foundation; either version 2 of the License, or
4522 # (at your option) any later version.
4524 # This program is distributed in the hope that it will be useful, but
4525 # WITHOUT ANY WARRANTY; without even the implied warranty of
4526 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4527 # General Public License for more details.
4529 # You should have received a copy of the GNU General Public License
4530 # along with this program; if not, write to the Free Software
4531 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4533 # As a special exception to the GNU General Public License, if you
4534 # distribute this file as part of a program that contains a
4535 # configuration script generated by Autoconf, you may include it under
4536 # the same distribution terms that you use for the rest of that program.
4538 # A sed program that does not truncate output.
4541 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4542 Xsed="$SED -e 1s/^X//"
4544 # The HP-UX ksh and POSIX shell print the target directory to stdout
4546 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4548 # The names of the tagged configurations supported by this script.
4551 # ### BEGIN LIBTOOL CONFIG],
4552 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4554 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4556 # Shell to use when invoking shell scripts.
4559 # Whether or not to build shared libraries.
4560 build_libtool_libs=$enable_shared
4562 # Whether or not to build static libraries.
4563 build_old_libs=$enable_static
4565 # Whether or not to add -lc for building shared libraries.
4566 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4568 # Whether or not to disallow shared libs when runtime libs are static
4569 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4571 # Whether or not to optimize for fast installation.
4572 fast_install=$enable_fast_install
4575 host_alias=$host_alias
4580 build_alias=$build_alias
4584 # An echo program that does not interpret backslashes.
4589 AR_FLAGS=$lt_AR_FLAGS
4594 # A language-specific compiler.
4595 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4597 # Is the compiler the GNU C compiler?
4598 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4603 # The linker used to build libraries.
4604 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4606 # Whether we need hard or soft links.
4609 # A BSD-compatible nm program.
4612 # A symbol stripping program
4615 # Used to examine libraries when file_magic_cmd begins "file"
4616 MAGIC_CMD=$MAGIC_CMD
4618 # Used on cygwin: DLL creation program.
4621 # Used on cygwin: object dumper.
4624 # Used on cygwin: assembler.
4627 # The name of the directory that contains temporary libtool files.
4630 # How to create reloadable object files.
4631 reload_flag=$lt_reload_flag
4632 reload_cmds=$lt_reload_cmds
4634 # How to pass a linker flag through the compiler.
4635 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4637 # Object file suffix (normally "o").
4640 # Old archive suffix (normally "a").
4643 # Shared library suffix (normally ".so").
4644 shrext_cmds='$shrext_cmds'
4646 # Executable file suffix (normally "").
4649 # Additional compiler flags for building library objects.
4650 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4653 # What is the maximum length of a command?
4654 max_cmd_len=$lt_cv_sys_max_cmd_len
4656 # Does compiler simultaneously support -c and -o options?
4657 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4659 # Must we lock files when doing compilation?
4660 need_locks=$lt_need_locks
4662 # Do we need the lib prefix for modules?
4663 need_lib_prefix=$need_lib_prefix
4665 # Do we need a version for libraries?
4666 need_version=$need_version
4668 # Whether dlopen is supported.
4669 dlopen_support=$enable_dlopen
4671 # Whether dlopen of programs is supported.
4672 dlopen_self=$enable_dlopen_self
4674 # Whether dlopen of statically linked programs is supported.
4675 dlopen_self_static=$enable_dlopen_self_static
4677 # Compiler flag to prevent dynamic linking.
4678 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4680 # Compiler flag to turn off builtin functions.
4681 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4683 # Compiler flag to allow reflexive dlopens.
4684 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4686 # Compiler flag to generate shared objects directly from archives.
4687 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4689 # Compiler flag to generate thread-safe objects.
4690 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4692 # Library versioning type.
4693 version_type=$version_type
4695 # Format of library name prefix.
4696 libname_spec=$lt_libname_spec
4698 # List of archive names. First name is the real one, the rest are links.
4699 # The last name is the one that the linker finds with -lNAME.
4700 library_names_spec=$lt_library_names_spec
4702 # The coded name of the library, if different from the real name.
4703 soname_spec=$lt_soname_spec
4705 # Commands used to build and install an old-style archive.
4707 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4708 old_postinstall_cmds=$lt_old_postinstall_cmds
4709 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4711 # Create an old-style archive from a shared archive.
4712 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4714 # Create a temporary old-style archive to link instead of a shared archive.
4715 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4717 # Commands used to build and install a shared archive.
4718 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4719 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4720 postinstall_cmds=$lt_postinstall_cmds
4721 postuninstall_cmds=$lt_postuninstall_cmds
4723 # Commands used to build a loadable module (assumed same as above if empty)
4724 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4725 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4727 # Commands to strip libraries.
4728 old_striplib=$lt_old_striplib
4729 striplib=$lt_striplib
4731 # Dependencies to place before the objects being linked to create a
4733 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4735 # Dependencies to place after the objects being linked to create a
4737 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4739 # Dependencies to place before the objects being linked to create a
4741 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4743 # Dependencies to place after the objects being linked to create a
4745 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4747 # The library search path used internally by the compiler when linking
4749 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4751 # Method to check whether dependent libraries are shared objects.
4752 deplibs_check_method=$lt_deplibs_check_method
4754 # Command to use when deplibs_check_method == file_magic.
4755 file_magic_cmd=$lt_file_magic_cmd
4757 # Flag that allows shared libraries with undefined symbols to be built.
4758 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4760 # Flag that forces no undefined symbols.
4761 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4763 # Commands used to finish a libtool library installation in a directory.
4764 finish_cmds=$lt_finish_cmds
4766 # Same as above, but a single script fragment to be evaled but not shown.
4767 finish_eval=$lt_finish_eval
4769 # Take the output of nm and produce a listing of raw symbols and C names.
4770 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4772 # Transform the output of nm in a proper C declaration
4773 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4775 # Transform the output of nm in a C name address pair
4776 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4778 # This is the shared library runtime path variable.
4779 runpath_var=$runpath_var
4781 # This is the shared library path variable.
4782 shlibpath_var=$shlibpath_var
4784 # Is shlibpath searched before the hard-coded library search path?
4785 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4787 # How to hardcode a shared library path into an executable.
4788 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4790 # Whether we should hardcode library paths into libraries.
4791 hardcode_into_libs=$hardcode_into_libs
4793 # Flag to hardcode \$libdir into a binary during linking.
4794 # This must work even if \$libdir does not exist.
4795 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4797 # If ld is used when linking, flag to hardcode \$libdir into
4798 # a binary during linking. This must work even if \$libdir does
4800 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4802 # Whether we need a single -rpath flag with a separated argument.
4803 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4805 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4807 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4809 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4811 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4813 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4814 # the resulting binary.
4815 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4817 # Set to yes if building a shared library automatically hardcodes DIR into the library
4818 # and all subsequent libraries and executables linked against it.
4819 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4821 # Variables whose values should be saved in libtool wrapper scripts and
4822 # restored at relink time.
4823 variables_saved_for_relink="$variables_saved_for_relink"
4825 # Whether libtool must link a program against all its dependency libraries.
4826 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4828 # Compile-time system search path for libraries
4829 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4831 # Run-time system search path for libraries
4832 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4834 # Fix the shell variable \$srcfile for the compiler.
4835 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4837 # Set to yes if exported symbols are required.
4838 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4840 # The commands to list exported symbols.
4841 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4843 # The commands to extract the exported symbol list from a shared archive.
4844 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4846 # Symbols that should not be listed in the preloaded symbols.
4847 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4849 # Symbols that must always be exported.
4850 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4853 [# ### END LIBTOOL CONFIG],
4854 [# ### END LIBTOOL TAG CONFIG: $tagname])
4861 cat <<\EOF >> "$cfgfile"
4863 # AIX sometimes has problems with the GCC collect2 program. For some
4864 # reason, if we set the COLLECT_NAMES environment variable, the problems
4865 # vanish in a puff of smoke.
4866 if test "X${COLLECT_NAMES+set}" != Xset; then
4868 export COLLECT_NAMES
4874 # We use sed instead of cat because bash on DJGPP gets confused if
4875 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4876 # text mode, it properly converts lines to CR/LF. This bash problem
4877 # is reportedly fixed, but why not run on old versions too?
4878 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4880 mv -f "$cfgfile" "$ofile" || \
4881 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4885 # If there is no Makefile yet, we rely on a make rule to execute
4886 # `config.status --recheck' to rerun these tests and create the
4887 # libtool script then.
4888 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4889 if test -f "$ltmain_in"; then
4890 test -f Makefile && make "$ltmain"
4893 ])# AC_LIBTOOL_CONFIG
4896 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4897 # -------------------------------------------
4898 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4899 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4901 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4903 if test "$GCC" = yes; then
4904 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4906 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4907 lt_cv_prog_compiler_rtti_exceptions,
4908 [-fno-rtti -fno-exceptions], [],
4909 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4911 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4914 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4915 # ---------------------------------
4916 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4917 [AC_REQUIRE([AC_CANONICAL_HOST])
4918 AC_REQUIRE([AC_PROG_NM])
4919 AC_REQUIRE([AC_OBJEXT])
4920 # Check for command to grab the raw symbol name followed by C symbol from nm.
4921 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4922 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4924 # These are sane defaults that work on at least a few old systems.
4925 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4927 # Character class describing NM global symbol codes.
4928 symcode='[[BCDEGRST]]'
4930 # Regexp to match symbols that can be accessed directly from C.
4931 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4933 # Transform an extracted symbol line into a proper C declaration
4934 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4936 # Transform an extracted symbol line into symbol name and symbol address
4937 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4939 # Define system-specific variables.
4944 cygwin* | mingw* | pw32*)
4945 symcode='[[ABCDGISTW]]'
4947 hpux*) # Its linker distinguishes data from code symbols
4948 if test "$host_cpu" = ia64; then
4949 symcode='[[ABCDEGRST]]'
4951 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4952 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4955 if test "$host_cpu" = ia64; then
4956 symcode='[[ABCDGIRSTW]]'
4957 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4958 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4962 symcode='[[BCDEGRST]]'
4965 symcode='[[BCDEGQRST]]'
4971 symcode='[[DFNSTU]]'
4975 # Handle CRLF in mingw tool chain
4979 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4983 # If we're using GNU nm, then use its standard symbol codes.
4984 case `$NM -V 2>&1` in
4985 *GNU* | *'with BFD'*)
4986 symcode='[[ABCDGIRSTW]]' ;;
4989 # Try without a prefix undercore, then with it.
4990 for ac_symprfx in "" "_"; do
4992 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4993 symxfrm="\\1 $ac_symprfx\\2 \\2"
4995 # Write the raw and C identifiers.
4996 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4998 # Check to see that the pipe works correctly.
5002 cat > conftest.$ac_ext <<EOF
5007 void nm_test_func(){}
5011 int main(){nm_test_var='a';nm_test_func();return(0);}
5014 if AC_TRY_EVAL(ac_compile); then
5015 # Now try to grab the symbols.
5017 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5018 # Try sorting and uniquifying the output.
5019 if sort "$nlist" | uniq > "$nlist"T; then
5020 mv -f "$nlist"T "$nlist"
5025 # Make sure that we snagged all the symbols we need.
5026 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5027 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5028 cat <<EOF > conftest.$ac_ext
5034 # Now generate the symbol file.
5035 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5037 cat <<EOF >> conftest.$ac_ext
5038 #if defined (__STDC__) && __STDC__
5039 # define lt_ptr_t void *
5041 # define lt_ptr_t char *
5045 /* The mapping between symbol names and symbols. */
5050 lt_preloaded_symbols[[]] =
5053 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5054 cat <<\EOF >> conftest.$ac_ext
5062 # Now try linking the two files.
5063 mv conftest.$ac_objext conftstm.$ac_objext
5064 lt_save_LIBS="$LIBS"
5065 lt_save_CFLAGS="$CFLAGS"
5066 LIBS="conftstm.$ac_objext"
5067 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5068 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5071 LIBS="$lt_save_LIBS"
5072 CFLAGS="$lt_save_CFLAGS"
5074 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5077 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5080 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5083 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5084 cat conftest.$ac_ext >&5
5086 rm -f conftest* conftst*
5088 # Do not use the global_symbol_pipe unless it works.
5089 if test "$pipe_works" = yes; then
5092 lt_cv_sys_global_symbol_pipe=
5096 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5097 lt_cv_sys_global_symbol_to_cdecl=
5099 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5100 AC_MSG_RESULT(failed)
5104 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5107 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5108 # ---------------------------------------
5109 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5110 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5111 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5112 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5114 AC_MSG_CHECKING([for $compiler option to produce PIC])
5116 # C++ specific cases for pic, static, wl, etc.
5117 if test "$GXX" = yes; then
5118 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5119 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5123 # All AIX code is PIC.
5124 if test "$host_cpu" = ia64; then
5125 # AIX 5 now supports IA64 processor
5126 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5130 # FIXME: we need at least 68020 code to build shared libraries, but
5131 # adding the `-m68020' flag to GCC prevents building anything better,
5133 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5135 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5136 # PIC is the default for these OSes.
5138 mingw* | os2* | pw32*)
5139 # This hack is so that the source file can tell whether it is being
5140 # built for inclusion in a dll (and should export symbols for example).
5141 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5143 darwin* | rhapsody*)
5144 # PIC is the default on this platform
5145 # Common symbols not allowed in MH_DYLIB files
5146 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5149 # DJGPP does not support shared libraries at all
5150 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5153 if test -d /usr/nec; then
5154 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5158 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5164 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5169 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5175 # All AIX code is PIC.
5176 if test "$host_cpu" = ia64; then
5177 # AIX 5 now supports IA64 processor
5178 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5180 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5184 case $cc_basename in
5186 # Green Hills C++ Compiler
5187 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5192 # PIC is the default on this platform
5193 # Common symbols not allowed in MH_DYLIB files
5194 case $cc_basename in
5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5197 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5202 case $cc_basename in
5204 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5207 # Green Hills C++ Compiler
5208 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5214 freebsd* | kfreebsd*-gnu | dragonfly*)
5215 # FreeBSD uses GNU C++
5217 hpux9* | hpux10* | hpux11*)
5218 case $cc_basename in
5220 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5221 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5222 if test "$host_cpu" != ia64; then
5223 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5227 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5228 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5234 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5242 irix5* | irix6* | nonstopux*)
5243 case $cc_basename in
5245 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5246 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5247 # CC pic flag -KPIC is the default.
5254 case $cc_basename in
5257 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5258 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5262 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5263 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5264 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5267 # Portland Group C++ compiler.
5268 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5269 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5270 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5274 # Make sure the PIC flag is empty. It appears that all Alpha
5275 # Linux and Compaq Tru64 Unix objects are PIC.
5276 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5277 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5288 case $cc_basename in
5290 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5298 osf3* | osf4* | osf5*)
5299 case $cc_basename in
5301 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5304 # Rational C++ 2.4.1
5305 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5308 # Digital/Compaq C++
5309 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5310 # Make sure the PIC flag is empty. It appears that all Alpha
5311 # Linux and Compaq Tru64 Unix objects are PIC.
5312 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5313 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5322 case $cc_basename in
5324 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5331 case $cc_basename in
5333 # Sun C++ 4.2, 5.x and Centerline C++
5334 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5335 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5336 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5339 # Green Hills C++ Compiler
5340 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5347 case $cc_basename in
5350 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5351 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5355 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5362 case $cc_basename in
5364 # NonStop-UX NCC 3.20
5365 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5376 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5382 if test "$GCC" = yes; then
5383 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5384 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5388 # All AIX code is PIC.
5389 if test "$host_cpu" = ia64; then
5390 # AIX 5 now supports IA64 processor
5391 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5396 # FIXME: we need at least 68020 code to build shared libraries, but
5397 # adding the `-m68020' flag to GCC prevents building anything better,
5399 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5402 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5403 # PIC is the default for these OSes.
5406 mingw* | pw32* | os2*)
5407 # This hack is so that the source file can tell whether it is being
5408 # built for inclusion in a dll (and should export symbols for example).
5409 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5412 darwin* | rhapsody*)
5413 # PIC is the default on this platform
5414 # Common symbols not allowed in MH_DYLIB files
5415 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5419 # Just because we use GCC doesn't mean we suddenly get shared libraries
5420 # on systems that don't support them.
5421 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5426 if test -d /usr/nec; then
5427 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5432 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5439 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5445 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5449 # PORTME Check for flag to pass linker flags through the system compiler.
5452 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5453 if test "$host_cpu" = ia64; then
5454 # AIX 5 now supports IA64 processor
5455 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5457 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5461 # PIC is the default on this platform
5462 # Common symbols not allowed in MH_DYLIB files
5463 case $cc_basename in
5465 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5466 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5471 mingw* | pw32* | os2*)
5472 # This hack is so that the source file can tell whether it is being
5473 # built for inclusion in a dll (and should export symbols for example).
5474 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5477 hpux9* | hpux10* | hpux11*)
5478 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5479 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5486 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5489 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5490 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5493 irix5* | irix6* | nonstopux*)
5494 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5495 # PIC (with -KPIC) is the default.
5496 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5500 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5501 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5505 case $cc_basename in
5507 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5508 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5509 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5511 pgcc* | pgf77* | pgf90* | pgf95*)
5512 # Portland Group compilers (*not* the Pentium gcc compiler,
5513 # which looks to be a dead project)
5514 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5515 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5516 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5519 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5520 # All Alpha code is PIC.
5521 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5526 osf3* | osf4* | osf5*)
5527 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5528 # All OSF/1 code is PIC.
5529 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5533 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5534 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5538 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5539 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5540 case $cc_basename in
5542 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5544 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5549 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5550 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5551 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5554 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5555 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5556 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5557 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5561 if test -d /usr/nec ;then
5562 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5563 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5568 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5569 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5573 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5574 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5578 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5583 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5586 # Check to make sure the PIC flag actually works.
5588 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5589 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5590 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5591 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5592 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5594 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5596 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5597 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5600 # For platforms which do not support PIC, -DPIC is meaningless:
5602 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5605 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5611 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5612 # ------------------------------------
5613 # See if the linker supports building shared libraries.
5614 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5615 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5617 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5620 # If we're using GNU nm, then we don't want the "-C" option.
5621 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5622 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5623 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5625 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5629 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5632 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5635 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5640 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5641 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5642 _LT_AC_TAGVAR(archive_cmds, $1)=
5643 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5644 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5645 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5646 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5647 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5648 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5649 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5650 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5651 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5652 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5653 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5654 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5655 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5656 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5657 _LT_AC_TAGVAR(module_cmds, $1)=
5658 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5659 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5660 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5661 # include_expsyms should be a list of space-separated symbols to be *always*
5662 # included in the symbol list
5663 _LT_AC_TAGVAR(include_expsyms, $1)=
5664 # exclude_expsyms can be an extended regexp of symbols to exclude
5665 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5666 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5667 # as well as any symbol that contains `d'.
5668 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5669 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5670 # platforms (ab)use it in PIC code, but their linkers get confused if
5671 # the symbol is explicitly referenced. Since portable code cannot
5672 # rely on this symbol name, it's probably fine to never include it in
5673 # preloaded symbol tables.
5674 extract_expsyms_cmds=
5675 # Just being paranoid about ensuring that cc_basename is set.
5676 _LT_CC_BASENAME([$compiler])
5678 cygwin* | mingw* | pw32*)
5679 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5680 # When not using gcc, we currently assume that we are using
5681 # Microsoft Visual C++.
5682 if test "$GCC" != yes; then
5691 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5692 if test "$with_gnu_ld" = yes; then
5693 # If archive_cmds runs LD, not CC, wlarc should be empty
5696 # Set some defaults for GNU ld with shared library support. These
5697 # are reset later if shared libraries are not supported. Putting them
5698 # here allows them to be overridden if necessary.
5699 runpath_var=LD_RUN_PATH
5700 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5701 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5702 # ancient GNU ld didn't support --whole-archive et. al.
5703 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5704 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5706 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5708 supports_anon_versioning=no
5709 case `$LD -v 2>/dev/null` in
5710 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5711 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5712 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5713 *\ 2.11.*) ;; # other 2.11 versions
5714 *) supports_anon_versioning=yes ;;
5717 # See if GNU ld supports shared libraries.
5719 aix3* | aix4* | aix5*)
5720 # On AIX/PPC, the GNU linker is very broken
5721 if test "$host_cpu" != ia64; then
5722 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5725 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5726 *** to be unable to reliably create shared libraries on AIX.
5727 *** Therefore, libtool is disabling shared libraries support. If you
5728 *** really care for shared libraries, you may want to modify your PATH
5729 *** so that a non-GNU linker is found, and then restart.
5736 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5737 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5738 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5740 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5741 # that the semantics of dynamic libraries on AmigaOS, at least up
5742 # to version 4, is to share data among multiple programs linked
5743 # with the same dynamic library. Since this doesn't match the
5744 # behavior of shared libraries on other platforms, we can't use
5746 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5750 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5751 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5752 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5753 # support --undefined. This deserves some investigation. FIXME
5754 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5756 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5760 cygwin* | mingw* | pw32*)
5761 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5762 # as there is no search path for DLLs.
5763 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5764 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5765 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5766 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5767 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5769 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5770 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5771 # If the export-symbols file already is a .def file (1st line
5772 # is EXPORTS), use it as is; otherwise, prepend...
5773 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5774 cp $export_symbols $output_objdir/$soname.def;
5776 echo EXPORTS > $output_objdir/$soname.def;
5777 cat $export_symbols >> $output_objdir/$soname.def;
5779 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5781 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5786 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5788 case $cc_basename,$host_cpu in
5789 pgcc*) # Portland Group C compiler
5790 _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'
5791 tmp_addflag=' $pic_flag'
5793 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5794 _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'
5795 tmp_addflag=' $pic_flag -Mnomain' ;;
5796 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5797 tmp_addflag=' -i_dynamic' ;;
5798 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5799 tmp_addflag=' -i_dynamic -nofor_main' ;;
5800 ifc* | ifort*) # Intel Fortran compiler
5801 tmp_addflag=' -nofor_main' ;;
5803 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5805 if test $supports_anon_versioning = yes; then
5806 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5807 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5808 $echo "local: *; };" >> $output_objdir/$libname.ver~
5809 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5812 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5817 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5818 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5821 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5822 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5827 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5828 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5831 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5832 *** create shared libraries on Solaris systems. Therefore, libtool
5833 *** is disabling shared libraries support. We urge you to upgrade GNU
5834 *** binutils to release 2.9.1 or newer. Another option is to modify
5835 *** your PATH or compiler configuration so that the native linker is
5836 *** used, and then restart.
5839 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5840 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5841 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5843 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5848 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5850 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5851 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5855 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5856 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5857 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5859 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5864 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5867 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5868 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5871 # PORTME fill in a description of your system's linker (not GNU ld)
5874 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5875 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5876 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5877 # Note: this linker hardcodes the directories in LIBPATH if there
5878 # are no directories specified by -L.
5879 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5880 if test "$GCC" = yes && test -z "$link_static_flag"; then
5881 # Neither direct hardcoding nor static linking is supported with a
5883 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5888 if test "$host_cpu" = ia64; then
5889 # On IA64, the linker does run time linking by default, so we don't
5890 # have to do anything special.
5891 aix_use_runtimelinking=no
5892 exp_sym_flag='-Bexport'
5895 # If we're using GNU nm, then we don't want the "-C" option.
5896 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5897 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5898 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5900 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5902 aix_use_runtimelinking=no
5904 # Test if we are trying to use run time linking or normal
5905 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5906 # need to do runtime linking.
5907 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5908 for ld_flag in $LDFLAGS; do
5909 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5910 aix_use_runtimelinking=yes
5916 exp_sym_flag='-bexport'
5917 no_entry_flag='-bnoentry'
5920 # When large executables or shared objects are built, AIX ld can
5921 # have problems creating the table of contents. If linking a library
5922 # or program results in "error TOC overflow" add -mminimal-toc to
5923 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5924 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5926 _LT_AC_TAGVAR(archive_cmds, $1)=''
5927 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5928 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5929 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5931 if test "$GCC" = yes; then
5932 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5933 # We only want to do this on AIX 4.2 and lower, the check
5934 # below for broken collect2 doesn't work under 4.3+
5935 collect2name=`${CC} -print-prog-name=collect2`
5936 if test -f "$collect2name" && \
5937 strings "$collect2name" | grep resolve_lib_name >/dev/null
5939 # We have reworked collect2
5940 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5942 # We have old collect2
5943 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5944 # It fails to find uninstalled libraries when the uninstalled
5945 # path is not listed in the libpath. Setting hardcode_minus_L
5946 # to unsupported forces relinking
5947 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5948 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5949 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5952 shared_flag='-shared'
5953 if test "$aix_use_runtimelinking" = yes; then
5954 shared_flag="$shared_flag "'${wl}-G'
5958 if test "$host_cpu" = ia64; then
5959 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5960 # chokes on -Wl,-G. The following line is correct:
5963 if test "$aix_use_runtimelinking" = yes; then
5964 shared_flag='${wl}-G'
5966 shared_flag='${wl}-bM:SRE'
5971 # It seems that -bexpall does not export symbols beginning with
5972 # underscore (_), so it is better to generate a list of symbols to export.
5973 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5974 if test "$aix_use_runtimelinking" = yes; then
5975 # Warning - without using the other runtime loading flags (-brtl),
5976 # -berok will link without error, but may produce a broken library.
5977 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5978 # Determine the default libpath from the value encoded in an empty executable.
5979 _LT_AC_SYS_LIBPATH_AIX
5980 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5981 _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"
5983 if test "$host_cpu" = ia64; then
5984 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5985 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5986 _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"
5988 # Determine the default libpath from the value encoded in an empty executable.
5989 _LT_AC_SYS_LIBPATH_AIX
5990 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5991 # Warning - without using the other run time loading flags,
5992 # -berok will link without error, but may produce a broken library.
5993 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5994 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5995 # -bexpall does not export symbols beginning with underscore (_)
5996 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5997 # Exported symbols can be pulled into shared objects from archives
5998 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5999 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6000 # This is similar to how AIX traditionally builds its shared libraries.
6001 _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'
6007 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6008 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6009 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6010 # see comment about different semantics on the GNU ld section
6011 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6015 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6018 cygwin* | mingw* | pw32*)
6019 # When not using gcc, we currently assume that we are using
6020 # Microsoft Visual C++.
6021 # hardcode_libdir_flag_spec is actually meaningless, as there is
6022 # no search path for DLLs.
6023 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6024 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6025 # Tell ltmain to make .lib files, not .a files.
6027 # Tell ltmain to make .dll files, not .so files.
6029 # FIXME: Setting linknames here is a bad hack.
6030 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6031 # The linker will automatically build a .lib file if we build a DLL.
6032 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6033 # FIXME: Should let the user specify the lib program.
6034 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6035 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6036 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6039 darwin* | rhapsody*)
6041 rhapsody* | darwin1.[[012]])
6042 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6045 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6046 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6048 case ${MACOSX_DEPLOYMENT_TARGET} in
6050 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6053 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6059 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6060 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6061 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6062 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6063 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6064 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6065 if test "$GCC" = yes ; then
6066 output_verbose_link_cmd='echo'
6067 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6068 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6069 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6070 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6071 _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}'
6073 case $cc_basename in
6075 output_verbose_link_cmd='echo'
6076 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6077 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6078 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6079 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6080 _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}'
6083 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6090 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6092 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6096 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6099 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6100 # support. Future versions do this automatically, but an explicit c++rt0.o
6101 # does not break anything, and helps significantly (at the cost of a little
6104 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6105 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6106 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6107 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6110 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6112 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6113 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6114 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6115 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6118 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6119 freebsd* | kfreebsd*-gnu | dragonfly*)
6120 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6121 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6122 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6123 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6127 if test "$GCC" = yes; then
6128 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6130 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6132 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6133 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6134 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6136 # hardcode_minus_L: Not really in the search PATH,
6137 # but as the default location of the library.
6138 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6139 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6143 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6146 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6149 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6155 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6158 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6162 if test "$with_gnu_ld" = no; then
6165 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6166 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6167 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6168 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6169 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6172 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6173 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6174 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6176 # hardcode_minus_L: Not really in the search PATH,
6177 # but as the default location of the library.
6178 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6181 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6182 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6183 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6184 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6186 # hardcode_minus_L: Not really in the search PATH,
6187 # but as the default location of the library.
6188 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6194 irix5* | irix6* | nonstopux*)
6195 if test "$GCC" = yes; then
6196 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6198 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6199 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6201 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6202 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6203 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6207 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6208 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6210 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6212 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6213 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6214 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6218 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6219 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6220 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6221 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6222 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6226 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6227 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6228 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6229 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6230 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6231 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6232 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6235 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6236 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6237 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6240 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6241 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6248 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6249 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6250 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6251 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6252 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6256 if test "$GCC" = yes; then
6257 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6258 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6260 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6261 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6263 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6264 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6267 osf4* | osf5*) # as osf3* with the addition of -msym flag
6268 if test "$GCC" = yes; then
6269 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6270 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6271 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6273 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6274 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6275 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6276 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6278 # Both c and cxx compiler support -rpath directly
6279 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6281 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6285 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6286 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6287 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6288 runpath_var=LD_RUN_PATH
6289 hardcode_runpath_var=yes
6293 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6294 if test "$GCC" = yes; then
6296 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6297 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6298 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6301 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6302 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6303 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6305 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6306 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6308 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6310 # The compiler driver will combine linker options so we
6311 # cannot just pass the convience library names through
6312 # without $wl, iff we do not link with $LD.
6313 # Luckily, gcc supports the same syntax we need for Sun Studio.
6314 # Supported since Solaris 2.6 (maybe 2.5.1?)
6317 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6319 _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' ;;
6322 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6326 if test "x$host_vendor" = xsequent; then
6327 # Use $CC to link under sequent, because it throws in some extra .o
6328 # files that make .init and .fini sections work.
6329 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6331 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6333 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6334 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6335 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6336 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6340 case $host_vendor in
6342 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6343 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6346 ## LD is ld it makes a PLAMLIB
6347 ## CC just makes a GrossModule.
6348 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6349 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6350 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6353 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6354 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6357 runpath_var='LD_RUN_PATH'
6358 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6362 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6363 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6364 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6368 if test -d /usr/nec; then
6369 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6370 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6371 runpath_var=LD_RUN_PATH
6372 hardcode_runpath_var=yes
6373 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6378 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6379 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6380 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6381 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6382 hardcode_runpath_var=yes
6383 runpath_var=LD_RUN_PATH
6386 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6387 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6388 if test "$GCC" = yes; then
6389 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6391 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6393 runpath_var='LD_RUN_PATH'
6394 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6398 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6399 # $CC -shared without GNU ld will not create a library from C++
6400 # object files and a static libstdc++, better avoid it by now
6401 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6402 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6403 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6405 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6406 runpath_var='LD_RUN_PATH'
6410 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6411 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6412 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6416 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6421 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6422 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6424 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6425 if test "$GCC" = yes; then
6426 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6430 # Do we need to explicitly link libc?
6432 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6434 # Assume -lc should be added
6435 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6437 if test "$enable_shared" = yes && test "$GCC" = yes; then
6438 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6440 # FIXME: we may have to deal with multi-command sequences.
6443 # Test whether the compiler implicitly links with -lc since on some
6444 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6445 # to ld, don't add -lc before -lgcc.
6446 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6448 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6450 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6453 libobjs=conftest.$ac_objext
6455 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6461 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6462 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6463 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6465 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6467 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6469 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6471 cat conftest.err 1>&5
6474 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6480 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6483 # _LT_AC_FILE_LTDLL_C
6484 # -------------------
6485 # Be careful that the start marker always follows a newline.
6486 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6487 # /* ltdll.c starts here */
6488 # #define WIN32_LEAN_AND_MEAN
6489 # #include <windows.h>
6490 # #undef WIN32_LEAN_AND_MEAN
6491 # #include <stdio.h>
6493 # #ifndef __CYGWIN__
6494 # # ifdef __CYGWIN32__
6495 # # define __CYGWIN__ __CYGWIN32__
6499 # #ifdef __cplusplus
6502 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6503 # #ifdef __cplusplus
6508 # #include <cygwin/cygwin_dll.h>
6509 # DECLARE_CYGWIN_DLL( DllMain );
6511 # HINSTANCE __hDllInstance_base;
6514 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6516 # __hDllInstance_base = hInst;
6519 # /* ltdll.c ends here */
6520 ])# _LT_AC_FILE_LTDLL_C
6523 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6524 # ---------------------------------
6525 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6529 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6530 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6531 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6532 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6533 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6534 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6535 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6537 # This is just to silence aclocal about the macro not being used
6538 ifelse([AC_DISABLE_FAST_INSTALL])
6540 AC_DEFUN([LT_AC_PROG_GCJ],
6541 [AC_CHECK_TOOL(GCJ, gcj, no)
6542 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6546 AC_DEFUN([LT_AC_PROG_RC],
6547 [AC_CHECK_TOOL(RC, windres, no)
6550 # NOTE: This macro has been submitted for inclusion into #
6551 # GNU Autoconf as AC_PROG_SED. When it is available in #
6552 # a released version of Autoconf we should remove this #
6553 # macro and use it instead. #
6556 # Check for a fully-functional sed program, that truncates
6557 # as few characters as possible. Prefer GNU sed if found.
6558 AC_DEFUN([LT_AC_PROG_SED],
6559 [AC_MSG_CHECKING([for a sed that does not truncate output])
6560 AC_CACHE_VAL(lt_cv_path_SED,
6561 [# Loop through the user's path and test for sed and gsed.
6562 # Then use that list of sed's as ones to test for truncation.
6563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6567 test -z "$as_dir" && as_dir=.
6568 for lt_ac_prog in sed gsed; do
6569 for ac_exec_ext in '' $ac_executable_extensions; do
6570 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6571 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6578 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6579 # along with /bin/sed that truncates output.
6580 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6581 test ! -f $lt_ac_sed && continue
6582 cat /dev/null > conftest.in
6584 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6585 # Check for GNU sed and select it if it is found.
6586 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6587 lt_cv_path_SED=$lt_ac_sed
6591 cat conftest.in conftest.in >conftest.tmp
6592 mv conftest.tmp conftest.in
6593 cp conftest.in conftest.nl
6595 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6596 cmp -s conftest.out conftest.nl || break
6597 # 10000 chars as input seems more than enough
6598 test $lt_ac_count -gt 10 && break
6599 lt_ac_count=`expr $lt_ac_count + 1`
6600 if test $lt_ac_count -gt $lt_ac_max; then
6601 lt_ac_max=$lt_ac_count
6602 lt_cv_path_SED=$lt_ac_sed
6608 AC_MSG_RESULT([$SED])
6611 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
6613 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6615 # This program is free software; you can redistribute it and/or modify
6616 # it under the terms of the GNU General Public License as published by
6617 # the Free Software Foundation; either version 2 of the License, or
6618 # (at your option) any later version.
6620 # This program is distributed in the hope that it will be useful, but
6621 # WITHOUT ANY WARRANTY; without even the implied warranty of
6622 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6623 # General Public License for more details.
6625 # You should have received a copy of the GNU General Public License
6626 # along with this program; if not, write to the Free Software
6627 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6629 # As a special exception to the GNU General Public License, if you
6630 # distribute this file as part of a program that contains a
6631 # configuration script generated by Autoconf, you may include it under
6632 # the same distribution terms that you use for the rest of that program.
6634 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
6635 # ----------------------------------
6636 AC_DEFUN([PKG_PROG_PKG_CONFIG],
6637 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6638 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6639 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6640 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6641 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6643 if test -n "$PKG_CONFIG"; then
6644 _pkg_min_version=m4_default([$1], [0.9.0])
6645 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6646 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6647 AC_MSG_RESULT([yes])
6654 ])# PKG_PROG_PKG_CONFIG
6656 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6658 # Check to see whether a particular set of modules exists. Similar
6659 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
6662 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
6663 # this or PKG_CHECK_MODULES is called, or make sure to call
6664 # PKG_CHECK_EXISTS manually
6665 # --------------------------------------------------------------
6666 AC_DEFUN([PKG_CHECK_EXISTS],
6667 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6668 if test -n "$PKG_CONFIG" && \
6669 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6670 m4_ifval([$2], [$2], [:])
6671 m4_ifvaln([$3], [else
6676 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6677 # ---------------------------------------------
6678 m4_define([_PKG_CONFIG],
6679 [if test -n "$PKG_CONFIG"; then
6680 if test -n "$$1"; then
6683 PKG_CHECK_EXISTS([$3],
6684 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6692 # _PKG_SHORT_ERRORS_SUPPORTED
6693 # -----------------------------
6694 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6695 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6696 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6697 _pkg_short_errors_supported=yes
6699 _pkg_short_errors_supported=no
6701 ])# _PKG_SHORT_ERRORS_SUPPORTED
6704 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6705 # [ACTION-IF-NOT-FOUND])
6708 # Note that if there is a possibility the first call to
6709 # PKG_CHECK_MODULES might not happen, you should be sure to include an
6710 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6713 # --------------------------------------------------------------
6714 AC_DEFUN([PKG_CHECK_MODULES],
6715 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6716 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6717 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6720 AC_MSG_CHECKING([for $1])
6722 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6723 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
6725 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6726 and $1[]_LIBS to avoid the need to call pkg-config.
6727 See the pkg-config man page for more details.])
6729 if test $pkg_failed = yes; then
6730 _PKG_SHORT_ERRORS_SUPPORTED
6731 if test $_pkg_short_errors_supported = yes; then
6732 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6734 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6736 # Put the nasty error message in config.log where it belongs
6737 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6739 ifelse([$4], , [AC_MSG_ERROR(dnl
6740 [Package requirements ($2) were not met:
6744 Consider adjusting the PKG_CONFIG_PATH environment variable if you
6745 installed software in a non-standard prefix.
6749 [AC_MSG_RESULT([no])
6751 elif test $pkg_failed = untried; then
6752 ifelse([$4], , [AC_MSG_FAILURE(dnl
6753 [The pkg-config script could not be found or is too old. Make sure it
6754 is in your PATH or set the PKG_CONFIG environment variable to the full
6759 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6762 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6763 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6764 AC_MSG_RESULT([yes])
6765 ifelse([$3], , :, [$3])
6767 ])# PKG_CHECK_MODULES
6770 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
6771 # Generated from amversion.in; do not edit by hand.
6773 # This program is free software; you can redistribute it and/or modify
6774 # it under the terms of the GNU General Public License as published by
6775 # the Free Software Foundation; either version 2, or (at your option)
6776 # any later version.
6778 # This program is distributed in the hope that it will be useful,
6779 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6780 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6781 # GNU General Public License for more details.
6783 # You should have received a copy of the GNU General Public License
6784 # along with this program; if not, write to the Free Software
6785 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6787 # AM_AUTOMAKE_VERSION(VERSION)
6788 # ----------------------------
6789 # Automake X.Y traces this macro to ensure aclocal.m4 has been
6790 # generated from the m4 files accompanying Automake X.Y.
6791 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
6793 # AM_SET_CURRENT_AUTOMAKE_VERSION
6794 # -------------------------------
6795 # Call AM_AUTOMAKE_VERSION so it can be traced.
6796 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6797 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6798 [AM_AUTOMAKE_VERSION([1.8.5])])
6802 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6804 # This program is free software; you can redistribute it and/or modify
6805 # it under the terms of the GNU General Public License as published by
6806 # the Free Software Foundation; either version 2, or (at your option)
6807 # any later version.
6809 # This program is distributed in the hope that it will be useful,
6810 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6811 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6812 # GNU General Public License for more details.
6814 # You should have received a copy of the GNU General Public License
6815 # along with this program; if not, write to the Free Software
6816 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6819 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6820 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6821 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6823 # Of course, Automake must honor this variable whenever it calls a
6824 # tool from the auxiliary directory. The problem is that $srcdir (and
6825 # therefore $ac_aux_dir as well) can be either absolute or relative,
6826 # depending on how configure is run. This is pretty annoying, since
6827 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
6828 # source directory, any form will work fine, but in subdirectories a
6829 # relative path needs to be adjusted first.
6831 # $ac_aux_dir/missing
6832 # fails when called from a subdirectory if $ac_aux_dir is relative
6833 # $top_srcdir/$ac_aux_dir/missing
6834 # fails if $ac_aux_dir is absolute,
6835 # fails when called from a subdirectory in a VPATH build with
6836 # a relative $ac_aux_dir
6838 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6839 # are both prefixed by $srcdir. In an in-source build this is usually
6840 # harmless because $srcdir is `.', but things will broke when you
6841 # start a VPATH build or use an absolute $srcdir.
6843 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6844 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6845 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6846 # and then we would define $MISSING as
6847 # MISSING="\${SHELL} $am_aux_dir/missing"
6848 # This will work as long as MISSING is not called from configure, because
6849 # unfortunately $(top_srcdir) has no meaning in configure.
6850 # However there are other variables, like CC, which are often used in
6851 # configure, and could therefore not use this "fixed" $ac_aux_dir.
6853 # Another solution, used here, is to always expand $ac_aux_dir to an
6854 # absolute PATH. The drawback is that using absolute paths prevent a
6855 # configured tree to be moved without reconfiguration.
6857 AC_DEFUN([AM_AUX_DIR_EXPAND],
6858 [dnl Rely on autoconf to set up CDPATH properly.
6859 AC_PREREQ([2.50])dnl
6860 # expand $ac_aux_dir to an absolute path
6861 am_aux_dir=`cd $ac_aux_dir && pwd`
6864 # AM_CONDITIONAL -*- Autoconf -*-
6866 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6868 # This program is free software; you can redistribute it and/or modify
6869 # it under the terms of the GNU General Public License as published by
6870 # the Free Software Foundation; either version 2, or (at your option)
6871 # any later version.
6873 # This program is distributed in the hope that it will be useful,
6874 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6875 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6876 # GNU General Public License for more details.
6878 # You should have received a copy of the GNU General Public License
6879 # along with this program; if not, write to the Free Software
6880 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6885 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
6886 # -------------------------------------
6887 # Define a conditional.
6888 AC_DEFUN([AM_CONDITIONAL],
6890 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6891 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6893 AC_SUBST([$1_FALSE])
6901 AC_CONFIG_COMMANDS_PRE(
6902 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6903 AC_MSG_ERROR([conditional "$1" was never defined.
6904 Usually this means the macro was only invoked conditionally.])
6907 # serial 7 -*- Autoconf -*-
6909 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6910 # Free Software Foundation, Inc.
6912 # This program is free software; you can redistribute it and/or modify
6913 # it under the terms of the GNU General Public License as published by
6914 # the Free Software Foundation; either version 2, or (at your option)
6915 # any later version.
6917 # This program is distributed in the hope that it will be useful,
6918 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6919 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6920 # GNU General Public License for more details.
6922 # You should have received a copy of the GNU General Public License
6923 # along with this program; if not, write to the Free Software
6924 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6928 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6929 # written in clear, in which case automake, when reading aclocal.m4,
6930 # will think it sees a *use*, and therefore will trigger all it's
6931 # C support machinery. Also note that it means that autoscan, seeing
6932 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6936 # _AM_DEPENDENCIES(NAME)
6937 # ----------------------
6938 # See how the compiler implements dependency checking.
6939 # NAME is "CC", "CXX", "GCJ", or "OBJC".
6940 # We try a few techniques and use that to set a single cache variable.
6942 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6943 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6944 # dependency, and given that the user is not expected to run this macro,
6945 # just rely on AC_PROG_CC.
6946 AC_DEFUN([_AM_DEPENDENCIES],
6947 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6948 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6949 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6950 AC_REQUIRE([AM_DEP_TRACK])dnl
6952 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6953 [$1], CXX, [depcc="$CXX" am_compiler_list=],
6954 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6955 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6956 [depcc="$$1" am_compiler_list=])
6958 AC_CACHE_CHECK([dependency style of $depcc],
6959 [am_cv_$1_dependencies_compiler_type],
6960 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6961 # We make a subdir and do the tests there. Otherwise we can end up
6962 # making bogus files that we don't know about and never remove. For
6963 # instance it was reported that on HP-UX the gcc test will end up
6964 # making a dummy file named `D' -- because `-MD' means `put the output
6967 # Copy depcomp to subdir because otherwise we won't find it if we're
6968 # using a relative directory.
6969 cp "$am_depcomp" conftest.dir
6971 # We will build objects and dependencies in a subdirectory because
6972 # it helps to detect inapplicable dependency modes. For instance
6973 # both Tru64's cc and ICC support -MD to output dependencies as a
6974 # side effect of compilation, but ICC will put the dependencies in
6975 # the current directory while Tru64 will put them in the object
6979 am_cv_$1_dependencies_compiler_type=none
6980 if test "$am_compiler_list" = ""; then
6981 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6983 for depmode in $am_compiler_list; do
6984 # Setup a source with many dependencies, because some compilers
6985 # like to wrap large dependency lists on column 80 (with \), and
6986 # we should not choose a depcomp mode which is confused by this.
6988 # We need to recreate these files for each test, as the compiler may
6989 # overwrite some of them when testing with obscure command lines.
6990 # This happens at least with the AIX C compiler.
6992 for i in 1 2 3 4 5 6; do
6993 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6994 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6995 # Solaris 8's {/usr,}/bin/sh.
6996 touch sub/conftst$i.h
6998 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7002 # after this tag, mechanisms are not by side-effect, so they'll
7003 # only be used when explicitly requested
7004 if test "x$enable_dependency_tracking" = xyes; then
7012 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7013 # mode. It turns out that the SunPro C++ compiler does not properly
7014 # handle `-M -o', and we need to detect this.
7015 if depmode=$depmode \
7016 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7017 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7018 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7019 >/dev/null 2>conftest.err &&
7020 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7021 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7022 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7023 # icc doesn't choke on unknown options, it will just issue warnings
7024 # or remarks (even with -Werror). So we grep stderr for any message
7025 # that says an option was ignored or not supported.
7026 # When given -MP, icc 7.0 and 7.1 complain thusly:
7027 # icc: Command line warning: ignoring option '-M'; no argument required
7028 # The diagnosis changed in icc 8.0:
7029 # icc: Command line remark: option '-MP' not supported
7030 if (grep 'ignoring option' conftest.err ||
7031 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7032 am_cv_$1_dependencies_compiler_type=$depmode
7041 am_cv_$1_dependencies_compiler_type=none
7044 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7045 AM_CONDITIONAL([am__fastdep$1], [
7046 test "x$enable_dependency_tracking" != xno \
7047 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7053 # Choose a directory name for dependency files.
7054 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
7055 AC_DEFUN([AM_SET_DEPDIR],
7056 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7057 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7063 AC_DEFUN([AM_DEP_TRACK],
7064 [AC_ARG_ENABLE(dependency-tracking,
7065 [ --disable-dependency-tracking speeds up one-time build
7066 --enable-dependency-tracking do not reject slow dependency extractors])
7067 if test "x$enable_dependency_tracking" != xno; then
7068 am_depcomp="$ac_aux_dir/depcomp"
7071 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7072 AC_SUBST([AMDEPBACKSLASH])
7075 # Generate code to set up dependency tracking. -*- Autoconf -*-
7077 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
7079 # This program is free software; you can redistribute it and/or modify
7080 # it under the terms of the GNU General Public License as published by
7081 # the Free Software Foundation; either version 2, or (at your option)
7082 # any later version.
7084 # This program is distributed in the hope that it will be useful,
7085 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7086 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7087 # GNU General Public License for more details.
7089 # You should have received a copy of the GNU General Public License
7090 # along with this program; if not, write to the Free Software
7091 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7096 # _AM_OUTPUT_DEPENDENCY_COMMANDS
7097 # ------------------------------
7098 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7099 [for mf in $CONFIG_FILES; do
7100 # Strip MF so we end up with the name of the file.
7101 mf=`echo "$mf" | sed -e 's/:.*$//'`
7102 # Check whether this is an Automake generated Makefile or not.
7103 # We used to match only the files named `Makefile.in', but
7104 # some people rename them; so instead we look at the file content.
7105 # Grep'ing the first line is not enough: some people post-process
7106 # each Makefile.in and add a new line on top of each file to say so.
7107 # So let's grep whole file.
7108 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
7109 dirpart=`AS_DIRNAME("$mf")`
7113 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
7114 # Extract the definition of DEP_FILES from the Makefile without
7116 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7117 test -z "$DEPDIR" && continue
7118 # When using ansi2knr, U may be empty or an underscore; expand it
7119 U=`sed -n 's/^U = //p' < "$mf"`
7120 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
7121 # We invoke sed twice because it is the simplest approach to
7122 # changing $(DEPDIR) to its actual value in the expansion.
7123 for file in `sed -n '
7124 /^DEP_FILES = .*\\\\$/ {
7133 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7134 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7135 # Make sure the directory exists.
7136 test -f "$dirpart/$file" && continue
7137 fdir=`AS_DIRNAME(["$file"])`
7138 AS_MKDIR_P([$dirpart/$fdir])
7139 # echo "creating $dirpart/$file"
7140 echo '# dummy' > "$dirpart/$file"
7143 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7146 # AM_OUTPUT_DEPENDENCY_COMMANDS
7147 # -----------------------------
7148 # This macro should only be invoked once -- use via AC_REQUIRE.
7150 # This code is only required when automatic dependency tracking
7151 # is enabled. FIXME. This creates each `.P' file that we will
7152 # need in order to bootstrap the dependency handling code.
7153 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7154 [AC_CONFIG_COMMANDS([depfiles],
7155 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7156 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7159 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
7161 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7163 # This program is free software; you can redistribute it and/or modify
7164 # it under the terms of the GNU General Public License as published by
7165 # the Free Software Foundation; either version 2, or (at your option)
7166 # any later version.
7168 # This program is distributed in the hope that it will be useful,
7169 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7170 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7171 # GNU General Public License for more details.
7173 # You should have received a copy of the GNU General Public License
7174 # along with this program; if not, write to the Free Software
7175 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7180 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
7181 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7183 # Do all the work for Automake. -*- Autoconf -*-
7185 # This macro actually does too much some checks are only needed if
7186 # your package does certain things. But this isn't really a big deal.
7188 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
7189 # Free Software Foundation, Inc.
7191 # This program is free software; you can redistribute it and/or modify
7192 # it under the terms of the GNU General Public License as published by
7193 # the Free Software Foundation; either version 2, or (at your option)
7194 # any later version.
7196 # This program is distributed in the hope that it will be useful,
7197 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7198 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7199 # GNU General Public License for more details.
7201 # You should have received a copy of the GNU General Public License
7202 # along with this program; if not, write to the Free Software
7203 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7208 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7209 # AM_INIT_AUTOMAKE([OPTIONS])
7210 # -----------------------------------------------
7211 # The call with PACKAGE and VERSION arguments is the old style
7212 # call (pre autoconf-2.50), which is being phased out. PACKAGE
7213 # and VERSION should now be passed to AC_INIT and removed from
7214 # the call to AM_INIT_AUTOMAKE.
7215 # We support both call styles for the transition. After
7216 # the next Automake release, Autoconf can make the AC_INIT
7217 # arguments mandatory, and then we can depend on a new Autoconf
7218 # release and drop the old call support.
7219 AC_DEFUN([AM_INIT_AUTOMAKE],
7220 [AC_PREREQ([2.58])dnl
7221 dnl Autoconf wants to disallow AM_ names. We explicitly allow
7222 dnl the ones we care about.
7223 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7224 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7225 AC_REQUIRE([AC_PROG_INSTALL])dnl
7226 # test to see if srcdir already configured
7227 if test "`cd $srcdir && pwd`" != "`pwd`" &&
7228 test -f $srcdir/config.status; then
7229 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7232 # test whether we have cygpath
7233 if test -z "$CYGPATH_W"; then
7234 if (cygpath --version) >/dev/null 2>/dev/null; then
7235 CYGPATH_W='cygpath -w'
7240 AC_SUBST([CYGPATH_W])
7242 # Define the identity of the package.
7243 dnl Distinguish between old-style and new-style calls.
7245 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7246 AC_SUBST([PACKAGE], [$1])dnl
7247 AC_SUBST([VERSION], [$2])],
7248 [_AM_SET_OPTIONS([$1])dnl
7249 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7250 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7252 _AM_IF_OPTION([no-define],,
7253 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7254 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7256 # Some tools Automake needs.
7257 AC_REQUIRE([AM_SANITY_CHECK])dnl
7258 AC_REQUIRE([AC_ARG_PROGRAM])dnl
7259 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7260 AM_MISSING_PROG(AUTOCONF, autoconf)
7261 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7262 AM_MISSING_PROG(AUTOHEADER, autoheader)
7263 AM_MISSING_PROG(MAKEINFO, makeinfo)
7264 AM_MISSING_PROG(AMTAR, tar)
7266 AM_PROG_INSTALL_STRIP
7267 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7268 # We need awk for the "check" target. The system "awk" is bad on
7270 AC_REQUIRE([AC_PROG_AWK])dnl
7271 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7272 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7274 _AM_IF_OPTION([no-dependencies],,
7275 [AC_PROVIDE_IFELSE([AC_PROG_CC],
7276 [_AM_DEPENDENCIES(CC)],
7277 [define([AC_PROG_CC],
7278 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7279 AC_PROVIDE_IFELSE([AC_PROG_CXX],
7280 [_AM_DEPENDENCIES(CXX)],
7281 [define([AC_PROG_CXX],
7282 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7287 # When config.status generates a header, we must update the stamp-h file.
7288 # This file resides in the same directory as the config header
7289 # that is generated. The stamp files are numbered to have different names.
7291 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7292 # loop where config.status creates the headers, so we can generate
7293 # our stamp files there.
7294 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7295 [# Compute $1's index in $config_headers.
7297 for _am_header in $config_headers :; do
7302 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7305 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7307 # AM_PROG_INSTALL_SH
7308 # ------------------
7309 # Define $install_sh.
7311 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7313 # This program is free software; you can redistribute it and/or modify
7314 # it under the terms of the GNU General Public License as published by
7315 # the Free Software Foundation; either version 2, or (at your option)
7316 # any later version.
7318 # This program is distributed in the hope that it will be useful,
7319 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7320 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7321 # GNU General Public License for more details.
7323 # You should have received a copy of the GNU General Public License
7324 # along with this program; if not, write to the Free Software
7325 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7328 AC_DEFUN([AM_PROG_INSTALL_SH],
7329 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7330 install_sh=${install_sh-"$am_aux_dir/install-sh"}
7331 AC_SUBST(install_sh)])
7334 # Copyright (C) 2003 Free Software Foundation, Inc.
7336 # This program is free software; you can redistribute it and/or modify
7337 # it under the terms of the GNU General Public License as published by
7338 # the Free Software Foundation; either version 2, or (at your option)
7339 # any later version.
7341 # This program is distributed in the hope that it will be useful,
7342 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7343 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7344 # GNU General Public License for more details.
7346 # You should have received a copy of the GNU General Public License
7347 # along with this program; if not, write to the Free Software
7348 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7353 # Check whether the underlying file-system supports filenames
7354 # with a leading dot. For instance MS-DOS doesn't.
7355 AC_DEFUN([AM_SET_LEADING_DOT],
7356 [rm -rf .tst 2>/dev/null
7357 mkdir .tst 2>/dev/null
7358 if test -d .tst; then
7363 rmdir .tst 2>/dev/null
7364 AC_SUBST([am__leading_dot])])
7366 # Check to see how 'make' treats includes. -*- Autoconf -*-
7368 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7370 # This program is free software; you can redistribute it and/or modify
7371 # it under the terms of the GNU General Public License as published by
7372 # the Free Software Foundation; either version 2, or (at your option)
7373 # any later version.
7375 # This program is distributed in the hope that it will be useful,
7376 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7377 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7378 # GNU General Public License for more details.
7380 # You should have received a copy of the GNU General Public License
7381 # along with this program; if not, write to the Free Software
7382 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7389 # Check to see how make treats includes.
7390 AC_DEFUN([AM_MAKE_INCLUDE],
7391 [am_make=${MAKE-make}
7392 cat > confinc << 'END'
7397 # If we don't find an include directive, just comment out the code.
7398 AC_MSG_CHECKING([for style of include used by $am_make])
7402 # First try GNU make style include.
7403 echo "include confinc" > confmf
7404 # We grep out `Entering directory' and `Leaving directory'
7405 # messages which can occur if `w' ends up in MAKEFLAGS.
7406 # In particular we don't look at `^make:' because GNU make might
7407 # be invoked under some other name (usually "gmake"), in which
7408 # case it prints its new name instead of `make'.
7409 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7414 # Now try BSD make style include.
7415 if test "$am__include" = "#"; then
7416 echo '.include "confinc"' > confmf
7417 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7418 am__include=.include
7423 AC_SUBST([am__include])
7424 AC_SUBST([am__quote])
7425 AC_MSG_RESULT([$_am_result])
7426 rm -f confinc confmf
7432 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
7434 # This program is free software; you can redistribute it and/or modify
7435 # it under the terms of the GNU General Public License as published by
7436 # the Free Software Foundation; either version 2, or (at your option)
7437 # any later version.
7439 # This program is distributed in the hope that it will be useful,
7440 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7441 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7442 # GNU General Public License for more details.
7444 # You should have received a copy of the GNU General Public License
7445 # along with this program; if not, write to the Free Software
7446 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7451 # AM_MISSING_PROG(NAME, PROGRAM)
7452 # ------------------------------
7453 AC_DEFUN([AM_MISSING_PROG],
7454 [AC_REQUIRE([AM_MISSING_HAS_RUN])
7455 $1=${$1-"${am_missing_run}$2"}
7459 # AM_MISSING_HAS_RUN
7460 # ------------------
7461 # Define MISSING if not defined so far and test if it supports --run.
7462 # If it does, set am_missing_run to use it, otherwise, to nothing.
7463 AC_DEFUN([AM_MISSING_HAS_RUN],
7464 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7465 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7466 # Use eval to expand $SHELL
7467 if eval "$MISSING --run true"; then
7468 am_missing_run="$MISSING --run "
7471 AC_MSG_WARN([`missing' script is too old or missing])
7477 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7479 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
7481 # This program is free software; you can redistribute it and/or modify
7482 # it under the terms of the GNU General Public License as published by
7483 # the Free Software Foundation; either version 2, or (at your option)
7484 # any later version.
7486 # This program is distributed in the hope that it will be useful,
7487 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7488 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7489 # GNU General Public License for more details.
7491 # You should have received a copy of the GNU General Public License
7492 # along with this program; if not, write to the Free Software
7493 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7496 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7497 # created by `make install' are always world readable, even if the
7498 # installer happens to have an overly restrictive umask (e.g. 077).
7499 # This was a mistake. There are at least two reasons why we must not
7501 # - it causes special bits like SGID to be ignored,
7502 # - it may be too restrictive (some setups expect 775 directories).
7504 # Do not use -m 0755 and let people choose whatever they expect by
7507 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
7508 # Some implementations (such as Solaris 8's) are not thread-safe: if a
7509 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7510 # concurrently, both version can detect that a/ is missing, but only
7511 # one can create it and the other will error out. Consequently we
7512 # restrict ourselves to GNU make (using the --version option ensures
7514 AC_DEFUN([AM_PROG_MKDIR_P],
7515 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7516 # Keeping the `.' argument allows $(mkdir_p) to be used without
7517 # argument. Indeed, we sometimes output rules like
7518 # $(mkdir_p) $(somedir)
7519 # where $(somedir) is conditionally defined.
7520 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
7521 # expensive solution, as it forces Make to start a sub-shell.)
7522 mkdir_p='mkdir -p -- .'
7524 # On NextStep and OpenStep, the `mkdir' command does not
7525 # recognize any option. It will interpret all options as
7526 # directories to create, and then abort because `.' already
7528 for d in ./-p ./--version;
7530 test -d $d && rmdir $d
7532 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7533 if test -f "$ac_aux_dir/mkinstalldirs"; then
7534 mkdir_p='$(mkinstalldirs)'
7536 mkdir_p='$(install_sh) -d'
7539 AC_SUBST([mkdir_p])])
7541 # Helper functions for option handling. -*- Autoconf -*-
7543 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7545 # This program is free software; you can redistribute it and/or modify
7546 # it under the terms of the GNU General Public License as published by
7547 # the Free Software Foundation; either version 2, or (at your option)
7548 # any later version.
7550 # This program is distributed in the hope that it will be useful,
7551 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7552 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7553 # GNU General Public License for more details.
7555 # You should have received a copy of the GNU General Public License
7556 # along with this program; if not, write to the Free Software
7557 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7562 # _AM_MANGLE_OPTION(NAME)
7563 # -----------------------
7564 AC_DEFUN([_AM_MANGLE_OPTION],
7565 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7567 # _AM_SET_OPTION(NAME)
7568 # ------------------------------
7569 # Set option NAME. Presently that only means defining a flag for this option.
7570 AC_DEFUN([_AM_SET_OPTION],
7571 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7573 # _AM_SET_OPTIONS(OPTIONS)
7574 # ----------------------------------
7575 # OPTIONS is a space-separated list of Automake options.
7576 AC_DEFUN([_AM_SET_OPTIONS],
7577 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7579 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7580 # -------------------------------------------
7581 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7582 AC_DEFUN([_AM_IF_OPTION],
7583 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7586 # Check to make sure that the build environment is sane.
7589 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7591 # This program is free software; you can redistribute it and/or modify
7592 # it under the terms of the GNU General Public License as published by
7593 # the Free Software Foundation; either version 2, or (at your option)
7594 # any later version.
7596 # This program is distributed in the hope that it will be useful,
7597 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7598 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7599 # GNU General Public License for more details.
7601 # You should have received a copy of the GNU General Public License
7602 # along with this program; if not, write to the Free Software
7603 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7610 AC_DEFUN([AM_SANITY_CHECK],
7611 [AC_MSG_CHECKING([whether build environment is sane])
7614 echo timestamp > conftest.file
7615 # Do `set' in a subshell so we don't clobber the current shell's
7616 # arguments. Must try -L first in case configure is actually a
7617 # symlink; some systems play weird games with the mod time of symlinks
7618 # (eg FreeBSD returns the mod time of the symlink's containing
7621 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7622 if test "$[*]" = "X"; then
7624 set X `ls -t $srcdir/configure conftest.file`
7627 if test "$[*]" != "X $srcdir/configure conftest.file" \
7628 && test "$[*]" != "X conftest.file $srcdir/configure"; then
7630 # If neither matched, then we have a broken ls. This can happen
7631 # if, for instance, CONFIG_SHELL is bash and it inherits a
7632 # broken ls alias from the environment. This has actually
7633 # happened. Such a system could not be considered "sane".
7634 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7635 alias in your environment])
7638 test "$[2]" = conftest.file
7644 AC_MSG_ERROR([newly created file is older than distributed files!
7645 Check your system clock])
7647 AC_MSG_RESULT(yes)])
7649 # AM_PROG_INSTALL_STRIP
7651 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7653 # This program is free software; you can redistribute it and/or modify
7654 # it under the terms of the GNU General Public License as published by
7655 # the Free Software Foundation; either version 2, or (at your option)
7656 # any later version.
7658 # This program is distributed in the hope that it will be useful,
7659 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7660 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7661 # GNU General Public License for more details.
7663 # You should have received a copy of the GNU General Public License
7664 # along with this program; if not, write to the Free Software
7665 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7668 # One issue with vendor `install' (even GNU) is that you can't
7669 # specify the program used to strip binaries. This is especially
7670 # annoying in cross-compiling environments, where the build's strip
7671 # is unlikely to handle the host's binaries.
7672 # Fortunately install-sh will honor a STRIPPROG variable, so we
7673 # always use install-sh in `make install-strip', and initialize
7674 # STRIPPROG with the value of the STRIP variable (set by the user).
7675 AC_DEFUN([AM_PROG_INSTALL_STRIP],
7676 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7677 # Installed binaries are usually stripped using `strip' when the user
7678 # run `make install-strip'. However `strip' might not be the right
7679 # tool to use in cross-compilation environments, therefore Automake
7680 # will honor the `STRIP' environment variable to overrule this program.
7681 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7682 if test "$cross_compiling" != no; then
7683 AC_CHECK_TOOL([STRIP], [strip], :)
7685 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7686 AC_SUBST([INSTALL_STRIP_PROGRAM])])