1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 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 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
24 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
26 # This file is free software, distributed under the terms of the GNU
27 # General Public License. As a special exception to the GNU General
28 # Public License, this file may be distributed as part of a program
29 # that contains a configuration script generated by Autoconf, under
30 # the same distribution terms as the rest of that program.
32 # This file can be copied and used freely without restrictions. It can
33 # be used in projects which are not available under the GNU Public License
34 # but which still want to provide support for the GNU gettext functionality.
36 # Macro to add for using GNU gettext.
37 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
39 # Modified to never use included libintl.
40 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
42 # Major rework to remove unused code
43 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
45 # Added better handling of ALL_LINGUAS from GNU gettext version
46 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
48 # Modified to require ngettext
49 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
51 # We need this here as well, since someone might use autoconf-2.5x
52 # to configure GLib then an older version to configure a package
53 # using AM_GLIB_GNU_GETTEXT
57 dnl We go to great lengths to make sure that aclocal won't
58 dnl try to pull in the installed version of these macros
59 dnl when running aclocal in the glib directory.
61 m4_copy([AC_DEFUN],[glib_DEFUN])
62 m4_copy([AC_REQUIRE],[glib_REQUIRE])
64 dnl At the end, if we're not within glib, we'll define the public
65 dnl definitions in terms of our private definitions.
70 glib_DEFUN([GLIB_LC_MESSAGES],
71 [AC_CHECK_HEADERS([locale.h])
72 if test $ac_cv_header_locale_h = yes; then
73 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
74 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
75 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
76 if test $am_cv_val_LC_MESSAGES = yes; then
77 AC_DEFINE(HAVE_LC_MESSAGES, 1,
78 [Define if your <locale.h> file defines LC_MESSAGES.])
82 # GLIB_PATH_PROG_WITH_TEST
83 #----------------------------
84 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
85 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
86 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
87 [# Extract the first word of "$2", so it can be a program name with args.
88 set dummy $2; ac_word=[$]2
89 AC_MSG_CHECKING([for $ac_word])
90 AC_CACHE_VAL(ac_cv_path_$1,
93 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
96 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
97 for ac_dir in ifelse([$5], , $PATH, [$5]); do
98 test -z "$ac_dir" && ac_dir=.
99 if test -f $ac_dir/$ac_word; then
101 ac_cv_path_$1="$ac_dir/$ac_word"
107 dnl If no 4th arg is given, leave the cache variable unset,
108 dnl so AC_PATH_PROGS will keep looking.
109 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
114 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
124 glib_DEFUN([GLIB_WITH_NLS],
125 dnl NLS is obligatory
129 gt_cv_have_gettext=no
135 AC_CHECK_HEADER(libintl.h,
136 [gt_cv_func_dgettext_libintl="no"
137 libintl_extra_libs=""
140 # First check in libc
142 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
146 [return !ngettext ("","", 1)],
147 gt_cv_func_ngettext_libc=yes,
148 gt_cv_func_ngettext_libc=no)
151 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
152 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
156 [return !dgettext ("","")],
157 gt_cv_func_dgettext_libc=yes,
158 gt_cv_func_dgettext_libc=no)
162 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
163 AC_CHECK_FUNCS(bind_textdomain_codeset)
167 # If we don't have everything we want, check in libintl
169 if test "$gt_cv_func_dgettext_libc" != "yes" \
170 || test "$gt_cv_func_ngettext_libc" != "yes" \
171 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
173 AC_CHECK_LIB(intl, bindtextdomain,
174 [AC_CHECK_LIB(intl, ngettext,
175 [AC_CHECK_LIB(intl, dgettext,
176 gt_cv_func_dgettext_libintl=yes)])])
178 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
179 AC_MSG_CHECKING([if -liconv is needed to use gettext])
181 AC_CHECK_LIB(intl, ngettext,
182 [AC_CHECK_LIB(intl, dcgettext,
183 [gt_cv_func_dgettext_libintl=yes
184 libintl_extra_libs=-liconv],
190 # If we found libintl, then check in it for bind_textdomain_codeset();
191 # we'll prefer libc if neither have bind_textdomain_codeset(),
192 # and both have dgettext and ngettext
194 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
195 glib_save_LIBS="$LIBS"
196 LIBS="$LIBS -lintl $libintl_extra_libs"
197 unset ac_cv_func_bind_textdomain_codeset
198 AC_CHECK_FUNCS(bind_textdomain_codeset)
199 LIBS="$glib_save_LIBS"
201 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
202 gt_cv_func_dgettext_libc=no
204 if test "$gt_cv_func_dgettext_libc" = "yes" \
205 && test "$gt_cv_func_ngettext_libc" = "yes"; then
206 gt_cv_func_dgettext_libintl=no
212 if test "$gt_cv_func_dgettext_libc" = "yes" \
213 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
214 gt_cv_have_gettext=yes
217 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
218 INTLLIBS="-lintl $libintl_extra_libs"
221 if test "$gt_cv_have_gettext" = "yes"; then
222 AC_DEFINE(HAVE_GETTEXT,1,
223 [Define if the GNU gettext() function is already present or preinstalled.])
224 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
225 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
226 if test "$MSGFMT" != "no"; then
227 glib_save_LIBS="$LIBS"
228 LIBS="$LIBS $INTLLIBS"
229 AC_CHECK_FUNCS(dcgettext)
231 AC_MSG_CHECKING([if msgfmt accepts -c])
232 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
235 "Content-Type: text/plain; charset=UTF-8\n"
236 "Project-Id-Version: test 1.0\n"
237 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
238 "Last-Translator: test <foo@bar.xx>\n"
239 "Language-Team: C <LL@li.org>\n"
240 "MIME-Version: 1.0\n"
241 "Content-Transfer-Encoding: 8bit\n"
242 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
243 AC_SUBST(MSGFMT_OPTS)
244 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
245 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
246 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
247 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
248 return _nl_msg_cat_cntr],
253 dnl On Solaris, if bind_textdomain_codeset is in libc,
254 dnl GNU format message catalog is always supported,
255 dnl since both are added to the libc all together.
256 dnl Hence, we'd like to go with DATADIRNAME=share and
257 dnl and CATOBJEXT=.gmo in this case.
258 AC_CHECK_FUNC(bind_textdomain_codeset,
273 LIBS="$glib_save_LIBS"
276 gt_cv_have_gettext=no
281 if test "$gt_cv_have_gettext" = "yes" ; then
282 AC_DEFINE(ENABLE_NLS, 1,
283 [always defined to indicate that i18n is enabled])
286 dnl Test whether we really found GNU xgettext.
287 if test "$XGETTEXT" != ":"; then
288 dnl If it is not GNU xgettext we define it as : so that the
289 dnl Makefiles still can work.
290 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
294 [found xgettext program is not GNU xgettext; ignore it])
299 # We need to process the po/ directory.
303 [case "$CONFIG_FILES" in *po/Makefile.in*)
304 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
307 dnl These rules are solely for the distribution goal. While doing this
308 dnl we only have to keep exactly one list of the available catalogs
310 for lang in $ALL_LINGUAS; do
311 GMOFILES="$GMOFILES $lang.gmo"
312 POFILES="$POFILES $lang.po"
315 dnl Make all variables we use known to autoconf.
318 AC_SUBST(DATADIRNAME)
322 AC_SUBST(PO_IN_DATADIR_TRUE)
323 AC_SUBST(PO_IN_DATADIR_FALSE)
328 # AM_GLIB_GNU_GETTEXT
329 # -------------------
330 # Do checks necessary for use of gettext. If a suitable implementation
331 # of gettext is found in either in libintl or in the C library,
332 # it will set INTLLIBS to the libraries needed for use of gettext
333 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
334 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
335 # on various variables needed by the Makefile.in.in installed by
338 glib_DEFUN([GLIB_GNU_GETTEXT],
339 [AC_REQUIRE([AC_PROG_CC])dnl
344 if test "$gt_cv_have_gettext" = "yes"; then
345 if test "x$ALL_LINGUAS" = "x"; then
348 AC_MSG_CHECKING(for catalogs to be installed)
350 for presentlang in $ALL_LINGUAS; do
352 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
353 desiredlanguages="$LINGUAS"
355 desiredlanguages="$ALL_LINGUAS"
357 for desiredlang in $desiredlanguages; do
358 # Use the presentlang catalog if desiredlang is
359 # a. equal to presentlang, or
360 # b. a variant of presentlang (because in this case,
361 # presentlang can be used as a fallback for messages
362 # which are not translated in the desiredlang catalog).
363 case "$desiredlang" in
364 "$presentlang"*) useit=yes;;
367 if test $useit = yes; then
368 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
372 AC_MSG_RESULT($LINGUAS)
375 dnl Construct list of names of catalog files to be constructed.
376 if test -n "$LINGUAS"; then
377 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
381 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
382 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
383 dnl Try to locate is.
385 if test -n "$ac_aux_dir"; then
386 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
388 if test -z "$MKINSTALLDIRS"; then
389 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
391 AC_SUBST(MKINSTALLDIRS)
393 dnl Generate list of files to be processed by xgettext which will
394 dnl be included in po/Makefile.
395 test -d po || mkdir po
396 if test "x$srcdir" != "x."; then
397 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
398 posrcprefix="$srcdir/"
400 posrcprefix="../$srcdir/"
406 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
407 < $srcdir/po/POTFILES.in > po/POTFILES
410 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
411 # -------------------------------
412 # Define VARIABLE to the location where catalog files will
413 # be installed by po/Makefile.
414 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
415 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
416 glib_save_prefix="$prefix"
417 glib_save_exec_prefix="$exec_prefix"
418 glib_save_datarootdir="$datarootdir"
419 test "x$prefix" = xNONE && prefix=$ac_default_prefix
420 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
421 datarootdir=`eval echo "${datarootdir}"`
422 if test "x$CATOBJEXT" = "x.mo" ; then
423 localedir=`eval echo "${libdir}/locale"`
425 localedir=`eval echo "${datadir}/locale"`
427 prefix="$glib_save_prefix"
428 exec_prefix="$glib_save_exec_prefix"
429 datarootdir="$glib_save_datarootdir"
430 AC_DEFINE_UNQUOTED($1, "$localedir",
431 [Define the location where the catalogs will be installed])
435 dnl Now the definitions that aclocal will find
437 ifdef(glib_configure_ac,[],[
438 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
439 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
442 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
444 # Create a temporary file with TEST-FILE as its contents and pass the
445 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
446 # 0 and perform ACTION-IF-FAIL for any other exit status.
447 AC_DEFUN([GLIB_RUN_PROG],
448 [cat >conftest.foo <<_ACEOF
451 if AC_RUN_LOG([$1 conftest.foo]); then
452 m4_ifval([$3], [$3], [:])
453 m4_ifvaln([$4], [else $4])dnl
454 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
455 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
459 # gnome-compiler-flags.m4
464 dnl GNOME_COMPILE_WARNINGS
465 dnl Turn on many useful compiler warnings and substitute the result into
467 dnl For now, only works on GCC
468 dnl Pass the default value of the --enable-compile-warnings configure option as
469 dnl the first argument to the macro, defaulting to 'yes'.
470 dnl Additional warning/error flags can be passed as an optional second argument.
472 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
473 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
474 dnl ******************************
475 dnl More compiler warnings
476 dnl ******************************
478 AC_ARG_ENABLE(compile-warnings,
479 AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
480 [Turn on compiler warnings]),,
481 [enable_compile_warnings="m4_default([$1],[yes])"])
483 if test "x$GCC" != xyes; then
484 enable_compile_warnings=no
488 realsave_CFLAGS="$CFLAGS"
490 dnl These are warning flags that aren't marked as fatal. Can be
491 dnl overridden on a per-project basis with -Wno-foo.
494 -Wstrict-prototypes \
498 dnl These compiler flags typically indicate very broken or suspicious
499 dnl code. Some of them such as implicit-function-declaration are
500 dnl just not default because gcc compiles a lot of legacy code.
501 dnl We choose to make this set into explicit errors.
503 -Werror=missing-prototypes \
504 -Werror=implicit-function-declaration \
505 -Werror=pointer-arith \
507 -Werror=format-security \
509 -Werror=missing-include-dirs \
512 dnl Additional warning or error flags provided by the module author to
513 dnl allow stricter standards to be imposed on a per-module basis.
514 dnl The author can pass -W or -Werror flags here as they see fit.
515 additional_flags="m4_default([$2],[])"
517 case "$enable_compile_warnings" in
522 warning_flags="-Wall"
525 warning_flags="$base_warn_flags $base_error_flags $additional_flags"
528 warning_flags="$base_warn_flags $base_error_flags $additional_flags"
531 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
535 if test "$enable_compile_warnings" = "error" ; then
536 warning_flags="$warning_flags -Werror"
539 dnl Check whether GCC supports the warning options
540 for option in $warning_flags; do
541 save_CFLAGS="$CFLAGS"
542 CFLAGS="$CFLAGS $option"
543 AC_MSG_CHECKING([whether gcc understands $option])
544 AC_TRY_COMPILE([], [],
547 CFLAGS="$save_CFLAGS"
548 AC_MSG_RESULT([$has_option])
549 if test $has_option = yes; then
550 tested_warning_flags="$tested_warning_flags $option"
556 CFLAGS="$realsave_CFLAGS"
557 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
558 AC_MSG_RESULT($tested_warning_flags)
561 AC_HELP_STRING([--enable-iso-c],
562 [Try to warn if code is not ISO C ]),,
565 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
567 if test "x$enable_iso_c" != "xno"; then
568 if test "x$GCC" = "xyes"; then
570 *[\ \ ]-ansi[\ \ ]*) ;;
571 *) complCFLAGS="$complCFLAGS -ansi" ;;
574 *[\ \ ]-pedantic[\ \ ]*) ;;
575 *) complCFLAGS="$complCFLAGS -pedantic" ;;
579 AC_MSG_RESULT($complCFLAGS)
581 WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
582 AC_SUBST(WARN_CFLAGS)
585 dnl For C++, do basically the same thing.
587 AC_DEFUN([GNOME_CXX_WARNINGS],[
588 AC_ARG_ENABLE(cxx-warnings,
589 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
590 [Turn on compiler warnings.]),,
591 [enable_cxx_warnings="m4_default([$1],[minimum])"])
593 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
595 if test "x$GXX" != xyes; then
596 enable_cxx_warnings=no
598 if test "x$enable_cxx_warnings" != "xno"; then
599 if test "x$GXX" = "xyes"; then
600 case " $CXXFLAGS " in
601 *[\ \ ]-Wall[\ \ ]*) ;;
602 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
605 ## -W is not all that useful. And it cannot be controlled
606 ## with individual -Wno-xxx flags, unlike -Wall
607 if test "x$enable_cxx_warnings" = "xyes"; then
608 warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
612 AC_MSG_RESULT($warnCXXFLAGS)
614 AC_ARG_ENABLE(iso-cxx,
615 AC_HELP_STRING([--enable-iso-cxx],
616 [Try to warn if code is not ISO C++ ]),,
619 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
621 if test "x$enable_iso_cxx" != "xno"; then
622 if test "x$GXX" = "xyes"; then
623 case " $CXXFLAGS " in
624 *[\ \ ]-ansi[\ \ ]*) ;;
625 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
628 case " $CXXFLAGS " in
629 *[\ \ ]-pedantic[\ \ ]*) ;;
630 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
634 AC_MSG_RESULT($complCXXFLAGS)
636 WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
637 AC_SUBST(WARN_CXXFLAGS)
641 dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
642 dnl the schema should be compiled
645 AC_DEFUN([GLIB_GSETTINGS],
647 m4_pattern_allow([AM_V_GEN])
648 AC_ARG_ENABLE(schemas-compile,
649 AS_HELP_STRING([--disable-schemas-compile],
650 [Disable regeneration of gschemas.compiled on install]),
651 [case ${enableval} in
652 yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
653 no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
654 *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
656 AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
657 PKG_PROG_PKG_CONFIG([0.16])
658 AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
659 if test x$cross_compiling != xyes; then
660 GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
662 AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
664 AC_SUBST(GLIB_COMPILE_SCHEMAS)
665 if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
666 ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
668 ifelse([$1],,[:],[$1])
672 .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
674 mostlyclean-am: clean-gsettings-schemas
676 gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
678 %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
679 $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
681 all-am: $(gsettings_SCHEMAS:.xml=.valid)
682 uninstall-am: uninstall-gsettings-schemas
683 install-data-am: install-gsettings-schemas
685 .SECONDARY: $(gsettings_SCHEMAS)
687 install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
689 if test -n "$^"; then \
690 test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
691 $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
692 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
695 uninstall-gsettings-schemas:
697 @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
698 files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
699 test -n "$$files" || exit 0; \
700 echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
701 cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
702 test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
704 clean-gsettings-schemas:
705 rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
707 ifdef gsettings_ENUM_NAMESPACE
708 $(gsettings__enum_file): $(gsettings_ENUM_FILES)
709 $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
712 _GSETTINGS_SUBST(GSETTINGS_RULES)
715 dnl _GSETTINGS_SUBST(VARIABLE)
716 dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
717 AC_DEFUN([_GSETTINGS_SUBST],
720 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
724 dnl -*- mode: autoconf -*-
729 dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
730 AC_DEFUN([GTK_DOC_CHECK],
732 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
733 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
734 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
736 ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
737 AC_MSG_CHECKING([for gtk-doc])
738 PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
739 AC_MSG_RESULT($have_gtk_doc)
741 if test "$have_gtk_doc" = "no"; then
743 You will not be able to create source packages with 'make dist'
744 because $gtk_doc_requires is not found.])
747 dnl check for tools we added during development
748 dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
749 dnl may not be writable by the user. Currently, automake requires that the
750 dnl test name must end in '.test'.
751 dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
752 AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
753 AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
754 AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
755 AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
757 dnl for overriding the documentation installation directory
758 AC_ARG_WITH([html-dir],
759 AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
760 [with_html_dir='${datadir}/gtk-doc/html'])
761 HTML_DIR="$with_html_dir"
764 dnl enable/disable documentation building
765 AC_ARG_ENABLE([gtk-doc],
766 AS_HELP_STRING([--enable-gtk-doc],
767 [use gtk-doc to build documentation [[default=no]]]),,
770 AC_MSG_CHECKING([whether to build gtk-doc documentation])
771 AC_MSG_RESULT($enable_gtk_doc)
773 if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
775 You must have $gtk_doc_requires installed to build documentation for
776 $PACKAGE_NAME. Please install gtk-doc or disable building the
777 documentation by adding '--disable-gtk-doc' to '[$]0'.])
780 dnl don't check for glib if we build glib
781 if test "x$PACKAGE_NAME" != "xglib"; then
782 dnl don't fail if someone does not have glib
783 PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:])
786 dnl enable/disable output formats
787 AC_ARG_ENABLE([gtk-doc-html],
788 AS_HELP_STRING([--enable-gtk-doc-html],
789 [build documentation in html format [[default=yes]]]),,
790 [enable_gtk_doc_html=yes])
791 AC_ARG_ENABLE([gtk-doc-pdf],
792 AS_HELP_STRING([--enable-gtk-doc-pdf],
793 [build documentation in pdf format [[default=no]]]),,
794 [enable_gtk_doc_pdf=no])
796 if test -z "$GTKDOC_MKPDF"; then
797 enable_gtk_doc_pdf=no
800 if test -z "$AM_DEFAULT_VERBOSITY"; then
801 AM_DEFAULT_VERBOSITY=1
803 AC_SUBST([AM_DEFAULT_VERBOSITY])
805 AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
806 AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
807 AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
808 AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
809 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
810 AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
814 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
815 # serial 42 IT_PROG_INTLTOOL
816 AC_DEFUN([IT_PROG_INTLTOOL], [
818 AC_REQUIRE([AM_NLS])dnl
820 case "$am__api_version" in
822 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
828 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
829 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
830 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
831 if test -n "$1"; then
832 AC_MSG_CHECKING([for intltool >= $1])
833 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
834 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
835 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
838 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
839 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
840 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
841 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
842 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
845 if test -z "$AM_DEFAULT_VERBOSITY"; then
846 AM_DEFAULT_VERBOSITY=1
848 AC_SUBST([AM_DEFAULT_VERBOSITY])
850 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
851 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
852 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
853 AC_SUBST(INTLTOOL_V_MERGE)
854 AC_SUBST(INTLTOOL__v_MERGE_)
855 AC_SUBST(INTLTOOL__v_MERGE_0)
857 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
858 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
859 intltool__v_merge_options_0='-q'
860 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
861 AC_SUBST(intltool__v_merge_options_)
862 AC_SUBST(intltool__v_merge_options_0)
864 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
865 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
866 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
867 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
868 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
869 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
870 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
871 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
872 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
873 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
874 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
875 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
876 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
878 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
880 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
881 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
882 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
883 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
884 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
885 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
886 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
888 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
889 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
890 _IT_SUBST(INTLTOOL_KEYS_RULE)
891 _IT_SUBST(INTLTOOL_PROP_RULE)
892 _IT_SUBST(INTLTOOL_OAF_RULE)
893 _IT_SUBST(INTLTOOL_PONG_RULE)
894 _IT_SUBST(INTLTOOL_SERVER_RULE)
895 _IT_SUBST(INTLTOOL_SHEET_RULE)
896 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
897 _IT_SUBST(INTLTOOL_UI_RULE)
898 _IT_SUBST(INTLTOOL_XAM_RULE)
899 _IT_SUBST(INTLTOOL_KBD_RULE)
900 _IT_SUBST(INTLTOOL_XML_RULE)
901 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
902 _IT_SUBST(INTLTOOL_CAVES_RULE)
903 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
904 _IT_SUBST(INTLTOOL_THEME_RULE)
905 _IT_SUBST(INTLTOOL_SERVICE_RULE)
906 _IT_SUBST(INTLTOOL_POLICY_RULE)
908 # Check the gettext tools to make sure they are GNU
909 AC_PATH_PROG(XGETTEXT, xgettext)
910 AC_PATH_PROG(MSGMERGE, msgmerge)
911 AC_PATH_PROG(MSGFMT, msgfmt)
912 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
913 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
914 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
916 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
917 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
918 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
919 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
920 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
923 AC_PATH_PROG(INTLTOOL_PERL, perl)
924 if test -z "$INTLTOOL_PERL"; then
925 AC_MSG_ERROR([perl not found])
927 AC_MSG_CHECKING([for perl >= 5.8.1])
928 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
929 if test $? -ne 0; then
930 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
932 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
933 AC_MSG_RESULT([$IT_PERL_VERSION])
935 if test "x$2" != "xno-xml"; then
936 AC_MSG_CHECKING([for XML::Parser])
937 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
940 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
944 # Substitute ALL_LINGUAS so we can use it in po/Makefile
945 AC_SUBST(ALL_LINGUAS)
947 # Set DATADIRNAME correctly if it is not set yet
948 # (copied from glib-gettext.m4)
949 if test -z "$DATADIRNAME"; then
951 [AC_LANG_PROGRAM([[]],
952 [[extern int _nl_msg_cat_cntr;
953 return _nl_msg_cat_cntr]])],
957 dnl On Solaris, if bind_textdomain_codeset is in libc,
958 dnl GNU format message catalog is always supported,
959 dnl since both are added to the libc all together.
960 dnl Hence, we'd like to go with DATADIRNAME=share
962 AC_CHECK_FUNC(bind_textdomain_codeset,
963 [DATADIRNAME=share], [DATADIRNAME=lib])
970 AC_SUBST(DATADIRNAME)
977 # IT_PO_SUBDIR(DIRNAME)
978 # ---------------------
979 # All po subdirs have to be declared with this macro; the subdir "po" is
980 # declared by IT_PROG_INTLTOOL.
982 AC_DEFUN([IT_PO_SUBDIR],
983 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
985 dnl The following CONFIG_COMMANDS should be executed at the very end
986 dnl of config.status.
987 AC_CONFIG_COMMANDS_PRE([
988 AC_CONFIG_COMMANDS([$1/stamp-it], [
989 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
990 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
992 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
997 '"s|^| $ac_top_srcdir/|" \
998 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1000 [sed '/^POTFILES =/,/[^\\]$/ {
1004 ' "$1/Makefile.in" >"$1/Makefile"]
1005 rm -f "$1/Makefile.tmp"
1006 mv "$1/stamp-it.tmp" "$1/stamp-it"
1011 # _IT_SUBST(VARIABLE)
1012 # -------------------
1013 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1015 AC_DEFUN([_IT_SUBST],
1018 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1023 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1024 # A hint is needed for aclocal from Automake <= 1.9.4:
1025 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
1028 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1030 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1031 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1033 # Written by Gordon Matzigkeit, 1996
1035 # This file is free software; the Free Software Foundation gives
1036 # unlimited permission to copy and/or distribute it, with or without
1037 # modifications, as long as this notice is preserved.
1039 m4_define([_LT_COPYING], [dnl
1040 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1041 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1043 # Written by Gordon Matzigkeit, 1996
1045 # This file is part of GNU Libtool.
1047 # GNU Libtool is free software; you can redistribute it and/or
1048 # modify it under the terms of the GNU General Public License as
1049 # published by the Free Software Foundation; either version 2 of
1050 # the License, or (at your option) any later version.
1052 # As a special exception to the GNU General Public License,
1053 # if you distribute this file as part of a program or library that
1054 # is built using GNU Libtool, you may include this file under the
1055 # same distribution terms that you use for the rest of that program.
1057 # GNU Libtool is distributed in the hope that it will be useful,
1058 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1059 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1060 # GNU General Public License for more details.
1062 # You should have received a copy of the GNU General Public License
1063 # along with GNU Libtool; see the file COPYING. If not, a copy
1064 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1065 # obtained by writing to the Free Software Foundation, Inc.,
1066 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1072 # LT_PREREQ(VERSION)
1073 # ------------------
1074 # Complain and exit if this libtool version is less that VERSION.
1075 m4_defun([LT_PREREQ],
1076 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1078 [m4_fatal([Libtool version $1 or higher is required],
1083 # _LT_CHECK_BUILDDIR
1084 # ------------------
1085 # Complain if the absolute build directory name contains unusual characters
1086 m4_defun([_LT_CHECK_BUILDDIR],
1089 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1094 # LT_INIT([OPTIONS])
1095 # ------------------
1097 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1098 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1099 AC_BEFORE([$0], [LT_LANG])dnl
1100 AC_BEFORE([$0], [LT_OUTPUT])dnl
1101 AC_BEFORE([$0], [LTDL_INIT])dnl
1102 m4_require([_LT_CHECK_BUILDDIR])dnl
1104 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1105 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1106 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1107 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1108 dnl unless we require an AC_DEFUNed macro:
1109 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1110 AC_REQUIRE([LTSUGAR_VERSION])dnl
1111 AC_REQUIRE([LTVERSION_VERSION])dnl
1112 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1113 m4_require([_LT_PROG_LTMAIN])dnl
1115 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1118 _LT_SET_OPTIONS([$0], [$1])
1120 # This can be used to rebuild libtool when needed
1121 LIBTOOL_DEPS="$ltmain"
1123 # Always use our own libtool.
1124 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1125 AC_SUBST(LIBTOOL)dnl
1130 m4_define([LT_INIT])
1134 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1135 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1136 dnl aclocal-1.4 backwards compatibility:
1137 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1138 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1141 # _LT_CC_BASENAME(CC)
1142 # -------------------
1143 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1144 m4_defun([_LT_CC_BASENAME],
1145 [for cc_temp in $1""; do
1147 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1148 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1153 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1157 # _LT_FILEUTILS_DEFAULTS
1158 # ----------------------
1159 # It is okay to use these file commands and assume they have been set
1160 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1161 m4_defun([_LT_FILEUTILS_DEFAULTS],
1165 ])# _LT_FILEUTILS_DEFAULTS
1170 m4_defun([_LT_SETUP],
1171 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1172 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1173 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1174 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1176 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1178 _LT_DECL([], [host_alias], [0], [The host system])dnl
1179 _LT_DECL([], [host], [0])dnl
1180 _LT_DECL([], [host_os], [0])dnl
1182 _LT_DECL([], [build_alias], [0], [The build system])dnl
1183 _LT_DECL([], [build], [0])dnl
1184 _LT_DECL([], [build_os], [0])dnl
1186 AC_REQUIRE([AC_PROG_CC])dnl
1187 AC_REQUIRE([LT_PATH_LD])dnl
1188 AC_REQUIRE([LT_PATH_NM])dnl
1190 AC_REQUIRE([AC_PROG_LN_S])dnl
1191 test -z "$LN_S" && LN_S="ln -s"
1192 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1194 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1195 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1196 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1198 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1199 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1200 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1201 m4_require([_LT_CMD_RELOAD])dnl
1202 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1203 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1204 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1205 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1206 m4_require([_LT_WITH_SYSROOT])dnl
1208 _LT_CONFIG_LIBTOOL_INIT([
1209 # See if we are running on zsh, and set the options which allow our
1210 # commands through without removal of \ escapes INIT.
1211 if test -n "\${ZSH_VERSION+set}" ; then
1212 setopt NO_GLOB_SUBST
1215 if test -n "${ZSH_VERSION+set}" ; then
1216 setopt NO_GLOB_SUBST
1221 m4_require([_LT_TAG_COMPILER])dnl
1225 # AIX sometimes has problems with the GCC collect2 program. For some
1226 # reason, if we set the COLLECT_NAMES environment variable, the problems
1227 # vanish in a puff of smoke.
1228 if test "X${COLLECT_NAMES+set}" != Xset; then
1230 export COLLECT_NAMES
1237 can_build_shared=yes
1239 # All known linkers require a `.a' archive for static linking (except MSVC,
1240 # which needs '.lib').
1243 with_gnu_ld="$lt_cv_prog_gnu_ld"
1246 old_CFLAGS="$CFLAGS"
1248 # Set sane defaults for various variables
1249 test -z "$CC" && CC=cc
1250 test -z "$LTCC" && LTCC=$CC
1251 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1252 test -z "$LD" && LD=ld
1253 test -z "$ac_objext" && ac_objext=o
1255 _LT_CC_BASENAME([$compiler])
1257 # Only perform the check for file, if the check method requires it
1258 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1259 case $deplibs_check_method in
1261 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1267 # Use C for the default configuration in the libtool script
1268 LT_SUPPORTED_TAG([CC])
1270 _LT_LANG_DEFAULT_CONFIG
1275 # _LT_PREPARE_SED_QUOTE_VARS
1276 # --------------------------
1277 # Define a few sed substitution that help us do robust quoting.
1278 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1279 [# Backslashify metacharacters that are still active within
1280 # double-quoted strings.
1281 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1283 # Same as above, but do not quote variable references.
1284 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1286 # Sed substitution to delay expansion of an escaped shell variable in a
1287 # double_quote_subst'ed string.
1288 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1290 # Sed substitution to delay expansion of an escaped single quote.
1291 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1293 # Sed substitution to avoid accidental globbing in evaled expressions
1294 no_glob_subst='s/\*/\\\*/g'
1299 # Note that this code is called both from `configure', and `config.status'
1300 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1301 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1302 # so we pass a copy along to make sure it has a sensible value anyway.
1303 m4_defun([_LT_PROG_LTMAIN],
1304 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1305 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1306 ltmain="$ac_aux_dir/ltmain.sh"
1311 # So that we can recreate a full libtool script including additional
1312 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1313 # in macros and then make a single call at the end using the `libtool'
1317 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1318 # ----------------------------------------
1319 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1320 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1322 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1327 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1330 # _LT_CONFIG_LIBTOOL([COMMANDS])
1331 # ------------------------------
1332 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1333 m4_define([_LT_CONFIG_LIBTOOL],
1335 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1340 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1343 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1344 # -----------------------------------------------------
1345 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1346 [_LT_CONFIG_LIBTOOL([$1])
1347 _LT_CONFIG_LIBTOOL_INIT([$2])
1351 # _LT_FORMAT_COMMENT([COMMENT])
1352 # -----------------------------
1353 # Add leading comment marks to the start of each line, and a trailing
1354 # full-stop to the whole comment if one is not present already.
1355 m4_define([_LT_FORMAT_COMMENT],
1357 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1358 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1365 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1366 # -------------------------------------------------------------------
1367 # CONFIGNAME is the name given to the value in the libtool script.
1368 # VARNAME is the (base) name used in the configure script.
1369 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1370 # VARNAME. Any other value will be used directly.
1371 m4_define([_LT_DECL],
1372 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1373 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1374 [m4_ifval([$1], [$1], [$2])])
1375 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1377 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1378 lt_dict_add_subkey([lt_decl_dict], [$2],
1379 [tagged?], [m4_ifval([$5], [yes], [no])])])
1383 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1384 # --------------------------------------------------------
1385 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1388 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1389 # ------------------------------------------------
1390 m4_define([lt_decl_tag_varnames],
1391 [_lt_decl_filter([tagged?], [yes], $@)])
1394 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1395 # ---------------------------------------------------------
1396 m4_define([_lt_decl_filter],
1398 [0], [m4_fatal([$0: too few arguments: $#])],
1399 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1400 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1401 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1402 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1406 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1407 # --------------------------------------------------
1408 m4_define([lt_decl_quote_varnames],
1409 [_lt_decl_filter([value], [1], $@)])
1412 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1413 # ---------------------------------------------------
1414 m4_define([lt_decl_dquote_varnames],
1415 [_lt_decl_filter([value], [2], $@)])
1418 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1419 # ---------------------------------------------------
1420 m4_define([lt_decl_varnames_tagged],
1421 [m4_assert([$# <= 2])dnl
1422 _$0(m4_quote(m4_default([$1], [[, ]])),
1423 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1424 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1425 m4_define([_lt_decl_varnames_tagged],
1426 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1429 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1430 # ------------------------------------------------
1431 m4_define([lt_decl_all_varnames],
1432 [_$0(m4_quote(m4_default([$1], [[, ]])),
1434 m4_quote(lt_decl_varnames),
1435 m4_quote(m4_shift($@))))[]dnl
1437 m4_define([_lt_decl_all_varnames],
1438 [lt_join($@, lt_decl_varnames_tagged([$1],
1439 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1443 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1444 # ------------------------------------
1445 # Quote a variable value, and forward it to `config.status' so that its
1446 # declaration there will have the same value as in `configure'. VARNAME
1447 # must have a single quote delimited value for this to work.
1448 m4_define([_LT_CONFIG_STATUS_DECLARE],
1449 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1452 # _LT_CONFIG_STATUS_DECLARATIONS
1453 # ------------------------------
1454 # We delimit libtool config variables with single quotes, so when
1455 # we write them to config.status, we have to be sure to quote all
1456 # embedded single quotes properly. In configure, this macro expands
1457 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1459 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1460 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1461 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1462 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1467 # Output comment and list of tags supported by the script
1468 m4_defun([_LT_LIBTOOL_TAGS],
1469 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1470 available_tags="_LT_TAGS"dnl
1474 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1475 # -----------------------------------
1476 # Extract the dictionary values for VARNAME (optionally with TAG) and
1477 # expand to a commented shell variable setting:
1479 # # Some comment about what VAR is for.
1480 # visible_name=$lt_internal_name
1481 m4_define([_LT_LIBTOOL_DECLARE],
1482 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1483 [description])))[]dnl
1484 m4_pushdef([_libtool_name],
1485 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1486 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1487 [0], [_libtool_name=[$]$1],
1488 [1], [_libtool_name=$lt_[]$1],
1489 [2], [_libtool_name=$lt_[]$1],
1490 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1491 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1495 # _LT_LIBTOOL_CONFIG_VARS
1496 # -----------------------
1497 # Produce commented declarations of non-tagged libtool config variables
1498 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1499 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1500 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1501 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1502 [m4_foreach([_lt_var],
1503 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1504 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1507 # _LT_LIBTOOL_TAG_VARS(TAG)
1508 # -------------------------
1509 m4_define([_LT_LIBTOOL_TAG_VARS],
1510 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1511 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1514 # _LT_TAGVAR(VARNAME, [TAGNAME])
1515 # ------------------------------
1516 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1519 # _LT_CONFIG_COMMANDS
1520 # -------------------
1521 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1522 # variables for single and double quote escaping we saved from calls
1523 # to _LT_DECL, we can put quote escaped variables declarations
1524 # into `config.status', and then the shell code to quote escape them in
1525 # for loops in `config.status'. Finally, any additional code accumulated
1526 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1527 m4_defun([_LT_CONFIG_COMMANDS],
1528 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1529 dnl If the libtool generation code has been placed in $CONFIG_LT,
1530 dnl instead of duplicating it all over again into config.status,
1531 dnl then we will have config.status run $CONFIG_LT later, so it
1532 dnl needs to know what name is stored there:
1533 [AC_CONFIG_COMMANDS([libtool],
1534 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1535 dnl If the libtool generation code is destined for config.status,
1536 dnl expand the accumulated commands and init code now:
1537 [AC_CONFIG_COMMANDS([libtool],
1538 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1539 ])#_LT_CONFIG_COMMANDS
1543 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1546 # The HP-UX ksh and POSIX shell print the target directory to stdout
1548 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1550 sed_quote_subst='$sed_quote_subst'
1551 double_quote_subst='$double_quote_subst'
1552 delay_variable_subst='$delay_variable_subst'
1553 _LT_CONFIG_STATUS_DECLARATIONS
1555 LTCFLAGS='$LTCFLAGS'
1556 compiler='$compiler_DEFAULT'
1558 # A function that is used when there is no print builtin or printf.
1559 func_fallback_echo ()
1561 eval 'cat <<_LTECHO_EOF
1566 # Quote evaled strings.
1567 for var in lt_decl_all_varnames([[ \
1568 ]], lt_decl_quote_varnames); do
1569 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1570 *[[\\\\\\\`\\"\\\$]]*)
1571 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1574 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1579 # Double-quote double-evaled strings.
1580 for var in lt_decl_all_varnames([[ \
1581 ]], lt_decl_dquote_varnames); do
1582 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1583 *[[\\\\\\\`\\"\\\$]]*)
1584 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1587 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1592 _LT_OUTPUT_LIBTOOL_INIT
1595 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1596 # ------------------------------------
1597 # Generate a child script FILE with all initialization necessary to
1598 # reuse the environment learned by the parent script, and make the
1599 # file executable. If COMMENT is supplied, it is inserted after the
1600 # `#!' sequence but before initialization text begins. After this
1601 # macro, additional text can be appended to FILE to form the body of
1602 # the child script. The macro ends with non-zero status if the
1603 # file could not be fully written (such as if the disk is full).
1604 m4_ifdef([AS_INIT_GENERATED],
1605 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1606 [m4_defun([_LT_GENERATED_FILE_INIT],
1607 [m4_require([AS_PREPARE])]dnl
1608 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1610 cat >$1 <<_ASEOF || lt_write_fail=1
1612 # Generated by $as_me.
1614 SHELL=\${CONFIG_SHELL-$SHELL}
1617 cat >>$1 <<\_ASEOF || lt_write_fail=1
1620 exec AS_MESSAGE_FD>&1
1622 test $lt_write_fail = 0 && chmod +x $1[]dnl
1623 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1627 # This macro allows early generation of the libtool script (before
1628 # AC_OUTPUT is called), incase it is used in configure for compilation
1630 AC_DEFUN([LT_OUTPUT],
1631 [: ${CONFIG_LT=./config.lt}
1632 AC_MSG_NOTICE([creating $CONFIG_LT])
1633 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1634 [# Run this file to recreate a libtool stub with the current configuration.])
1636 cat >>"$CONFIG_LT" <<\_LTEOF
1638 exec AS_MESSAGE_LOG_FD>>config.log
1641 AS_BOX([Running $as_me.])
1642 } >&AS_MESSAGE_LOG_FD
1645 \`$as_me' creates a local libtool stub from the current configuration,
1646 for use in further configure time tests before the real libtool is
1649 Usage: $[0] [[OPTIONS]]
1651 -h, --help print this help, then exit
1652 -V, --version print version number, then exit
1653 -q, --quiet do not print progress messages
1654 -d, --debug don't remove temporary files
1656 Report bugs to <bug-libtool@gnu.org>."
1659 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1660 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1661 configured by $[0], generated by m4_PACKAGE_STRING.
1663 Copyright (C) 2011 Free Software Foundation, Inc.
1664 This config.lt script is free software; the Free Software Foundation
1665 gives unlimited permision to copy, distribute and modify it."
1667 while test $[#] != 0
1670 --version | --v* | -V )
1671 echo "$lt_cl_version"; exit 0 ;;
1672 --help | --h* | -h )
1673 echo "$lt_cl_help"; exit 0 ;;
1674 --debug | --d* | -d )
1676 --quiet | --q* | --silent | --s* | -q )
1679 -*) AC_MSG_ERROR([unrecognized option: $[1]
1680 Try \`$[0] --help' for more information.]) ;;
1682 *) AC_MSG_ERROR([unrecognized argument: $[1]
1683 Try \`$[0] --help' for more information.]) ;;
1688 if $lt_cl_silent; then
1689 exec AS_MESSAGE_FD>/dev/null
1693 cat >>"$CONFIG_LT" <<_LTEOF
1694 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1697 cat >>"$CONFIG_LT" <<\_LTEOF
1698 AC_MSG_NOTICE([creating $ofile])
1699 _LT_OUTPUT_LIBTOOL_COMMANDS
1702 chmod +x "$CONFIG_LT"
1704 # configure is writing to config.log, but config.lt does its own redirection,
1705 # appending to config.log, which fails on DOS, as config.log is still kept
1706 # open by configure. Here we exec the FD to /dev/null, effectively closing
1707 # config.log, so it can be properly (re)opened and appended to by config.lt.
1709 test "$silent" = yes &&
1710 lt_config_lt_args="$lt_config_lt_args --quiet"
1711 exec AS_MESSAGE_LOG_FD>/dev/null
1712 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1713 exec AS_MESSAGE_LOG_FD>>config.log
1714 $lt_cl_success || AS_EXIT(1)
1720 # If TAG is the built-in tag, create an initial libtool script with a
1721 # default configuration from the untagged config vars. Otherwise add code
1722 # to config.status for appending the configuration named by TAG from the
1723 # matching tagged config vars.
1724 m4_defun([_LT_CONFIG],
1725 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1726 _LT_CONFIG_SAVE_COMMANDS([
1727 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1728 m4_if(_LT_TAG, [C], [
1729 # See if we are running on zsh, and set the options which allow our
1730 # commands through without removal of \ escapes.
1731 if test -n "${ZSH_VERSION+set}" ; then
1732 setopt NO_GLOB_SUBST
1736 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1739 cat <<_LT_EOF >> "$cfgfile"
1742 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1743 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1744 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1745 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1750 # ### BEGIN LIBTOOL CONFIG
1751 _LT_LIBTOOL_CONFIG_VARS
1752 _LT_LIBTOOL_TAG_VARS
1753 # ### END LIBTOOL CONFIG
1759 cat <<\_LT_EOF >> "$cfgfile"
1760 # AIX sometimes has problems with the GCC collect2 program. For some
1761 # reason, if we set the COLLECT_NAMES environment variable, the problems
1762 # vanish in a puff of smoke.
1763 if test "X${COLLECT_NAMES+set}" != Xset; then
1765 export COLLECT_NAMES
1773 # We use sed instead of cat because bash on DJGPP gets confused if
1774 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1775 # text mode, it properly converts lines to CR/LF. This bash problem
1776 # is reportedly fixed, but why not run on old versions too?
1777 sed '$q' "$ltmain" >> "$cfgfile" \
1778 || (rm -f "$cfgfile"; exit 1)
1780 _LT_PROG_REPLACE_SHELLFNS
1782 mv -f "$cfgfile" "$ofile" ||
1783 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1786 [cat <<_LT_EOF >> "$ofile"
1788 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1789 dnl in a comment (ie after a #).
1790 # ### BEGIN LIBTOOL TAG CONFIG: $1
1791 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1792 # ### END LIBTOOL TAG CONFIG: $1
1799 TIMESTAMP='$TIMESTAMP'
1801 ofile='$ofile'], [])
1802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1806 # LT_SUPPORTED_TAG(TAG)
1807 # ---------------------
1808 # Trace this macro to discover what tags are supported by the libtool
1809 # --tag option, using:
1810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
1811 AC_DEFUN([LT_SUPPORTED_TAG], [])
1814 # C support is built-in for now
1815 m4_define([_LT_LANG_C_enabled], [])
1816 m4_define([_LT_TAGS], [])
1821 # Enable libtool support for the given language if not already enabled.
1823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1826 [C++], [_LT_LANG(CXX)],
1827 [Go], [_LT_LANG(GO)],
1828 [Java], [_LT_LANG(GCJ)],
1829 [Fortran 77], [_LT_LANG(F77)],
1830 [Fortran], [_LT_LANG(FC)],
1831 [Windows Resource], [_LT_LANG(RC)],
1832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
1838 # _LT_LANG(LANGNAME)
1839 # ------------------
1840 m4_defun([_LT_LANG],
1841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1842 [LT_SUPPORTED_TAG([$1])dnl
1843 m4_append([_LT_TAGS], [$1 ])dnl
1844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
1845 _LT_LANG_$1_CONFIG($1)])dnl
1849 m4_ifndef([AC_PROG_GO], [
1850 # NOTE: This macro has been submitted for inclusion into #
1851 # GNU Autoconf as AC_PROG_GO. When it is available in #
1852 # a released version of Autoconf we should remove this #
1853 # macro and use it instead. #
1854 m4_defun([AC_PROG_GO],
1855 [AC_LANG_PUSH(Go)dnl
1856 AC_ARG_VAR([GOC], [Go compiler command])dnl
1857 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1858 _AC_ARG_VAR_LDFLAGS()dnl
1859 AC_CHECK_TOOL(GOC, gccgo)
1860 if test -z "$GOC"; then
1861 if test -n "$ac_tool_prefix"; then
1862 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1865 if test -z "$GOC"; then
1866 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1872 # _LT_LANG_DEFAULT_CONFIG
1873 # -----------------------
1874 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1875 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1877 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1879 AC_PROVIDE_IFELSE([AC_PROG_F77],
1881 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1883 AC_PROVIDE_IFELSE([AC_PROG_FC],
1885 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1887 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1888 dnl pulling things in needlessly.
1889 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1891 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1893 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1895 [m4_ifdef([AC_PROG_GCJ],
1896 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1897 m4_ifdef([A][M_PROG_GCJ],
1898 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1899 m4_ifdef([LT_PROG_GCJ],
1900 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1902 AC_PROVIDE_IFELSE([AC_PROG_GO],
1904 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1906 AC_PROVIDE_IFELSE([LT_PROG_RC],
1908 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1909 ])# _LT_LANG_DEFAULT_CONFIG
1912 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1913 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1914 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1915 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1916 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1917 dnl aclocal-1.4 backwards compatibility:
1918 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1919 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1920 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1921 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1922 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1927 m4_defun([_LT_TAG_COMPILER],
1928 [AC_REQUIRE([AC_PROG_CC])dnl
1930 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1931 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1932 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1933 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1935 # If no C compiler was specified, use CC.
1938 # If no C compiler flags were specified, use CFLAGS.
1939 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1941 # Allow CC to be a program name with arguments.
1943 ])# _LT_TAG_COMPILER
1946 # _LT_COMPILER_BOILERPLATE
1947 # ------------------------
1948 # Check for compiler boilerplate output or warnings with
1949 # the simple compiler test code.
1950 m4_defun([_LT_COMPILER_BOILERPLATE],
1951 [m4_require([_LT_DECL_SED])dnl
1952 ac_outfile=conftest.$ac_objext
1953 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1954 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1955 _lt_compiler_boilerplate=`cat conftest.err`
1957 ])# _LT_COMPILER_BOILERPLATE
1960 # _LT_LINKER_BOILERPLATE
1961 # ----------------------
1962 # Check for linker boilerplate output or warnings with
1963 # the simple link test code.
1964 m4_defun([_LT_LINKER_BOILERPLATE],
1965 [m4_require([_LT_DECL_SED])dnl
1966 ac_outfile=conftest.$ac_objext
1967 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1968 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1969 _lt_linker_boilerplate=`cat conftest.err`
1971 ])# _LT_LINKER_BOILERPLATE
1973 # _LT_REQUIRED_DARWIN_CHECKS
1974 # -------------------------
1975 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1977 rhapsody* | darwin*)
1978 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1979 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1980 AC_CHECK_TOOL([LIPO], [lipo], [:])
1981 AC_CHECK_TOOL([OTOOL], [otool], [:])
1982 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1983 _LT_DECL([], [DSYMUTIL], [1],
1984 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1985 _LT_DECL([], [NMEDIT], [1],
1986 [Tool to change global to local symbols on Mac OS X])
1987 _LT_DECL([], [LIPO], [1],
1988 [Tool to manipulate fat objects and archives on Mac OS X])
1989 _LT_DECL([], [OTOOL], [1],
1990 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1991 _LT_DECL([], [OTOOL64], [1],
1992 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1994 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1995 [lt_cv_apple_cc_single_mod=no
1996 if test -z "${LT_MULTI_MODULE}"; then
1997 # By default we will add the -single_module flag. You can override
1998 # by either setting the environment variable LT_MULTI_MODULE
1999 # non-empty at configure time, or by adding -multi_module to the
2001 rm -rf libconftest.dylib*
2002 echo "int foo(void){return 1;}" > conftest.c
2003 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2004 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2005 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2006 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2008 # If there is a non-empty error log, and "single_module"
2009 # appears in it, assume the flag caused a linker warning
2010 if test -s conftest.err && $GREP single_module conftest.err; then
2011 cat conftest.err >&AS_MESSAGE_LOG_FD
2012 # Otherwise, if the output was created with a 0 exit code from
2013 # the compiler, it worked.
2014 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2015 lt_cv_apple_cc_single_mod=yes
2017 cat conftest.err >&AS_MESSAGE_LOG_FD
2019 rm -rf libconftest.dylib*
2023 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2024 [lt_cv_ld_exported_symbols_list],
2025 [lt_cv_ld_exported_symbols_list=no
2026 save_LDFLAGS=$LDFLAGS
2027 echo "_main" > conftest.sym
2028 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2029 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2030 [lt_cv_ld_exported_symbols_list=yes],
2031 [lt_cv_ld_exported_symbols_list=no])
2032 LDFLAGS="$save_LDFLAGS"
2035 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2036 [lt_cv_ld_force_load=no
2037 cat > conftest.c << _LT_EOF
2038 int forced_loaded() { return 2;}
2040 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2041 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2042 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2043 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2044 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2045 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2046 cat > conftest.c << _LT_EOF
2047 int main() { return 0;}
2049 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2050 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2052 if test -s conftest.err && $GREP force_load conftest.err; then
2053 cat conftest.err >&AS_MESSAGE_LOG_FD
2054 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2055 lt_cv_ld_force_load=yes
2057 cat conftest.err >&AS_MESSAGE_LOG_FD
2059 rm -f conftest.err libconftest.a conftest conftest.c
2060 rm -rf conftest.dSYM
2063 rhapsody* | darwin1.[[012]])
2064 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2066 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2067 darwin*) # darwin 5.x on
2068 # if running on 10.5 or later, the deployment target defaults
2069 # to the OS version, if on x86, and 10.4, the deployment
2070 # target defaults to 10.4. Don't you love it?
2071 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2072 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2073 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2075 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2077 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2081 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2082 _lt_dar_single_mod='$single_module'
2084 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2085 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2087 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2089 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2090 _lt_dsymutil='~$DSYMUTIL $lib || :'
2099 # _LT_DARWIN_LINKER_FEATURES([TAG])
2100 # ---------------------------------
2101 # Checks for linker and compiler features on darwin
2102 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2104 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2105 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2106 _LT_TAGVAR(hardcode_direct, $1)=no
2107 _LT_TAGVAR(hardcode_automatic, $1)=yes
2108 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2109 if test "$lt_cv_ld_force_load" = "yes"; then
2110 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2111 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2112 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2114 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2116 _LT_TAGVAR(link_all_deplibs, $1)=yes
2117 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2118 case $cc_basename in
2119 ifort*) _lt_dar_can_shared=yes ;;
2120 *) _lt_dar_can_shared=$GCC ;;
2122 if test "$_lt_dar_can_shared" = "yes"; then
2123 output_verbose_link_cmd=func_echo_all
2124 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2125 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2126 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2127 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2129 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2130 _LT_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${_lt_dsymutil}"
2131 _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
2135 _LT_TAGVAR(ld_shlibs, $1)=no
2139 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2140 # ----------------------------------
2141 # Links a minimal program and checks the executable
2142 # for the system default hardcoded library path. In most cases,
2143 # this is /usr/lib:/lib, but when the MPI compilers are used
2144 # the location of the communication and MPI libs are included too.
2145 # If we don't find anything, use the default library path according
2146 # to the aix ld manual.
2147 # Store the results from the different compilers for each TAGNAME.
2148 # Allow to override them for all tags through lt_cv_aix_libpath.
2149 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2150 [m4_require([_LT_DECL_SED])dnl
2151 if test "${lt_cv_aix_libpath+set}" = set; then
2152 aix_libpath=$lt_cv_aix_libpath
2154 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2155 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2156 lt_aix_libpath_sed='[
2157 /Import File Strings/,/^$/ {
2159 s/^0 *\([^ ]*\) *$/\1/
2163 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2164 # Check for a 64-bit object if we didn't find anything.
2165 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2172 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2174 ])# _LT_SYS_MODULE_PATH_AIX
2177 # _LT_SHELL_INIT(ARG)
2178 # -------------------
2179 m4_define([_LT_SHELL_INIT],
2180 [m4_divert_text([M4SH-INIT], [$1
2181 ])])# _LT_SHELL_INIT
2185 # _LT_PROG_ECHO_BACKSLASH
2186 # -----------------------
2187 # Find how we can fake an echo command that does not interpret backslash.
2188 # In particular, with Autoconf 2.60 or later we add some code to the start
2189 # of the generated configure script which will find a shell with a builtin
2190 # printf (which we can use as an echo command).
2191 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2192 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2193 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2194 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2196 AC_MSG_CHECKING([how to print strings])
2197 # Test print first, because it will be a builtin if present.
2198 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2199 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2201 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2204 # Use this function as a fallback that always works.
2205 func_fallback_echo ()
2207 eval 'cat <<_LTECHO_EOF
2211 ECHO='func_fallback_echo'
2214 # func_echo_all arg...
2215 # Invoke $ECHO with all args, space-separated.
2222 printf*) AC_MSG_RESULT([printf]) ;;
2223 print*) AC_MSG_RESULT([print -r]) ;;
2224 *) AC_MSG_RESULT([cat]) ;;
2227 m4_ifdef([_AS_DETECT_SUGGESTED],
2228 [_AS_DETECT_SUGGESTED([
2229 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2230 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2231 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2232 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2233 PATH=/empty FPATH=/empty; export PATH FPATH
2234 test "X`printf %s $ECHO`" = "X$ECHO" \
2235 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2237 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2238 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2239 ])# _LT_PROG_ECHO_BACKSLASH
2244 AC_DEFUN([_LT_WITH_SYSROOT],
2245 [AC_MSG_CHECKING([for sysroot])
2246 AC_ARG_WITH([sysroot],
2247 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
2248 (or the compiler's sysroot if not specified).],
2249 [], [with_sysroot=no])
2251 dnl lt_sysroot will always be passed unquoted. We quote it here
2252 dnl in case the user passed a directory name.
2254 case ${with_sysroot} in #(
2256 if test "$GCC" = yes; then
2257 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2261 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2266 AC_MSG_RESULT([${with_sysroot}])
2267 AC_MSG_ERROR([The sysroot must be an absolute path.])
2271 AC_MSG_RESULT([${lt_sysroot:-no}])
2272 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2273 [dependent libraries, and in which our libraries should be installed.])])
2277 m4_defun([_LT_ENABLE_LOCK],
2278 [AC_ARG_ENABLE([libtool-lock],
2279 [AS_HELP_STRING([--disable-libtool-lock],
2280 [avoid locking (might break parallel builds)])])
2281 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2283 # Some flags need to be propagated to the compiler or linker for good
2287 # Find out which ABI we are using.
2288 echo 'int i;' > conftest.$ac_ext
2289 if AC_TRY_EVAL(ac_compile); then
2290 case `/usr/bin/file conftest.$ac_objext` in
2302 # Find out which ABI we are using.
2303 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2304 if AC_TRY_EVAL(ac_compile); then
2305 if test "$lt_cv_prog_gnu_ld" = yes; then
2306 case `/usr/bin/file conftest.$ac_objext` in
2308 LD="${LD-ld} -melf32bsmip"
2311 LD="${LD-ld} -melf32bmipn32"
2314 LD="${LD-ld} -melf64bmip"
2318 case `/usr/bin/file conftest.$ac_objext` in
2334 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2335 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2336 # Find out which ABI we are using.
2337 echo 'int i;' > conftest.$ac_ext
2338 if AC_TRY_EVAL(ac_compile); then
2339 case `/usr/bin/file conftest.o` in
2342 x86_64-*kfreebsd*-gnu)
2343 LD="${LD-ld} -m elf_i386_fbsd"
2346 case `/usr/bin/file conftest.o` in
2348 LD="${LD-ld} -m elf32_x86_64"
2351 LD="${LD-ld} -m elf_i386"
2356 LD="${LD-ld} -m elf32lppclinux"
2359 LD="${LD-ld} -m elf32ppclinux"
2362 LD="${LD-ld} -m elf_s390"
2365 LD="${LD-ld} -m elf32_sparc"
2371 x86_64-*kfreebsd*-gnu)
2372 LD="${LD-ld} -m elf_x86_64_fbsd"
2375 LD="${LD-ld} -m elf_x86_64"
2378 LD="${LD-ld} -m elf64lppc"
2381 LD="${LD-ld} -m elf64ppc"
2383 s390*-*linux*|s390*-*tpf*)
2384 LD="${LD-ld} -m elf64_s390"
2387 LD="${LD-ld} -m elf64_sparc"
2397 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2398 SAVE_CFLAGS="$CFLAGS"
2399 CFLAGS="$CFLAGS -belf"
2400 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2402 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2404 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2405 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2406 CFLAGS="$SAVE_CFLAGS"
2410 # Find out which ABI we are using.
2411 echo 'int i;' > conftest.$ac_ext
2412 if AC_TRY_EVAL(ac_compile); then
2413 case `/usr/bin/file conftest.o` in
2415 case $lt_cv_prog_gnu_ld in
2419 LD="${LD-ld} -m elf_x86_64"
2422 LD="${LD-ld} -m elf64_sparc"
2425 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
2426 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2431 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2443 need_locks="$enable_libtool_lock"
2449 m4_defun([_LT_PROG_AR],
2450 [AC_CHECK_TOOLS(AR, [ar], false)
2453 _LT_DECL([], [AR], [1], [The archiver])
2454 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2456 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2457 [lt_cv_ar_at_file=no
2458 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2459 [echo conftest.$ac_objext > conftest.lst
2460 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2461 AC_TRY_EVAL([lt_ar_try])
2462 if test "$ac_status" -eq 0; then
2463 # Ensure the archiver fails upon bogus file names.
2464 rm -f conftest.$ac_objext libconftest.a
2465 AC_TRY_EVAL([lt_ar_try])
2466 if test "$ac_status" -ne 0; then
2470 rm -f conftest.* libconftest.a
2474 if test "x$lt_cv_ar_at_file" = xno; then
2477 archiver_list_spec=$lt_cv_ar_at_file
2479 _LT_DECL([], [archiver_list_spec], [1],
2480 [How to feed a file listing to the archiver])
2484 # _LT_CMD_OLD_ARCHIVE
2485 # -------------------
2486 m4_defun([_LT_CMD_OLD_ARCHIVE],
2489 AC_CHECK_TOOL(STRIP, strip, :)
2490 test -z "$STRIP" && STRIP=:
2491 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2493 AC_CHECK_TOOL(RANLIB, ranlib, :)
2494 test -z "$RANLIB" && RANLIB=:
2495 _LT_DECL([], [RANLIB], [1],
2496 [Commands used to install an old-style archive])
2498 # Determine commands to create old-style static archives.
2499 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2500 old_postinstall_cmds='chmod 644 $oldlib'
2501 old_postuninstall_cmds=
2503 if test -n "$RANLIB"; then
2506 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2509 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2512 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2517 lock_old_archive_extraction=yes ;;
2519 lock_old_archive_extraction=no ;;
2521 _LT_DECL([], [old_postinstall_cmds], [2])
2522 _LT_DECL([], [old_postuninstall_cmds], [2])
2523 _LT_TAGDECL([], [old_archive_cmds], [2],
2524 [Commands used to build an old-style archive])
2525 _LT_DECL([], [lock_old_archive_extraction], [0],
2526 [Whether to use a lock for old archive extraction])
2527 ])# _LT_CMD_OLD_ARCHIVE
2530 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2531 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2532 # ----------------------------------------------------------------
2533 # Check whether the given compiler option works
2534 AC_DEFUN([_LT_COMPILER_OPTION],
2535 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2536 m4_require([_LT_DECL_SED])dnl
2537 AC_CACHE_CHECK([$1], [$2],
2539 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2540 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2541 lt_compiler_flag="$3"
2542 # Insert the option either (1) after the last *FLAGS variable, or
2543 # (2) before a word containing "conftest.", or (3) at the end.
2544 # Note that $ac_compile itself does not contain backslashes and begins
2545 # with a dollar sign (not a hyphen), so the echo should work correctly.
2546 # The option is referenced via a variable to avoid confusing sed.
2547 lt_compile=`echo "$ac_compile" | $SED \
2548 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2549 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2550 -e 's:$: $lt_compiler_flag:'`
2551 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2552 (eval "$lt_compile" 2>conftest.err)
2554 cat conftest.err >&AS_MESSAGE_LOG_FD
2555 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2556 if (exit $ac_status) && test -s "$ac_outfile"; then
2557 # The compiler can only warn and ignore the option if not recognized
2558 # So say no if there are warnings other than the usual output.
2559 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2560 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2561 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2568 if test x"[$]$2" = xyes; then
2569 m4_if([$5], , :, [$5])
2571 m4_if([$6], , :, [$6])
2573 ])# _LT_COMPILER_OPTION
2576 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2577 dnl aclocal-1.4 backwards compatibility:
2578 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2581 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2582 # [ACTION-SUCCESS], [ACTION-FAILURE])
2583 # ----------------------------------------------------
2584 # Check whether the given linker option works
2585 AC_DEFUN([_LT_LINKER_OPTION],
2586 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2587 m4_require([_LT_DECL_SED])dnl
2588 AC_CACHE_CHECK([$1], [$2],
2590 save_LDFLAGS="$LDFLAGS"
2591 LDFLAGS="$LDFLAGS $3"
2592 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2593 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2594 # The linker can only warn and ignore the option if not recognized
2595 # So say no if there are warnings
2596 if test -s conftest.err; then
2597 # Append any errors to the config.log.
2598 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2599 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2600 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2601 if diff conftest.exp conftest.er2 >/dev/null; then
2609 LDFLAGS="$save_LDFLAGS"
2612 if test x"[$]$2" = xyes; then
2613 m4_if([$4], , :, [$4])
2615 m4_if([$5], , :, [$5])
2617 ])# _LT_LINKER_OPTION
2620 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2621 dnl aclocal-1.4 backwards compatibility:
2622 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2627 AC_DEFUN([LT_CMD_MAX_LEN],
2628 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2629 # find the maximum length of command line arguments
2630 AC_MSG_CHECKING([the maximum length of command line arguments])
2631 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2637 # On DJGPP, this test can blow up pretty badly due to problems in libc
2638 # (any single argument exceeding 2000 bytes causes a buffer overrun
2639 # during glob expansion). Even if it were fixed, the result of this
2640 # check would be larger than it should be.
2641 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2645 # Under GNU Hurd, this test is not required because there is
2646 # no limit to the length of command line arguments.
2647 # Libtool will interpret -1 as no limit whatsoever
2648 lt_cv_sys_max_cmd_len=-1;
2651 cygwin* | mingw* | cegcc*)
2652 # On Win9x/ME, this test blows up -- it succeeds, but takes
2653 # about 5 minutes as the teststring grows exponentially.
2654 # Worse, since 9x/ME are not pre-emptively multitasking,
2655 # you end up with a "frozen" computer, even though with patience
2656 # the test eventually succeeds (with a max line length of 256k).
2657 # Instead, let's just punt: use the minimum linelength reported by
2658 # all of the supported platforms: 8192 (on NT/2K/XP).
2659 lt_cv_sys_max_cmd_len=8192;
2663 # On MiNT this can take a long time and run out of memory.
2664 lt_cv_sys_max_cmd_len=8192;
2668 # On AmigaOS with pdksh, this test takes hours, literally.
2669 # So we just punt and use a minimum line length of 8192.
2670 lt_cv_sys_max_cmd_len=8192;
2673 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2674 # This has been around since 386BSD, at least. Likely further.
2675 if test -x /sbin/sysctl; then
2676 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2677 elif test -x /usr/sbin/sysctl; then
2678 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2680 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2682 # And add a safety zone
2683 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2684 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2688 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2689 lt_cv_sys_max_cmd_len=196608
2693 # The test takes a long time on OS/2.
2694 lt_cv_sys_max_cmd_len=8192
2698 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2699 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2700 # nice to cause kernel panics so lets avoid the loop below.
2701 # First set a reasonable default.
2702 lt_cv_sys_max_cmd_len=16384
2704 if test -x /sbin/sysconfig; then
2705 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2706 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2711 lt_cv_sys_max_cmd_len=102400
2713 sysv5* | sco5v6* | sysv4.2uw2*)
2714 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2715 if test -n "$kargmax"; then
2716 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2718 lt_cv_sys_max_cmd_len=32768
2722 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2723 if test -n "$lt_cv_sys_max_cmd_len" && \
2724 test undefined != "$lt_cv_sys_max_cmd_len"; then
2725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2728 # Make teststring a little bigger before we do anything with it.
2729 # a 1K string should be a reasonable start.
2730 for i in 1 2 3 4 5 6 7 8 ; do
2731 teststring=$teststring$teststring
2733 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2734 # If test is not a shell built-in, we'll probably end up computing a
2735 # maximum length that is only half of the actual maximum length, but
2737 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2738 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2739 test $i != 17 # 1/2 MB should be enough
2742 teststring=$teststring$teststring
2744 # Only check the string length outside the loop.
2745 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2747 # Add a significant safety factor because C++ compilers can tack on
2748 # massive amounts of additional arguments before passing them to the
2749 # linker. It appears as though 1/2 is a usable value.
2750 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2755 if test -n $lt_cv_sys_max_cmd_len ; then
2756 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2760 max_cmd_len=$lt_cv_sys_max_cmd_len
2761 _LT_DECL([], [max_cmd_len], [0],
2762 [What is the maximum length of a command?])
2766 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2767 dnl aclocal-1.4 backwards compatibility:
2768 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2773 m4_defun([_LT_HEADER_DLFCN],
2774 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2775 ])# _LT_HEADER_DLFCN
2778 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2779 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2780 # ----------------------------------------------------------------
2781 m4_defun([_LT_TRY_DLOPEN_SELF],
2782 [m4_require([_LT_HEADER_DLFCN])dnl
2783 if test "$cross_compiling" = yes; then :
2786 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2787 lt_status=$lt_dlunknown
2788 cat > conftest.$ac_ext <<_LT_EOF
2789 [#line $LINENO "configure"
2790 #include "confdefs.h"
2799 # define LT_DLGLOBAL RTLD_GLOBAL
2802 # define LT_DLGLOBAL DL_GLOBAL
2804 # define LT_DLGLOBAL 0
2808 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2809 find out it does not work in some platform. */
2810 #ifndef LT_DLLAZY_OR_NOW
2812 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2815 # define LT_DLLAZY_OR_NOW DL_LAZY
2818 # define LT_DLLAZY_OR_NOW RTLD_NOW
2821 # define LT_DLLAZY_OR_NOW DL_NOW
2823 # define LT_DLLAZY_OR_NOW 0
2830 /* When -fvisbility=hidden is used, assume the code has been annotated
2831 correspondingly for the symbols needed. */
2832 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2833 int fnord () __attribute__((visibility("default")));
2836 int fnord () { return 42; }
2839 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2840 int status = $lt_dlunknown;
2844 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2847 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2848 else puts (dlerror ());
2850 /* dlclose (self); */
2858 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2859 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2862 x$lt_dlno_uscore) $1 ;;
2863 x$lt_dlneed_uscore) $2 ;;
2864 x$lt_dlunknown|x*) $3 ;;
2867 # compilation failed
2872 ])# _LT_TRY_DLOPEN_SELF
2875 # LT_SYS_DLOPEN_SELF
2876 # ------------------
2877 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2878 [m4_require([_LT_HEADER_DLFCN])dnl
2879 if test "x$enable_dlopen" != xyes; then
2880 enable_dlopen=unknown
2881 enable_dlopen_self=unknown
2882 enable_dlopen_self_static=unknown
2889 lt_cv_dlopen="load_add_on"
2891 lt_cv_dlopen_self=yes
2894 mingw* | pw32* | cegcc*)
2895 lt_cv_dlopen="LoadLibrary"
2900 lt_cv_dlopen="dlopen"
2905 # if libdl is installed we need to link against it
2906 AC_CHECK_LIB([dl], [dlopen],
2907 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2910 lt_cv_dlopen_self=yes
2915 AC_CHECK_FUNC([shl_load],
2916 [lt_cv_dlopen="shl_load"],
2917 [AC_CHECK_LIB([dld], [shl_load],
2918 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2919 [AC_CHECK_FUNC([dlopen],
2920 [lt_cv_dlopen="dlopen"],
2921 [AC_CHECK_LIB([dl], [dlopen],
2922 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2923 [AC_CHECK_LIB([svld], [dlopen],
2924 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2925 [AC_CHECK_LIB([dld], [dld_link],
2926 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2935 if test "x$lt_cv_dlopen" != xno; then
2941 case $lt_cv_dlopen in
2943 save_CPPFLAGS="$CPPFLAGS"
2944 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2946 save_LDFLAGS="$LDFLAGS"
2947 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2950 LIBS="$lt_cv_dlopen_libs $LIBS"
2952 AC_CACHE_CHECK([whether a program can dlopen itself],
2953 lt_cv_dlopen_self, [dnl
2954 _LT_TRY_DLOPEN_SELF(
2955 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2956 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2959 if test "x$lt_cv_dlopen_self" = xyes; then
2960 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2961 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2962 lt_cv_dlopen_self_static, [dnl
2963 _LT_TRY_DLOPEN_SELF(
2964 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2965 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2969 CPPFLAGS="$save_CPPFLAGS"
2970 LDFLAGS="$save_LDFLAGS"
2975 case $lt_cv_dlopen_self in
2976 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2977 *) enable_dlopen_self=unknown ;;
2980 case $lt_cv_dlopen_self_static in
2981 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2982 *) enable_dlopen_self_static=unknown ;;
2985 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2986 [Whether dlopen is supported])
2987 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2988 [Whether dlopen of programs is supported])
2989 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2990 [Whether dlopen of statically linked programs is supported])
2991 ])# LT_SYS_DLOPEN_SELF
2994 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2995 dnl aclocal-1.4 backwards compatibility:
2996 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2999 # _LT_COMPILER_C_O([TAGNAME])
3000 # ---------------------------
3001 # Check to see if options -c and -o are simultaneously supported by compiler.
3002 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3003 m4_defun([_LT_COMPILER_C_O],
3004 [m4_require([_LT_DECL_SED])dnl
3005 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3006 m4_require([_LT_TAG_COMPILER])dnl
3007 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3008 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3009 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3010 $RM -r conftest 2>/dev/null
3014 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3016 lt_compiler_flag="-o out/conftest2.$ac_objext"
3017 # Insert the option either (1) after the last *FLAGS variable, or
3018 # (2) before a word containing "conftest.", or (3) at the end.
3019 # Note that $ac_compile itself does not contain backslashes and begins
3020 # with a dollar sign (not a hyphen), so the echo should work correctly.
3021 lt_compile=`echo "$ac_compile" | $SED \
3022 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3023 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3024 -e 's:$: $lt_compiler_flag:'`
3025 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3026 (eval "$lt_compile" 2>out/conftest.err)
3028 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3030 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3032 # The compiler can only warn and ignore the option if not recognized
3033 # So say no if there are warnings
3034 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3035 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3036 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3037 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3040 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3042 # SGI C++ compiler will create directory out/ii_files/ for
3043 # template instantiation
3044 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3045 $RM out/* && rmdir out
3050 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3051 [Does compiler simultaneously support -c and -o options?])
3052 ])# _LT_COMPILER_C_O
3055 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3056 # ----------------------------------
3057 # Check to see if we can do hard links to lock some files if needed
3058 m4_defun([_LT_COMPILER_FILE_LOCKS],
3059 [m4_require([_LT_ENABLE_LOCK])dnl
3060 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3061 _LT_COMPILER_C_O([$1])
3063 hard_links="nottested"
3064 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3065 # do not overwrite the value of need_locks provided by the user
3066 AC_MSG_CHECKING([if we can lock with hard links])
3069 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3071 ln conftest.a conftest.b 2>&5 || hard_links=no
3072 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3073 AC_MSG_RESULT([$hard_links])
3074 if test "$hard_links" = no; then
3075 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3081 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3082 ])# _LT_COMPILER_FILE_LOCKS
3087 m4_defun([_LT_CHECK_OBJDIR],
3088 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3089 [rm -f .libs 2>/dev/null
3090 mkdir .libs 2>/dev/null
3091 if test -d .libs; then
3094 # MS-DOS does not allow filenames that begin with a dot.
3097 rmdir .libs 2>/dev/null])
3098 objdir=$lt_cv_objdir
3099 _LT_DECL([], [objdir], [0],
3100 [The name of the directory that contains temporary libtool files])dnl
3101 m4_pattern_allow([LT_OBJDIR])dnl
3102 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3103 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3104 ])# _LT_CHECK_OBJDIR
3107 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3108 # --------------------------------------
3109 # Check hardcoding attributes.
3110 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3111 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3112 _LT_TAGVAR(hardcode_action, $1)=
3113 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3114 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3115 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3117 # We can hardcode non-existent directories.
3118 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3119 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3120 # have to relink, otherwise we might link with an installed library
3121 # when we should be linking with a yet-to-be-installed one
3122 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3123 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3124 # Linking always hardcodes the temporary library directory.
3125 _LT_TAGVAR(hardcode_action, $1)=relink
3127 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3128 _LT_TAGVAR(hardcode_action, $1)=immediate
3131 # We cannot hardcode anything, or else we can only hardcode existing
3133 _LT_TAGVAR(hardcode_action, $1)=unsupported
3135 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3137 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3138 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3139 # Fast installation is not supported
3140 enable_fast_install=no
3141 elif test "$shlibpath_overrides_runpath" = yes ||
3142 test "$enable_shared" = no; then
3143 # Fast installation is not necessary
3144 enable_fast_install=needless
3146 _LT_TAGDECL([], [hardcode_action], [0],
3147 [How to hardcode a shared library path into an executable])
3148 ])# _LT_LINKER_HARDCODE_LIBPATH
3153 m4_defun([_LT_CMD_STRIPLIB],
3154 [m4_require([_LT_DECL_EGREP])
3157 AC_MSG_CHECKING([whether stripping libraries is possible])
3158 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3159 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3160 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3161 AC_MSG_RESULT([yes])
3163 # FIXME - insert some real tests, host_os isn't really good enough
3166 if test -n "$STRIP" ; then
3167 striplib="$STRIP -x"
3168 old_striplib="$STRIP -S"
3169 AC_MSG_RESULT([yes])
3179 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3180 _LT_DECL([], [striplib], [1])
3181 ])# _LT_CMD_STRIPLIB
3184 # _LT_SYS_DYNAMIC_LINKER([TAG])
3185 # -----------------------------
3186 # PORTME Fill in your ld.so characteristics
3187 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3188 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3189 m4_require([_LT_DECL_EGREP])dnl
3190 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3191 m4_require([_LT_DECL_OBJDUMP])dnl
3192 m4_require([_LT_DECL_SED])dnl
3193 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3194 AC_MSG_CHECKING([dynamic linker characteristics])
3197 if test "$GCC" = yes; then
3199 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3200 *) lt_awk_arg="/^libraries:/" ;;
3203 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3204 *) lt_sed_strip_eq="s,=/,/,g" ;;
3206 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3207 case $lt_search_path_spec in
3209 # if the path contains ";" then we assume it to be the separator
3210 # otherwise default to the standard path separator (i.e. ":") - it is
3211 # assumed that no part of a normal pathname contains ";" but that should
3212 # okay in the real world where ";" in dirpaths is itself problematic.
3213 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3216 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3219 # Ok, now we have the path, separated by spaces, we can step through it
3220 # and add multilib dir if necessary.
3221 lt_tmp_lt_search_path_spec=
3222 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3223 for lt_sys_path in $lt_search_path_spec; do
3224 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3225 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3227 test -d "$lt_sys_path" && \
3228 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3231 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3232 BEGIN {RS=" "; FS="/|\n";} {
3235 for (lt_i = NF; lt_i > 0; lt_i--) {
3236 if ($lt_i != "" && $lt_i != ".") {
3237 if ($lt_i == "..") {
3240 if (lt_count == 0) {
3241 lt_foo="/" $lt_i lt_foo;
3248 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3249 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3251 # AWK program above erroneously prepends '/' to C:/dos/paths
3254 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3255 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3257 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3259 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3262 libname_spec='lib$name'
3270 shlibpath_overrides_runpath=unknown
3272 dynamic_linker="$host_os ld.so"
3273 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3274 need_lib_prefix=unknown
3275 hardcode_into_libs=no
3277 # when you set need_version to no, make sure it does not cause -set_version
3278 # flags to be left without arguments
3279 need_version=unknown
3283 version_type=linux # correct to gnu/linux during the next big refactor
3284 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3285 shlibpath_var=LIBPATH
3287 # AIX 3 has no versioning support, so we append a major version to the name.
3288 soname_spec='${libname}${release}${shared_ext}$major'
3292 version_type=linux # correct to gnu/linux during the next big refactor
3295 hardcode_into_libs=yes
3296 if test "$host_cpu" = ia64; then
3297 # AIX 5 supports IA64
3298 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3299 shlibpath_var=LD_LIBRARY_PATH
3301 # With GCC up to 2.95.x, collect2 would create an import file
3302 # for dependence libraries. The import file would start with
3303 # the line `#! .'. This would cause the generated library to
3304 # depend on `.', always an invalid library. This was fixed in
3305 # development snapshots of GCC prior to 3.0.
3307 aix4 | aix4.[[01]] | aix4.[[01]].*)
3308 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3310 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3317 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3318 # soname into executable. Probably we can add versioning support to
3319 # collect2, so additional links can be useful in future.
3320 if test "$aix_use_runtimelinking" = yes; then
3321 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3322 # instead of lib<name>.a to let people know that these are not
3323 # typical AIX shared libraries.
3324 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3326 # We preserve .a as extension for shared libraries through AIX4.2
3327 # and later when we are not doing run time linking.
3328 library_names_spec='${libname}${release}.a $libname.a'
3329 soname_spec='${libname}${release}${shared_ext}$major'
3331 shlibpath_var=LIBPATH
3338 # Since July 2007 AmigaOS4 officially supports .so libraries.
3339 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3343 library_names_spec='$libname.ixlibrary $libname.a'
3344 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3345 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3351 library_names_spec='${libname}${shared_ext}'
3352 dynamic_linker="$host_os ld.so"
3353 shlibpath_var=LIBRARY_PATH
3357 version_type=linux # correct to gnu/linux during the next big refactor
3359 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3360 soname_spec='${libname}${release}${shared_ext}$major'
3361 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3362 shlibpath_var=LD_LIBRARY_PATH
3363 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3364 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3365 # the default ld.so.conf also contains /usr/contrib/lib and
3366 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3367 # libtool to hard-code these into programs
3370 cygwin* | mingw* | pw32* | cegcc*)
3371 version_type=windows
3376 case $GCC,$cc_basename in
3379 library_names_spec='$libname.dll.a'
3380 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3381 postinstall_cmds='base_file=`basename \${file}`~
3382 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3383 dldir=$destdir/`dirname \$dlpath`~
3384 test -d \$dldir || mkdir -p \$dldir~
3385 $install_prog $dir/$dlname \$dldir/$dlname~
3386 chmod a+x \$dldir/$dlname~
3387 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3388 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3390 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3391 dlpath=$dir/\$dldll~
3393 shlibpath_overrides_runpath=yes
3397 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3398 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3400 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3403 # MinGW DLLs use traditional 'lib' prefix
3404 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3407 # pw32 DLLs use 'pw' prefix rather than 'lib'
3408 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3411 dynamic_linker='Win32 ld.exe'
3416 libname_spec='$name'
3417 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3418 library_names_spec='${libname}.dll.lib'
3422 sys_lib_search_path_spec=
3428 # Let DOS variable expansion print the short 8.3 style file name.
3429 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3430 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3433 # Convert to MSYS style.
3434 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3437 # Convert to unix form, then to dos form, then back to unix form
3438 # but this time dos style (no spaces!) so that the unix form looks
3439 # like /cygdrive/c/PROGRA~1:/cygdr...
3440 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3441 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3442 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3445 sys_lib_search_path_spec="$LIB"
3446 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3447 # It is most probably a Windows format PATH.
3448 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3450 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3452 # FIXME: find the short name or the path components, as spaces are
3453 # common. (e.g. "Program Files" -> "PROGRA~1")
3457 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3458 postinstall_cmds='base_file=`basename \${file}`~
3459 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3460 dldir=$destdir/`dirname \$dlpath`~
3461 test -d \$dldir || mkdir -p \$dldir~
3462 $install_prog $dir/$dlname \$dldir/$dlname'
3463 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3464 dlpath=$dir/\$dldll~
3466 shlibpath_overrides_runpath=yes
3467 dynamic_linker='Win32 link.exe'
3471 # Assume MSVC wrapper
3472 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3473 dynamic_linker='Win32 ld.exe'
3476 # FIXME: first we should search . and the directory the executable is in
3480 darwin* | rhapsody*)
3481 dynamic_linker="$host_os dyld"
3485 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3486 soname_spec='${libname}${release}${major}$shared_ext'
3487 shlibpath_overrides_runpath=yes
3488 shlibpath_var=DYLD_LIBRARY_PATH
3489 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3491 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3492 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3496 version_type=linux # correct to gnu/linux during the next big refactor
3499 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3500 soname_spec='${libname}${release}${shared_ext}$major'
3501 shlibpath_var=LD_LIBRARY_PATH
3504 freebsd* | dragonfly*)
3505 # DragonFly does not have aout. When/if they implement a new
3506 # versioning mechanism, adjust this.
3507 if test -x /usr/bin/objformat; then
3508 objformat=`/usr/bin/objformat`
3511 freebsd[[23]].*) objformat=aout ;;
3515 version_type=freebsd-$objformat
3516 case $version_type in
3518 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3523 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3527 shlibpath_var=LD_LIBRARY_PATH
3530 shlibpath_overrides_runpath=yes
3532 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3533 shlibpath_overrides_runpath=yes
3534 hardcode_into_libs=yes
3536 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3537 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3538 shlibpath_overrides_runpath=no
3539 hardcode_into_libs=yes
3541 *) # from 4.6 on, and DragonFly
3542 shlibpath_overrides_runpath=yes
3543 hardcode_into_libs=yes
3549 version_type=linux # correct to gnu/linux during the next big refactor
3552 dynamic_linker="$host_os runtime_loader"
3553 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3554 soname_spec='${libname}${release}${shared_ext}$major'
3555 shlibpath_var=LIBRARY_PATH
3556 shlibpath_overrides_runpath=yes
3557 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3558 hardcode_into_libs=yes
3561 hpux9* | hpux10* | hpux11*)
3562 # Give a soname corresponding to the major version so that dld.sl refuses to
3563 # link against other versions.
3570 hardcode_into_libs=yes
3571 dynamic_linker="$host_os dld.so"
3572 shlibpath_var=LD_LIBRARY_PATH
3573 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3574 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3575 soname_spec='${libname}${release}${shared_ext}$major'
3576 if test "X$HPUX_IA64_MODE" = X32; then
3577 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3579 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3581 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3585 hardcode_into_libs=yes
3586 dynamic_linker="$host_os dld.sl"
3587 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3588 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3589 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3590 soname_spec='${libname}${release}${shared_ext}$major'
3591 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3592 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3596 dynamic_linker="$host_os dld.sl"
3597 shlibpath_var=SHLIB_PATH
3598 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3599 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3600 soname_spec='${libname}${release}${shared_ext}$major'
3603 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3604 postinstall_cmds='chmod 555 $lib'
3605 # or fails outright, so override atomically:
3606 install_override_mode=555
3610 version_type=linux # correct to gnu/linux during the next big refactor
3613 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3614 soname_spec='${libname}${release}${shared_ext}$major'
3615 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3616 shlibpath_var=LD_LIBRARY_PATH
3617 shlibpath_overrides_runpath=no
3618 hardcode_into_libs=yes
3621 irix5* | irix6* | nonstopux*)
3623 nonstopux*) version_type=nonstopux ;;
3625 if test "$lt_cv_prog_gnu_ld" = yes; then
3626 version_type=linux # correct to gnu/linux during the next big refactor
3633 soname_spec='${libname}${release}${shared_ext}$major'
3634 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3636 irix5* | nonstopux*)
3640 case $LD in # libtool.m4 will add one of these switches to LD
3641 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3642 libsuff= shlibsuff= libmagic=32-bit;;
3643 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3644 libsuff=32 shlibsuff=N32 libmagic=N32;;
3645 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3646 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3647 *) libsuff= shlibsuff= libmagic=never-match;;
3651 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3652 shlibpath_overrides_runpath=no
3653 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3654 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3655 hardcode_into_libs=yes
3658 # No shared lib support for Linux oldld, aout, or coff.
3659 linux*oldld* | linux*aout* | linux*coff*)
3663 # This must be glibc/ELF.
3664 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3665 version_type=linux # correct to gnu/linux during the next big refactor
3668 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3669 soname_spec='${libname}${release}${shared_ext}$major'
3670 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3671 shlibpath_var=LD_LIBRARY_PATH
3672 shlibpath_overrides_runpath=no
3674 # Some binutils ld are patched to set DT_RUNPATH
3675 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3676 [lt_cv_shlibpath_overrides_runpath=no
3677 save_LDFLAGS=$LDFLAGS
3679 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3680 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3681 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3682 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3683 [lt_cv_shlibpath_overrides_runpath=yes])])
3684 LDFLAGS=$save_LDFLAGS
3687 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3689 # This implies no fast_install, which is unacceptable.
3690 # Some rework will be needed to allow for fast_install
3691 # before this can be enabled.
3692 hardcode_into_libs=yes
3694 # Append ld.so.conf contents to the search path
3695 if test -f /etc/ld.so.conf; then
3696 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3697 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3700 # We used to test for /lib/ld.so.1 and disable shared libraries on
3701 # powerpc, because MkLinux only supported shared libraries with the
3702 # GNU dynamic linker. Since this was broken with cross compilers,
3703 # most powerpc-linux boxes support dynamic linking these days and
3704 # people can always --disable-shared, the test was removed, and we
3705 # assume the GNU/Linux dynamic linker is in use.
3706 dynamic_linker='GNU/Linux ld.so'
3713 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3714 soname_spec='${libname}${release}${shared_ext}$major'
3715 shlibpath_var=LD_LIBRARY_PATH
3716 shlibpath_overrides_runpath=no
3717 hardcode_into_libs=yes
3718 dynamic_linker='NetBSD ld.elf_so'
3725 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3726 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3727 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3728 dynamic_linker='NetBSD (a.out) ld.so'
3730 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3731 soname_spec='${libname}${release}${shared_ext}$major'
3732 dynamic_linker='NetBSD ld.elf_so'
3734 shlibpath_var=LD_LIBRARY_PATH
3735 shlibpath_overrides_runpath=yes
3736 hardcode_into_libs=yes
3740 version_type=linux # correct to gnu/linux during the next big refactor
3741 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3742 shlibpath_var=LD_LIBRARY_PATH
3743 shlibpath_overrides_runpath=yes
3750 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3751 soname_spec='${libname}${release}${shared_ext}$major'
3752 shlibpath_var=LD_LIBRARY_PATH
3753 shlibpath_overrides_runpath=no
3754 hardcode_into_libs=yes
3755 dynamic_linker='ldqnx.so'
3760 sys_lib_dlsearch_path_spec="/usr/lib"
3762 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3764 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3765 *) need_version=no ;;
3767 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3768 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3769 shlibpath_var=LD_LIBRARY_PATH
3770 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3772 openbsd2.[[89]] | openbsd2.[[89]].*)
3773 shlibpath_overrides_runpath=no
3776 shlibpath_overrides_runpath=yes
3780 shlibpath_overrides_runpath=yes
3785 libname_spec='$name'
3788 library_names_spec='$libname${shared_ext} $libname.a'
3789 dynamic_linker='OS/2 ld.exe'
3790 shlibpath_var=LIBPATH
3793 osf3* | osf4* | osf5*)
3797 soname_spec='${libname}${release}${shared_ext}$major'
3798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3799 shlibpath_var=LD_LIBRARY_PATH
3800 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3801 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3809 version_type=linux # correct to gnu/linux during the next big refactor
3812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3813 soname_spec='${libname}${release}${shared_ext}$major'
3814 shlibpath_var=LD_LIBRARY_PATH
3815 shlibpath_overrides_runpath=yes
3816 hardcode_into_libs=yes
3817 # ldd complains unless libraries are executable
3818 postinstall_cmds='chmod +x $lib'
3823 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3824 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3825 shlibpath_var=LD_LIBRARY_PATH
3826 shlibpath_overrides_runpath=yes
3827 if test "$with_gnu_ld" = yes; then
3834 version_type=linux # correct to gnu/linux during the next big refactor
3835 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3836 soname_spec='${libname}${release}${shared_ext}$major'
3837 shlibpath_var=LD_LIBRARY_PATH
3838 case $host_vendor in
3840 shlibpath_overrides_runpath=no
3842 runpath_var=LD_RUN_PATH
3850 shlibpath_overrides_runpath=no
3851 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3857 if test -d /usr/nec ;then
3858 version_type=linux # correct to gnu/linux during the next big refactor
3859 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3860 soname_spec='$libname${shared_ext}.$major'
3861 shlibpath_var=LD_LIBRARY_PATH
3865 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3866 version_type=freebsd-elf
3869 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3870 soname_spec='${libname}${release}${shared_ext}$major'
3871 shlibpath_var=LD_LIBRARY_PATH
3872 shlibpath_overrides_runpath=yes
3873 hardcode_into_libs=yes
3874 if test "$with_gnu_ld" = yes; then
3875 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3877 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3880 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3884 sys_lib_dlsearch_path_spec='/usr/lib'
3888 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3889 version_type=linux # correct to gnu/linux during the next big refactor
3892 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3893 shlibpath_var=LD_LIBRARY_PATH
3894 shlibpath_overrides_runpath=no
3895 hardcode_into_libs=yes
3899 version_type=linux # correct to gnu/linux during the next big refactor
3900 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3901 soname_spec='${libname}${release}${shared_ext}$major'
3902 shlibpath_var=LD_LIBRARY_PATH
3909 AC_MSG_RESULT([$dynamic_linker])
3910 test "$dynamic_linker" = no && can_build_shared=no
3912 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3913 if test "$GCC" = yes; then
3914 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3917 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3918 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3920 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3921 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3924 _LT_DECL([], [variables_saved_for_relink], [1],
3925 [Variables whose values should be saved in libtool wrapper scripts and
3926 restored at link time])
3927 _LT_DECL([], [need_lib_prefix], [0],
3928 [Do we need the "lib" prefix for modules?])
3929 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3930 _LT_DECL([], [version_type], [0], [Library versioning type])
3931 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3932 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3933 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3934 [Is shlibpath searched before the hard-coded library search path?])
3935 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3936 _LT_DECL([], [library_names_spec], [1],
3937 [[List of archive names. First name is the real one, the rest are links.
3938 The last name is the one that the linker finds with -lNAME]])
3939 _LT_DECL([], [soname_spec], [1],
3940 [[The coded name of the library, if different from the real name]])
3941 _LT_DECL([], [install_override_mode], [1],
3942 [Permission mode override for installation of shared libraries])
3943 _LT_DECL([], [postinstall_cmds], [2],
3944 [Command to use after installation of a shared archive])
3945 _LT_DECL([], [postuninstall_cmds], [2],
3946 [Command to use after uninstallation of a shared archive])
3947 _LT_DECL([], [finish_cmds], [2],
3948 [Commands used to finish a libtool library installation in a directory])
3949 _LT_DECL([], [finish_eval], [1],
3950 [[As "finish_cmds", except a single script fragment to be evaled but
3952 _LT_DECL([], [hardcode_into_libs], [0],
3953 [Whether we should hardcode library paths into libraries])
3954 _LT_DECL([], [sys_lib_search_path_spec], [2],
3955 [Compile-time system search path for libraries])
3956 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3957 [Run-time system search path for libraries])
3958 ])# _LT_SYS_DYNAMIC_LINKER
3961 # _LT_PATH_TOOL_PREFIX(TOOL)
3962 # --------------------------
3963 # find a file program which can recognize shared library
3964 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3965 [m4_require([_LT_DECL_EGREP])dnl
3966 AC_MSG_CHECKING([for $1])
3967 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3969 [[\\/*] | ?:[\\/]*])
3970 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3973 lt_save_MAGIC_CMD="$MAGIC_CMD"
3974 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3975 dnl $ac_dummy forces splitting on constant user-supplied paths.
3976 dnl POSIX.2 word splitting is done only on the output of word expansions,
3977 dnl not every word. This closes a longstanding sh security hole.
3978 ac_dummy="m4_if([$2], , $PATH, [$2])"
3979 for ac_dir in $ac_dummy; do
3981 test -z "$ac_dir" && ac_dir=.
3982 if test -f $ac_dir/$1; then
3983 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3984 if test -n "$file_magic_test_file"; then
3985 case $deplibs_check_method in
3987 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3988 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3989 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3990 $EGREP "$file_magic_regex" > /dev/null; then
3995 *** Warning: the command libtool uses to detect shared libraries,
3996 *** $file_magic_cmd, produces output that libtool cannot recognize.
3997 *** The result is that libtool may fail to recognize shared libraries
3998 *** as such. This will affect the creation of libtool libraries that
3999 *** depend on shared libraries, but programs linked with such libtool
4000 *** libraries will work regardless of this problem. Nevertheless, you
4001 *** may want to report the problem to your system manager and/or to
4002 *** bug-libtool@gnu.org
4012 MAGIC_CMD="$lt_save_MAGIC_CMD"
4015 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4016 if test -n "$MAGIC_CMD"; then
4017 AC_MSG_RESULT($MAGIC_CMD)
4021 _LT_DECL([], [MAGIC_CMD], [0],
4022 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4023 ])# _LT_PATH_TOOL_PREFIX
4026 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4027 dnl aclocal-1.4 backwards compatibility:
4028 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4033 # find a file program which can recognize a shared library
4034 m4_defun([_LT_PATH_MAGIC],
4035 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4036 if test -z "$lt_cv_path_MAGIC_CMD"; then
4037 if test -n "$ac_tool_prefix"; then
4038 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4048 # find the pathname to the GNU or non-GNU linker
4049 AC_DEFUN([LT_PATH_LD],
4050 [AC_REQUIRE([AC_PROG_CC])dnl
4051 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4052 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4053 m4_require([_LT_DECL_SED])dnl
4054 m4_require([_LT_DECL_EGREP])dnl
4055 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4057 AC_ARG_WITH([gnu-ld],
4058 [AS_HELP_STRING([--with-gnu-ld],
4059 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4060 [test "$withval" = no || with_gnu_ld=yes],
4061 [with_gnu_ld=no])dnl
4064 if test "$GCC" = yes; then
4065 # Check if gcc -print-prog-name=ld gives a path.
4066 AC_MSG_CHECKING([for ld used by $CC])
4069 # gcc leaves a trailing carriage return which upsets mingw
4070 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4072 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4075 # Accept absolute paths.
4076 [[\\/]]* | ?:[[\\/]]*)
4077 re_direlt='/[[^/]][[^/]]*/\.\./'
4078 # Canonicalize the pathname of ld
4079 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4080 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4081 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4083 test -z "$LD" && LD="$ac_prog"
4086 # If it fails, then pretend we aren't using GCC.
4090 # If it is relative, then search for the first ld in PATH.
4094 elif test "$with_gnu_ld" = yes; then
4095 AC_MSG_CHECKING([for GNU ld])
4097 AC_MSG_CHECKING([for non-GNU ld])
4099 AC_CACHE_VAL(lt_cv_path_LD,
4100 [if test -z "$LD"; then
4101 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4102 for ac_dir in $PATH; do
4104 test -z "$ac_dir" && ac_dir=.
4105 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4106 lt_cv_path_LD="$ac_dir/$ac_prog"
4107 # Check to see if the program is GNU ld. I'd rather use --version,
4108 # but apparently some variants of GNU ld only accept -v.
4109 # Break only if it was the GNU/non-GNU ld that we prefer.
4110 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4111 *GNU* | *'with BFD'*)
4112 test "$with_gnu_ld" != no && break
4115 test "$with_gnu_ld" != yes && break
4122 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4125 if test -n "$LD"; then
4130 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4134 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4138 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4139 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4140 dnl aclocal-1.4 backwards compatibility:
4141 dnl AC_DEFUN([AM_PROG_LD], [])
4142 dnl AC_DEFUN([AC_PROG_LD], [])
4147 m4_defun([_LT_PATH_LD_GNU],
4148 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4149 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4150 case `$LD -v 2>&1 </dev/null` in
4151 *GNU* | *'with BFD'*)
4152 lt_cv_prog_gnu_ld=yes
4155 lt_cv_prog_gnu_ld=no
4158 with_gnu_ld=$lt_cv_prog_gnu_ld
4164 # find reload flag for linker
4165 # -- PORTME Some linkers may need a different reload flag.
4166 m4_defun([_LT_CMD_RELOAD],
4167 [AC_CACHE_CHECK([for $LD option to reload object files],
4168 lt_cv_ld_reload_flag,
4169 [lt_cv_ld_reload_flag='-r'])
4170 reload_flag=$lt_cv_ld_reload_flag
4171 case $reload_flag in
4173 *) reload_flag=" $reload_flag" ;;
4175 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4177 cygwin* | mingw* | pw32* | cegcc*)
4178 if test "$GCC" != yes; then
4183 if test "$GCC" = yes; then
4184 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4186 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4190 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4191 _LT_TAGDECL([], [reload_cmds], [2])dnl
4195 # _LT_CHECK_MAGIC_METHOD
4196 # ----------------------
4197 # how to check for library dependencies
4198 # -- PORTME fill in with the dynamic library characteristics
4199 m4_defun([_LT_CHECK_MAGIC_METHOD],
4200 [m4_require([_LT_DECL_EGREP])
4201 m4_require([_LT_DECL_OBJDUMP])
4202 AC_CACHE_CHECK([how to recognize dependent libraries],
4203 lt_cv_deplibs_check_method,
4204 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4205 lt_cv_file_magic_test_file=
4206 lt_cv_deplibs_check_method='unknown'
4207 # Need to set the preceding variable on all platforms that support
4208 # interlibrary dependencies.
4209 # 'none' -- dependencies not supported.
4210 # `unknown' -- same as none, but documents that we really don't know.
4211 # 'pass_all' -- all dependencies passed with no checks.
4212 # 'test_compile' -- check by making test program.
4213 # 'file_magic [[regex]]' -- check by looking for files in library path
4214 # which responds to the $file_magic_cmd with a given extended regex.
4215 # If you have `file' or equivalent on your system and you're not sure
4216 # whether `pass_all' will *always* work, you probably want this one.
4220 lt_cv_deplibs_check_method=pass_all
4224 lt_cv_deplibs_check_method=pass_all
4228 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4229 lt_cv_file_magic_cmd='/usr/bin/file -L'
4230 lt_cv_file_magic_test_file=/shlib/libc.so
4234 # func_win32_libid is a shell function defined in ltmain.sh
4235 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4236 lt_cv_file_magic_cmd='func_win32_libid'
4240 # Base MSYS/MinGW do not provide the 'file' command needed by
4241 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4242 # unless we find 'file', for example because we are cross-compiling.
4243 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4244 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4245 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4246 lt_cv_file_magic_cmd='func_win32_libid'
4248 # Keep this pattern in sync with the one in func_win32_libid.
4249 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4250 lt_cv_file_magic_cmd='$OBJDUMP -f'
4255 # use the weaker test based on 'objdump'. See mingw*.
4256 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4257 lt_cv_file_magic_cmd='$OBJDUMP -f'
4260 darwin* | rhapsody*)
4261 lt_cv_deplibs_check_method=pass_all
4264 freebsd* | dragonfly*)
4265 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4268 # Not sure whether the presence of OpenBSD here was a mistake.
4269 # Let's accept both of them until this is cleared up.
4270 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4271 lt_cv_file_magic_cmd=/usr/bin/file
4272 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4276 lt_cv_deplibs_check_method=pass_all
4281 lt_cv_deplibs_check_method=pass_all
4284 hpux10.20* | hpux11*)
4285 lt_cv_file_magic_cmd=/usr/bin/file
4288 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4289 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4292 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4293 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4296 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4297 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4303 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4304 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4307 irix5* | irix6* | nonstopux*)
4309 *-32|*"-32 ") libmagic=32-bit;;
4310 *-n32|*"-n32 ") libmagic=N32;;
4311 *-64|*"-64 ") libmagic=64-bit;;
4312 *) libmagic=never-match;;
4314 lt_cv_deplibs_check_method=pass_all
4317 # This must be glibc/ELF.
4318 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4319 lt_cv_deplibs_check_method=pass_all
4322 netbsd* | netbsdelf*-gnu)
4323 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4324 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4326 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4331 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4332 lt_cv_file_magic_cmd=/usr/bin/file
4333 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4337 lt_cv_deplibs_check_method=pass_all
4341 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4342 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4344 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4348 osf3* | osf4* | osf5*)
4349 lt_cv_deplibs_check_method=pass_all
4353 lt_cv_deplibs_check_method=pass_all
4357 lt_cv_deplibs_check_method=pass_all
4360 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4361 lt_cv_deplibs_check_method=pass_all
4365 case $host_vendor in
4367 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]]'
4368 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4371 lt_cv_deplibs_check_method=pass_all
4374 lt_cv_file_magic_cmd='/bin/file'
4375 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4378 lt_cv_file_magic_cmd='/bin/file'
4379 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4380 lt_cv_file_magic_test_file=/lib/libc.so
4383 lt_cv_deplibs_check_method=pass_all
4386 lt_cv_deplibs_check_method=pass_all
4392 lt_cv_deplibs_check_method=pass_all
4399 if test "$build" = "$host"; then
4402 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4405 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4411 file_magic_cmd=$lt_cv_file_magic_cmd
4412 deplibs_check_method=$lt_cv_deplibs_check_method
4413 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4415 _LT_DECL([], [deplibs_check_method], [1],
4416 [Method to check whether dependent libraries are shared objects])
4417 _LT_DECL([], [file_magic_cmd], [1],
4418 [Command to use when deplibs_check_method = "file_magic"])
4419 _LT_DECL([], [file_magic_glob], [1],
4420 [How to find potential files when deplibs_check_method = "file_magic"])
4421 _LT_DECL([], [want_nocaseglob], [1],
4422 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4423 ])# _LT_CHECK_MAGIC_METHOD
4428 # find the pathname to a BSD- or MS-compatible name lister
4429 AC_DEFUN([LT_PATH_NM],
4430 [AC_REQUIRE([AC_PROG_CC])dnl
4431 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4432 [if test -n "$NM"; then
4433 # Let the user override the test.
4436 lt_nm_to_check="${ac_tool_prefix}nm"
4437 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4438 lt_nm_to_check="$lt_nm_to_check nm"
4440 for lt_tmp_nm in $lt_nm_to_check; do
4441 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4442 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4444 test -z "$ac_dir" && ac_dir=.
4445 tmp_nm="$ac_dir/$lt_tmp_nm"
4446 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4447 # Check to see if the nm accepts a BSD-compat flag.
4448 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4449 # nm: unknown option "B" ignored
4450 # Tru64's nm complains that /dev/null is an invalid object file
4451 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4452 */dev/null* | *'Invalid file or object type'*)
4453 lt_cv_path_NM="$tmp_nm -B"
4457 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4459 lt_cv_path_NM="$tmp_nm -p"
4463 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4464 continue # so that we can try to find one that supports BSD flags
4473 : ${lt_cv_path_NM=no}
4475 if test "$lt_cv_path_NM" != "no"; then
4478 # Didn't find any BSD compatible name lister, look for dumpbin.
4479 if test -n "$DUMPBIN"; then :
4480 # Let the user override the test.
4482 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4483 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4485 DUMPBIN="$DUMPBIN -symbols"
4493 if test "$DUMPBIN" != ":"; then
4497 test -z "$NM" && NM=nm
4499 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4501 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4502 [lt_cv_nm_interface="BSD nm"
4503 echo "int some_variable = 0;" > conftest.$ac_ext
4504 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4505 (eval "$ac_compile" 2>conftest.err)
4506 cat conftest.err >&AS_MESSAGE_LOG_FD
4507 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4508 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4509 cat conftest.err >&AS_MESSAGE_LOG_FD
4510 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4511 cat conftest.out >&AS_MESSAGE_LOG_FD
4512 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4513 lt_cv_nm_interface="MS dumpbin"
4519 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4520 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4521 dnl aclocal-1.4 backwards compatibility:
4522 dnl AC_DEFUN([AM_PROG_NM], [])
4523 dnl AC_DEFUN([AC_PROG_NM], [])
4525 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4526 # --------------------------------
4527 # how to determine the name of the shared library
4528 # associated with a specific link library.
4529 # -- PORTME fill in with the dynamic library characteristics
4530 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4531 [m4_require([_LT_DECL_EGREP])
4532 m4_require([_LT_DECL_OBJDUMP])
4533 m4_require([_LT_DECL_DLLTOOL])
4534 AC_CACHE_CHECK([how to associate runtime and link libraries],
4535 lt_cv_sharedlib_from_linklib_cmd,
4536 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4539 cygwin* | mingw* | pw32* | cegcc*)
4540 # two different shell functions defined in ltmain.sh
4541 # decide which to use based on capabilities of $DLLTOOL
4542 case `$DLLTOOL --help 2>&1` in
4543 *--identify-strict*)
4544 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4547 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4552 # fallback: assume linklib IS sharedlib
4553 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4557 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4558 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4560 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4561 [Command to associate shared and link libraries])
4562 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4565 # _LT_PATH_MANIFEST_TOOL
4566 # ----------------------
4567 # locate the manifest tool
4568 m4_defun([_LT_PATH_MANIFEST_TOOL],
4569 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4570 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4571 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4572 [lt_cv_path_mainfest_tool=no
4573 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4574 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4575 cat conftest.err >&AS_MESSAGE_LOG_FD
4576 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4577 lt_cv_path_mainfest_tool=yes
4580 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4583 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4584 ])# _LT_PATH_MANIFEST_TOOL
4589 # check for math library
4590 AC_DEFUN([LT_LIB_M],
4591 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4594 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4595 # These system don't have libm, or don't need it
4598 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4599 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4602 AC_CHECK_LIB(m, cos, LIBM="-lm")
4609 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4610 dnl aclocal-1.4 backwards compatibility:
4611 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4614 # _LT_COMPILER_NO_RTTI([TAGNAME])
4615 # -------------------------------
4616 m4_defun([_LT_COMPILER_NO_RTTI],
4617 [m4_require([_LT_TAG_COMPILER])dnl
4619 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4621 if test "$GCC" = yes; then
4622 case $cc_basename in
4624 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4626 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4629 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4630 lt_cv_prog_compiler_rtti_exceptions,
4631 [-fno-rtti -fno-exceptions], [],
4632 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4634 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4635 [Compiler flag to turn off builtin functions])
4636 ])# _LT_COMPILER_NO_RTTI
4639 # _LT_CMD_GLOBAL_SYMBOLS
4640 # ----------------------
4641 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4642 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4643 AC_REQUIRE([AC_PROG_CC])dnl
4644 AC_REQUIRE([AC_PROG_AWK])dnl
4645 AC_REQUIRE([LT_PATH_NM])dnl
4646 AC_REQUIRE([LT_PATH_LD])dnl
4647 m4_require([_LT_DECL_SED])dnl
4648 m4_require([_LT_DECL_EGREP])dnl
4649 m4_require([_LT_TAG_COMPILER])dnl
4651 # Check for command to grab the raw symbol name followed by C symbol from nm.
4652 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4653 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4655 # These are sane defaults that work on at least a few old systems.
4656 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4658 # Character class describing NM global symbol codes.
4659 symcode='[[BCDEGRST]]'
4661 # Regexp to match symbols that can be accessed directly from C.
4662 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4664 # Define system-specific variables.
4669 cygwin* | mingw* | pw32* | cegcc*)
4670 symcode='[[ABCDGISTW]]'
4673 if test "$host_cpu" = ia64; then
4674 symcode='[[ABCDEGRST]]'
4678 symcode='[[BCDEGRST]]'
4681 symcode='[[BCDEGQRST]]'
4692 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4696 symcode='[[DFNSTU]]'
4700 # If we're using GNU nm, then use its standard symbol codes.
4701 case `$NM -V 2>&1` in
4702 *GNU* | *'with BFD'*)
4703 symcode='[[ABCDGIRSTW]]' ;;
4706 # Transform an extracted symbol line into a proper C declaration.
4707 # Some systems (esp. on ia64) link data and code symbols differently,
4708 # so use this general approach.
4709 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4711 # Transform an extracted symbol line into symbol name and symbol address
4712 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4713 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
4715 # Handle CRLF in mingw tool chain
4719 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4723 # Try without a prefix underscore, then with it.
4724 for ac_symprfx in "" "_"; do
4726 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4727 symxfrm="\\1 $ac_symprfx\\2 \\2"
4729 # Write the raw and C identifiers.
4730 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4731 # Fake it for dumpbin and say T for any non-static function
4732 # and D for any global variable.
4733 # Also find C++ and __fastcall symbols from MSVC++,
4734 # which start with @ or ?.
4735 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4736 " {last_section=section; section=\$ 3};"\
4737 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4738 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4739 " \$ 0!~/External *\|/{next};"\
4740 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4741 " {if(hide[section]) next};"\
4742 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4743 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4744 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
4745 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4746 " ' prfx=^$ac_symprfx]"
4748 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4750 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4752 # Check to see that the pipe works correctly.
4756 cat > conftest.$ac_ext <<_LT_EOF
4761 void nm_test_func(void);
4762 void nm_test_func(void){}
4766 int main(){nm_test_var='a';nm_test_func();return(0);}
4769 if AC_TRY_EVAL(ac_compile); then
4770 # Now try to grab the symbols.
4772 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4773 # Try sorting and uniquifying the output.
4774 if sort "$nlist" | uniq > "$nlist"T; then
4775 mv -f "$nlist"T "$nlist"
4780 # Make sure that we snagged all the symbols we need.
4781 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4782 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4783 cat <<_LT_EOF > conftest.$ac_ext
4784 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4785 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4786 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4787 relocations are performed -- see ld's documentation on pseudo-relocs. */
4788 # define LT@&t@_DLSYM_CONST
4789 #elif defined(__osf__)
4790 /* This system does not cope well with relocations in const data. */
4791 # define LT@&t@_DLSYM_CONST
4793 # define LT@&t@_DLSYM_CONST const
4801 # Now generate the symbol file.
4802 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4804 cat <<_LT_EOF >> conftest.$ac_ext
4806 /* The mapping between symbol names and symbols. */
4807 LT@&t@_DLSYM_CONST struct {
4811 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4813 { "@PROGRAM@", (void *) 0 },
4815 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4816 cat <<\_LT_EOF >> conftest.$ac_ext
4820 /* This works around a problem in FreeBSD linker */
4821 #ifdef FREEBSD_WORKAROUND
4822 static const void *lt_preloaded_setup() {
4823 return lt__PROGRAM__LTX_preloaded_symbols;
4831 # Now try linking the two files.
4832 mv conftest.$ac_objext conftstm.$ac_objext
4833 lt_globsym_save_LIBS=$LIBS
4834 lt_globsym_save_CFLAGS=$CFLAGS
4835 LIBS="conftstm.$ac_objext"
4836 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4837 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4840 LIBS=$lt_globsym_save_LIBS
4841 CFLAGS=$lt_globsym_save_CFLAGS
4843 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4846 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4849 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4852 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4853 cat conftest.$ac_ext >&5
4855 rm -rf conftest* conftst*
4857 # Do not use the global_symbol_pipe unless it works.
4858 if test "$pipe_works" = yes; then
4861 lt_cv_sys_global_symbol_pipe=
4865 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4866 lt_cv_sys_global_symbol_to_cdecl=
4868 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4869 AC_MSG_RESULT(failed)
4874 # Response file support.
4875 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4876 nm_file_list_spec='@'
4877 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4878 nm_file_list_spec='@'
4881 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4882 [Take the output of nm and produce a listing of raw symbols and C names])
4883 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4884 [Transform the output of nm in a proper C declaration])
4885 _LT_DECL([global_symbol_to_c_name_address],
4886 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4887 [Transform the output of nm in a C name address pair])
4888 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4889 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4890 [Transform the output of nm in a C name address pair when lib prefix is needed])
4891 _LT_DECL([], [nm_file_list_spec], [1],
4892 [Specify filename containing input files for $NM])
4893 ]) # _LT_CMD_GLOBAL_SYMBOLS
4896 # _LT_COMPILER_PIC([TAGNAME])
4897 # ---------------------------
4898 m4_defun([_LT_COMPILER_PIC],
4899 [m4_require([_LT_TAG_COMPILER])dnl
4900 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4901 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4902 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4904 m4_if([$1], [CXX], [
4905 # C++ specific cases for pic, static, wl, etc.
4906 if test "$GXX" = yes; then
4907 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4908 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4912 # All AIX code is PIC.
4913 if test "$host_cpu" = ia64; then
4914 # AIX 5 now supports IA64 processor
4915 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4922 # see comment about AmigaOS4 .so support
4923 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4926 # FIXME: we need at least 68020 code to build shared libraries, but
4927 # adding the `-m68020' flag to GCC prevents building anything better,
4929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4934 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4935 # PIC is the default for these OSes.
4937 mingw* | cygwin* | os2* | pw32* | cegcc*)
4938 # This hack is so that the source file can tell whether it is being
4939 # built for inclusion in a dll (and should export symbols for example).
4940 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4941 # (--disable-auto-import) libraries
4942 m4_if([$1], [GCJ], [],
4943 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4945 darwin* | rhapsody*)
4946 # PIC is the default on this platform
4947 # Common symbols not allowed in MH_DYLIB files
4948 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4951 # DJGPP does not support shared libraries at all
4952 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4955 # PIC is the default for Haiku.
4956 # The "-static" flag exists, but is broken.
4957 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4960 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4961 # Instead, we relocate shared libraries at runtime.
4964 if test -d /usr/nec; then
4965 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4969 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4970 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4971 # sets the default TLS model and affects inlining.
4976 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4981 # QNX uses GNU C++, but need to define -shared option too, otherwise
4983 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4986 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4992 # All AIX code is PIC.
4993 if test "$host_cpu" = ia64; then
4994 # AIX 5 now supports IA64 processor
4995 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4997 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5001 case $cc_basename in
5003 # Green Hills C++ Compiler
5004 # _LT_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"
5008 mingw* | cygwin* | os2* | pw32* | cegcc*)
5009 # This hack is so that the source file can tell whether it is being
5010 # built for inclusion in a dll (and should export symbols for example).
5011 m4_if([$1], [GCJ], [],
5012 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5015 case $cc_basename in
5017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5020 # Green Hills C++ Compiler
5021 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5027 freebsd* | dragonfly*)
5028 # FreeBSD uses GNU C++
5030 hpux9* | hpux10* | hpux11*)
5031 case $cc_basename in
5033 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5034 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5035 if test "$host_cpu" != ia64; then
5036 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5040 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5041 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5047 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5056 # This is c89, which is MS Visual C++ (no shared libs)
5057 # Anyone wants to do a port?
5059 irix5* | irix6* | nonstopux*)
5060 case $cc_basename in
5062 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5063 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5064 # CC pic flag -KPIC is the default.
5070 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5071 case $cc_basename in
5074 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5075 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5078 # old Intel C++ for x86_64 which still supported -KPIC.
5079 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5080 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5081 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5084 # Intel C++, used to be incompatible with GCC.
5085 # ICC 10 doesn't accept -KPIC any more.
5086 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5091 # Portland Group C++ compiler
5092 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5094 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5098 # Make sure the PIC flag is empty. It appears that all Alpha
5099 # Linux and Compaq Tru64 Unix objects are PIC.
5100 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5101 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5103 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5104 # IBM XL 8.0, 9.0 on PPC and BlueGene
5105 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5106 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5107 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5110 case `$CC -V 2>&1 | sed 5q` in
5113 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5114 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5115 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5126 case $cc_basename in
5128 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5134 netbsd* | netbsdelf*-gnu)
5137 # QNX uses GNU C++, but need to define -shared option too, otherwise
5139 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5141 osf3* | osf4* | osf5*)
5142 case $cc_basename in
5144 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5147 # Rational C++ 2.4.1
5148 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5151 # Digital/Compaq C++
5152 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5153 # Make sure the PIC flag is empty. It appears that all Alpha
5154 # Linux and Compaq Tru64 Unix objects are PIC.
5155 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5156 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5165 case $cc_basename in
5167 # Sun C++ 4.2, 5.x and Centerline C++
5168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5169 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5170 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5173 # Green Hills C++ Compiler
5174 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5181 case $cc_basename in
5184 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5185 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5195 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5196 case $cc_basename in
5198 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5199 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5200 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5205 case $cc_basename in
5207 # NonStop-UX NCC 3.20
5208 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5217 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5223 if test "$GCC" = yes; then
5224 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5225 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5229 # All AIX code is PIC.
5230 if test "$host_cpu" = ia64; then
5231 # AIX 5 now supports IA64 processor
5232 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5239 # see comment about AmigaOS4 .so support
5240 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5243 # FIXME: we need at least 68020 code to build shared libraries, but
5244 # adding the `-m68020' flag to GCC prevents building anything better,
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5251 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5252 # PIC is the default for these OSes.
5255 mingw* | cygwin* | pw32* | os2* | cegcc*)
5256 # This hack is so that the source file can tell whether it is being
5257 # built for inclusion in a dll (and should export symbols for example).
5258 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5259 # (--disable-auto-import) libraries
5260 m4_if([$1], [GCJ], [],
5261 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5264 darwin* | rhapsody*)
5265 # PIC is the default on this platform
5266 # Common symbols not allowed in MH_DYLIB files
5267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5271 # PIC is the default for Haiku.
5272 # The "-static" flag exists, but is broken.
5273 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5277 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5278 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5279 # sets the default TLS model and affects inlining.
5285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5291 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5292 # Instead, we relocate shared libraries at runtime.
5296 # Just because we use GCC doesn't mean we suddenly get shared libraries
5297 # on systems that don't support them.
5298 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5303 # QNX uses GNU C++, but need to define -shared option too, otherwise
5305 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5309 if test -d /usr/nec; then
5310 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5315 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5319 case $cc_basename in
5320 nvcc*) # Cuda Compiler Driver 2.2
5321 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5322 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5323 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5328 # PORTME Check for flag to pass linker flags through the system compiler.
5331 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5332 if test "$host_cpu" = ia64; then
5333 # AIX 5 now supports IA64 processor
5334 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5336 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5340 mingw* | cygwin* | pw32* | os2* | cegcc*)
5341 # This hack is so that the source file can tell whether it is being
5342 # built for inclusion in a dll (and should export symbols for example).
5343 m4_if([$1], [GCJ], [],
5344 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5347 hpux9* | hpux10* | hpux11*)
5348 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5349 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5356 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5359 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5360 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5363 irix5* | irix6* | nonstopux*)
5364 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5365 # PIC (with -KPIC) is the default.
5366 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5369 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5370 case $cc_basename in
5371 # old Intel for x86_64 which still supported -KPIC.
5373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5377 # icc used to be incompatible with GCC.
5378 # ICC 10 doesn't accept -KPIC any more.
5380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5384 # Lahey Fortran 8.1.
5386 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5387 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5388 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5391 # NAG Fortran compiler
5392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5396 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5397 # Portland Group compilers (*not* the Pentium gcc compiler,
5398 # which looks to be a dead project)
5399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5401 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5405 # All Alpha code is PIC.
5406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5408 xl* | bgxl* | bgf* | mpixl*)
5409 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5410 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5411 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5412 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5415 case `$CC -V 2>&1 | sed 5q` in
5416 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5417 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5420 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5422 *Sun\ F* | *Sun*Fortran*)
5423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5425 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5429 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5430 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5433 *Intel*\ [[CF]]*Compiler*)
5434 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5435 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5436 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5439 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5440 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5441 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5449 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5454 # QNX uses GNU C++, but need to define -shared option too, otherwise
5456 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5459 osf3* | osf4* | osf5*)
5460 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5461 # All OSF/1 code is PIC.
5462 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5466 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5470 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5471 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5472 case $cc_basename in
5473 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5476 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5486 sysv4 | sysv4.2uw2* | sysv4.3*)
5487 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5493 if test -d /usr/nec ;then
5494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5495 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5500 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5501 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5502 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5506 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5507 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5511 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5512 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5516 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5522 # For platforms which do not support PIC, -DPIC is meaningless:
5524 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5527 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5531 AC_CACHE_CHECK([for $compiler option to produce PIC],
5532 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5533 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5534 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5537 # Check to make sure the PIC flag actually works.
5539 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5540 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5541 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5542 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5543 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5545 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5547 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5548 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5550 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5551 [Additional compiler flags for building library objects])
5553 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5554 [How to pass a linker flag through the compiler])
5556 # Check to make sure the static flag actually works.
5558 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5559 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5560 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5561 $lt_tmp_static_flag,
5563 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5564 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5565 [Compiler flag to prevent dynamic linking])
5566 ])# _LT_COMPILER_PIC
5569 # _LT_LINKER_SHLIBS([TAGNAME])
5570 # ----------------------------
5571 # See if the linker supports building shared libraries.
5572 m4_defun([_LT_LINKER_SHLIBS],
5573 [AC_REQUIRE([LT_PATH_LD])dnl
5574 AC_REQUIRE([LT_PATH_NM])dnl
5575 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5576 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5577 m4_require([_LT_DECL_EGREP])dnl
5578 m4_require([_LT_DECL_SED])dnl
5579 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5580 m4_require([_LT_TAG_COMPILER])dnl
5581 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5582 m4_if([$1], [CXX], [
5583 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5584 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5587 # If we're using GNU nm, then we don't want the "-C" option.
5588 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5589 # Also, AIX nm treats weak defined symbols like other global defined
5590 # symbols, whereas GNU nm marks them as "W".
5591 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5592 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5594 _LT_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'
5598 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5600 cygwin* | mingw* | cegcc*)
5601 case $cc_basename in
5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5606 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5607 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5611 linux* | k*bsd*-gnu | gnu*)
5612 _LT_TAGVAR(link_all_deplibs, $1)=no
5615 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5620 _LT_TAGVAR(allow_undefined_flag, $1)=
5621 _LT_TAGVAR(always_export_symbols, $1)=no
5622 _LT_TAGVAR(archive_cmds, $1)=
5623 _LT_TAGVAR(archive_expsym_cmds, $1)=
5624 _LT_TAGVAR(compiler_needs_object, $1)=no
5625 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5626 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5627 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5628 _LT_TAGVAR(hardcode_automatic, $1)=no
5629 _LT_TAGVAR(hardcode_direct, $1)=no
5630 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5631 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5632 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5633 _LT_TAGVAR(hardcode_minus_L, $1)=no
5634 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5635 _LT_TAGVAR(inherit_rpath, $1)=no
5636 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5637 _LT_TAGVAR(module_cmds, $1)=
5638 _LT_TAGVAR(module_expsym_cmds, $1)=
5639 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5640 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5641 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5642 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5643 # include_expsyms should be a list of space-separated symbols to be *always*
5644 # included in the symbol list
5645 _LT_TAGVAR(include_expsyms, $1)=
5646 # exclude_expsyms can be an extended regexp of symbols to exclude
5647 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5648 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5649 # as well as any symbol that contains `d'.
5650 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5651 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5652 # platforms (ab)use it in PIC code, but their linkers get confused if
5653 # the symbol is explicitly referenced. Since portable code cannot
5654 # rely on this symbol name, it's probably fine to never include it in
5655 # preloaded symbol tables.
5656 # Exclude shared library initialization/finalization symbols.
5657 dnl Note also adjust exclude_expsyms for C++ above.
5658 extract_expsyms_cmds=
5661 cygwin* | mingw* | pw32* | cegcc*)
5662 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5663 # When not using gcc, we currently assume that we are using
5664 # Microsoft Visual C++.
5665 if test "$GCC" != yes; then
5670 # we just hope/assume this is gcc and not c89 (= MSVC++)
5676 linux* | k*bsd*-gnu | gnu*)
5677 _LT_TAGVAR(link_all_deplibs, $1)=no
5681 _LT_TAGVAR(ld_shlibs, $1)=yes
5683 # On some targets, GNU ld is compatible enough with the native linker
5684 # that we're better off using the native interface for both.
5685 lt_use_gnu_ld_interface=no
5686 if test "$with_gnu_ld" = yes; then
5689 # The AIX port of GNU ld has always aspired to compatibility
5690 # with the native linker. However, as the warning in the GNU ld
5691 # block says, versions before 2.19.5* couldn't really create working
5692 # shared libraries, regardless of the interface used.
5693 case `$LD -v 2>&1` in
5694 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5695 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5696 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5698 lt_use_gnu_ld_interface=yes
5703 lt_use_gnu_ld_interface=yes
5708 if test "$lt_use_gnu_ld_interface" = yes; then
5709 # If archive_cmds runs LD, not CC, wlarc should be empty
5712 # Set some defaults for GNU ld with shared library support. These
5713 # are reset later if shared libraries are not supported. Putting them
5714 # here allows them to be overridden if necessary.
5715 runpath_var=LD_RUN_PATH
5716 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5717 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5718 # ancient GNU ld didn't support --whole-archive et. al.
5719 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5720 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5722 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5724 supports_anon_versioning=no
5725 case `$LD -v 2>&1` in
5726 *GNU\ gold*) supports_anon_versioning=yes ;;
5727 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5728 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5729 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5730 *\ 2.11.*) ;; # other 2.11 versions
5731 *) supports_anon_versioning=yes ;;
5734 # See if GNU ld supports shared libraries.
5737 # On AIX/PPC, the GNU linker is very broken
5738 if test "$host_cpu" != ia64; then
5739 _LT_TAGVAR(ld_shlibs, $1)=no
5742 *** Warning: the GNU linker, at least up to release 2.19, is reported
5743 *** to be unable to reliably create shared libraries on AIX.
5744 *** Therefore, libtool is disabling shared libraries support. If you
5745 *** really care for shared libraries, you may want to install binutils
5746 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5747 *** You will then need to restart the configuration process.
5756 # see comment about AmigaOS4 .so support
5757 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5758 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5761 _LT_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)'
5762 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5763 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5769 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5770 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5771 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5772 # support --undefined. This deserves some investigation. FIXME
5773 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5775 _LT_TAGVAR(ld_shlibs, $1)=no
5779 cygwin* | mingw* | pw32* | cegcc*)
5780 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5781 # as there is no search path for DLLs.
5782 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5783 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5784 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5785 _LT_TAGVAR(always_export_symbols, $1)=no
5786 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5787 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5788 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5790 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5791 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5792 # If the export-symbols file already is a .def file (1st line
5793 # is EXPORTS), use it as is; otherwise, prepend...
5794 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5795 cp $export_symbols $output_objdir/$soname.def;
5797 echo EXPORTS > $output_objdir/$soname.def;
5798 cat $export_symbols >> $output_objdir/$soname.def;
5800 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5802 _LT_TAGVAR(ld_shlibs, $1)=no
5807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5808 _LT_TAGVAR(link_all_deplibs, $1)=yes
5812 _LT_TAGVAR(hardcode_direct, $1)=no
5813 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5815 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5816 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5817 # Instead, shared libraries are loaded at an image base (0x10000000 by
5818 # default) and relocated if they conflict, which is a slow very memory
5819 # consuming and fragmenting process. To avoid this, we pick a random,
5820 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5821 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5822 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5823 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5826 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5828 if test "$host_os" = linux-dietlibc; then
5829 case $cc_basename in
5830 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5833 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5834 && test "$tmp_diet" = no
5836 tmp_addflag=' $pic_flag'
5837 tmp_sharedflag='-shared'
5838 case $cc_basename,$host_cpu in
5839 pgcc*) # Portland Group C compiler
5840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5841 tmp_addflag=' $pic_flag'
5843 pgf77* | pgf90* | pgf95* | pgfortran*)
5844 # Portland Group f77 and f90 compilers
5845 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5846 tmp_addflag=' $pic_flag -Mnomain' ;;
5847 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5848 tmp_addflag=' -i_dynamic' ;;
5849 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5850 tmp_addflag=' -i_dynamic -nofor_main' ;;
5851 ifc* | ifort*) # Intel Fortran compiler
5852 tmp_addflag=' -nofor_main' ;;
5853 lf95*) # Lahey Fortran 8.1
5854 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5855 tmp_sharedflag='--shared' ;;
5856 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5857 tmp_sharedflag='-qmkshrobj'
5859 nvcc*) # Cuda Compiler Driver 2.2
5860 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5861 _LT_TAGVAR(compiler_needs_object, $1)=yes
5864 case `$CC -V 2>&1 | sed 5q` in
5865 *Sun\ C*) # Sun C 5.9
5866 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5867 _LT_TAGVAR(compiler_needs_object, $1)=yes
5868 tmp_sharedflag='-G' ;;
5869 *Sun\ F*) # Sun Fortran 8.3
5870 tmp_sharedflag='-G' ;;
5872 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5874 if test "x$supports_anon_versioning" = xyes; then
5875 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5876 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5877 echo "local: *; };" >> $output_objdir/$libname.ver~
5878 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5881 case $cc_basename in
5882 xlf* | bgf* | bgxlf* | mpixlf*)
5883 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5884 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5885 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5886 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5887 if test "x$supports_anon_versioning" = xyes; then
5888 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5889 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5890 echo "local: *; };" >> $output_objdir/$libname.ver~
5891 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5896 _LT_TAGVAR(ld_shlibs, $1)=no
5900 netbsd* | netbsdelf*-gnu)
5901 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5902 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5906 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5911 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5912 _LT_TAGVAR(ld_shlibs, $1)=no
5915 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5916 *** create shared libraries on Solaris systems. Therefore, libtool
5917 *** is disabling shared libraries support. We urge you to upgrade GNU
5918 *** binutils to release 2.9.1 or newer. Another option is to modify
5919 *** your PATH or compiler configuration so that the native linker is
5920 *** used, and then restart.
5923 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5925 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5927 _LT_TAGVAR(ld_shlibs, $1)=no
5931 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5932 case `$LD -v 2>&1` in
5933 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5934 _LT_TAGVAR(ld_shlibs, $1)=no
5937 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5938 *** reliably create shared libraries on SCO systems. Therefore, libtool
5939 *** is disabling shared libraries support. We urge you to upgrade GNU
5940 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5941 *** your PATH or compiler configuration so that the native linker is
5942 *** used, and then restart.
5947 # For security reasons, it is highly recommended that you always
5948 # use absolute paths for naming shared libraries, and exclude the
5949 # DT_RUNPATH tag from executables and libraries. But doing so
5950 # requires that you compile everything twice, which is a pain.
5951 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5953 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5954 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5956 _LT_TAGVAR(ld_shlibs, $1)=no
5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5965 _LT_TAGVAR(hardcode_direct, $1)=yes
5966 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5970 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5971 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5972 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5974 _LT_TAGVAR(ld_shlibs, $1)=no
5979 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5982 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5983 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5986 # PORTME fill in a description of your system's linker (not GNU ld)
5989 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5990 _LT_TAGVAR(always_export_symbols, $1)=yes
5991 _LT_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'
5992 # Note: this linker hardcodes the directories in LIBPATH if there
5993 # are no directories specified by -L.
5994 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5995 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5996 # Neither direct hardcoding nor static linking is supported with a
5998 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6003 if test "$host_cpu" = ia64; then
6004 # On IA64, the linker does run time linking by default, so we don't
6005 # have to do anything special.
6006 aix_use_runtimelinking=no
6007 exp_sym_flag='-Bexport'
6010 # If we're using GNU nm, then we don't want the "-C" option.
6011 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6012 # Also, AIX nm treats weak defined symbols like other global
6013 # defined symbols, whereas GNU nm marks them as "W".
6014 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6015 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6017 _LT_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'
6019 aix_use_runtimelinking=no
6021 # Test if we are trying to use run time linking or normal
6022 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6023 # need to do runtime linking.
6024 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6025 for ld_flag in $LDFLAGS; do
6026 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6027 aix_use_runtimelinking=yes
6034 exp_sym_flag='-bexport'
6035 no_entry_flag='-bnoentry'
6038 # When large executables or shared objects are built, AIX ld can
6039 # have problems creating the table of contents. If linking a library
6040 # or program results in "error TOC overflow" add -mminimal-toc to
6041 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6042 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6044 _LT_TAGVAR(archive_cmds, $1)=''
6045 _LT_TAGVAR(hardcode_direct, $1)=yes
6046 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6047 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6048 _LT_TAGVAR(link_all_deplibs, $1)=yes
6049 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6051 if test "$GCC" = yes; then
6052 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6053 # We only want to do this on AIX 4.2 and lower, the check
6054 # below for broken collect2 doesn't work under 4.3+
6055 collect2name=`${CC} -print-prog-name=collect2`
6056 if test -f "$collect2name" &&
6057 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6059 # We have reworked collect2
6062 # We have old collect2
6063 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6064 # It fails to find uninstalled libraries when the uninstalled
6065 # path is not listed in the libpath. Setting hardcode_minus_L
6066 # to unsupported forces relinking
6067 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6068 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6069 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6073 shared_flag='-shared'
6074 if test "$aix_use_runtimelinking" = yes; then
6075 shared_flag="$shared_flag "'${wl}-G'
6077 _LT_TAGVAR(link_all_deplibs, $1)=no
6080 if test "$host_cpu" = ia64; then
6081 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6082 # chokes on -Wl,-G. The following line is correct:
6085 if test "$aix_use_runtimelinking" = yes; then
6086 shared_flag='${wl}-G'
6088 shared_flag='${wl}-bM:SRE'
6093 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6094 # It seems that -bexpall does not export symbols beginning with
6095 # underscore (_), so it is better to generate a list of symbols to export.
6096 _LT_TAGVAR(always_export_symbols, $1)=yes
6097 if test "$aix_use_runtimelinking" = yes; then
6098 # Warning - without using the other runtime loading flags (-brtl),
6099 # -berok will link without error, but may produce a broken library.
6100 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6101 # Determine the default libpath from the value encoded in an
6103 _LT_SYS_MODULE_PATH_AIX([$1])
6104 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6105 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6107 if test "$host_cpu" = ia64; then
6108 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6109 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6110 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6112 # Determine the default libpath from the value encoded in an
6114 _LT_SYS_MODULE_PATH_AIX([$1])
6115 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6116 # Warning - without using the other run time loading flags,
6117 # -berok will link without error, but may produce a broken library.
6118 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6119 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6120 if test "$with_gnu_ld" = yes; then
6121 # We only use this code for GNU lds that support --whole-archive.
6122 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6124 # Exported symbols can be pulled into shared objects from archives
6125 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6127 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6128 # This is similar to how AIX traditionally builds its shared libraries.
6129 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6137 # see comment about AmigaOS4 .so support
6138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6139 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6142 _LT_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)'
6143 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6144 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6150 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6153 cygwin* | mingw* | pw32* | cegcc*)
6154 # When not using gcc, we currently assume that we are using
6155 # Microsoft Visual C++.
6156 # hardcode_libdir_flag_spec is actually meaningless, as there is
6157 # no search path for DLLs.
6158 case $cc_basename in
6161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6162 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6163 _LT_TAGVAR(always_export_symbols, $1)=yes
6164 _LT_TAGVAR(file_list_spec, $1)='@'
6165 # Tell ltmain to make .lib files, not .a files.
6167 # Tell ltmain to make .dll files, not .so files.
6169 # FIXME: Setting linknames here is a bad hack.
6170 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6171 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6172 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6174 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6176 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6178 # The linker will not automatically build a static lib if we build a DLL.
6179 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6180 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6181 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6182 _LT_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'
6184 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6185 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6186 lt_tool_outputfile="@TOOL_OUTPUT@"~
6187 case $lt_outputfile in
6190 lt_outputfile="$lt_outputfile.exe"
6191 lt_tool_outputfile="$lt_tool_outputfile.exe"
6194 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6195 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6196 $RM "$lt_outputfile.manifest";
6200 # Assume MSVC wrapper
6201 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6202 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6203 # Tell ltmain to make .lib files, not .a files.
6205 # Tell ltmain to make .dll files, not .so files.
6207 # FIXME: Setting linknames here is a bad hack.
6208 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6209 # The linker will automatically build a .lib file if we build a DLL.
6210 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6211 # FIXME: Should let the user specify the lib program.
6212 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6213 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6218 darwin* | rhapsody*)
6219 _LT_DARWIN_LINKER_FEATURES($1)
6223 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6224 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6225 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6228 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6229 # support. Future versions do this automatically, but an explicit c++rt0.o
6230 # does not break anything, and helps significantly (at the cost of a little
6233 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6234 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6235 _LT_TAGVAR(hardcode_direct, $1)=yes
6236 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6239 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6241 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6242 _LT_TAGVAR(hardcode_direct, $1)=yes
6243 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6244 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6247 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6248 freebsd* | dragonfly*)
6249 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6250 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6251 _LT_TAGVAR(hardcode_direct, $1)=yes
6252 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6256 if test "$GCC" = yes; then
6257 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6259 _LT_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'
6261 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6262 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6263 _LT_TAGVAR(hardcode_direct, $1)=yes
6265 # hardcode_minus_L: Not really in the search PATH,
6266 # but as the default location of the library.
6267 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6268 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6272 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6275 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6277 if test "$with_gnu_ld" = no; then
6278 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6279 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6280 _LT_TAGVAR(hardcode_direct, $1)=yes
6281 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6282 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6283 # hardcode_minus_L: Not really in the search PATH,
6284 # but as the default location of the library.
6285 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6290 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6299 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6305 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6308 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6312 # Older versions of the 11.00 compiler do not understand -b yet
6313 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6314 _LT_LINKER_OPTION([if $CC understands -b],
6315 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6316 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6317 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6318 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6322 if test "$with_gnu_ld" = no; then
6323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6324 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6328 _LT_TAGVAR(hardcode_direct, $1)=no
6329 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6332 _LT_TAGVAR(hardcode_direct, $1)=yes
6333 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6334 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6336 # hardcode_minus_L: Not really in the search PATH,
6337 # but as the default location of the library.
6338 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6344 irix5* | irix6* | nonstopux*)
6345 if test "$GCC" = yes; then
6346 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6347 # Try to use the -exported_symbol ld option, if it does not
6348 # work, assume that -exports_file does not work either and
6349 # implicitly export all symbols.
6350 # This should be the same for all languages, so no per-tag cache variable.
6351 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6352 [lt_cv_irix_exported_symbol],
6353 [save_LDFLAGS="$LDFLAGS"
6354 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6357 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6358 [C++], [[int foo (void) { return 0; }]],
6365 [lt_cv_irix_exported_symbol=yes],
6366 [lt_cv_irix_exported_symbol=no])
6367 LDFLAGS="$save_LDFLAGS"])
6368 if test "$lt_cv_irix_exported_symbol" = yes; then
6369 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6372 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6373 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6375 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6376 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6377 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6378 _LT_TAGVAR(inherit_rpath, $1)=yes
6379 _LT_TAGVAR(link_all_deplibs, $1)=yes
6382 netbsd* | netbsdelf*-gnu)
6383 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6384 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6386 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6388 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6389 _LT_TAGVAR(hardcode_direct, $1)=yes
6390 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6394 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6395 _LT_TAGVAR(hardcode_direct, $1)=yes
6396 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6397 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6398 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6405 if test -f /usr/libexec/ld.so; then
6406 _LT_TAGVAR(hardcode_direct, $1)=yes
6407 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6408 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6409 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6410 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6411 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6413 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6416 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6417 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6418 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6421 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6422 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6427 _LT_TAGVAR(ld_shlibs, $1)=no
6432 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6433 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6434 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6435 _LT_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'
6436 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6440 if test "$GCC" = yes; then
6441 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6442 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6444 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6445 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6447 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6449 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6452 osf4* | osf5*) # as osf3* with the addition of -msym flag
6453 if test "$GCC" = yes; then
6454 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6456 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6458 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6459 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6460 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6461 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6463 # Both c and cxx compiler support -rpath directly
6464 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6466 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6467 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6471 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6472 if test "$GCC" = yes; then
6474 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6475 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6476 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6478 case `$CC -V 2>&1` in
6481 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6482 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6483 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6487 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6488 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6489 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6493 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6494 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6496 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6498 # The compiler driver will combine and reorder linker options,
6499 # but understands `-z linker_flag'. GCC discards it without `$wl',
6500 # but is careful enough not to reorder.
6501 # Supported since Solaris 2.6 (maybe 2.5.1?)
6502 if test "$GCC" = yes; then
6503 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6505 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6509 _LT_TAGVAR(link_all_deplibs, $1)=yes
6513 if test "x$host_vendor" = xsequent; then
6514 # Use $CC to link under sequent, because it throws in some extra .o
6515 # files that make .init and .fini sections work.
6516 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6518 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6520 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6521 _LT_TAGVAR(hardcode_direct, $1)=yes
6522 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6523 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6527 case $host_vendor in
6529 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6530 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6533 ## LD is ld it makes a PLAMLIB
6534 ## CC just makes a GrossModule.
6535 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6536 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6537 _LT_TAGVAR(hardcode_direct, $1)=no
6540 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6541 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6544 runpath_var='LD_RUN_PATH'
6545 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6549 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6550 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6551 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6555 if test -d /usr/nec; then
6556 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6557 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6558 runpath_var=LD_RUN_PATH
6559 hardcode_runpath_var=yes
6560 _LT_TAGVAR(ld_shlibs, $1)=yes
6564 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6565 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6566 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6567 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6568 runpath_var='LD_RUN_PATH'
6570 if test "$GCC" = yes; then
6571 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6572 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6574 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6575 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6579 sysv5* | sco3.2v5* | sco5v6*)
6580 # Note: We can NOT use -z defs as we might desire, because we do not
6581 # link with -lc, and that would cause any symbols used from libc to
6582 # always be unresolved, which means just about no library would
6583 # ever link correctly. If we're not using GNU ld we use -z text
6584 # though, which does catch some bad symbols but isn't as heavy-handed
6586 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6587 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6588 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6589 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6591 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6592 _LT_TAGVAR(link_all_deplibs, $1)=yes
6593 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6594 runpath_var='LD_RUN_PATH'
6596 if test "$GCC" = yes; then
6597 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6598 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6600 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6601 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6606 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6607 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6608 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6612 _LT_TAGVAR(ld_shlibs, $1)=no
6616 if test x$host_vendor = xsni; then
6618 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6619 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6625 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6626 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6628 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6630 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6631 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6632 _LT_DECL([], [extract_expsyms_cmds], [2],
6633 [The commands to extract the exported symbol list from a shared archive])
6636 # Do we need to explicitly link libc?
6638 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6640 # Assume -lc should be added
6641 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6643 if test "$enable_shared" = yes && test "$GCC" = yes; then
6644 case $_LT_TAGVAR(archive_cmds, $1) in
6646 # FIXME: we may have to deal with multi-command sequences.
6649 # Test whether the compiler implicitly links with -lc since on some
6650 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6651 # to ld, don't add -lc before -lgcc.
6652 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6653 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6655 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6657 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6660 libobjs=conftest.$ac_objext
6662 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6663 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6669 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6670 _LT_TAGVAR(allow_undefined_flag, $1)=
6671 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6673 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6675 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6677 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6679 cat conftest.err 1>&5
6683 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6690 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6691 [Whether or not to add -lc for building shared libraries])
6692 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6693 [enable_shared_with_static_runtimes], [0],
6694 [Whether or not to disallow shared libs when runtime libs are static])
6695 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6696 [Compiler flag to allow reflexive dlopens])
6697 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6698 [Compiler flag to generate shared objects directly from archives])
6699 _LT_TAGDECL([], [compiler_needs_object], [1],
6700 [Whether the compiler copes with passing no objects directly])
6701 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6702 [Create an old-style archive from a shared archive])
6703 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6704 [Create a temporary old-style archive to link instead of a shared archive])
6705 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6706 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6707 _LT_TAGDECL([], [module_cmds], [2],
6708 [Commands used to build a loadable module if different from building
6710 _LT_TAGDECL([], [module_expsym_cmds], [2])
6711 _LT_TAGDECL([], [with_gnu_ld], [1],
6712 [Whether we are building with GNU ld or not])
6713 _LT_TAGDECL([], [allow_undefined_flag], [1],
6714 [Flag that allows shared libraries with undefined symbols to be built])
6715 _LT_TAGDECL([], [no_undefined_flag], [1],
6716 [Flag that enforces no undefined symbols])
6717 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6718 [Flag to hardcode $libdir into a binary during linking.
6719 This must work even if $libdir does not exist])
6720 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6721 [Whether we need a single "-rpath" flag with a separated argument])
6722 _LT_TAGDECL([], [hardcode_direct], [0],
6723 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6724 DIR into the resulting binary])
6725 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6726 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6727 DIR into the resulting binary and the resulting library dependency is
6728 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6729 library is relocated])
6730 _LT_TAGDECL([], [hardcode_minus_L], [0],
6731 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6732 into the resulting binary])
6733 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6734 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6735 into the resulting binary])
6736 _LT_TAGDECL([], [hardcode_automatic], [0],
6737 [Set to "yes" if building a shared library automatically hardcodes DIR
6738 into the library and all subsequent libraries and executables linked
6740 _LT_TAGDECL([], [inherit_rpath], [0],
6741 [Set to yes if linker adds runtime paths of dependent libraries
6742 to runtime path list])
6743 _LT_TAGDECL([], [link_all_deplibs], [0],
6744 [Whether libtool must link a program against all its dependency libraries])
6745 _LT_TAGDECL([], [always_export_symbols], [0],
6746 [Set to "yes" if exported symbols are required])
6747 _LT_TAGDECL([], [export_symbols_cmds], [2],
6748 [The commands to list exported symbols])
6749 _LT_TAGDECL([], [exclude_expsyms], [1],
6750 [Symbols that should not be listed in the preloaded symbols])
6751 _LT_TAGDECL([], [include_expsyms], [1],
6752 [Symbols that must always be exported])
6753 _LT_TAGDECL([], [prelink_cmds], [2],
6754 [Commands necessary for linking programs (against libraries) with templates])
6755 _LT_TAGDECL([], [postlink_cmds], [2],
6756 [Commands necessary for finishing linking programs])
6757 _LT_TAGDECL([], [file_list_spec], [1],
6758 [Specify filename containing input files])
6759 dnl FIXME: Not yet implemented
6760 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6761 dnl [Compiler flag to generate thread safe objects])
6762 ])# _LT_LINKER_SHLIBS
6765 # _LT_LANG_C_CONFIG([TAG])
6766 # ------------------------
6767 # Ensure that the configuration variables for a C compiler are suitably
6768 # defined. These variables are subsequently used by _LT_CONFIG to write
6769 # the compiler configuration to `libtool'.
6770 m4_defun([_LT_LANG_C_CONFIG],
6771 [m4_require([_LT_DECL_EGREP])dnl
6775 # Source file extension for C test sources.
6778 # Object file extension for compiled C test sources.
6780 _LT_TAGVAR(objext, $1)=$objext
6782 # Code to be used in simple compile tests
6783 lt_simple_compile_test_code="int some_variable = 0;"
6785 # Code to be used in simple link tests
6786 lt_simple_link_test_code='int main(){return(0);}'
6789 # Save the default compiler, since it gets overwritten when the other
6790 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6791 compiler_DEFAULT=$CC
6793 # save warnings/boilerplate of simple test code
6794 _LT_COMPILER_BOILERPLATE
6795 _LT_LINKER_BOILERPLATE
6797 if test -n "$compiler"; then
6798 _LT_COMPILER_NO_RTTI($1)
6799 _LT_COMPILER_PIC($1)
6800 _LT_COMPILER_C_O($1)
6801 _LT_COMPILER_FILE_LOCKS($1)
6802 _LT_LINKER_SHLIBS($1)
6803 _LT_SYS_DYNAMIC_LINKER($1)
6804 _LT_LINKER_HARDCODE_LIBPATH($1)
6808 # Report which library types will actually be built
6809 AC_MSG_CHECKING([if libtool supports shared libraries])
6810 AC_MSG_RESULT([$can_build_shared])
6812 AC_MSG_CHECKING([whether to build shared libraries])
6813 test "$can_build_shared" = "no" && enable_shared=no
6815 # On AIX, shared libraries and static libraries use the same namespace, and
6816 # are all built from PIC.
6819 test "$enable_shared" = yes && enable_static=no
6820 if test -n "$RANLIB"; then
6821 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6822 postinstall_cmds='$RANLIB $lib'
6827 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6828 test "$enable_shared" = yes && enable_static=no
6832 AC_MSG_RESULT([$enable_shared])
6834 AC_MSG_CHECKING([whether to build static libraries])
6835 # Make sure either enable_shared or enable_static is yes.
6836 test "$enable_shared" = yes || enable_static=yes
6837 AC_MSG_RESULT([$enable_static])
6843 ])# _LT_LANG_C_CONFIG
6846 # _LT_LANG_CXX_CONFIG([TAG])
6847 # --------------------------
6848 # Ensure that the configuration variables for a C++ compiler are suitably
6849 # defined. These variables are subsequently used by _LT_CONFIG to write
6850 # the compiler configuration to `libtool'.
6851 m4_defun([_LT_LANG_CXX_CONFIG],
6852 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6853 m4_require([_LT_DECL_EGREP])dnl
6854 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6855 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6856 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6857 (test "X$CXX" != "Xg++"))) ; then
6860 _lt_caught_CXX_error=yes
6864 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6865 _LT_TAGVAR(allow_undefined_flag, $1)=
6866 _LT_TAGVAR(always_export_symbols, $1)=no
6867 _LT_TAGVAR(archive_expsym_cmds, $1)=
6868 _LT_TAGVAR(compiler_needs_object, $1)=no
6869 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6870 _LT_TAGVAR(hardcode_direct, $1)=no
6871 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6873 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6874 _LT_TAGVAR(hardcode_minus_L, $1)=no
6875 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6876 _LT_TAGVAR(hardcode_automatic, $1)=no
6877 _LT_TAGVAR(inherit_rpath, $1)=no
6878 _LT_TAGVAR(module_cmds, $1)=
6879 _LT_TAGVAR(module_expsym_cmds, $1)=
6880 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6881 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6882 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6883 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6884 _LT_TAGVAR(no_undefined_flag, $1)=
6885 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6886 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6888 # Source file extension for C++ test sources.
6891 # Object file extension for compiled C++ test sources.
6893 _LT_TAGVAR(objext, $1)=$objext
6895 # No sense in running all these tests if we already determined that
6896 # the CXX compiler isn't working. Some variables (like enable_shared)
6897 # are currently assumed to apply to all compilers on this platform,
6898 # and will be corrupted by setting them based on a non-working compiler.
6899 if test "$_lt_caught_CXX_error" != yes; then
6900 # Code to be used in simple compile tests
6901 lt_simple_compile_test_code="int some_variable = 0;"
6903 # Code to be used in simple link tests
6904 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6906 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6909 # save warnings/boilerplate of simple test code
6910 _LT_COMPILER_BOILERPLATE
6911 _LT_LINKER_BOILERPLATE
6913 # Allow CC to be a program name with arguments.
6915 lt_save_CFLAGS=$CFLAGS
6919 lt_save_with_gnu_ld=$with_gnu_ld
6920 lt_save_path_LD=$lt_cv_path_LD
6921 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6922 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6924 $as_unset lt_cv_prog_gnu_ld
6926 if test -n "${lt_cv_path_LDCXX+set}"; then
6927 lt_cv_path_LD=$lt_cv_path_LDCXX
6929 $as_unset lt_cv_path_LD
6931 test -z "${LDCXX+set}" || LD=$LDCXX
6935 _LT_TAGVAR(compiler, $1)=$CC
6936 _LT_CC_BASENAME([$compiler])
6938 if test -n "$compiler"; then
6939 # We don't want -fno-exception when compiling C++ code, so set the
6940 # no_builtin_flag separately
6941 if test "$GXX" = yes; then
6942 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6944 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6947 if test "$GXX" = yes; then
6948 # Set up default GNU C++ configuration
6952 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6953 # archiving commands below assume that GNU ld is being used.
6954 if test "$with_gnu_ld" = yes; then
6955 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6956 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6958 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6959 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6961 # If archive_cmds runs LD, not CC, wlarc should be empty
6962 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6963 # investigate it a little bit more. (MM)
6966 # ancient GNU ld didn't support --whole-archive et. al.
6967 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6968 $GREP 'no-whole-archive' > /dev/null; then
6969 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6971 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6977 # A generic and very simple default shared library creation
6978 # command for GNU C++ for the case where it uses the native
6979 # linker, instead of GNU ld. If possible, this setting should
6980 # overridden to take advantage of the native linker features on
6981 # the platform it is being used on.
6982 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6985 # Commands to make compiler produce verbose output that lists
6986 # what "hidden" libraries, object files and flags are used when
6987 # linking a shared library.
6988 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6996 # PORTME: fill in a description of your system's C++ link characteristics
6997 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6998 _LT_TAGVAR(ld_shlibs, $1)=yes
7001 # FIXME: insert proper C++ library support
7002 _LT_TAGVAR(ld_shlibs, $1)=no
7005 if test "$host_cpu" = ia64; then
7006 # On IA64, the linker does run time linking by default, so we don't
7007 # have to do anything special.
7008 aix_use_runtimelinking=no
7009 exp_sym_flag='-Bexport'
7012 aix_use_runtimelinking=no
7014 # Test if we are trying to use run time linking or normal
7015 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7016 # need to do runtime linking.
7017 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7018 for ld_flag in $LDFLAGS; do
7021 aix_use_runtimelinking=yes
7029 exp_sym_flag='-bexport'
7030 no_entry_flag='-bnoentry'
7033 # When large executables or shared objects are built, AIX ld can
7034 # have problems creating the table of contents. If linking a library
7035 # or program results in "error TOC overflow" add -mminimal-toc to
7036 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7037 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7039 _LT_TAGVAR(archive_cmds, $1)=''
7040 _LT_TAGVAR(hardcode_direct, $1)=yes
7041 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7042 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7043 _LT_TAGVAR(link_all_deplibs, $1)=yes
7044 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7046 if test "$GXX" = yes; then
7047 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7048 # We only want to do this on AIX 4.2 and lower, the check
7049 # below for broken collect2 doesn't work under 4.3+
7050 collect2name=`${CC} -print-prog-name=collect2`
7051 if test -f "$collect2name" &&
7052 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7054 # We have reworked collect2
7057 # We have old collect2
7058 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7059 # It fails to find uninstalled libraries when the uninstalled
7060 # path is not listed in the libpath. Setting hardcode_minus_L
7061 # to unsupported forces relinking
7062 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7063 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7064 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7067 shared_flag='-shared'
7068 if test "$aix_use_runtimelinking" = yes; then
7069 shared_flag="$shared_flag "'${wl}-G'
7073 if test "$host_cpu" = ia64; then
7074 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7075 # chokes on -Wl,-G. The following line is correct:
7078 if test "$aix_use_runtimelinking" = yes; then
7079 shared_flag='${wl}-G'
7081 shared_flag='${wl}-bM:SRE'
7086 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7087 # It seems that -bexpall does not export symbols beginning with
7088 # underscore (_), so it is better to generate a list of symbols to
7090 _LT_TAGVAR(always_export_symbols, $1)=yes
7091 if test "$aix_use_runtimelinking" = yes; then
7092 # Warning - without using the other runtime loading flags (-brtl),
7093 # -berok will link without error, but may produce a broken library.
7094 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7095 # Determine the default libpath from the value encoded in an empty
7097 _LT_SYS_MODULE_PATH_AIX([$1])
7098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7100 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7102 if test "$host_cpu" = ia64; then
7103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7104 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7105 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7107 # Determine the default libpath from the value encoded in an
7109 _LT_SYS_MODULE_PATH_AIX([$1])
7110 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7111 # Warning - without using the other run time loading flags,
7112 # -berok will link without error, but may produce a broken library.
7113 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7114 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7115 if test "$with_gnu_ld" = yes; then
7116 # We only use this code for GNU lds that support --whole-archive.
7117 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7119 # Exported symbols can be pulled into shared objects from archives
7120 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7122 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7123 # This is similar to how AIX traditionally builds its shared
7125 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7131 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7132 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7133 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7134 # support --undefined. This deserves some investigation. FIXME
7135 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7137 _LT_TAGVAR(ld_shlibs, $1)=no
7142 case $cc_basename in
7144 # FIXME: insert proper C++ library support
7145 _LT_TAGVAR(ld_shlibs, $1)=no
7150 cygwin* | mingw* | pw32* | cegcc*)
7151 case $GXX,$cc_basename in
7154 # hardcode_libdir_flag_spec is actually meaningless, as there is
7155 # no search path for DLLs.
7156 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7157 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7158 _LT_TAGVAR(always_export_symbols, $1)=yes
7159 _LT_TAGVAR(file_list_spec, $1)='@'
7160 # Tell ltmain to make .lib files, not .a files.
7162 # Tell ltmain to make .dll files, not .so files.
7164 # FIXME: Setting linknames here is a bad hack.
7165 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7166 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7167 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7169 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7171 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7173 # The linker will not automatically build a static lib if we build a DLL.
7174 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7177 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7178 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7179 lt_tool_outputfile="@TOOL_OUTPUT@"~
7180 case $lt_outputfile in
7183 lt_outputfile="$lt_outputfile.exe"
7184 lt_tool_outputfile="$lt_tool_outputfile.exe"
7187 func_to_tool_file "$lt_outputfile"~
7188 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7189 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7190 $RM "$lt_outputfile.manifest";
7195 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7196 # as there is no search path for DLLs.
7197 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7198 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7199 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7200 _LT_TAGVAR(always_export_symbols, $1)=no
7201 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7203 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7204 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7205 # If the export-symbols file already is a .def file (1st line
7206 # is EXPORTS), use it as is; otherwise, prepend...
7207 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7208 cp $export_symbols $output_objdir/$soname.def;
7210 echo EXPORTS > $output_objdir/$soname.def;
7211 cat $export_symbols >> $output_objdir/$soname.def;
7213 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7215 _LT_TAGVAR(ld_shlibs, $1)=no
7220 darwin* | rhapsody*)
7221 _LT_DARWIN_LINKER_FEATURES($1)
7225 case $cc_basename in
7227 # FIXME: insert proper C++ library support
7228 _LT_TAGVAR(ld_shlibs, $1)=no
7231 # Green Hills C++ Compiler
7232 # FIXME: insert proper C++ library support
7233 _LT_TAGVAR(ld_shlibs, $1)=no
7236 # FIXME: insert proper C++ library support
7237 _LT_TAGVAR(ld_shlibs, $1)=no
7243 # C++ shared libraries reported to be fairly broken before
7245 _LT_TAGVAR(ld_shlibs, $1)=no
7249 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7252 freebsd* | dragonfly*)
7253 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7255 _LT_TAGVAR(ld_shlibs, $1)=yes
7259 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7260 _LT_TAGVAR(link_all_deplibs, $1)=yes
7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7265 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7266 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7267 _LT_TAGVAR(hardcode_direct, $1)=yes
7268 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7269 # but as the default
7270 # location of the library.
7272 case $cc_basename in
7274 # FIXME: insert proper C++ library support
7275 _LT_TAGVAR(ld_shlibs, $1)=no
7278 _LT_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'
7279 # Commands to make compiler produce verbose output that lists
7280 # what "hidden" libraries, object files and flags are used when
7281 # linking a shared library.
7283 # There doesn't appear to be a way to prevent this compiler from
7284 # explicitly linking system object files so we need to strip them
7285 # from the output so that they don't get included in the library
7287 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7290 if test "$GXX" = yes; then
7291 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7293 # FIXME: insert proper C++ library support
7294 _LT_TAGVAR(ld_shlibs, $1)=no
7301 if test $with_gnu_ld = no; then
7302 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7303 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7309 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7315 _LT_TAGVAR(hardcode_direct, $1)=no
7316 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7319 _LT_TAGVAR(hardcode_direct, $1)=yes
7320 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7321 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7322 # but as the default
7323 # location of the library.
7327 case $cc_basename in
7329 # FIXME: insert proper C++ library support
7330 _LT_TAGVAR(ld_shlibs, $1)=no
7335 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7338 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7341 _LT_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'
7344 # Commands to make compiler produce verbose output that lists
7345 # what "hidden" libraries, object files and flags are used when
7346 # linking a shared library.
7348 # There doesn't appear to be a way to prevent this compiler from
7349 # explicitly linking system object files so we need to strip them
7350 # from the output so that they don't get included in the library
7352 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; func_echo_all "$list"'
7355 if test "$GXX" = yes; then
7356 if test $with_gnu_ld = no; then
7359 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7362 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7365 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7370 # FIXME: insert proper C++ library support
7371 _LT_TAGVAR(ld_shlibs, $1)=no
7378 _LT_TAGVAR(hardcode_direct, $1)=no
7379 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7380 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7381 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7382 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7383 # Instead, shared libraries are loaded at an image base (0x10000000 by
7384 # default) and relocated if they conflict, which is a slow very memory
7385 # consuming and fragmenting process. To avoid this, we pick a random,
7386 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7387 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7388 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7389 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7392 case $cc_basename in
7395 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7397 # Archives containing C++ object files must be created using
7398 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7399 # necessary to make sure instantiated templates are included
7401 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7404 if test "$GXX" = yes; then
7405 if test "$with_gnu_ld" = no; then
7406 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7408 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7411 _LT_TAGVAR(link_all_deplibs, $1)=yes
7414 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7415 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7416 _LT_TAGVAR(inherit_rpath, $1)=yes
7419 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7420 case $cc_basename in
7422 # Kuck and Associates, Inc. (KAI) C++ Compiler
7424 # KCC will only create a shared library if the output file
7425 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7426 # to its proper name (with version) after linking.
7427 _LT_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'
7428 _LT_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'
7429 # Commands to make compiler produce verbose output that lists
7430 # what "hidden" libraries, object files and flags are used when
7431 # linking a shared library.
7433 # There doesn't appear to be a way to prevent this compiler from
7434 # explicitly linking system object files so we need to strip them
7435 # from the output so that they don't get included in the library
7437 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; func_echo_all "$list"'
7439 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7440 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7442 # Archives containing C++ object files must be created using
7443 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7444 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7449 # version 8.0 and above of icpc choke on multiply defined symbols
7450 # if we add $predep_objects and $postdep_objects, however 7.1 and
7451 # earlier do not add the objects themselves.
7452 case `$CC -V 2>&1` in
7454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7455 _LT_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'
7457 *) # Version 8.0 or newer
7460 ia64*) tmp_idyn=' -i_dynamic';;
7462 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7463 _LT_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'
7466 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7468 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7469 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7472 # Portland Group C++ compiler
7474 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7475 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7477 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7478 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7479 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7481 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7482 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7484 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7486 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7487 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7488 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7490 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7491 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7493 *) # Version 6 and above use weak symbols
7494 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7495 _LT_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'
7499 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7500 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7501 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7505 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7506 _LT_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'
7508 runpath_var=LD_RUN_PATH
7509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7510 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7512 # Commands to make compiler produce verbose output that lists
7513 # what "hidden" libraries, object files and flags are used when
7514 # linking a shared library.
7516 # There doesn't appear to be a way to prevent this compiler from
7517 # explicitly linking system object files so we need to strip them
7518 # from the output so that they don't get included in the library
7520 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
7522 xl* | mpixl* | bgxl*)
7523 # IBM XL 8.0 on PPC, with GNU ld
7524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7525 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7526 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7527 if test "x$supports_anon_versioning" = xyes; then
7528 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7529 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7530 echo "local: *; };" >> $output_objdir/$libname.ver~
7531 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7535 case `$CC -V 2>&1 | sed 5q` in
7538 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7539 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7540 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7541 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7542 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7543 _LT_TAGVAR(compiler_needs_object, $1)=yes
7545 # Not sure whether something based on
7546 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7548 output_verbose_link_cmd='func_echo_all'
7550 # Archives containing C++ object files must be created using
7551 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7552 # necessary to make sure instantiated templates are included
7554 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7562 # FIXME: insert proper C++ library support
7563 _LT_TAGVAR(ld_shlibs, $1)=no
7567 # FIXME: insert proper C++ library support
7568 _LT_TAGVAR(ld_shlibs, $1)=no
7572 case $cc_basename in
7574 # FIXME: insert proper C++ library support
7575 _LT_TAGVAR(ld_shlibs, $1)=no
7578 # FIXME: insert proper C++ library support
7579 _LT_TAGVAR(ld_shlibs, $1)=no
7585 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7586 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7589 _LT_TAGVAR(hardcode_direct, $1)=yes
7590 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7592 # Workaround some broken pre-1.5 toolchains
7593 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7597 _LT_TAGVAR(ld_shlibs, $1)=yes
7601 # C++ shared libraries are fairly broken
7602 _LT_TAGVAR(ld_shlibs, $1)=no
7606 if test -f /usr/libexec/ld.so; then
7607 _LT_TAGVAR(hardcode_direct, $1)=yes
7608 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7609 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7610 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7612 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7613 _LT_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'
7614 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7615 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7617 output_verbose_link_cmd=func_echo_all
7619 _LT_TAGVAR(ld_shlibs, $1)=no
7623 osf3* | osf4* | osf5*)
7624 case $cc_basename in
7626 # Kuck and Associates, Inc. (KAI) C++ Compiler
7628 # KCC will only create a shared library if the output file
7629 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7630 # to its proper name (with version) after linking.
7631 _LT_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'
7633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7634 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7636 # Archives containing C++ object files must be created using
7637 # the KAI C++ compiler.
7639 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7640 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7644 # Rational C++ 2.4.1
7645 # FIXME: insert proper C++ library support
7646 _LT_TAGVAR(ld_shlibs, $1)=no
7651 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7652 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7653 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7656 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7657 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7658 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7659 echo "-hidden">> $lib.exp~
7660 $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~
7662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7666 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7668 # Commands to make compiler produce verbose output that lists
7669 # what "hidden" libraries, object files and flags are used when
7670 # linking a shared library.
7672 # There doesn't appear to be a way to prevent this compiler from
7673 # explicitly linking system object files so we need to strip them
7674 # from the output so that they don't get included in the library
7676 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
7679 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7680 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7683 _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7686 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7690 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7691 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7693 # Commands to make compiler produce verbose output that lists
7694 # what "hidden" libraries, object files and flags are used when
7695 # linking a shared library.
7696 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7699 # FIXME: insert proper C++ library support
7700 _LT_TAGVAR(ld_shlibs, $1)=no
7707 # FIXME: insert proper C++ library support
7708 _LT_TAGVAR(ld_shlibs, $1)=no
7712 case $cc_basename in
7715 # FIXME: insert proper C++ library support
7716 _LT_TAGVAR(ld_shlibs, $1)=no
7720 # FIXME: insert proper C++ library support
7721 _LT_TAGVAR(ld_shlibs, $1)=no
7724 # FIXME: insert proper C++ library support
7725 _LT_TAGVAR(ld_shlibs, $1)=no
7731 case $cc_basename in
7733 # Sun C++ 4.2, 5.x and Centerline C++
7734 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7735 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7736 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7737 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7738 $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'
7740 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7741 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7743 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7745 # The compiler driver will combine and reorder linker options,
7746 # but understands `-z linker_flag'.
7747 # Supported since Solaris 2.6 (maybe 2.5.1?)
7748 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7751 _LT_TAGVAR(link_all_deplibs, $1)=yes
7753 output_verbose_link_cmd='func_echo_all'
7755 # Archives containing C++ object files must be created using
7756 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7757 # necessary to make sure instantiated templates are included
7759 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7762 # Green Hills C++ Compiler
7763 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7765 # The C++ compiler must be used to create the archive.
7766 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7769 # GNU C++ compiler with Solaris linker
7770 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7771 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7772 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7773 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7774 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7775 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7777 # Commands to make compiler produce verbose output that lists
7778 # what "hidden" libraries, object files and flags are used when
7779 # linking a shared library.
7780 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7782 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7784 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7785 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7786 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7788 # Commands to make compiler produce verbose output that lists
7789 # what "hidden" libraries, object files and flags are used when
7790 # linking a shared library.
7791 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7796 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7798 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7806 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7807 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7808 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7809 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7810 runpath_var='LD_RUN_PATH'
7812 case $cc_basename in
7814 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7815 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7818 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7819 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7824 sysv5* | sco3.2v5* | sco5v6*)
7825 # Note: We can NOT use -z defs as we might desire, because we do not
7826 # link with -lc, and that would cause any symbols used from libc to
7827 # always be unresolved, which means just about no library would
7828 # ever link correctly. If we're not using GNU ld we use -z text
7829 # though, which does catch some bad symbols but isn't as heavy-handed
7831 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7832 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7833 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7836 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7837 _LT_TAGVAR(link_all_deplibs, $1)=yes
7838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7839 runpath_var='LD_RUN_PATH'
7841 case $cc_basename in
7843 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7845 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7846 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7847 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7848 '"$_LT_TAGVAR(reload_cmds, $1)"
7851 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7852 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7858 case $cc_basename in
7860 # NonStop-UX NCC 3.20
7861 # FIXME: insert proper C++ library support
7862 _LT_TAGVAR(ld_shlibs, $1)=no
7865 # FIXME: insert proper C++ library support
7866 _LT_TAGVAR(ld_shlibs, $1)=no
7872 # FIXME: insert proper C++ library support
7873 _LT_TAGVAR(ld_shlibs, $1)=no
7877 # FIXME: insert proper C++ library support
7878 _LT_TAGVAR(ld_shlibs, $1)=no
7882 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7883 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7885 _LT_TAGVAR(GCC, $1)="$GXX"
7886 _LT_TAGVAR(LD, $1)="$LD"
7889 ## There is no encapsulation within the following macros, do not change
7890 ## the running order or otherwise move them around unless you know exactly
7891 ## what you are doing...
7892 _LT_SYS_HIDDEN_LIBDEPS($1)
7893 _LT_COMPILER_PIC($1)
7894 _LT_COMPILER_C_O($1)
7895 _LT_COMPILER_FILE_LOCKS($1)
7896 _LT_LINKER_SHLIBS($1)
7897 _LT_SYS_DYNAMIC_LINKER($1)
7898 _LT_LINKER_HARDCODE_LIBPATH($1)
7901 fi # test -n "$compiler"
7904 CFLAGS=$lt_save_CFLAGS
7908 with_gnu_ld=$lt_save_with_gnu_ld
7909 lt_cv_path_LDCXX=$lt_cv_path_LD
7910 lt_cv_path_LD=$lt_save_path_LD
7911 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7912 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7913 fi # test "$_lt_caught_CXX_error" != yes
7916 ])# _LT_LANG_CXX_CONFIG
7919 # _LT_FUNC_STRIPNAME_CNF
7920 # ----------------------
7921 # func_stripname_cnf prefix suffix name
7922 # strip PREFIX and SUFFIX off of NAME.
7923 # PREFIX and SUFFIX must not contain globbing or regex special
7924 # characters, hashes, percent signs, but SUFFIX may contain a leading
7925 # dot (in which case that matches only a dot).
7927 # This function is identical to the (non-XSI) version of func_stripname,
7928 # except this one can be used by m4 code that may be executed by configure,
7929 # rather than the libtool script.
7930 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7931 AC_REQUIRE([_LT_DECL_SED])
7932 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7933 func_stripname_cnf ()
7936 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7937 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7939 } # func_stripname_cnf
7940 ])# _LT_FUNC_STRIPNAME_CNF
7942 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7943 # ---------------------------------
7944 # Figure out "hidden" library dependencies from verbose
7945 # compiler output when linking a shared library.
7946 # Parse the compiler output and extract the necessary
7947 # objects, libraries and library flags.
7948 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7949 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7950 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7951 # Dependencies to place before and after the object being linked:
7952 _LT_TAGVAR(predep_objects, $1)=
7953 _LT_TAGVAR(postdep_objects, $1)=
7954 _LT_TAGVAR(predeps, $1)=
7955 _LT_TAGVAR(postdeps, $1)=
7956 _LT_TAGVAR(compiler_lib_search_path, $1)=
7958 dnl we can't use the lt_simple_compile_test_code here,
7959 dnl because it contains code intended for an executable,
7960 dnl not a library. It's possible we should let each
7961 dnl tag define a new lt_????_link_test_code variable,
7962 dnl but it's only used here...
7963 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7965 void foo (void) { a = 0; }
7967 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7971 Foo (void) { a = 0; }
7976 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7984 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7992 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7995 public void bar (void) {
8000 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8007 _lt_libdeps_save_CFLAGS=$CFLAGS
8008 case "$CC $CFLAGS " in #(
8009 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8010 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8011 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8014 dnl Parse the compiler output and extract the necessary
8015 dnl objects, libraries and library flags.
8016 if AC_TRY_EVAL(ac_compile); then
8017 # Parse the compiler output and extract the necessary
8018 # objects, libraries and library flags.
8020 # Sentinel used to keep track of whether or not we are before
8021 # the conftest object file.
8022 pre_test_object_deps_done=no
8024 for p in `eval "$output_verbose_link_cmd"`; do
8028 # Some compilers place space between "-{L,R}" and the path.
8030 if test $p = "-L" ||
8031 test $p = "-R"; then
8036 # Expand the sysroot to ease extracting the directories later.
8037 if test -z "$prev"; then
8039 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8040 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8041 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8045 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8047 if test "$pre_test_object_deps_done" = no; then
8050 # Internal compiler library paths should come after those
8051 # provided the user. The postdeps already come after the
8052 # user supplied libs so there is no need to process them.
8053 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8054 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8056 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8059 # The "-l" case would never come before the object being
8060 # linked, so don't bother handling this case.
8063 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8064 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8066 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8072 *.lto.$objext) ;; # Ignore GCC LTO objects
8074 # This assumes that the test object file only shows up
8075 # once in the compiler output.
8076 if test "$p" = "conftest.$objext"; then
8077 pre_test_object_deps_done=yes
8081 if test "$pre_test_object_deps_done" = no; then
8082 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8083 _LT_TAGVAR(predep_objects, $1)="$p"
8085 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8088 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8089 _LT_TAGVAR(postdep_objects, $1)="$p"
8091 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8096 *) ;; # Ignore the rest.
8104 echo "libtool.m4: error: problem compiling $1 test program"
8107 $RM -f confest.$objext
8108 CFLAGS=$_lt_libdeps_save_CFLAGS
8110 # PORTME: override above test on systems where it is broken
8114 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8115 # hack all around it, let's just trust "g++" to DTRT.
8116 _LT_TAGVAR(predep_objects,$1)=
8117 _LT_TAGVAR(postdep_objects,$1)=
8118 _LT_TAGVAR(postdeps,$1)=
8122 case `$CC -V 2>&1 | sed 5q` in
8126 # The more standards-conforming stlport4 library is
8127 # incompatible with the Cstd library. Avoid specifying
8128 # it if it's in CXXFLAGS. Ignore libCrun as
8129 # -library=stlport4 depends on it.
8130 case " $CXX $CXXFLAGS " in
8131 *" -library=stlport4 "*)
8132 solaris_use_stlport4=yes
8136 if test "$solaris_use_stlport4" != yes; then
8137 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8144 case $cc_basename in
8146 # The more standards-conforming stlport4 library is
8147 # incompatible with the Cstd library. Avoid specifying
8148 # it if it's in CXXFLAGS. Ignore libCrun as
8149 # -library=stlport4 depends on it.
8150 case " $CXX $CXXFLAGS " in
8151 *" -library=stlport4 "*)
8152 solaris_use_stlport4=yes
8156 # Adding this requires a known-good setup of shared libraries for
8157 # Sun compiler versions before 5.6, else PIC objects from an old
8158 # archive will be linked into the output, leading to subtle bugs.
8159 if test "$solaris_use_stlport4" != yes; then
8160 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8168 case " $_LT_TAGVAR(postdeps, $1) " in
8169 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8171 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8172 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8173 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8175 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8176 [The directories searched by this compiler when creating a shared library])
8177 _LT_TAGDECL([], [predep_objects], [1],
8178 [Dependencies to place before and after the objects being linked to
8179 create a shared library])
8180 _LT_TAGDECL([], [postdep_objects], [1])
8181 _LT_TAGDECL([], [predeps], [1])
8182 _LT_TAGDECL([], [postdeps], [1])
8183 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8184 [The library search path used internally by the compiler when linking
8186 ])# _LT_SYS_HIDDEN_LIBDEPS
8189 # _LT_LANG_F77_CONFIG([TAG])
8190 # --------------------------
8191 # Ensure that the configuration variables for a Fortran 77 compiler are
8192 # suitably defined. These variables are subsequently used by _LT_CONFIG
8193 # to write the compiler configuration to `libtool'.
8194 m4_defun([_LT_LANG_F77_CONFIG],
8195 [AC_LANG_PUSH(Fortran 77)
8196 if test -z "$F77" || test "X$F77" = "Xno"; then
8200 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8201 _LT_TAGVAR(allow_undefined_flag, $1)=
8202 _LT_TAGVAR(always_export_symbols, $1)=no
8203 _LT_TAGVAR(archive_expsym_cmds, $1)=
8204 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8205 _LT_TAGVAR(hardcode_direct, $1)=no
8206 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8207 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8208 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8209 _LT_TAGVAR(hardcode_minus_L, $1)=no
8210 _LT_TAGVAR(hardcode_automatic, $1)=no
8211 _LT_TAGVAR(inherit_rpath, $1)=no
8212 _LT_TAGVAR(module_cmds, $1)=
8213 _LT_TAGVAR(module_expsym_cmds, $1)=
8214 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8215 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8216 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8217 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8218 _LT_TAGVAR(no_undefined_flag, $1)=
8219 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8220 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8222 # Source file extension for f77 test sources.
8225 # Object file extension for compiled f77 test sources.
8227 _LT_TAGVAR(objext, $1)=$objext
8229 # No sense in running all these tests if we already determined that
8230 # the F77 compiler isn't working. Some variables (like enable_shared)
8231 # are currently assumed to apply to all compilers on this platform,
8232 # and will be corrupted by setting them based on a non-working compiler.
8233 if test "$_lt_disable_F77" != yes; then
8234 # Code to be used in simple compile tests
8235 lt_simple_compile_test_code="\
8241 # Code to be used in simple link tests
8242 lt_simple_link_test_code="\
8247 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8250 # save warnings/boilerplate of simple test code
8251 _LT_COMPILER_BOILERPLATE
8252 _LT_LINKER_BOILERPLATE
8254 # Allow CC to be a program name with arguments.
8257 lt_save_CFLAGS=$CFLAGS
8261 _LT_TAGVAR(compiler, $1)=$CC
8262 _LT_CC_BASENAME([$compiler])
8264 if test -n "$compiler"; then
8265 AC_MSG_CHECKING([if libtool supports shared libraries])
8266 AC_MSG_RESULT([$can_build_shared])
8268 AC_MSG_CHECKING([whether to build shared libraries])
8269 test "$can_build_shared" = "no" && enable_shared=no
8271 # On AIX, shared libraries and static libraries use the same namespace, and
8272 # are all built from PIC.
8275 test "$enable_shared" = yes && enable_static=no
8276 if test -n "$RANLIB"; then
8277 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8278 postinstall_cmds='$RANLIB $lib'
8282 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8283 test "$enable_shared" = yes && enable_static=no
8287 AC_MSG_RESULT([$enable_shared])
8289 AC_MSG_CHECKING([whether to build static libraries])
8290 # Make sure either enable_shared or enable_static is yes.
8291 test "$enable_shared" = yes || enable_static=yes
8292 AC_MSG_RESULT([$enable_static])
8294 _LT_TAGVAR(GCC, $1)="$G77"
8295 _LT_TAGVAR(LD, $1)="$LD"
8298 ## There is no encapsulation within the following macros, do not change
8299 ## the running order or otherwise move them around unless you know exactly
8300 ## what you are doing...
8301 _LT_COMPILER_PIC($1)
8302 _LT_COMPILER_C_O($1)
8303 _LT_COMPILER_FILE_LOCKS($1)
8304 _LT_LINKER_SHLIBS($1)
8305 _LT_SYS_DYNAMIC_LINKER($1)
8306 _LT_LINKER_HARDCODE_LIBPATH($1)
8309 fi # test -n "$compiler"
8313 CFLAGS="$lt_save_CFLAGS"
8314 fi # test "$_lt_disable_F77" != yes
8317 ])# _LT_LANG_F77_CONFIG
8320 # _LT_LANG_FC_CONFIG([TAG])
8321 # -------------------------
8322 # Ensure that the configuration variables for a Fortran compiler are
8323 # suitably defined. These variables are subsequently used by _LT_CONFIG
8324 # to write the compiler configuration to `libtool'.
8325 m4_defun([_LT_LANG_FC_CONFIG],
8326 [AC_LANG_PUSH(Fortran)
8328 if test -z "$FC" || test "X$FC" = "Xno"; then
8332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8333 _LT_TAGVAR(allow_undefined_flag, $1)=
8334 _LT_TAGVAR(always_export_symbols, $1)=no
8335 _LT_TAGVAR(archive_expsym_cmds, $1)=
8336 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8337 _LT_TAGVAR(hardcode_direct, $1)=no
8338 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8340 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8341 _LT_TAGVAR(hardcode_minus_L, $1)=no
8342 _LT_TAGVAR(hardcode_automatic, $1)=no
8343 _LT_TAGVAR(inherit_rpath, $1)=no
8344 _LT_TAGVAR(module_cmds, $1)=
8345 _LT_TAGVAR(module_expsym_cmds, $1)=
8346 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8347 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8348 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8349 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8350 _LT_TAGVAR(no_undefined_flag, $1)=
8351 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8352 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8354 # Source file extension for fc test sources.
8355 ac_ext=${ac_fc_srcext-f}
8357 # Object file extension for compiled fc test sources.
8359 _LT_TAGVAR(objext, $1)=$objext
8361 # No sense in running all these tests if we already determined that
8362 # the FC compiler isn't working. Some variables (like enable_shared)
8363 # are currently assumed to apply to all compilers on this platform,
8364 # and will be corrupted by setting them based on a non-working compiler.
8365 if test "$_lt_disable_FC" != yes; then
8366 # Code to be used in simple compile tests
8367 lt_simple_compile_test_code="\
8373 # Code to be used in simple link tests
8374 lt_simple_link_test_code="\
8379 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8382 # save warnings/boilerplate of simple test code
8383 _LT_COMPILER_BOILERPLATE
8384 _LT_LINKER_BOILERPLATE
8386 # Allow CC to be a program name with arguments.
8389 lt_save_CFLAGS=$CFLAGS
8393 GCC=$ac_cv_fc_compiler_gnu
8395 _LT_TAGVAR(compiler, $1)=$CC
8396 _LT_CC_BASENAME([$compiler])
8398 if test -n "$compiler"; then
8399 AC_MSG_CHECKING([if libtool supports shared libraries])
8400 AC_MSG_RESULT([$can_build_shared])
8402 AC_MSG_CHECKING([whether to build shared libraries])
8403 test "$can_build_shared" = "no" && enable_shared=no
8405 # On AIX, shared libraries and static libraries use the same namespace, and
8406 # are all built from PIC.
8409 test "$enable_shared" = yes && enable_static=no
8410 if test -n "$RANLIB"; then
8411 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8412 postinstall_cmds='$RANLIB $lib'
8416 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8417 test "$enable_shared" = yes && enable_static=no
8421 AC_MSG_RESULT([$enable_shared])
8423 AC_MSG_CHECKING([whether to build static libraries])
8424 # Make sure either enable_shared or enable_static is yes.
8425 test "$enable_shared" = yes || enable_static=yes
8426 AC_MSG_RESULT([$enable_static])
8428 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8429 _LT_TAGVAR(LD, $1)="$LD"
8432 ## There is no encapsulation within the following macros, do not change
8433 ## the running order or otherwise move them around unless you know exactly
8434 ## what you are doing...
8435 _LT_SYS_HIDDEN_LIBDEPS($1)
8436 _LT_COMPILER_PIC($1)
8437 _LT_COMPILER_C_O($1)
8438 _LT_COMPILER_FILE_LOCKS($1)
8439 _LT_LINKER_SHLIBS($1)
8440 _LT_SYS_DYNAMIC_LINKER($1)
8441 _LT_LINKER_HARDCODE_LIBPATH($1)
8444 fi # test -n "$compiler"
8448 CFLAGS=$lt_save_CFLAGS
8449 fi # test "$_lt_disable_FC" != yes
8452 ])# _LT_LANG_FC_CONFIG
8455 # _LT_LANG_GCJ_CONFIG([TAG])
8456 # --------------------------
8457 # Ensure that the configuration variables for the GNU Java Compiler compiler
8458 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8459 # to write the compiler configuration to `libtool'.
8460 m4_defun([_LT_LANG_GCJ_CONFIG],
8461 [AC_REQUIRE([LT_PROG_GCJ])dnl
8464 # Source file extension for Java test sources.
8467 # Object file extension for compiled Java test sources.
8469 _LT_TAGVAR(objext, $1)=$objext
8471 # Code to be used in simple compile tests
8472 lt_simple_compile_test_code="class foo {}"
8474 # Code to be used in simple link tests
8475 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8477 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8480 # save warnings/boilerplate of simple test code
8481 _LT_COMPILER_BOILERPLATE
8482 _LT_LINKER_BOILERPLATE
8484 # Allow CC to be a program name with arguments.
8486 lt_save_CFLAGS=$CFLAGS
8492 _LT_TAGVAR(compiler, $1)=$CC
8493 _LT_TAGVAR(LD, $1)="$LD"
8494 _LT_CC_BASENAME([$compiler])
8496 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8497 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8499 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8500 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8501 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8503 if test -n "$compiler"; then
8504 _LT_COMPILER_NO_RTTI($1)
8505 _LT_COMPILER_PIC($1)
8506 _LT_COMPILER_C_O($1)
8507 _LT_COMPILER_FILE_LOCKS($1)
8508 _LT_LINKER_SHLIBS($1)
8509 _LT_LINKER_HARDCODE_LIBPATH($1)
8518 CFLAGS=$lt_save_CFLAGS
8519 ])# _LT_LANG_GCJ_CONFIG
8522 # _LT_LANG_GO_CONFIG([TAG])
8523 # --------------------------
8524 # Ensure that the configuration variables for the GNU Go compiler
8525 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8526 # to write the compiler configuration to `libtool'.
8527 m4_defun([_LT_LANG_GO_CONFIG],
8528 [AC_REQUIRE([LT_PROG_GO])dnl
8531 # Source file extension for Go test sources.
8534 # Object file extension for compiled Go test sources.
8536 _LT_TAGVAR(objext, $1)=$objext
8538 # Code to be used in simple compile tests
8539 lt_simple_compile_test_code="package main; func main() { }"
8541 # Code to be used in simple link tests
8542 lt_simple_link_test_code='package main; func main() { }'
8544 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8547 # save warnings/boilerplate of simple test code
8548 _LT_COMPILER_BOILERPLATE
8549 _LT_LINKER_BOILERPLATE
8551 # Allow CC to be a program name with arguments.
8553 lt_save_CFLAGS=$CFLAGS
8559 _LT_TAGVAR(compiler, $1)=$CC
8560 _LT_TAGVAR(LD, $1)="$LD"
8561 _LT_CC_BASENAME([$compiler])
8563 # Go did not exist at the time GCC didn't implicitly link libc in.
8564 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8566 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8567 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8568 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8570 if test -n "$compiler"; then
8571 _LT_COMPILER_NO_RTTI($1)
8572 _LT_COMPILER_PIC($1)
8573 _LT_COMPILER_C_O($1)
8574 _LT_COMPILER_FILE_LOCKS($1)
8575 _LT_LINKER_SHLIBS($1)
8576 _LT_LINKER_HARDCODE_LIBPATH($1)
8585 CFLAGS=$lt_save_CFLAGS
8586 ])# _LT_LANG_GO_CONFIG
8589 # _LT_LANG_RC_CONFIG([TAG])
8590 # -------------------------
8591 # Ensure that the configuration variables for the Windows resource compiler
8592 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8593 # to write the compiler configuration to `libtool'.
8594 m4_defun([_LT_LANG_RC_CONFIG],
8595 [AC_REQUIRE([LT_PROG_RC])dnl
8598 # Source file extension for RC test sources.
8601 # Object file extension for compiled RC test sources.
8603 _LT_TAGVAR(objext, $1)=$objext
8605 # Code to be used in simple compile tests
8606 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8608 # Code to be used in simple link tests
8609 lt_simple_link_test_code="$lt_simple_compile_test_code"
8611 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8614 # save warnings/boilerplate of simple test code
8615 _LT_COMPILER_BOILERPLATE
8616 _LT_LINKER_BOILERPLATE
8618 # Allow CC to be a program name with arguments.
8620 lt_save_CFLAGS=$CFLAGS
8626 _LT_TAGVAR(compiler, $1)=$CC
8627 _LT_CC_BASENAME([$compiler])
8628 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8630 if test -n "$compiler"; then
8638 CFLAGS=$lt_save_CFLAGS
8639 ])# _LT_LANG_RC_CONFIG
8644 AC_DEFUN([LT_PROG_GCJ],
8645 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8646 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8647 [AC_CHECK_TOOL(GCJ, gcj,)
8648 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8649 AC_SUBST(GCJFLAGS)])])[]dnl
8653 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8654 dnl aclocal-1.4 backwards compatibility:
8655 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8660 AC_DEFUN([LT_PROG_GO],
8661 [AC_CHECK_TOOL(GOC, gccgo,)
8667 AC_DEFUN([LT_PROG_RC],
8668 [AC_CHECK_TOOL(RC, windres,)
8672 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8673 dnl aclocal-1.4 backwards compatibility:
8674 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8679 # If we don't have a new enough Autoconf to choose the best grep
8680 # available, choose the one first in the user's PATH.
8681 m4_defun([_LT_DECL_EGREP],
8682 [AC_REQUIRE([AC_PROG_EGREP])dnl
8683 AC_REQUIRE([AC_PROG_FGREP])dnl
8684 test -z "$GREP" && GREP=grep
8685 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8686 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8687 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8688 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8695 # If we don't have a new enough Autoconf to choose the best objdump
8696 # available, choose the one first in the user's PATH.
8697 m4_defun([_LT_DECL_OBJDUMP],
8698 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8699 test -z "$OBJDUMP" && OBJDUMP=objdump
8700 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8706 # Ensure DLLTOOL variable is set.
8707 m4_defun([_LT_DECL_DLLTOOL],
8708 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8709 test -z "$DLLTOOL" && DLLTOOL=dlltool
8710 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8716 # Check for a fully-functional sed program, that truncates
8717 # as few characters as possible. Prefer GNU sed if found.
8718 m4_defun([_LT_DECL_SED],
8720 test -z "$SED" && SED=sed
8721 Xsed="$SED -e 1s/^X//"
8722 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8723 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8724 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8727 m4_ifndef([AC_PROG_SED], [
8728 # NOTE: This macro has been submitted for inclusion into #
8729 # GNU Autoconf as AC_PROG_SED. When it is available in #
8730 # a released version of Autoconf we should remove this #
8731 # macro and use it instead. #
8733 m4_defun([AC_PROG_SED],
8734 [AC_MSG_CHECKING([for a sed that does not truncate output])
8735 AC_CACHE_VAL(lt_cv_path_SED,
8736 [# Loop through the user's path and test for sed and gsed.
8737 # Then use that list of sed's as ones to test for truncation.
8738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742 test -z "$as_dir" && as_dir=.
8743 for lt_ac_prog in sed gsed; do
8744 for ac_exec_ext in '' $ac_executable_extensions; do
8745 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8746 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8754 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8755 # along with /bin/sed that truncates output.
8756 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8757 test ! -f $lt_ac_sed && continue
8758 cat /dev/null > conftest.in
8760 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8761 # Check for GNU sed and select it if it is found.
8762 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8763 lt_cv_path_SED=$lt_ac_sed
8767 cat conftest.in conftest.in >conftest.tmp
8768 mv conftest.tmp conftest.in
8769 cp conftest.in conftest.nl
8771 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8772 cmp -s conftest.out conftest.nl || break
8773 # 10000 chars as input seems more than enough
8774 test $lt_ac_count -gt 10 && break
8775 lt_ac_count=`expr $lt_ac_count + 1`
8776 if test $lt_ac_count -gt $lt_ac_max; then
8777 lt_ac_max=$lt_ac_count
8778 lt_cv_path_SED=$lt_ac_sed
8785 AC_MSG_RESULT([$SED])
8790 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8791 dnl aclocal-1.4 backwards compatibility:
8792 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8795 # _LT_CHECK_SHELL_FEATURES
8796 # ------------------------
8797 # Find out whether the shell is Bourne or XSI compatible,
8798 # or has some other useful features.
8799 m4_defun([_LT_CHECK_SHELL_FEATURES],
8800 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8801 # Try some XSI features
8804 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8806 && eval 'test $(( 1 + 1 )) -eq 2 \
8807 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8809 AC_MSG_RESULT([$xsi_shell])
8810 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8812 AC_MSG_CHECKING([whether the shell understands "+="])
8814 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8816 && lt_shell_append=yes
8817 AC_MSG_RESULT([$lt_shell_append])
8818 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8820 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8825 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8827 # test EBCDIC or ASCII
8828 case `echo X|tr X '\101'` in
8829 A) # ASCII based system
8830 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8831 lt_SP2NL='tr \040 \012'
8832 lt_NL2SP='tr \015\012 \040\040'
8834 *) # EBCDIC based system
8835 lt_SP2NL='tr \100 \n'
8836 lt_NL2SP='tr \r\n \100\100'
8839 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8840 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8841 ])# _LT_CHECK_SHELL_FEATURES
8844 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8845 # ------------------------------------------------------
8846 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8847 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8848 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8850 sed -e '/^$1 ()$/,/^} # $1 /c\
8853 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
8854 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8855 && mv -f "$cfgfile.tmp" "$cfgfile" \
8856 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8857 test 0 -eq $? || _lt_function_replace_fail=:
8861 # _LT_PROG_REPLACE_SHELLFNS
8862 # -------------------------
8863 # Replace existing portable implementations of several shell functions with
8864 # equivalent extended shell implementations where those features are available..
8865 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8866 [if test x"$xsi_shell" = xyes; then
8867 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8869 */*) func_dirname_result="${1%/*}${2}" ;;
8870 * ) func_dirname_result="${3}" ;;
8873 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8874 func_basename_result="${1##*/}"])
8876 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8878 */*) func_dirname_result="${1%/*}${2}" ;;
8879 * ) func_dirname_result="${3}" ;;
8881 func_basename_result="${1##*/}"])
8883 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8884 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8885 # positional parameters, so assign one to ordinary parameter first.
8886 func_stripname_result=${3}
8887 func_stripname_result=${func_stripname_result#"${1}"}
8888 func_stripname_result=${func_stripname_result%"${2}"}])
8890 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8891 func_split_long_opt_name=${1%%=*}
8892 func_split_long_opt_arg=${1#*=}])
8894 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8895 func_split_short_opt_arg=${1#??}
8896 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8898 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8900 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8901 *) func_lo2o_result=${1} ;;
8904 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
8906 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
8908 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
8911 if test x"$lt_shell_append" = xyes; then
8912 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
8914 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8915 func_quote_for_eval "${2}"
8916 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8917 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8919 # Save a `func_append' function call where possible by direct use of '+='
8920 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8921 && mv -f "$cfgfile.tmp" "$cfgfile" \
8922 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8923 test 0 -eq $? || _lt_function_replace_fail=:
8925 # Save a `func_append' function call even when '+=' is not available
8926 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8927 && mv -f "$cfgfile.tmp" "$cfgfile" \
8928 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8929 test 0 -eq $? || _lt_function_replace_fail=:
8932 if test x"$_lt_function_replace_fail" = x":"; then
8933 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8937 # _LT_PATH_CONVERSION_FUNCTIONS
8938 # -----------------------------
8939 # Determine which file name conversion functions should be used by
8940 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8941 # for certain cross-compile configurations and native mingw.
8942 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8943 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8944 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8945 AC_MSG_CHECKING([how to convert $build file names to $host format])
8946 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8950 *-*-mingw* ) # actually msys
8951 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8954 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8956 * ) # otherwise, assume *nix
8957 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8963 *-*-mingw* ) # actually msys
8964 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8967 lt_cv_to_host_file_cmd=func_convert_file_noop
8969 * ) # otherwise, assume *nix
8970 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8974 * ) # unhandled hosts (and "normal" native builds)
8975 lt_cv_to_host_file_cmd=func_convert_file_noop
8979 to_host_file_cmd=$lt_cv_to_host_file_cmd
8980 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8981 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8982 [0], [convert $build file names to $host format])dnl
8984 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8985 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8986 [#assume ordinary cross tools, or native build.
8987 lt_cv_to_tool_file_cmd=func_convert_file_noop
8991 *-*-mingw* ) # actually msys
8992 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8998 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8999 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9000 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9001 [0], [convert $build files to toolchain format])dnl
9002 ])# _LT_PATH_CONVERSION_FUNCTIONS
9004 # Helper functions for option handling. -*- Autoconf -*-
9006 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9008 # Written by Gary V. Vaughan, 2004
9010 # This file is free software; the Free Software Foundation gives
9011 # unlimited permission to copy and/or distribute it, with or without
9012 # modifications, as long as this notice is preserved.
9014 # serial 7 ltoptions.m4
9016 # This is to help aclocal find these macros, as it can't see m4_define.
9017 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9020 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9021 # ------------------------------------------
9022 m4_define([_LT_MANGLE_OPTION],
9023 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9026 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9027 # ---------------------------------------
9028 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9029 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9031 m4_define([_LT_SET_OPTION],
9032 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9033 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9034 _LT_MANGLE_DEFUN([$1], [$2]),
9035 [m4_warning([Unknown $1 option `$2'])])[]dnl
9039 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9040 # ------------------------------------------------------------
9041 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9042 m4_define([_LT_IF_OPTION],
9043 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9046 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9047 # -------------------------------------------------------
9048 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9050 m4_define([_LT_UNLESS_OPTIONS],
9051 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9052 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9053 [m4_define([$0_found])])])[]dnl
9054 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9059 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9060 # ----------------------------------------
9061 # OPTION-LIST is a space-separated list of Libtool options associated
9062 # with MACRO-NAME. If any OPTION has a matching handler declared with
9063 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9064 # the unknown option and exit.
9065 m4_defun([_LT_SET_OPTIONS],
9067 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9068 [_LT_SET_OPTION([$1], _LT_Option)])
9070 m4_if([$1],[LT_INIT],[
9072 dnl Simply set some default values (i.e off) if boolean options were not
9074 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9076 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9079 dnl If no reference was made to various pairs of opposing options, then
9080 dnl we run the default mode handler for the pair. For example, if neither
9081 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9082 dnl archives by default:
9083 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9084 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9085 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9086 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9087 [_LT_ENABLE_FAST_INSTALL])
9093 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9094 # -----------------------------------------
9095 m4_define([_LT_MANGLE_DEFUN],
9096 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9099 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9100 # -----------------------------------------------
9101 m4_define([LT_OPTION_DEFINE],
9102 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9103 ])# LT_OPTION_DEFINE
9108 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9111 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9112 [_LT_SET_OPTION([LT_INIT], [dlopen])
9113 AC_DIAGNOSE([obsolete],
9114 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9115 put the `dlopen' option into LT_INIT's first parameter.])
9118 dnl aclocal-1.4 backwards compatibility:
9119 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9124 # Declare package support for building win32 dll's.
9125 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9126 [enable_win32_dll=yes
9129 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9130 AC_CHECK_TOOL(AS, as, false)
9131 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9132 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9136 test -z "$AS" && AS=as
9137 _LT_DECL([], [AS], [1], [Assembler program])dnl
9139 test -z "$DLLTOOL" && DLLTOOL=dlltool
9140 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9142 test -z "$OBJDUMP" && OBJDUMP=objdump
9143 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9146 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9147 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9148 _LT_SET_OPTION([LT_INIT], [win32-dll])
9149 AC_DIAGNOSE([obsolete],
9150 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9151 put the `win32-dll' option into LT_INIT's first parameter.])
9154 dnl aclocal-1.4 backwards compatibility:
9155 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9158 # _LT_ENABLE_SHARED([DEFAULT])
9159 # ----------------------------
9160 # implement the --enable-shared flag, and supports the `shared' and
9161 # `disable-shared' LT_INIT options.
9162 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9163 m4_define([_LT_ENABLE_SHARED],
9164 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9165 AC_ARG_ENABLE([shared],
9166 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9167 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9168 [p=${PACKAGE-default}
9170 yes) enable_shared=yes ;;
9171 no) enable_shared=no ;;
9174 # Look at the argument we got. We use all the common list separators.
9175 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9176 for pkg in $enableval; do
9178 if test "X$pkg" = "X$p"; then
9185 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9187 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9188 [Whether or not to build shared libraries])
9189 ])# _LT_ENABLE_SHARED
9191 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9192 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9195 AC_DEFUN([AC_ENABLE_SHARED],
9196 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9199 AC_DEFUN([AC_DISABLE_SHARED],
9200 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9203 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9204 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9206 dnl aclocal-1.4 backwards compatibility:
9207 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9208 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9212 # _LT_ENABLE_STATIC([DEFAULT])
9213 # ----------------------------
9214 # implement the --enable-static flag, and support the `static' and
9215 # `disable-static' LT_INIT options.
9216 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9217 m4_define([_LT_ENABLE_STATIC],
9218 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9219 AC_ARG_ENABLE([static],
9220 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9221 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9222 [p=${PACKAGE-default}
9224 yes) enable_static=yes ;;
9225 no) enable_static=no ;;
9228 # Look at the argument we got. We use all the common list separators.
9229 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9230 for pkg in $enableval; do
9232 if test "X$pkg" = "X$p"; then
9239 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9241 _LT_DECL([build_old_libs], [enable_static], [0],
9242 [Whether or not to build static libraries])
9243 ])# _LT_ENABLE_STATIC
9245 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9246 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9249 AC_DEFUN([AC_ENABLE_STATIC],
9250 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9253 AC_DEFUN([AC_DISABLE_STATIC],
9254 [_LT_SET_OPTION([LT_INIT], [disable-static])
9257 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9258 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9260 dnl aclocal-1.4 backwards compatibility:
9261 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9262 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9266 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9267 # ----------------------------------
9268 # implement the --enable-fast-install flag, and support the `fast-install'
9269 # and `disable-fast-install' LT_INIT options.
9270 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9271 m4_define([_LT_ENABLE_FAST_INSTALL],
9272 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9273 AC_ARG_ENABLE([fast-install],
9274 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9275 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9276 [p=${PACKAGE-default}
9278 yes) enable_fast_install=yes ;;
9279 no) enable_fast_install=no ;;
9281 enable_fast_install=no
9282 # Look at the argument we got. We use all the common list separators.
9283 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9284 for pkg in $enableval; do
9286 if test "X$pkg" = "X$p"; then
9287 enable_fast_install=yes
9293 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9295 _LT_DECL([fast_install], [enable_fast_install], [0],
9296 [Whether or not to optimize for fast installation])dnl
9297 ])# _LT_ENABLE_FAST_INSTALL
9299 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9300 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9303 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9304 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9305 AC_DIAGNOSE([obsolete],
9306 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9307 the `fast-install' option into LT_INIT's first parameter.])
9310 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9311 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9312 AC_DIAGNOSE([obsolete],
9313 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9314 the `disable-fast-install' option into LT_INIT's first parameter.])
9317 dnl aclocal-1.4 backwards compatibility:
9318 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9319 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9322 # _LT_WITH_PIC([MODE])
9323 # --------------------
9324 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9326 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9327 m4_define([_LT_WITH_PIC],
9329 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9330 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9331 [lt_p=${PACKAGE-default}
9333 yes|no) pic_mode=$withval ;;
9336 # Look at the argument we got. We use all the common list separators.
9337 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9338 for lt_pkg in $withval; do
9340 if test "X$lt_pkg" = "X$lt_p"; then
9349 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9351 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9354 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9355 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9358 AU_DEFUN([AC_LIBTOOL_PICMODE],
9359 [_LT_SET_OPTION([LT_INIT], [pic-only])
9360 AC_DIAGNOSE([obsolete],
9361 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9362 put the `pic-only' option into LT_INIT's first parameter.])
9365 dnl aclocal-1.4 backwards compatibility:
9366 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9369 m4_define([_LTDL_MODE], [])
9370 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9371 [m4_define([_LTDL_MODE], [nonrecursive])])
9372 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9373 [m4_define([_LTDL_MODE], [recursive])])
9374 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9375 [m4_define([_LTDL_MODE], [subproject])])
9377 m4_define([_LTDL_TYPE], [])
9378 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9379 [m4_define([_LTDL_TYPE], [installable])])
9380 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9381 [m4_define([_LTDL_TYPE], [convenience])])
9383 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9385 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9386 # Written by Gary V. Vaughan, 2004
9388 # This file is free software; the Free Software Foundation gives
9389 # unlimited permission to copy and/or distribute it, with or without
9390 # modifications, as long as this notice is preserved.
9392 # serial 6 ltsugar.m4
9394 # This is to help aclocal find these macros, as it can't see m4_define.
9395 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9398 # lt_join(SEP, ARG1, [ARG2...])
9399 # -----------------------------
9400 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9401 # associated separator.
9402 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9403 # versions in m4sugar had bugs.
9404 m4_define([lt_join],
9405 [m4_if([$#], [1], [],
9407 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9408 m4_define([_lt_join],
9409 [m4_if([$#$2], [2], [],
9410 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9416 # Manipulate m4 lists.
9417 # These macros are necessary as long as will still need to support
9418 # Autoconf-2.59 which quotes differently.
9419 m4_define([lt_car], [[$1]])
9421 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9423 [m4_dquote(m4_shift($@))])])
9424 m4_define([lt_unquote], $1)
9427 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9428 # ------------------------------------------
9429 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9430 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9431 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9432 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9433 # than defined and empty).
9435 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9436 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9437 m4_define([lt_append],
9439 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9443 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9444 # ----------------------------------------------------------
9445 # Produce a SEP delimited list of all paired combinations of elements of
9446 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9447 # has the form PREFIXmINFIXSUFFIXn.
9448 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9449 m4_define([lt_combine],
9450 [m4_if(m4_eval([$# > 3]), [1],
9451 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9452 [[m4_foreach([_Lt_prefix], [$2],
9453 [m4_foreach([_Lt_suffix],
9454 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9455 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9458 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9459 # -----------------------------------------------------------------------
9460 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9461 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9462 m4_define([lt_if_append_uniq],
9464 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9465 [lt_append([$1], [$2], [$3])$4],
9467 [lt_append([$1], [$2], [$3])$4])])
9470 # lt_dict_add(DICT, KEY, VALUE)
9471 # -----------------------------
9472 m4_define([lt_dict_add],
9473 [m4_define([$1($2)], [$3])])
9476 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9477 # --------------------------------------------
9478 m4_define([lt_dict_add_subkey],
9479 [m4_define([$1($2:$3)], [$4])])
9482 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9483 # ----------------------------------
9484 m4_define([lt_dict_fetch],
9486 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9487 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9490 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9491 # -----------------------------------------------------------------
9492 m4_define([lt_if_dict_fetch],
9493 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9498 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9499 # --------------------------------------------------------------
9500 m4_define([lt_dict_filter],
9501 [m4_if([$5], [], [],
9502 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9503 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9504 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9507 # ltversion.m4 -- version numbers -*- Autoconf -*-
9509 # Copyright (C) 2004 Free Software Foundation, Inc.
9510 # Written by Scott James Remnant, 2004
9512 # This file is free software; the Free Software Foundation gives
9513 # unlimited permission to copy and/or distribute it, with or without
9514 # modifications, as long as this notice is preserved.
9518 # serial 3337 ltversion.m4
9519 # This file is part of GNU Libtool
9521 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9522 m4_define([LT_PACKAGE_REVISION], [1.3337])
9524 AC_DEFUN([LTVERSION_VERSION],
9525 [macro_version='2.4.2'
9526 macro_revision='1.3337'
9527 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9528 _LT_DECL(, macro_revision, 0)
9531 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9533 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9534 # Written by Scott James Remnant, 2004.
9536 # This file is free software; the Free Software Foundation gives
9537 # unlimited permission to copy and/or distribute it, with or without
9538 # modifications, as long as this notice is preserved.
9540 # serial 5 lt~obsolete.m4
9542 # These exist entirely to fool aclocal when bootstrapping libtool.
9544 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9545 # which have later been changed to m4_define as they aren't part of the
9546 # exported API, or moved to Autoconf or Automake where they belong.
9548 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9549 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9550 # using a macro with the same name in our local m4/libtool.m4 it'll
9551 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9552 # and doesn't know about Autoconf macros at all.)
9554 # So we provide this file, which has a silly filename so it's always
9555 # included after everything else. This provides aclocal with the
9556 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9557 # because those macros already exist, or will be overwritten later.
9558 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9560 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9561 # Yes, that means every name once taken will need to remain here until
9562 # we give up compatibility with versions before 1.7, at which point
9563 # we need to keep only those names which we still refer to.
9565 # This is to help aclocal find these macros, as it can't see m4_define.
9566 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9568 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9569 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9570 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9571 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9572 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9573 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9574 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9575 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9576 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9577 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9578 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9579 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9580 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9581 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9582 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9583 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9584 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9585 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9586 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9587 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9588 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9589 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9590 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9591 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9592 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9593 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9594 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9595 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9596 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9597 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9598 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9599 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9600 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9601 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9602 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9603 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9604 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9605 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9606 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9607 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9608 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9609 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9610 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9611 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9612 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9613 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9614 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9615 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9616 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9617 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9618 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9619 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9620 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9621 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9622 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9623 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9624 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9625 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9626 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
9627 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
9628 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
9630 # nls.m4 serial 5 (gettext-0.18)
9631 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
9633 dnl This file is free software; the Free Software Foundation
9634 dnl gives unlimited permission to copy and/or distribute it,
9635 dnl with or without modifications, as long as this notice is preserved.
9637 dnl This file can can be used in projects which are not available under
9638 dnl the GNU General Public License or the GNU Library General Public
9639 dnl License but which still want to provide support for the GNU gettext
9641 dnl Please note that the actual code of the GNU gettext library is covered
9642 dnl by the GNU Library General Public License, and the rest of the GNU
9643 dnl gettext package package is covered by the GNU General Public License.
9644 dnl They are *not* in the public domain.
9647 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9648 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9654 AC_MSG_CHECKING([whether NLS is requested])
9655 dnl Default is enabled NLS
9656 AC_ARG_ENABLE([nls],
9657 [ --disable-nls do not use Native Language Support],
9658 USE_NLS=$enableval, USE_NLS=yes)
9659 AC_MSG_RESULT([$USE_NLS])
9663 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9664 # serial 1 (pkg-config-0.24)
9666 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9668 # This program is free software; you can redistribute it and/or modify
9669 # it under the terms of the GNU General Public License as published by
9670 # the Free Software Foundation; either version 2 of the License, or
9671 # (at your option) any later version.
9673 # This program is distributed in the hope that it will be useful, but
9674 # WITHOUT ANY WARRANTY; without even the implied warranty of
9675 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9676 # General Public License for more details.
9678 # You should have received a copy of the GNU General Public License
9679 # along with this program; if not, write to the Free Software
9680 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9682 # As a special exception to the GNU General Public License, if you
9683 # distribute this file as part of a program that contains a
9684 # configuration script generated by Autoconf, you may include it under
9685 # the same distribution terms that you use for the rest of that program.
9687 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9688 # ----------------------------------
9689 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9690 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9691 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9692 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9693 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9694 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9695 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9697 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9698 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9700 if test -n "$PKG_CONFIG"; then
9701 _pkg_min_version=m4_default([$1], [0.9.0])
9702 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9703 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9704 AC_MSG_RESULT([yes])
9710 ])# PKG_PROG_PKG_CONFIG
9712 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9714 # Check to see whether a particular set of modules exists. Similar
9715 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9717 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9718 # only at the first occurence in configure.ac, so if the first place
9719 # it's called might be skipped (such as if it is within an "if", you
9720 # have to call PKG_CHECK_EXISTS manually
9721 # --------------------------------------------------------------
9722 AC_DEFUN([PKG_CHECK_EXISTS],
9723 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9724 if test -n "$PKG_CONFIG" && \
9725 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9726 m4_default([$2], [:])
9727 m4_ifvaln([$3], [else
9731 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9732 # ---------------------------------------------
9733 m4_define([_PKG_CONFIG],
9734 [if test -n "$$1"; then
9736 elif test -n "$PKG_CONFIG"; then
9737 PKG_CHECK_EXISTS([$3],
9738 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9739 test "x$?" != "x0" && pkg_failed=yes ],
9746 # _PKG_SHORT_ERRORS_SUPPORTED
9747 # -----------------------------
9748 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9749 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9750 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9751 _pkg_short_errors_supported=yes
9753 _pkg_short_errors_supported=no
9755 ])# _PKG_SHORT_ERRORS_SUPPORTED
9758 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9759 # [ACTION-IF-NOT-FOUND])
9762 # Note that if there is a possibility the first call to
9763 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9764 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9767 # --------------------------------------------------------------
9768 AC_DEFUN([PKG_CHECK_MODULES],
9769 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9770 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9771 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9774 AC_MSG_CHECKING([for $1])
9776 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9777 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9779 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9780 and $1[]_LIBS to avoid the need to call pkg-config.
9781 See the pkg-config man page for more details.])
9783 if test $pkg_failed = yes; then
9785 _PKG_SHORT_ERRORS_SUPPORTED
9786 if test $_pkg_short_errors_supported = yes; then
9787 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9789 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9791 # Put the nasty error message in config.log where it belongs
9792 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9794 m4_default([$4], [AC_MSG_ERROR(
9795 [Package requirements ($2) were not met:
9799 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9800 installed software in a non-standard prefix.
9804 elif test $pkg_failed = untried; then
9806 m4_default([$4], [AC_MSG_FAILURE(
9807 [The pkg-config script could not be found or is too old. Make sure it
9808 is in your PATH or set the PKG_CONFIG environment variable to the full
9813 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9816 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9817 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9818 AC_MSG_RESULT([yes])
9821 ])# PKG_CHECK_MODULES
9823 AC_DEFUN([YELP_HELP_INIT],
9825 AC_REQUIRE([AC_PROG_LN_S])
9826 m4_pattern_allow([AM_V_at])
9827 m4_pattern_allow([AM_V_GEN])
9828 m4_pattern_allow([AM_DEFAULT_VERBOSITY])
9829 AC_ARG_WITH([help-dir],
9830 AC_HELP_STRING([--with-help-dir=DIR],
9831 [path where help files are installed]),,
9832 [with_help_dir='${datadir}/help'])
9833 HELP_DIR="$with_help_dir"
9836 AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
9837 AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
9838 if test x"$ITSTOOL" = x; then
9839 AC_MSG_ERROR([itstool not found])
9842 AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
9843 AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
9844 if test x"$XMLLINT" = x; then
9845 AC_MSG_ERROR([xmllint not found])
9856 _HELP_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),$(filter $(LINGUAS),$(HELP_LINGUAS)),$(HELP_LINGUAS))
9857 _HELP_POTFILE = $(if $(HELP_POT),$(HELP_POT),$(if $(HELP_ID),$(HELP_ID).pot))
9858 _HELP_POFILES = $(if $(HELP_ID),$(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).po))
9859 _HELP_MOFILES = $(patsubst %.po,%.mo,$(_HELP_POFILES))
9860 _HELP_C_FILES = $(foreach f,$(HELP_FILES),C/$(f))
9861 _HELP_C_EXTRA = $(foreach f,$(HELP_EXTRA),C/$(f))
9862 _HELP_C_MEDIA = $(foreach f,$(HELP_MEDIA),C/$(f))
9863 _HELP_LC_FILES = $(foreach lc,$(_HELP_LINGUAS),$(foreach f,$(HELP_FILES),$(lc)/$(f)))
9864 _HELP_LC_STAMPS = $(foreach lc,$(_HELP_LINGUAS),$(lc)/$(lc).stamp)
9866 _HELP_DEFAULT_V = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
9867 _HELP_V = $(if $(V),$(V),$(_HELP_DEFAULT_V))
9868 _HELP_LC_VERBOSE = $(_HELP_LC_VERBOSE_$(_HELP_V))
9869 _HELP_LC_VERBOSE_ = $(_HELP_LC_VERBOSE_$(_HELP_DEFAULT_V))
9870 _HELP_LC_VERBOSE_0 = @echo " GEN "$(dir [$]@);
9872 all: $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA) $(_HELP_LC_FILES) $(_HELP_POFILES)
9875 pot: $(_HELP_POTFILE)
9876 $(_HELP_POTFILE): $(_HELP_C_FILES) $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9877 $(AM_V_GEN)if test -d "C"; then d=; else d="$(srcdir)/"; fi; \
9878 $(ITSTOOL) -o "[$]@" $(foreach f,$(_HELP_C_FILES),"$${d}$(f)")
9881 repo: $(_HELP_POTFILE)
9882 $(AM_V_at)for po in $(_HELP_POFILES); do \
9883 if test "x[$](_HELP_V)" = "x0"; then echo " GEN $${po}"; fi; \
9884 msgmerge -q -o "$${po}" "$${po}" "$(_HELP_POTFILE)"; \
9888 $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9889 $(AM_V_at)if test ! -f "[$]@" -a -f "$(srcdir)/[$]@"; then cp "$(srcdir)/[$]@" "[$]@"; fi
9890 $(AM_V_GEN)if ! test -f "[$]@"; then \
9891 (cd "$(dir [$]@)" && \
9892 $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9893 mv "$(notdir [$]@).tmp" "$(notdir [$]@)"); \
9895 (cd "$(dir [$]@)" && \
9896 $(ITSTOOL) -o "$(notdir [$]@).tmp" $(_HELP_C_FILES) && \
9897 msgmerge -o "$(notdir [$]@)" "$(notdir [$]@)" "$(notdir [$]@).tmp" && \
9898 rm "$(notdir [$]@).tmp"); \
9901 $(_HELP_MOFILES): %.mo: %.po
9902 $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9903 $(AM_V_GEN)msgfmt -o "[$]@" "$<"
9905 $(_HELP_LC_FILES): $(_HELP_LINGUAS)
9906 $(_HELP_LINGUAS): $(_HELP_LC_STAMPS)
9907 $(_HELP_LC_STAMPS): %.stamp: %.mo
9908 $(_HELP_LC_STAMPS): $(_HELP_C_FILES) $(_HELP_C_EXTRA)
9909 $(AM_V_at)if ! test -d "$(dir [$]@)"; then mkdir "$(dir [$]@)"; fi
9910 $(_HELP_LC_VERBOSE)if test -d "C"; then d="../"; else d="$(abs_srcdir)/"; fi; \
9911 mo="$(dir [$]@)$(patsubst %/$(notdir [$]@),%,[$]@).mo"; \
9912 if test -f "$${mo}"; then mo="../$${mo}"; else mo="$(abs_srcdir)/$${mo}"; fi; \
9913 (cd "$(dir [$]@)" && $(ITSTOOL) -m "$${mo}" $(foreach f,$(_HELP_C_FILES),$${d}/$(f))) && \
9917 mostlyclean-am: $(if $(HELP_ID),clean-help)
9919 rm -f $(_HELP_LC_FILES) $(_HELP_LC_STAMPS) $(_HELP_MOFILES)
9922 EXTRA_DIST += $(_HELP_C_EXTRA) $(_HELP_C_MEDIA)
9923 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).stamp)
9924 EXTRA_DIST += $(foreach lc,$(HELP_LINGUAS),$(lc)/$(lc).po)
9925 EXTRA_DIST += $(foreach f,$(HELP_MEDIA),$(foreach lc,$(HELP_LINGUAS),$(wildcard $(lc)/$(f))))
9927 distdir: distdir-help-files
9929 @for lc in C $(HELP_LINGUAS); do \
9930 $(MKDIR_P) "$(distdir)/$$lc"; \
9931 for file in $(HELP_FILES); do \
9932 if test -f "$$lc/$$file"; then d=./; else d=$(srcdir)/; fi; \
9933 cp -p "$$d$$lc/$$file" "$(distdir)/$$lc/" || exit 1; \
9940 for lc in C $(_HELP_LINGUAS); do \
9941 if test -d "$$lc"; \
9946 xmlpath="$$lc:$(srcdir)/$$lc"; \
9948 for page in $(HELP_FILES); do \
9949 echo "$(XMLLINT) --noout --noent --path $$xmlpath --xinclude $$d$$lc/$$page"; \
9950 $(XMLLINT) --noout --noent --path "$$xmlpath" --xinclude "$$d$$lc/$$page"; \
9955 .PHONY: install-help
9956 install-data-am: $(if $(HELP_ID),install-help)
9958 @for lc in C $(_HELP_LINGUAS); do \
9959 $(mkinstalldirs) "$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)" || exit 1; \
9961 @for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
9962 if test -f "$$lc/$$f"; then d=; else d="$(srcdir)/"; fi; \
9963 helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9964 if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
9965 echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir`basename $$f`"; \
9966 $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir`basename $$f`" || exit 1; \
9968 @for f in $(_HELP_C_EXTRA); do \
9969 lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
9970 if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
9971 helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9972 if ! test -d "$$helpdir"; then $(mkinstalldirs) "$$helpdir"; fi; \
9973 echo "$(INSTALL_DATA) $$d$$f $$helpdir`basename $$f`"; \
9974 $(INSTALL_DATA) "$$d$$f" "$$helpdir`basename $$f`" || exit 1; \
9976 @for f in $(HELP_MEDIA); do \
9977 for lc in C $(_HELP_LINGUAS); do \
9978 if test -f "$$lc$$f"; then d=; else d="$(srcdir)/"; fi; \
9979 helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9980 mdir=`dirname "$$f"`; \
9981 if test "x$mdir" = "x."; then mdir=""; fi; \
9982 if ! test -d "$$helpdir$$mdir"; then $(mkinstalldirs) "$$helpdir$$mdir"; fi; \
9983 if test -f "$$d$$lc/$$f"; then \
9984 echo "$(INSTALL_DATA) $$d$$lc/$$f $$helpdir$$f"; \
9985 $(INSTALL_DATA) "$$d$$lc/$$f" "$$helpdir$$f" || exit 1; \
9986 elif test "x$$lc" != "xC"; then \
9987 echo "$(LN_S) -f $(HELP_DIR)/C/$(HELP_ID)/$$f $$helpdir$$f"; \
9988 $(LN_S) -f "$(HELP_DIR)/C/$(HELP_ID)/$$f" "$$helpdir$$f" || exit 1; \
9993 .PHONY: uninstall-help
9994 uninstall-am: $(if $(HELP_ID),uninstall-help)
9996 for lc in C $(_HELP_LINGUAS); do for f in $(HELP_FILES); do \
9997 helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
9998 echo "rm -f $$helpdir`basename $$f`"; \
9999 rm -f "$$helpdir`basename $$f`"; \
10001 @for f in $(_HELP_C_EXTRA); do \
10002 lc=`dirname "$$f"`; lc=`basename "$$lc"`; \
10003 helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10004 echo "rm -f $$helpdir`basename $$f`"; \
10005 rm -f "$$helpdir`basename $$f`"; \
10007 @for f in $(HELP_MEDIA); do \
10008 for lc in C $(_HELP_LINGUAS); do \
10009 helpdir="$(DESTDIR)$(HELP_DIR)/$$lc/$(HELP_ID)/"; \
10010 echo "rm -f $$helpdir$$f"; \
10011 rm -f "$$helpdir$$f"; \
10015 AC_SUBST([YELP_HELP_RULES])
10016 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([YELP_HELP_RULES])])
10019 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
10021 # This file is free software; the Free Software Foundation
10022 # gives unlimited permission to copy and/or distribute it,
10023 # with or without modifications, as long as this notice is preserved.
10025 # AM_AUTOMAKE_VERSION(VERSION)
10026 # ----------------------------
10027 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10028 # generated from the m4 files accompanying Automake X.Y.
10029 # (This private macro should not be called outside this file.)
10030 AC_DEFUN([AM_AUTOMAKE_VERSION],
10031 [am__api_version='1.14'
10032 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10033 dnl require some minimum version. Point them to the right macro.
10034 m4_if([$1], [1.14.1], [],
10035 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10038 # _AM_AUTOCONF_VERSION(VERSION)
10039 # -----------------------------
10040 # aclocal traces this macro to find the Autoconf version.
10041 # This is a private macro too. Using m4_define simplifies
10042 # the logic in aclocal, which can simply ignore this definition.
10043 m4_define([_AM_AUTOCONF_VERSION], [])
10045 # AM_SET_CURRENT_AUTOMAKE_VERSION
10046 # -------------------------------
10047 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10048 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10049 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10050 [AM_AUTOMAKE_VERSION([1.14.1])dnl
10051 m4_ifndef([AC_AUTOCONF_VERSION],
10052 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10053 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10055 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
10057 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10059 # This file is free software; the Free Software Foundation
10060 # gives unlimited permission to copy and/or distribute it,
10061 # with or without modifications, as long as this notice is preserved.
10063 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10064 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
10065 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
10067 # Of course, Automake must honor this variable whenever it calls a
10068 # tool from the auxiliary directory. The problem is that $srcdir (and
10069 # therefore $ac_aux_dir as well) can be either absolute or relative,
10070 # depending on how configure is run. This is pretty annoying, since
10071 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10072 # source directory, any form will work fine, but in subdirectories a
10073 # relative path needs to be adjusted first.
10075 # $ac_aux_dir/missing
10076 # fails when called from a subdirectory if $ac_aux_dir is relative
10077 # $top_srcdir/$ac_aux_dir/missing
10078 # fails if $ac_aux_dir is absolute,
10079 # fails when called from a subdirectory in a VPATH build with
10080 # a relative $ac_aux_dir
10082 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10083 # are both prefixed by $srcdir. In an in-source build this is usually
10084 # harmless because $srcdir is '.', but things will broke when you
10085 # start a VPATH build or use an absolute $srcdir.
10087 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10088 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
10089 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10090 # and then we would define $MISSING as
10091 # MISSING="\${SHELL} $am_aux_dir/missing"
10092 # This will work as long as MISSING is not called from configure, because
10093 # unfortunately $(top_srcdir) has no meaning in configure.
10094 # However there are other variables, like CC, which are often used in
10095 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10097 # Another solution, used here, is to always expand $ac_aux_dir to an
10098 # absolute PATH. The drawback is that using absolute paths prevent a
10099 # configured tree to be moved without reconfiguration.
10101 AC_DEFUN([AM_AUX_DIR_EXPAND],
10102 [dnl Rely on autoconf to set up CDPATH properly.
10103 AC_PREREQ([2.50])dnl
10104 # expand $ac_aux_dir to an absolute path
10105 am_aux_dir=`cd $ac_aux_dir && pwd`
10108 # AM_CONDITIONAL -*- Autoconf -*-
10110 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10112 # This file is free software; the Free Software Foundation
10113 # gives unlimited permission to copy and/or distribute it,
10114 # with or without modifications, as long as this notice is preserved.
10116 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10117 # -------------------------------------
10118 # Define a conditional.
10119 AC_DEFUN([AM_CONDITIONAL],
10120 [AC_PREREQ([2.52])dnl
10121 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
10122 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10123 AC_SUBST([$1_TRUE])dnl
10124 AC_SUBST([$1_FALSE])dnl
10125 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10126 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10127 m4_define([_AM_COND_VALUE_$1], [$2])dnl
10135 AC_CONFIG_COMMANDS_PRE(
10136 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10137 AC_MSG_ERROR([[conditional "$1" was never defined.
10138 Usually this means the macro was only invoked conditionally.]])
10141 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10143 # This file is free software; the Free Software Foundation
10144 # gives unlimited permission to copy and/or distribute it,
10145 # with or without modifications, as long as this notice is preserved.
10148 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
10149 # written in clear, in which case automake, when reading aclocal.m4,
10150 # will think it sees a *use*, and therefore will trigger all it's
10151 # C support machinery. Also note that it means that autoscan, seeing
10152 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10155 # _AM_DEPENDENCIES(NAME)
10156 # ----------------------
10157 # See how the compiler implements dependency checking.
10158 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
10159 # We try a few techniques and use that to set a single cache variable.
10161 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10162 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10163 # dependency, and given that the user is not expected to run this macro,
10164 # just rely on AC_PROG_CC.
10165 AC_DEFUN([_AM_DEPENDENCIES],
10166 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10167 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10168 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10169 AC_REQUIRE([AM_DEP_TRACK])dnl
10171 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
10172 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
10173 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10174 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
10175 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
10176 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
10177 [depcc="$$1" am_compiler_list=])
10179 AC_CACHE_CHECK([dependency style of $depcc],
10180 [am_cv_$1_dependencies_compiler_type],
10181 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10182 # We make a subdir and do the tests there. Otherwise we can end up
10183 # making bogus files that we don't know about and never remove. For
10184 # instance it was reported that on HP-UX the gcc test will end up
10185 # making a dummy file named 'D' -- because '-MD' means "put the output
10187 rm -rf conftest.dir
10189 # Copy depcomp to subdir because otherwise we won't find it if we're
10190 # using a relative directory.
10191 cp "$am_depcomp" conftest.dir
10193 # We will build objects and dependencies in a subdirectory because
10194 # it helps to detect inapplicable dependency modes. For instance
10195 # both Tru64's cc and ICC support -MD to output dependencies as a
10196 # side effect of compilation, but ICC will put the dependencies in
10197 # the current directory while Tru64 will put them in the object
10201 am_cv_$1_dependencies_compiler_type=none
10202 if test "$am_compiler_list" = ""; then
10203 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10205 am__universal=false
10206 m4_case([$1], [CC],
10207 [case " $depcc " in #(
10208 *\ -arch\ *\ -arch\ *) am__universal=true ;;
10211 [case " $depcc " in #(
10212 *\ -arch\ *\ -arch\ *) am__universal=true ;;
10215 for depmode in $am_compiler_list; do
10216 # Setup a source with many dependencies, because some compilers
10217 # like to wrap large dependency lists on column 80 (with \), and
10218 # we should not choose a depcomp mode which is confused by this.
10220 # We need to recreate these files for each test, as the compiler may
10221 # overwrite some of them when testing with obscure command lines.
10222 # This happens at least with the AIX C compiler.
10224 for i in 1 2 3 4 5 6; do
10225 echo '#include "conftst'$i'.h"' >> sub/conftest.c
10226 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10227 # Solaris 10 /bin/sh.
10228 echo '/* dummy */' > sub/conftst$i.h
10230 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10232 # We check with '-c' and '-o' for the sake of the "dashmstdout"
10233 # mode. It turns out that the SunPro C++ compiler does not properly
10234 # handle '-M -o', and we need to detect this. Also, some Intel
10235 # versions had trouble with output in subdirs.
10236 am__obj=sub/conftest.${OBJEXT-o}
10237 am__minus_obj="-o $am__obj"
10240 # This depmode causes a compiler race in universal mode.
10241 test "$am__universal" = false || continue
10244 # After this tag, mechanisms are not by side-effect, so they'll
10245 # only be used when explicitly requested.
10246 if test "x$enable_dependency_tracking" = xyes; then
10252 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10253 # This compiler won't grok '-c -o', but also, the minuso test has
10254 # not run yet. These depmodes are late enough in the game, and
10255 # so weak that their functioning should not be impacted.
10256 am__obj=conftest.${OBJEXT-o}
10261 if depmode=$depmode \
10262 source=sub/conftest.c object=$am__obj \
10263 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10264 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10265 >/dev/null 2>conftest.err &&
10266 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10267 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10268 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10269 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10270 # icc doesn't choke on unknown options, it will just issue warnings
10271 # or remarks (even with -Werror). So we grep stderr for any message
10272 # that says an option was ignored or not supported.
10273 # When given -MP, icc 7.0 and 7.1 complain thusly:
10274 # icc: Command line warning: ignoring option '-M'; no argument required
10275 # The diagnosis changed in icc 8.0:
10276 # icc: Command line remark: option '-MP' not supported
10277 if (grep 'ignoring option' conftest.err ||
10278 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10279 am_cv_$1_dependencies_compiler_type=$depmode
10286 rm -rf conftest.dir
10288 am_cv_$1_dependencies_compiler_type=none
10291 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10292 AM_CONDITIONAL([am__fastdep$1], [
10293 test "x$enable_dependency_tracking" != xno \
10294 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10300 # Choose a directory name for dependency files.
10301 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
10302 AC_DEFUN([AM_SET_DEPDIR],
10303 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10304 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10310 AC_DEFUN([AM_DEP_TRACK],
10311 [AC_ARG_ENABLE([dependency-tracking], [dnl
10313 [--enable-dependency-tracking],
10314 [do not reject slow dependency extractors])
10316 [--disable-dependency-tracking],
10317 [speeds up one-time build])])
10318 if test "x$enable_dependency_tracking" != xno; then
10319 am_depcomp="$ac_aux_dir/depcomp"
10323 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10324 AC_SUBST([AMDEPBACKSLASH])dnl
10325 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10326 AC_SUBST([am__nodep])dnl
10327 _AM_SUBST_NOTMAKE([am__nodep])dnl
10330 # Generate code to set up dependency tracking. -*- Autoconf -*-
10332 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10334 # This file is free software; the Free Software Foundation
10335 # gives unlimited permission to copy and/or distribute it,
10336 # with or without modifications, as long as this notice is preserved.
10339 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10340 # ------------------------------
10341 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10343 # Older Autoconf quotes --file arguments for eval, but not when files
10344 # are listed without --file. Let's play safe and only enable the eval
10345 # if we detect the quoting.
10346 case $CONFIG_FILES in
10347 *\'*) eval set x "$CONFIG_FILES" ;;
10348 *) set x $CONFIG_FILES ;;
10353 # Strip MF so we end up with the name of the file.
10354 mf=`echo "$mf" | sed -e 's/:.*$//'`
10355 # Check whether this is an Automake generated Makefile or not.
10356 # We used to match only the files named 'Makefile.in', but
10357 # some people rename them; so instead we look at the file content.
10358 # Grep'ing the first line is not enough: some people post-process
10359 # each Makefile.in and add a new line on top of each file to say so.
10360 # Grep'ing the whole file is not good either: AIX grep has a line
10361 # limit of 2048, but all sed's we know have understand at least 4000.
10362 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10363 dirpart=`AS_DIRNAME("$mf")`
10367 # Extract the definition of DEPDIR, am__include, and am__quote
10368 # from the Makefile without running 'make'.
10369 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10370 test -z "$DEPDIR" && continue
10371 am__include=`sed -n 's/^am__include = //p' < "$mf"`
10372 test -z "$am__include" && continue
10373 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10374 # Find all dependency output files, they are included files with
10375 # $(DEPDIR) in their names. We invoke sed twice because it is the
10376 # simplest approach to changing $(DEPDIR) to its actual value in the
10378 for file in `sed -n "
10379 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10380 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
10381 # Make sure the directory exists.
10382 test -f "$dirpart/$file" && continue
10383 fdir=`AS_DIRNAME(["$file"])`
10384 AS_MKDIR_P([$dirpart/$fdir])
10385 # echo "creating $dirpart/$file"
10386 echo '# dummy' > "$dirpart/$file"
10390 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10393 # AM_OUTPUT_DEPENDENCY_COMMANDS
10394 # -----------------------------
10395 # This macro should only be invoked once -- use via AC_REQUIRE.
10397 # This code is only required when automatic dependency tracking
10398 # is enabled. FIXME. This creates each '.P' file that we will
10399 # need in order to bootstrap the dependency handling code.
10400 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10401 [AC_CONFIG_COMMANDS([depfiles],
10402 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10403 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10406 # Do all the work for Automake. -*- Autoconf -*-
10408 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10410 # This file is free software; the Free Software Foundation
10411 # gives unlimited permission to copy and/or distribute it,
10412 # with or without modifications, as long as this notice is preserved.
10414 # This macro actually does too much. Some checks are only needed if
10415 # your package does certain things. But this isn't really a big deal.
10417 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
10418 m4_define([AC_PROG_CC],
10419 m4_defn([AC_PROG_CC])
10423 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10424 # AM_INIT_AUTOMAKE([OPTIONS])
10425 # -----------------------------------------------
10426 # The call with PACKAGE and VERSION arguments is the old style
10427 # call (pre autoconf-2.50), which is being phased out. PACKAGE
10428 # and VERSION should now be passed to AC_INIT and removed from
10429 # the call to AM_INIT_AUTOMAKE.
10430 # We support both call styles for the transition. After
10431 # the next Automake release, Autoconf can make the AC_INIT
10432 # arguments mandatory, and then we can depend on a new Autoconf
10433 # release and drop the old call support.
10434 AC_DEFUN([AM_INIT_AUTOMAKE],
10435 [AC_PREREQ([2.65])dnl
10436 dnl Autoconf wants to disallow AM_ names. We explicitly allow
10437 dnl the ones we care about.
10438 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10439 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10440 AC_REQUIRE([AC_PROG_INSTALL])dnl
10441 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10442 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10443 # is not polluted with repeated "-I."
10444 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10445 # test to see if srcdir already configured
10446 if test -f $srcdir/config.status; then
10447 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10451 # test whether we have cygpath
10452 if test -z "$CYGPATH_W"; then
10453 if (cygpath --version) >/dev/null 2>/dev/null; then
10454 CYGPATH_W='cygpath -w'
10459 AC_SUBST([CYGPATH_W])
10461 # Define the identity of the package.
10462 dnl Distinguish between old-style and new-style calls.
10464 [AC_DIAGNOSE([obsolete],
10465 [$0: two- and three-arguments forms are deprecated.])
10466 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10467 AC_SUBST([PACKAGE], [$1])dnl
10468 AC_SUBST([VERSION], [$2])],
10469 [_AM_SET_OPTIONS([$1])dnl
10470 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10472 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
10474 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10475 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10476 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10478 _AM_IF_OPTION([no-define],,
10479 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
10480 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
10482 # Some tools Automake needs.
10483 AC_REQUIRE([AM_SANITY_CHECK])dnl
10484 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10485 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
10486 AM_MISSING_PROG([AUTOCONF], [autoconf])
10487 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
10488 AM_MISSING_PROG([AUTOHEADER], [autoheader])
10489 AM_MISSING_PROG([MAKEINFO], [makeinfo])
10490 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10491 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10492 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10493 # For better backward compatibility. To be removed once Automake 1.9.x
10494 # dies out for good. For more background, see:
10495 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
10496 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
10497 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
10498 # We need awk for the "check" target. The system "awk" is bad on
10500 AC_REQUIRE([AC_PROG_AWK])dnl
10501 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10502 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10503 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10504 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10505 [_AM_PROG_TAR([v7])])])
10506 _AM_IF_OPTION([no-dependencies],,
10507 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10508 [_AM_DEPENDENCIES([CC])],
10509 [m4_define([AC_PROG_CC],
10510 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
10511 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10512 [_AM_DEPENDENCIES([CXX])],
10513 [m4_define([AC_PROG_CXX],
10514 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
10515 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10516 [_AM_DEPENDENCIES([OBJC])],
10517 [m4_define([AC_PROG_OBJC],
10518 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
10519 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
10520 [_AM_DEPENDENCIES([OBJCXX])],
10521 [m4_define([AC_PROG_OBJCXX],
10522 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
10524 AC_REQUIRE([AM_SILENT_RULES])dnl
10525 dnl The testsuite driver may need to know about EXEEXT, so add the
10526 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
10527 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
10528 AC_CONFIG_COMMANDS_PRE(dnl
10529 [m4_provide_if([_AM_COMPILER_EXEEXT],
10530 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10532 # POSIX will say in a future version that running "rm -f" with no argument
10533 # is OK; and we want to be able to make that assumption in our Makefile
10534 # recipes. So use an aggressive probe to check that the usage we want is
10535 # actually supported "in the wild" to an acceptable degree.
10536 # See automake bug#10828.
10537 # To make any issue more visible, cause the running configure to be aborted
10538 # by default if the 'rm' program in use doesn't match our expectations; the
10539 # user can still override this though.
10540 if rm -f && rm -fr && rm -rf; then : OK; else
10544 Your 'rm' program seems unable to run without file operands specified
10545 on the command line, even when the '-f' option is present. This is contrary
10546 to the behaviour of most rm programs out there, and not conforming with
10547 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
10549 Please tell bug-automake@gnu.org about your system, including the value
10550 of your $PATH and any error possibly output before this message. This
10551 can help us improve future automake versions.
10554 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
10555 echo 'Configuration will proceed anyway, since you have set the' >&2
10556 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
10560 Aborting the configuration process, to ensure you take notice of the issue.
10562 You can download and install GNU coreutils to get an 'rm' implementation
10563 that behaves properly: <http://www.gnu.org/software/coreutils/>.
10565 If you want to complete the configuration process using your problematic
10566 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
10567 to "yes", and re-run configure.
10570 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
10574 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
10575 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10576 dnl mangled by Autoconf and run in a shell conditional statement.
10577 m4_define([_AC_COMPILER_EXEEXT],
10578 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10580 # When config.status generates a header, we must update the stamp-h file.
10581 # This file resides in the same directory as the config header
10582 # that is generated. The stamp files are numbered to have different names.
10584 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10585 # loop where config.status creates the headers, so we can generate
10586 # our stamp files there.
10587 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10588 [# Compute $1's index in $config_headers.
10591 for _am_header in $config_headers :; do
10592 case $_am_header in
10593 $_am_arg | $_am_arg:* )
10596 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10599 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10601 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10603 # This file is free software; the Free Software Foundation
10604 # gives unlimited permission to copy and/or distribute it,
10605 # with or without modifications, as long as this notice is preserved.
10607 # AM_PROG_INSTALL_SH
10608 # ------------------
10609 # Define $install_sh.
10610 AC_DEFUN([AM_PROG_INSTALL_SH],
10611 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10612 if test x"${install_sh}" != xset; then
10613 case $am_aux_dir in
10615 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10617 install_sh="\${SHELL} $am_aux_dir/install-sh"
10620 AC_SUBST([install_sh])])
10622 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
10624 # This file is free software; the Free Software Foundation
10625 # gives unlimited permission to copy and/or distribute it,
10626 # with or without modifications, as long as this notice is preserved.
10628 # Check whether the underlying file-system supports filenames
10629 # with a leading dot. For instance MS-DOS doesn't.
10630 AC_DEFUN([AM_SET_LEADING_DOT],
10631 [rm -rf .tst 2>/dev/null
10632 mkdir .tst 2>/dev/null
10633 if test -d .tst; then
10638 rmdir .tst 2>/dev/null
10639 AC_SUBST([am__leading_dot])])
10641 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
10642 # From Jim Meyering
10644 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10646 # This file is free software; the Free Software Foundation
10647 # gives unlimited permission to copy and/or distribute it,
10648 # with or without modifications, as long as this notice is preserved.
10650 # AM_MAINTAINER_MODE([DEFAULT-MODE])
10651 # ----------------------------------
10652 # Control maintainer-specific portions of Makefiles.
10653 # Default is to disable them, unless 'enable' is passed literally.
10654 # For symmetry, 'disable' may be passed as well. Anyway, the user
10655 # can override the default with the --enable/--disable switch.
10656 AC_DEFUN([AM_MAINTAINER_MODE],
10657 [m4_case(m4_default([$1], [disable]),
10658 [enable], [m4_define([am_maintainer_other], [disable])],
10659 [disable], [m4_define([am_maintainer_other], [enable])],
10660 [m4_define([am_maintainer_other], [enable])
10661 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
10662 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10663 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
10664 AC_ARG_ENABLE([maintainer-mode],
10665 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
10666 am_maintainer_other[ make rules and dependencies not useful
10667 (and sometimes confusing) to the casual installer])],
10668 [USE_MAINTAINER_MODE=$enableval],
10669 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
10670 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10671 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
10672 MAINT=$MAINTAINER_MODE_TRUE
10673 AC_SUBST([MAINT])dnl
10677 # Check to see how 'make' treats includes. -*- Autoconf -*-
10679 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10681 # This file is free software; the Free Software Foundation
10682 # gives unlimited permission to copy and/or distribute it,
10683 # with or without modifications, as long as this notice is preserved.
10685 # AM_MAKE_INCLUDE()
10686 # -----------------
10687 # Check to see how make treats includes.
10688 AC_DEFUN([AM_MAKE_INCLUDE],
10689 [am_make=${MAKE-make}
10690 cat > confinc << 'END'
10692 @echo this is the am__doit target
10695 # If we don't find an include directive, just comment out the code.
10696 AC_MSG_CHECKING([for style of include used by $am_make])
10700 # First try GNU make style include.
10701 echo "include confinc" > confmf
10702 # Ignore all kinds of additional output from 'make'.
10703 case `$am_make -s -f confmf 2> /dev/null` in #(
10704 *the\ am__doit\ target*)
10705 am__include=include
10710 # Now try BSD make style include.
10711 if test "$am__include" = "#"; then
10712 echo '.include "confinc"' > confmf
10713 case `$am_make -s -f confmf 2> /dev/null` in #(
10714 *the\ am__doit\ target*)
10715 am__include=.include
10721 AC_SUBST([am__include])
10722 AC_SUBST([am__quote])
10723 AC_MSG_RESULT([$_am_result])
10724 rm -f confinc confmf
10727 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
10729 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10731 # This file is free software; the Free Software Foundation
10732 # gives unlimited permission to copy and/or distribute it,
10733 # with or without modifications, as long as this notice is preserved.
10735 # AM_MISSING_PROG(NAME, PROGRAM)
10736 # ------------------------------
10737 AC_DEFUN([AM_MISSING_PROG],
10738 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10739 $1=${$1-"${am_missing_run}$2"}
10742 # AM_MISSING_HAS_RUN
10743 # ------------------
10744 # Define MISSING if not defined so far and test if it is modern enough.
10745 # If it is, set am_missing_run to use it, otherwise, to nothing.
10746 AC_DEFUN([AM_MISSING_HAS_RUN],
10747 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10748 AC_REQUIRE_AUX_FILE([missing])dnl
10749 if test x"${MISSING+set}" != xset; then
10750 case $am_aux_dir in
10752 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10754 MISSING="\${SHELL} $am_aux_dir/missing" ;;
10757 # Use eval to expand $SHELL
10758 if eval "$MISSING --is-lightweight"; then
10759 am_missing_run="$MISSING "
10762 AC_MSG_WARN(['missing' script is too old or missing])
10766 # Helper functions for option handling. -*- Autoconf -*-
10768 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10770 # This file is free software; the Free Software Foundation
10771 # gives unlimited permission to copy and/or distribute it,
10772 # with or without modifications, as long as this notice is preserved.
10774 # _AM_MANGLE_OPTION(NAME)
10775 # -----------------------
10776 AC_DEFUN([_AM_MANGLE_OPTION],
10777 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10779 # _AM_SET_OPTION(NAME)
10780 # --------------------
10781 # Set option NAME. Presently that only means defining a flag for this option.
10782 AC_DEFUN([_AM_SET_OPTION],
10783 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
10785 # _AM_SET_OPTIONS(OPTIONS)
10786 # ------------------------
10787 # OPTIONS is a space-separated list of Automake options.
10788 AC_DEFUN([_AM_SET_OPTIONS],
10789 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10791 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10792 # -------------------------------------------
10793 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10794 AC_DEFUN([_AM_IF_OPTION],
10795 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10797 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
10799 # This file is free software; the Free Software Foundation
10800 # gives unlimited permission to copy and/or distribute it,
10801 # with or without modifications, as long as this notice is preserved.
10805 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
10806 # to automatically call this.
10807 AC_DEFUN([_AM_PROG_CC_C_O],
10808 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10809 AC_REQUIRE_AUX_FILE([compile])dnl
10810 AC_LANG_PUSH([C])dnl
10812 [whether $CC understands -c and -o together],
10813 [am_cv_prog_cc_c_o],
10814 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
10815 # Make sure it works both with $CC and with simple cc.
10816 # Following AC_PROG_CC_C_O, we do the test twice because some
10817 # compilers refuse to overwrite an existing .o file with -o,
10818 # though they will create one.
10819 am_cv_prog_cc_c_o=yes
10820 for am_i in 1 2; do
10821 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
10822 && test -f conftest2.$ac_objext; then
10825 am_cv_prog_cc_c_o=no
10829 rm -f core conftest*
10831 if test "$am_cv_prog_cc_c_o" != yes; then
10832 # Losing compiler, so override with the script.
10833 # FIXME: It is wrong to rewrite CC.
10834 # But if we don't then we get into trouble of one sort or another.
10835 # A longer-term fix would be to have automake use am__CC in this case,
10836 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
10837 CC="$am_aux_dir/compile $CC"
10841 # For backward compatibility.
10842 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
10844 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
10846 # This file is free software; the Free Software Foundation
10847 # gives unlimited permission to copy and/or distribute it,
10848 # with or without modifications, as long as this notice is preserved.
10850 # AM_RUN_LOG(COMMAND)
10851 # -------------------
10852 # Run COMMAND, save the exit status in ac_status, and log it.
10853 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
10854 AC_DEFUN([AM_RUN_LOG],
10855 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
10856 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
10858 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
10859 (exit $ac_status); }])
10861 # Check to make sure that the build environment is sane. -*- Autoconf -*-
10863 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
10865 # This file is free software; the Free Software Foundation
10866 # gives unlimited permission to copy and/or distribute it,
10867 # with or without modifications, as long as this notice is preserved.
10871 AC_DEFUN([AM_SANITY_CHECK],
10872 [AC_MSG_CHECKING([whether build environment is sane])
10873 # Reject unsafe characters in $srcdir or the absolute working directory
10874 # name. Accept space and tab only in the latter.
10878 *[[\\\"\#\$\&\'\`$am_lf]]*)
10879 AC_MSG_ERROR([unsafe absolute working directory name]);;
10882 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10883 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
10886 # Do 'set' in a subshell so we don't clobber the current shell's
10887 # arguments. Must try -L first in case configure is actually a
10888 # symlink; some systems play weird games with the mod time of symlinks
10889 # (eg FreeBSD returns the mod time of the symlink's containing
10893 for am_try in 1 2; do
10894 echo "timestamp, slept: $am_has_slept" > conftest.file
10895 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10896 if test "$[*]" = "X"; then
10898 set X `ls -t "$srcdir/configure" conftest.file`
10900 if test "$[*]" != "X $srcdir/configure conftest.file" \
10901 && test "$[*]" != "X conftest.file $srcdir/configure"; then
10903 # If neither matched, then we have a broken ls. This can happen
10904 # if, for instance, CONFIG_SHELL is bash and it inherits a
10905 # broken ls alias from the environment. This has actually
10906 # happened. Such a system could not be considered "sane".
10907 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10908 alias in your environment])
10910 if test "$[2]" = conftest.file || test $am_try -eq 2; then
10917 test "$[2]" = conftest.file
10923 AC_MSG_ERROR([newly created file is older than distributed files!
10924 Check your system clock])
10926 AC_MSG_RESULT([yes])
10927 # If we didn't sleep, we still need to ensure time stamps of config.status and
10928 # generated files are strictly newer.
10930 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
10934 AC_CONFIG_COMMANDS_PRE(
10935 [AC_MSG_CHECKING([that generated files are newer than configure])
10936 if test -n "$am_sleep_pid"; then
10937 # Hide warnings about reused PIDs.
10938 wait $am_sleep_pid 2>/dev/null
10940 AC_MSG_RESULT([done])])
10941 rm -f conftest.file
10944 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
10946 # This file is free software; the Free Software Foundation
10947 # gives unlimited permission to copy and/or distribute it,
10948 # with or without modifications, as long as this notice is preserved.
10950 # AM_SILENT_RULES([DEFAULT])
10951 # --------------------------
10952 # Enable less verbose build rules; with the default set to DEFAULT
10953 # ("yes" being less verbose, "no" or empty being verbose).
10954 AC_DEFUN([AM_SILENT_RULES],
10955 [AC_ARG_ENABLE([silent-rules], [dnl
10957 [--enable-silent-rules],
10958 [less verbose build output (undo: "make V=1")])
10960 [--disable-silent-rules],
10961 [verbose build output (undo: "make V=0")])dnl
10963 case $enable_silent_rules in @%:@ (((
10964 yes) AM_DEFAULT_VERBOSITY=0;;
10965 no) AM_DEFAULT_VERBOSITY=1;;
10966 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10969 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10970 dnl do not support nested variable expansions.
10971 dnl See automake bug#9928 and bug#10237.
10972 am_make=${MAKE-make}
10973 AC_CACHE_CHECK([whether $am_make supports nested variables],
10974 [am_cv_make_support_nested_variables],
10975 [if AS_ECHO([['TRUE=$(BAR$(V))
10981 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10982 am_cv_make_support_nested_variables=yes
10984 am_cv_make_support_nested_variables=no
10986 if test $am_cv_make_support_nested_variables = yes; then
10987 dnl Using '$V' instead of '$(V)' breaks IRIX make.
10989 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10991 AM_V=$AM_DEFAULT_VERBOSITY
10992 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10994 AC_SUBST([AM_V])dnl
10995 AM_SUBST_NOTMAKE([AM_V])dnl
10996 AC_SUBST([AM_DEFAULT_V])dnl
10997 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10998 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11000 AC_SUBST([AM_BACKSLASH])dnl
11001 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11004 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
11006 # This file is free software; the Free Software Foundation
11007 # gives unlimited permission to copy and/or distribute it,
11008 # with or without modifications, as long as this notice is preserved.
11010 # AM_PROG_INSTALL_STRIP
11011 # ---------------------
11012 # One issue with vendor 'install' (even GNU) is that you can't
11013 # specify the program used to strip binaries. This is especially
11014 # annoying in cross-compiling environments, where the build's strip
11015 # is unlikely to handle the host's binaries.
11016 # Fortunately install-sh will honor a STRIPPROG variable, so we
11017 # always use install-sh in "make install-strip", and initialize
11018 # STRIPPROG with the value of the STRIP variable (set by the user).
11019 AC_DEFUN([AM_PROG_INSTALL_STRIP],
11020 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11021 # Installed binaries are usually stripped using 'strip' when the user
11022 # run "make install-strip". However 'strip' might not be the right
11023 # tool to use in cross-compilation environments, therefore Automake
11024 # will honor the 'STRIP' environment variable to overrule this program.
11025 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
11026 if test "$cross_compiling" != no; then
11027 AC_CHECK_TOOL([STRIP], [strip], :)
11029 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11030 AC_SUBST([INSTALL_STRIP_PROGRAM])])
11032 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
11034 # This file is free software; the Free Software Foundation
11035 # gives unlimited permission to copy and/or distribute it,
11036 # with or without modifications, as long as this notice is preserved.
11038 # _AM_SUBST_NOTMAKE(VARIABLE)
11039 # ---------------------------
11040 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11041 # This macro is traced by Automake.
11042 AC_DEFUN([_AM_SUBST_NOTMAKE])
11044 # AM_SUBST_NOTMAKE(VARIABLE)
11045 # --------------------------
11046 # Public sister of _AM_SUBST_NOTMAKE.
11047 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
11049 # Check how to create a tarball. -*- Autoconf -*-
11051 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
11053 # This file is free software; the Free Software Foundation
11054 # gives unlimited permission to copy and/or distribute it,
11055 # with or without modifications, as long as this notice is preserved.
11057 # _AM_PROG_TAR(FORMAT)
11058 # --------------------
11059 # Check how to create a tarball in format FORMAT.
11060 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
11062 # Substitute a variable $(am__tar) that is a command
11063 # writing to stdout a FORMAT-tarball containing the directory
11065 # tardir=directory && $(am__tar) > result.tar
11067 # Substitute a variable $(am__untar) that extract such
11068 # a tarball read from stdin.
11069 # $(am__untar) < result.tar
11071 AC_DEFUN([_AM_PROG_TAR],
11072 [# Always define AMTAR for backward compatibility. Yes, it's still used
11073 # in the wild :-( We should find a proper way to deprecate it ...
11074 AC_SUBST([AMTAR], ['$${TAR-tar}'])
11076 # We'll loop over all known methods to create a tar archive until one works.
11077 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11080 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11084 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11085 # There is notably a 21 bits limit for the UID and the GID. In fact,
11086 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11088 am_max_uid=2097151 # 2^21 - 1
11089 am_max_gid=$am_max_uid
11090 # The $UID and $GID variables are not portable, so we need to resort
11091 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
11092 # below are definitely unexpected, so allow the users to see them
11093 # (that is, avoid stderr redirection).
11094 am_uid=`id -u || echo unknown`
11095 am_gid=`id -g || echo unknown`
11096 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11097 if test $am_uid -le $am_max_uid; then
11098 AC_MSG_RESULT([yes])
11100 AC_MSG_RESULT([no])
11103 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11104 if test $am_gid -le $am_max_gid; then
11105 AC_MSG_RESULT([yes])
11107 AC_MSG_RESULT([no])
11114 [m4_fatal([Unknown tar format])])
11116 AC_MSG_CHECKING([how to create a $1 tar archive])
11118 # Go ahead even if we have the value already cached. We do so because we
11119 # need to set the values for the 'am__tar' and 'am__untar' variables.
11120 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11122 for _am_tool in $_am_tools; do
11125 for _am_tar in tar gnutar gtar; do
11126 AM_RUN_LOG([$_am_tar --version]) && break
11128 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11129 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11130 am__untar="$_am_tar -xf -"
11133 # Must skip GNU tar: if it does not support --format= it doesn't create
11134 # ustar tarball either.
11135 (tar --version) >/dev/null 2>&1 && continue
11136 am__tar='tar chf - "$$tardir"'
11137 am__tar_='tar chf - "$tardir"'
11138 am__untar='tar xf -'
11141 am__tar='pax -L -x $1 -w "$$tardir"'
11142 am__tar_='pax -L -x $1 -w "$tardir"'
11146 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11147 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11148 am__untar='cpio -i -H $1 -d'
11157 # If the value was cached, stop now. We just wanted to have am__tar
11158 # and am__untar set.
11159 test -n "${am_cv_prog_tar_$1}" && break
11161 # tar/untar a dummy directory, and stop if the command works.
11162 rm -rf conftest.dir
11164 echo GrepMe > conftest.dir/file
11165 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11166 rm -rf conftest.dir
11167 if test -s conftest.tar; then
11168 AM_RUN_LOG([$am__untar <conftest.tar])
11169 AM_RUN_LOG([cat conftest.dir/file])
11170 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11173 rm -rf conftest.dir
11175 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11176 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11178 AC_SUBST([am__tar])
11179 AC_SUBST([am__untar])