1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 AC_DEFUN(AM_GNOME_CHECK_TYPE,
14 [AC_CACHE_CHECK([$1 in <sys/types.h>], ac_cv_type_$1,
16 #include <sys/types.h>
22 ac_cv_type_$1=yes, ac_cv_type_$1=no)])
23 if test $ac_cv_type_$1 = no; then
28 AC_DEFUN(AM_GNOME_SIZE_T,
29 [AM_GNOME_CHECK_TYPE(size_t, unsigned)
30 AC_PROVIDE([AC_TYPE_SIZE_T])
33 AC_DEFUN(AM_GNOME_OFF_T,
34 [AM_GNOME_CHECK_TYPE(off_t, long)
35 AC_PROVIDE([AC_TYPE_OFF_T])
38 dnl Autoconf macros for libgnutls
40 # Modified for LIBGNUTLS -- nmav
41 # Configure paths for LIBGCRYPT
42 # Shamelessly stolen from the one of XDELTA by Owen Taylor
43 # Werner Koch 99-12-09
45 dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
46 dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS
48 AC_DEFUN(AM_PATH_LIBGNUTLS,
50 dnl Get the cflags and libraries from the libgnutls-config script
52 AC_ARG_WITH(libgnutls-prefix,
53 [ --with-libgnutls-prefix=PFX Prefix where libgnutls is installed (optional)],
54 libgnutls_config_prefix="$withval", libgnutls_config_prefix="")
56 if test x$libgnutls_config_prefix != x ; then
57 libgnutls_config_args="$libgnutls_config_args --prefix=$libgnutls_config_prefix"
58 if test x${LIBGNUTLS_CONFIG+set} != xset ; then
59 LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config
63 AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no)
64 min_libgnutls_version=ifelse([$1], ,0.1.0,$1)
65 AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version)
67 if test "$LIBGNUTLS_CONFIG" = "no" ; then
70 LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
71 LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs`
72 libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
75 ac_save_CFLAGS="$CFLAGS"
77 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
78 LIBS="$LIBS $LIBGNUTLS_LIBS"
80 dnl Now check if the installed libgnutls is sufficiently new. Also sanity
81 dnl checks the results of libgnutls-config to some extent
83 rm -f conf.libgnutlstest
88 #include <gnutls/gnutls.h>
93 system ("touch conf.libgnutlstest");
95 if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) )
97 printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n",
98 "$libgnutls_config_version", gnutls_check_version(NULL) );
99 printf("*** was found! If libgnutls-config was correct, then it is best\n");
100 printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n");
101 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
102 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
103 printf("*** required on your system.\n");
104 printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n");
105 printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n");
106 printf("*** before re-running configure\n");
108 else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) )
110 printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION);
111 printf("*** library (version %s)\n", gnutls_check_version(NULL) );
115 if ( gnutls_check_version( "$min_libgnutls_version" ) )
121 printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n",
122 gnutls_check_version(NULL) );
123 printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n",
124 "$min_libgnutls_version" );
125 printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n");
127 printf("*** If you have already installed a sufficiently new version, this error\n");
128 printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
129 printf("*** being found. The easiest way to fix this is to remove the old version\n");
130 printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n");
131 printf("*** correct copy of libgnutls-config. (In this case, you will have to\n");
132 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
133 printf("*** so that the correct libraries are found at run-time))\n");
138 ],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
139 CFLAGS="$ac_save_CFLAGS"
143 if test "x$no_libgnutls" = x ; then
145 ifelse([$2], , :, [$2])
147 if test -f conf.libgnutlstest ; then
152 if test "$LIBGNUTLS_CONFIG" = "no" ; then
153 echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found"
154 echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in"
155 echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the"
156 echo "*** full path to libgnutls-config."
158 if test -f conf.libgnutlstest ; then
161 echo "*** Could not run libgnutls test program, checking why..."
162 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
163 LIBS="$LIBS $LIBGNUTLS_LIBS"
168 #include <gnutls/gnutls.h>
169 ], [ return !!gnutls_check_version(NULL); ],
170 [ echo "*** The test program compiled, but did not run. This usually means"
171 echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong"
172 echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your"
173 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
174 echo "*** to the installed location Also, make sure you have run ldconfig if that"
175 echo "*** is required on your system"
177 echo "*** If you have an old version installed, it is best to remove it, although"
178 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
180 [ echo "*** The test program failed to compile or link. See the file config.log for the"
181 echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed"
182 echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you"
183 echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ])
184 CFLAGS="$ac_save_CFLAGS"
190 ifelse([$3], , :, [$3])
192 rm -f conf.libgnutlstest
193 AC_SUBST(LIBGNUTLS_CFLAGS)
194 AC_SUBST(LIBGNUTLS_LIBS)
197 dnl end of Autoconf macros for libgnutls
199 # Like AC_CONFIG_HEADER, but automatically create stamp file.
201 AC_DEFUN([AM_CONFIG_HEADER],
203 AC_CONFIG_HEADER([$1])
204 dnl When config.status generates a header, we must update the stamp-h file.
205 dnl This file resides in the same directory as the config header
206 dnl that is generated. We must strip everything past the first ":",
207 dnl and everything past the last "/".
208 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
209 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
210 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
212 for am_file in <<$1>>; do
213 case " <<$>>CONFIG_HEADERS " in
214 *" <<$>>am_file "*<<)>>
215 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
218 am_indx=`expr "<<$>>am_indx" + 1`
222 # Do all the work for Automake. This macro actually does too much --
223 # some checks are only needed if your package does certain things.
224 # But this isn't really a big deal.
229 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
231 AC_DEFUN([AM_INIT_AUTOMAKE],
232 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
233 AC_REQUIRE([AC_PROG_INSTALL])
238 dnl test to see if srcdir already configured
239 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
240 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
243 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
244 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
245 AC_REQUIRE([AM_SANITY_CHECK])
246 AC_REQUIRE([AC_ARG_PROGRAM])
247 dnl FIXME This is truly gross.
248 missing_dir=`cd $ac_aux_dir && pwd`
249 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
250 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
251 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
252 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
253 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
254 AC_REQUIRE([AC_PROG_MAKE_SET])])
256 # Copyright 2002 Free Software Foundation, Inc.
258 # This program is free software; you can redistribute it and/or modify
259 # it under the terms of the GNU General Public License as published by
260 # the Free Software Foundation; either version 2, or (at your option)
263 # This program is distributed in the hope that it will be useful,
264 # but WITHOUT ANY WARRANTY; without even the implied warranty of
265 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
266 # GNU General Public License for more details.
268 # You should have received a copy of the GNU General Public License
269 # along with this program; if not, write to the Free Software
270 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
272 # AM_AUTOMAKE_VERSION(VERSION)
273 # ----------------------------
274 # Automake X.Y traces this macro to ensure aclocal.m4 has been
275 # generated from the m4 files accompanying Automake X.Y.
276 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
278 # AM_SET_CURRENT_AUTOMAKE_VERSION
279 # -------------------------------
280 # Call AM_AUTOMAKE_VERSION so it can be traced.
281 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
282 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
283 [AM_AUTOMAKE_VERSION([1.4-p6])])
286 # Check to make sure that the build environment is sane.
289 AC_DEFUN([AM_SANITY_CHECK],
290 [AC_MSG_CHECKING([whether build environment is sane])
293 echo timestamp > conftestfile
294 # Do `set' in a subshell so we don't clobber the current shell's
295 # arguments. Must try -L first in case configure is actually a
296 # symlink; some systems play weird games with the mod time of symlinks
297 # (eg FreeBSD returns the mod time of the symlink's containing
300 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
301 if test "[$]*" = "X"; then
303 set X `ls -t $srcdir/configure conftestfile`
305 if test "[$]*" != "X $srcdir/configure conftestfile" \
306 && test "[$]*" != "X conftestfile $srcdir/configure"; then
308 # If neither matched, then we have a broken ls. This can happen
309 # if, for instance, CONFIG_SHELL is bash and it inherits a
310 # broken ls alias from the environment. This has actually
311 # happened. Such a system could not be considered "sane".
312 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
313 alias in your environment])
316 test "[$]2" = conftestfile
322 AC_MSG_ERROR([newly created file is older than distributed files!
323 Check your system clock])
328 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
329 dnl The program must properly implement --version.
330 AC_DEFUN([AM_MISSING_PROG],
331 [AC_MSG_CHECKING(for working $2)
332 # Run test in a subshell; some versions of sh will print an error if
333 # an executable is not found, even if stderr is redirected.
334 # Redirect stdin to placate older versions of autoconf. Sigh.
335 if ($2 --version) < /dev/null > /dev/null 2>&1; then
340 AC_MSG_RESULT(missing)
344 # Add --enable-maintainer-mode option to configure.
349 AC_DEFUN([AM_MAINTAINER_MODE],
350 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
351 dnl maintainer-mode is disabled by default
352 AC_ARG_ENABLE(maintainer-mode,
353 [ --enable-maintainer-mode enable make rules and dependencies not useful
354 (and sometimes confusing) to the casual installer],
355 USE_MAINTAINER_MODE=$enableval,
356 USE_MAINTAINER_MODE=no)
357 AC_MSG_RESULT($USE_MAINTAINER_MODE)
358 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
359 MAINT=$MAINTAINER_MODE_TRUE
364 # Define a conditional.
366 AC_DEFUN([AM_CONDITIONAL],
380 dnl GNOME_COMMON_INIT
382 AC_DEFUN([GNOME_COMMON_INIT],
384 AC_CACHE_VAL(ac_cv_gnome_aclocal_dir,
385 [ac_cv_gnome_aclocal_dir="$GNOME_COMMON_MACROS_DIR"])
386 AC_CACHE_VAL(ac_cv_gnome_aclocal_flags,
387 [ac_cv_gnome_aclocal_flags="$ACLOCAL_FLAGS"])
388 GNOME_ACLOCAL_DIR="$ac_cv_gnome_aclocal_dir"
389 GNOME_ACLOCAL_FLAGS="$ac_cv_gnome_aclocal_flags"
390 AC_SUBST(GNOME_ACLOCAL_DIR)
391 AC_SUBST(GNOME_ACLOCAL_FLAGS)
393 ACLOCAL="$ACLOCAL $GNOME_ACLOCAL_FLAGS"
395 AM_CONDITIONAL(INSIDE_GNOME_DOCU, false)
398 AC_DEFUN([GNOME_DEBUG_CHECK],
400 AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], enable_debug="$enableval", enable_debug=no)
402 if test x$enable_debug = xyes ; then
403 AC_DEFINE(GNOME_ENABLE_DEBUG,1,
404 [Enable additional debugging at the expense of performance and size])
408 -*- mode: autoconf -*-
410 # GNOME_AUTOGEN_OBSOLETE
411 # this marker is checked for in the aclocal.m4 file to check for bad macros ...
413 AU_DEFUN([AM_GNOME2_GETTEXT], [AM_GLIB_GNU_GETTEXT])
414 AU_DEFUN([GNOME_GTKDOC_CHECK], [GTK_DOC_CHECK])
415 AU_DEFUN([GNOME2_X_CHECKS], [])
416 AU_DEFUN([GNOME_PTHREAD_CHECK], [])
417 AU_DEFUN([GNOME_CHECK_PKGCONFIG], [])
418 AU_DEFUN([GNOME_REQUIRE_PKGCONFIG], [])
419 AU_DEFUN([GNOME_PLATFORM_GNOME_2], [])
421 AU_DEFUN([GNOME_CHECK_CXX],
423 # see if a C++ compiler exists and works
425 if test "x$ac_cv_prog_cxx_works" = xno; then
426 AC_MSG_WARN(ifelse([$1], , "No C++ compiler", [$1]))
428 AM_CONDITIONAL(CXX_PRESENT, test "x$ac_cv_prog_cxx_works" != xno)
431 # for aclocal-1.4's benefit
432 # AC_DEFUN([AM_GNOME2_GETTEXT], [])
433 # AC_DEFUN([GNOME_GTKDOC_CHECK], [])
434 # AC_DEFUN([GNOME2_X_CHECKS], [])
435 # AC_DEFUN([GNOME_PTHREAD_CHECK], [])
436 # AC_DEFUN([GNOME_CHECK_PKGCONFIG], [])
437 # AC_DEFUN([GNOME_REQUIRE_PKGCONFIG], [])
438 # AC_DEFUN([GNOME_PLATFORM_GNOME_2], [])
439 # AC_DEFUN([GNOME_CHECK_CXX], [])
441 dnl -*- mode: autoconf -*-
446 dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
447 AC_DEFUN([GTK_DOC_CHECK],
449 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
450 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
451 dnl for overriding the documentation installation directory
452 AC_ARG_WITH(html-dir,
453 AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
454 [with_html_dir='${datadir}/gtk-doc/html'])
455 HTML_DIR="$with_html_dir"
458 dnl enable/disable documentation building
459 AC_ARG_ENABLE(gtk-doc,
460 AC_HELP_STRING([--enable-gtk-doc],
461 [use gtk-doc to build documentation [default=no]]),,
465 if test -z "$PKG_CONFIG"; then
466 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
468 if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
472 dnl do we want to do a version check?
474 [gtk_doc_min_version=$1
475 if test "$have_gtk_doc" = yes; then
476 AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
477 if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
485 if test x$enable_gtk_doc = xyes; then
486 if test "$have_gtk_doc" != yes; then
491 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
492 AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
495 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
497 # serial 46 AC_PROG_LIBTOOL
499 AC_DEFUN([AC_PROG_LIBTOOL],
500 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
502 # This can be used to rebuild libtool when needed
503 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
505 # Always use our own libtool.
506 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
509 # Prevent multiple expansion
510 define([AC_PROG_LIBTOOL], [])
513 AC_DEFUN([AC_LIBTOOL_SETUP],
515 AC_REQUIRE([AC_ENABLE_SHARED])dnl
516 AC_REQUIRE([AC_ENABLE_STATIC])dnl
517 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
518 AC_REQUIRE([AC_CANONICAL_HOST])dnl
519 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
520 AC_REQUIRE([AC_PROG_CC])dnl
521 AC_REQUIRE([AC_PROG_LD])dnl
522 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
523 AC_REQUIRE([AC_PROG_NM])dnl
524 AC_REQUIRE([LT_AC_PROG_SED])dnl
526 AC_REQUIRE([AC_PROG_LN_S])dnl
527 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
528 AC_REQUIRE([AC_OBJEXT])dnl
529 AC_REQUIRE([AC_EXEEXT])dnl
532 _LT_AC_PROG_ECHO_BACKSLASH
533 # Only perform the check for file, if the check method requires it
534 case $deplibs_check_method in
536 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
542 AC_CHECK_TOOL(RANLIB, ranlib, :)
543 AC_CHECK_TOOL(STRIP, strip, :)
545 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
546 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
547 enable_win32_dll=yes, enable_win32_dll=no)
549 AC_ARG_ENABLE(libtool-lock,
550 [ --disable-libtool-lock avoid locking (might break parallel builds)])
551 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
553 # Some flags need to be propagated to the compiler or linker for good
557 # Find out which ABI we are using.
558 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
559 if AC_TRY_EVAL(ac_compile); then
560 case `/usr/bin/file conftest.$ac_objext` in
576 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
577 SAVE_CFLAGS="$CFLAGS"
578 CFLAGS="$CFLAGS -belf"
579 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
582 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
584 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
585 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
586 CFLAGS="$SAVE_CFLAGS"
590 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
591 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
592 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
593 AC_CHECK_TOOL(AS, as, false)
594 AC_CHECK_TOOL(OBJDUMP, objdump, false)
596 # recent cygwin and mingw systems supply a stub DllMain which the user
597 # can override, but on older systems we have to supply one
598 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
600 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
602 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
605 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
606 # old mingw systems require "-dll" to link a DLL, while more recent ones
608 SAVE_CFLAGS="$CFLAGS"
609 CFLAGS="$CFLAGS -mdll"
610 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
611 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
612 CFLAGS="$SAVE_CFLAGS" ;;
613 *-*-cygwin* | *-*-pw32*)
614 # cygwin systems need to pass --dll to the linker, and not link
615 # crt.o which will require a WinMain@16 definition.
616 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
626 # AC_LIBTOOL_HEADER_ASSERT
627 # ------------------------
628 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
629 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
630 [lt_cv_func_assert_works],
633 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
634 case `$CC --version 2>/dev/null` in
635 [[12]].*) lt_cv_func_assert_works=no ;;
636 *) lt_cv_func_assert_works=yes ;;
642 if test "x$lt_cv_func_assert_works" = xyes; then
643 AC_CHECK_HEADERS(assert.h)
645 ])# AC_LIBTOOL_HEADER_ASSERT
648 # --------------------
649 AC_DEFUN([_LT_AC_CHECK_DLFCN],
650 [AC_CHECK_HEADERS(dlfcn.h)
651 ])# _LT_AC_CHECK_DLFCN
653 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
654 # ---------------------------------
655 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
656 [AC_REQUIRE([AC_CANONICAL_HOST])
657 AC_REQUIRE([AC_PROG_NM])
658 AC_REQUIRE([AC_OBJEXT])
659 # Check for command to grab the raw symbol name followed by C symbol from nm.
660 AC_MSG_CHECKING([command to parse $NM output])
661 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
663 # These are sane defaults that work on at least a few old systems.
664 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
666 # Character class describing NM global symbol codes.
667 symcode='[[BCDEGRST]]'
669 # Regexp to match symbols that can be accessed directly from C.
670 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
672 # Transform the above into a raw symbol and a C symbol.
675 # Transform an extracted symbol line into a proper C declaration
676 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
678 # Transform an extracted symbol line into symbol name and symbol address
679 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
681 # Define system-specific variables.
686 cygwin* | mingw* | pw32*)
687 symcode='[[ABCDGISTW]]'
689 hpux*) # Its linker distinguishes data from code symbols
690 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
691 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
694 symcode='[[BCDEGRST]]'
697 symcode='[[BCDEGQRST]]'
707 # Handle CRLF in mingw tool chain
711 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
715 # If we're using GNU nm, then use its standard symbol codes.
716 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
717 symcode='[[ABCDGISTW]]'
720 # Try without a prefix undercore, then with it.
721 for ac_symprfx in "" "_"; do
723 # Write the raw and C identifiers.
724 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
726 # Check to see that the pipe works correctly.
729 cat > conftest.$ac_ext <<EOF
734 void nm_test_func(){}
738 int main(){nm_test_var='a';nm_test_func();return(0);}
741 if AC_TRY_EVAL(ac_compile); then
742 # Now try to grab the symbols.
744 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
745 # Try sorting and uniquifying the output.
746 if sort "$nlist" | uniq > "$nlist"T; then
747 mv -f "$nlist"T "$nlist"
752 # Make sure that we snagged all the symbols we need.
753 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
754 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
755 cat <<EOF > conftest.$ac_ext
761 # Now generate the symbol file.
762 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
764 cat <<EOF >> conftest.$ac_ext
765 #if defined (__STDC__) && __STDC__
766 # define lt_ptr void *
768 # define lt_ptr char *
772 /* The mapping between symbol names and symbols. */
777 lt_preloaded_symbols[[]] =
780 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
781 cat <<\EOF >> conftest.$ac_ext
789 # Now try linking the two files.
790 mv conftest.$ac_objext conftstm.$ac_objext
792 save_CFLAGS="$CFLAGS"
793 LIBS="conftstm.$ac_objext"
794 CFLAGS="$CFLAGS$no_builtin_flag"
795 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
799 CFLAGS="$save_CFLAGS"
801 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
804 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
807 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
810 echo "$progname: failed program was:" >&AC_FD_CC
811 cat conftest.$ac_ext >&5
813 rm -f conftest* conftst*
815 # Do not use the global_symbol_pipe unless it works.
816 if test "$pipe_works" = yes; then
819 lt_cv_sys_global_symbol_pipe=
823 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
824 if test -z "$lt_cv_sys_global_symbol_pipe"; then
825 global_symbol_to_cdecl=
826 global_symbol_to_c_name_address=
828 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
829 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
831 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
833 AC_MSG_RESULT(failed)
837 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
839 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
840 # ---------------------------------
841 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
842 [# Find the correct PATH separator. Usually this is `:', but
843 # DJGPP uses `;' like DOS.
844 if test "X${PATH_SEPARATOR+set}" != Xset; then
845 UNAME=${UNAME-`uname 2>/dev/null`}
847 *-DOS) lt_cv_sys_path_separator=';' ;;
848 *) lt_cv_sys_path_separator=':' ;;
850 PATH_SEPARATOR=$lt_cv_sys_path_separator
852 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
854 # _LT_AC_PROG_ECHO_BACKSLASH
855 # --------------------------
856 # Add some code to the start of the generated configure script which
857 # will find an echo command which doesn't interpret backslashes.
858 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
859 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
860 [AC_DIVERT_PUSH(NOTICE)])
861 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
863 # Check that we are running under the correct shell.
864 SHELL=${CONFIG_SHELL-/bin/sh}
868 # Remove one level of quotation (which was required for Make).
869 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
874 if test "X[$]1" = X--no-reexec; then
875 # Discard the --no-reexec flag, and continue.
877 elif test "X[$]1" = X--fallback-echo; then
878 # Avoid inline document here, it may be left over
880 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
881 # Yippee, $echo works!
884 # Restart under the correct shell.
885 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
888 if test "X[$]1" = X--fallback-echo; then
889 # used as fallback echo
897 # The HP-UX ksh and POSIX shell print the target directory to stdout
899 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
901 if test -z "$ECHO"; then
902 if test "X${echo_test_string+set}" != Xset; then
903 # find a string as large as possible, as long as the shell can cope with it
904 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
905 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
906 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
907 echo_test_string="`eval $cmd`" &&
908 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
915 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
916 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
917 test "X$echo_testing_string" = "X$echo_test_string"; then
920 # The Solaris, AIX, and Digital Unix default echo programs unquote
921 # backslashes. This makes it impossible to quote backslashes using
922 # echo "$something" | sed 's/\\/\\\\/g'
924 # So, first we look for a working echo in the user's PATH.
926 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
927 for dir in $PATH /usr/ucb; do
928 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
929 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
930 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
931 test "X$echo_testing_string" = "X$echo_test_string"; then
938 if test "X$echo" = Xecho; then
939 # We didn't find a better echo, so look for alternatives.
940 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
941 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
942 test "X$echo_testing_string" = "X$echo_test_string"; then
943 # This shell has a builtin print -r that does the trick.
945 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
946 test "X$CONFIG_SHELL" != X/bin/ksh; then
947 # If we have ksh, try running configure again with it.
948 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
949 export ORIGINAL_CONFIG_SHELL
950 CONFIG_SHELL=/bin/ksh
952 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
956 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
957 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
958 test "X$echo_testing_string" = "X$echo_test_string"; then
961 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
962 test "X$echo_testing_string" = 'X\t' &&
963 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
964 test "X$echo_testing_string" = "X$echo_test_string"; then
965 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
967 SHELL="$CONFIG_SHELL"
969 echo="$CONFIG_SHELL [$]0 --fallback-echo"
970 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
971 test "X$echo_testing_string" = 'X\t' &&
972 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
973 test "X$echo_testing_string" = "X$echo_test_string"; then
974 echo="$CONFIG_SHELL [$]0 --fallback-echo"
976 # maybe with a smaller string...
979 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
980 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
987 if test "$prev" != 'sed 50q "[$]0"'; then
988 echo_test_string=`eval $prev`
989 export echo_test_string
990 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
992 # Oops. We lost completely, so just stick with echo.
1001 # Copy echo and quote the copy suitably for passing to libtool from
1002 # the Makefile, instead of quoting the original, which is used later.
1004 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1005 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1010 ])# _LT_AC_PROG_ECHO_BACKSLASH
1012 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1013 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1014 # ------------------------------------------------------------------
1015 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1016 [if test "$cross_compiling" = yes; then :
1019 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1020 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1021 lt_status=$lt_dlunknown
1022 cat > conftest.$ac_ext <<EOF
1023 [#line __oline__ "configure"
1024 #include "confdefs.h"
1033 # define LT_DLGLOBAL RTLD_GLOBAL
1036 # define LT_DLGLOBAL DL_GLOBAL
1038 # define LT_DLGLOBAL 0
1042 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1043 find out it does not work in some platform. */
1044 #ifndef LT_DLLAZY_OR_NOW
1046 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1049 # define LT_DLLAZY_OR_NOW DL_LAZY
1052 # define LT_DLLAZY_OR_NOW RTLD_NOW
1055 # define LT_DLLAZY_OR_NOW DL_NOW
1057 # define LT_DLLAZY_OR_NOW 0
1065 extern "C" void exit (int);
1068 void fnord() { int i=42;}
1071 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1072 int status = $lt_dlunknown;
1076 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1077 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1078 /* dlclose (self); */
1084 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1085 (./conftest; exit; ) 2>/dev/null
1088 x$lt_dlno_uscore) $1 ;;
1089 x$lt_dlneed_uscore) $2 ;;
1090 x$lt_unknown|x*) $3 ;;
1093 # compilation failed
1098 ])# _LT_AC_TRY_DLOPEN_SELF
1100 # AC_LIBTOOL_DLOPEN_SELF
1101 # -------------------
1102 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1103 [if test "x$enable_dlopen" != xyes; then
1104 enable_dlopen=unknown
1105 enable_dlopen_self=unknown
1106 enable_dlopen_self_static=unknown
1113 lt_cv_dlopen="load_add_on"
1115 lt_cv_dlopen_self=yes
1118 cygwin* | mingw* | pw32*)
1119 lt_cv_dlopen="LoadLibrary"
1124 AC_CHECK_FUNC([shl_load],
1125 [lt_cv_dlopen="shl_load"],
1126 [AC_CHECK_LIB([dld], [shl_load],
1127 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1128 [AC_CHECK_FUNC([dlopen],
1129 [lt_cv_dlopen="dlopen"],
1130 [AC_CHECK_LIB([dl], [dlopen],
1131 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1132 [AC_CHECK_LIB([svld], [dlopen],
1133 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1134 [AC_CHECK_LIB([dld], [dld_link],
1135 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1144 if test "x$lt_cv_dlopen" != xno; then
1150 case $lt_cv_dlopen in
1152 save_CPPFLAGS="$CPPFLAGS"
1153 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1154 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1156 save_LDFLAGS="$LDFLAGS"
1157 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1160 LIBS="$lt_cv_dlopen_libs $LIBS"
1162 AC_CACHE_CHECK([whether a program can dlopen itself],
1163 lt_cv_dlopen_self, [dnl
1164 _LT_AC_TRY_DLOPEN_SELF(
1165 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1166 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1169 if test "x$lt_cv_dlopen_self" = xyes; then
1170 LDFLAGS="$LDFLAGS $link_static_flag"
1171 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1172 lt_cv_dlopen_self_static, [dnl
1173 _LT_AC_TRY_DLOPEN_SELF(
1174 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1175 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1179 CPPFLAGS="$save_CPPFLAGS"
1180 LDFLAGS="$save_LDFLAGS"
1185 case $lt_cv_dlopen_self in
1186 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1187 *) enable_dlopen_self=unknown ;;
1190 case $lt_cv_dlopen_self_static in
1191 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1192 *) enable_dlopen_self_static=unknown ;;
1195 ])# AC_LIBTOOL_DLOPEN_SELF
1197 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1198 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1199 # Sed substitution that helps us do robust quoting. It backslashifies
1200 # metacharacters that are still active within double-quoted strings.
1201 Xsed='sed -e s/^X//'
1202 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1204 # Same as above, but do not quote variable references.
1205 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1207 # Sed substitution to delay expansion of an escaped shell variable in a
1208 # double_quote_subst'ed string.
1209 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1215 default_ofile=libtool
1216 can_build_shared=yes
1218 # All known linkers require a `.a' archive for static linking (except M$VC,
1219 # which needs '.lib').
1221 ltmain="$ac_aux_dir/ltmain.sh"
1222 ofile="$default_ofile"
1223 with_gnu_ld="$lt_cv_prog_gnu_ld"
1224 need_locks="$enable_libtool_lock"
1227 old_CFLAGS="$CFLAGS"
1229 # Set sane defaults for various variables
1230 test -z "$AR" && AR=ar
1231 test -z "$AR_FLAGS" && AR_FLAGS=cru
1232 test -z "$AS" && AS=as
1233 test -z "$CC" && CC=cc
1234 test -z "$DLLTOOL" && DLLTOOL=dlltool
1235 test -z "$LD" && LD=ld
1236 test -z "$LN_S" && LN_S="ln -s"
1237 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1238 test -z "$NM" && NM=nm
1239 test -z "$OBJDUMP" && OBJDUMP=objdump
1240 test -z "$RANLIB" && RANLIB=:
1241 test -z "$STRIP" && STRIP=:
1242 test -z "$ac_objext" && ac_objext=o
1244 if test x"$host" != x"$build"; then
1245 ac_tool_prefix=${host_alias}-
1250 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1253 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1258 # AIX sometimes has problems with the GCC collect2 program. For some
1259 # reason, if we set the COLLECT_NAMES environment variable, the problems
1260 # vanish in a puff of smoke.
1261 if test "X${COLLECT_NAMES+set}" != Xset; then
1263 export COLLECT_NAMES
1268 # Determine commands to create old-style static archives.
1269 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1270 old_postinstall_cmds='chmod 644 $oldlib'
1271 old_postuninstall_cmds=
1273 if test -n "$RANLIB"; then
1276 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1279 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1282 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1285 # Allow CC to be a program name with arguments.
1289 AC_MSG_CHECKING([for objdir])
1290 rm -f .libs 2>/dev/null
1291 mkdir .libs 2>/dev/null
1292 if test -d .libs; then
1295 # MS-DOS does not allow filenames that begin with a dot.
1298 rmdir .libs 2>/dev/null
1299 AC_MSG_RESULT($objdir)
1303 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1304 pic_mode="$withval", pic_mode=default)
1305 test -z "$pic_mode" && pic_mode=default
1307 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1308 # in isolation, and that seeing it set (from the cache) indicates that
1309 # the associated values are set (in the cache) correctly too.
1310 AC_MSG_CHECKING([for $compiler option to produce PIC])
1311 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1312 [ lt_cv_prog_cc_pic=
1313 lt_cv_prog_cc_shlib=
1315 lt_cv_prog_cc_static=
1316 lt_cv_prog_cc_no_builtin=
1317 lt_cv_prog_cc_can_build_shared=$can_build_shared
1319 if test "$GCC" = yes; then
1320 lt_cv_prog_cc_wl='-Wl,'
1321 lt_cv_prog_cc_static='-static'
1325 # Below there is a dirty hack to force normal static linking with -ldl
1326 # The problem is because libdl dynamically linked with both libc and
1327 # libC (AIX C++ library), which obviously doesn't included in libraries
1328 # list by gcc. This cause undefined symbols with -static flags.
1329 # This hack allows C programs to be linked with "-static -ldl", but
1330 # not sure about C++ programs.
1331 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1334 # FIXME: we need at least 68020 code to build shared libraries, but
1335 # adding the `-m68020' flag to GCC prevents building anything better,
1337 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1339 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1340 # PIC is the default for these OSes.
1342 darwin* | rhapsody*)
1343 # PIC is the default on this platform
1344 # Common symbols not allowed in MH_DYLIB files
1345 lt_cv_prog_cc_pic='-fno-common'
1347 cygwin* | mingw* | pw32* | os2*)
1348 # This hack is so that the source file can tell whether it is being
1349 # built for inclusion in a dll (and should export symbols for example).
1350 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1353 if test -d /usr/nec; then
1354 lt_cv_prog_cc_pic=-Kconform_pic
1358 lt_cv_prog_cc_pic='-fPIC'
1362 # PORTME Check for PIC flags for the system compiler.
1364 aix3* | aix4* | aix5*)
1365 lt_cv_prog_cc_wl='-Wl,'
1366 # All AIX code is PIC.
1367 if test "$host_cpu" = ia64; then
1368 # AIX 5 now supports IA64 processor
1369 lt_cv_prog_cc_static='-Bstatic'
1371 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1375 hpux9* | hpux10* | hpux11*)
1376 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1377 lt_cv_prog_cc_wl='-Wl,'
1378 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1379 lt_cv_prog_cc_pic='+Z'
1382 irix5* | irix6* | nonstopux*)
1383 lt_cv_prog_cc_wl='-Wl,'
1384 lt_cv_prog_cc_static='-non_shared'
1385 # PIC (with -KPIC) is the default.
1388 cygwin* | mingw* | pw32* | os2*)
1389 # This hack is so that the source file can tell whether it is being
1390 # built for inclusion in a dll (and should export symbols for example).
1391 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1395 lt_cv_prog_cc_pic='-KPIC'
1396 lt_cv_prog_cc_static='-Bstatic'
1399 osf3* | osf4* | osf5*)
1400 # All OSF/1 code is PIC.
1401 lt_cv_prog_cc_wl='-Wl,'
1402 lt_cv_prog_cc_static='-non_shared'
1406 lt_cv_prog_cc_pic='-Kpic'
1407 lt_cv_prog_cc_static='-dn'
1408 lt_cv_prog_cc_shlib='-belf'
1412 lt_cv_prog_cc_pic='-KPIC'
1413 lt_cv_prog_cc_static='-Bstatic'
1414 lt_cv_prog_cc_wl='-Wl,'
1418 lt_cv_prog_cc_pic='-PIC'
1419 lt_cv_prog_cc_static='-Bstatic'
1420 lt_cv_prog_cc_wl='-Qoption ld '
1423 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1424 lt_cv_prog_cc_pic='-KPIC'
1425 lt_cv_prog_cc_static='-Bstatic'
1426 lt_cv_prog_cc_wl='-Wl,'
1430 lt_cv_prog_cc_pic='-pic'
1431 lt_cv_prog_cc_static='-Bstatic'
1435 if test -d /usr/nec ;then
1436 lt_cv_prog_cc_pic='-Kconform_pic'
1437 lt_cv_prog_cc_static='-Bstatic'
1442 lt_cv_prog_cc_can_build_shared=no
1447 if test -z "$lt_cv_prog_cc_pic"; then
1448 AC_MSG_RESULT([none])
1450 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1452 # Check to make sure the pic_flag actually works.
1453 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1454 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1455 save_CFLAGS="$CFLAGS"
1456 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1457 AC_TRY_COMPILE([], [], [dnl
1459 hpux9* | hpux10* | hpux11*)
1460 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1461 # they create non-PIC objects. So, if there were any warnings, we
1462 # assume that PIC is not supported.
1463 if test -s conftest.err; then
1464 lt_cv_prog_cc_pic_works=no
1466 lt_cv_prog_cc_pic_works=yes
1470 lt_cv_prog_cc_pic_works=yes
1474 lt_cv_prog_cc_pic_works=no
1476 CFLAGS="$save_CFLAGS"
1479 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1481 lt_cv_prog_cc_can_build_shared=no
1483 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1486 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1489 # Check for any special shared library compilation flags.
1490 if test -n "$lt_cv_prog_cc_shlib"; then
1491 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1492 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1494 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1495 lt_cv_prog_cc_can_build_shared=no
1499 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1500 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1501 lt_cv_prog_cc_static_works=no
1502 save_LDFLAGS="$LDFLAGS"
1503 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1504 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1505 LDFLAGS="$save_LDFLAGS"
1508 # Belt *and* braces to stop my trousers falling down:
1509 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1510 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1512 pic_flag="$lt_cv_prog_cc_pic"
1513 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1514 wl="$lt_cv_prog_cc_wl"
1515 link_static_flag="$lt_cv_prog_cc_static"
1516 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1517 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1520 # Check to see if options -o and -c are simultaneously supported by compiler
1521 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1522 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1523 $rm -r conftest 2>/dev/null
1526 echo "int some_variable = 0;" > conftest.$ac_ext
1528 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1529 # that will create temporary files in the current directory regardless of
1530 # the output directory. Thus, making CWD read-only will cause this test
1531 # to fail, enabling locking or at least warning the user not to do parallel
1534 save_CFLAGS="$CFLAGS"
1535 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1537 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1538 # The compiler can only warn and ignore the option if not recognized
1539 # So say no if there are warnings
1540 if test -s out/conftest.err; then
1541 lt_cv_compiler_c_o=no
1543 lt_cv_compiler_c_o=yes
1546 # Append any errors to the config.log.
1547 cat out/conftest.err 1>&AC_FD_CC
1548 lt_cv_compiler_c_o=no
1550 CFLAGS="$save_CFLAGS"
1556 $rm -r conftest 2>/dev/null
1558 compiler_c_o=$lt_cv_compiler_c_o
1559 AC_MSG_RESULT([$compiler_c_o])
1561 if test x"$compiler_c_o" = x"yes"; then
1562 # Check to see if we can write to a .lo
1563 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1564 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1565 lt_cv_compiler_o_lo=no
1566 save_CFLAGS="$CFLAGS"
1567 CFLAGS="$CFLAGS -c -o conftest.lo"
1568 save_objext="$ac_objext"
1570 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1571 # The compiler can only warn and ignore the option if not recognized
1572 # So say no if there are warnings
1573 if test -s conftest.err; then
1574 lt_cv_compiler_o_lo=no
1576 lt_cv_compiler_o_lo=yes
1579 ac_objext="$save_objext"
1580 CFLAGS="$save_CFLAGS"
1582 compiler_o_lo=$lt_cv_compiler_o_lo
1583 AC_MSG_RESULT([$compiler_o_lo])
1588 # Check to see if we can do hard links to lock some files if needed
1589 hard_links="nottested"
1590 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1591 # do not overwrite the value of need_locks provided by the user
1592 AC_MSG_CHECKING([if we can lock with hard links])
1595 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1597 ln conftest.a conftest.b 2>&5 || hard_links=no
1598 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1599 AC_MSG_RESULT([$hard_links])
1600 if test "$hard_links" = no; then
1601 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1608 if test "$GCC" = yes; then
1609 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1610 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1611 echo "int some_variable = 0;" > conftest.$ac_ext
1612 save_CFLAGS="$CFLAGS"
1613 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1614 compiler_rtti_exceptions=no
1615 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1616 # The compiler can only warn and ignore the option if not recognized
1617 # So say no if there are warnings
1618 if test -s conftest.err; then
1619 compiler_rtti_exceptions=no
1621 compiler_rtti_exceptions=yes
1624 CFLAGS="$save_CFLAGS"
1625 AC_MSG_RESULT([$compiler_rtti_exceptions])
1627 if test "$compiler_rtti_exceptions" = "yes"; then
1628 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1630 no_builtin_flag=' -fno-builtin'
1634 # See if the linker supports building shared libraries.
1635 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1637 allow_undefined_flag=
1639 need_lib_prefix=unknown
1640 need_version=unknown
1641 # when you set need_version to no, make sure it does not cause -set_version
1642 # flags to be left without arguments
1644 archive_expsym_cmds=
1645 old_archive_from_new_cmds=
1646 old_archive_from_expsyms_cmds=
1647 export_dynamic_flag_spec=
1648 whole_archive_flag_spec=
1649 thread_safe_flag_spec=
1650 hardcode_into_libs=no
1651 hardcode_libdir_flag_spec=
1652 hardcode_libdir_separator=
1655 hardcode_shlibpath_var=unsupported
1657 link_all_deplibs=unknown
1658 always_export_symbols=no
1659 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1660 # include_expsyms should be a list of space-separated symbols to be *always*
1661 # included in the symbol list
1663 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1664 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1665 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1666 # as well as any symbol that contains `d'.
1667 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1668 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1669 # platforms (ab)use it in PIC code, but their linkers get confused if
1670 # the symbol is explicitly referenced. Since portable code cannot
1671 # rely on this symbol name, it's probably fine to never include it in
1672 # preloaded symbol tables.
1673 extract_expsyms_cmds=
1676 cygwin* | mingw* | pw32*)
1677 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1678 # When not using gcc, we currently assume that we are using
1679 # Microsoft Visual C++.
1680 if test "$GCC" != yes; then
1690 if test "$with_gnu_ld" = yes; then
1691 # If archive_cmds runs LD, not CC, wlarc should be empty
1694 # See if GNU ld supports shared libraries.
1696 aix3* | aix4* | aix5*)
1697 # On AIX, the GNU linker is very broken
1698 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1702 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1703 *** to be unable to reliably create shared libraries on AIX.
1704 *** Therefore, libtool is disabling shared libraries support. If you
1705 *** really care for shared libraries, you may want to modify your PATH
1706 *** so that a non-GNU linker is found, and then restart.
1712 archive_cmds='$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)'
1713 hardcode_libdir_flag_spec='-L$libdir'
1714 hardcode_minus_L=yes
1716 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1717 # that the semantics of dynamic libraries on AmigaOS, at least up
1718 # to version 4, is to share data among multiple programs linked
1719 # with the same dynamic library. Since this doesn't match the
1720 # behavior of shared libraries on other platforms, we can use
1726 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1727 allow_undefined_flag=unsupported
1728 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1729 # support --undefined. This deserves some investigation. FIXME
1730 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1736 cygwin* | mingw* | pw32*)
1737 # hardcode_libdir_flag_spec is actually meaningless, as there is
1738 # no search path for DLLs.
1739 hardcode_libdir_flag_spec='-L$libdir'
1740 allow_undefined_flag=unsupported
1741 always_export_symbols=yes
1743 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1744 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1745 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1746 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1747 else $CC -o impgen impgen.c ; fi)~
1748 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1750 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1752 # cygwin and mingw dlls have different entry points and sets of symbols
1754 # FIXME: what about values for MSVC?
1755 dll_entry=__cygwin_dll_entry@12
1756 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1760 dll_entry=_DllMainCRTStartup@12
1761 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1765 # mingw and cygwin differ, and it's simplest to just exclude the union
1766 # of the two symbol sets.
1767 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1769 # recent cygwin and mingw systems supply a stub DllMain which the user
1770 # can override, but on older systems we have to supply one (in ltdll.c)
1771 if test "x$lt_cv_need_dllmain" = "xyes"; then
1772 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1773 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1774 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1780 # Extract the symbol export list from an `--export-all' def file,
1781 # then regenerate the def file from the symbol export list, so that
1782 # the compiled dll only exports the symbol export list.
1783 # Be careful not to strip the DATA tag left be newer dlltools.
1784 export_symbols_cmds="$ltdll_cmds"'
1785 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1786 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1788 # If the export-symbols file already is a .def file (1st line
1789 # is EXPORTS), use it as is.
1790 # If DATA tags from a recent dlltool are present, honour them!
1791 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1792 cp $export_symbols $output_objdir/$soname-def;
1794 echo EXPORTS > $output_objdir/$soname-def;
1796 cat $export_symbols | while read symbol; do
1799 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1800 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1801 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1803 _lt_hint=`expr 1 + \$_lt_hint`;
1807 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1808 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1809 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1810 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
1811 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1815 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1816 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1819 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1820 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1825 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1829 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1830 *** create shared libraries on Solaris systems. Therefore, libtool
1831 *** is disabling shared libraries support. We urge you to upgrade GNU
1832 *** binutils to release 2.9.1 or newer. Another option is to modify
1833 *** your PATH or compiler configuration so that the native linker is
1834 *** used, and then restart.
1837 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1838 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1839 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1846 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1849 hardcode_shlibpath_var=no
1853 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1854 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1855 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1862 if test "$ld_shlibs" = yes; then
1863 runpath_var=LD_RUN_PATH
1864 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1865 export_dynamic_flag_spec='${wl}--export-dynamic'
1867 cygwin* | mingw* | pw32*)
1868 # dlltool doesn't understand --whole-archive et. al.
1869 whole_archive_flag_spec=
1872 # ancient GNU ld didn't support --whole-archive et. al.
1873 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1874 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1876 whole_archive_flag_spec=
1882 # PORTME fill in a description of your system's linker (not GNU ld)
1885 allow_undefined_flag=unsupported
1886 always_export_symbols=yes
1887 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1888 # Note: this linker hardcodes the directories in LIBPATH if there
1889 # are no directories specified by -L.
1890 hardcode_minus_L=yes
1891 if test "$GCC" = yes && test -z "$link_static_flag"; then
1892 # Neither direct hardcoding nor static linking is supported with a
1894 hardcode_direct=unsupported
1899 if test "$host_cpu" = ia64; then
1900 # On IA64, the linker does run time linking by default, so we don't
1901 # have to do anything special.
1902 aix_use_runtimelinking=no
1903 exp_sym_flag='-Bexport'
1906 aix_use_runtimelinking=no
1908 # Test if we are trying to use run time linking or normal
1909 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1910 # need to do runtime linking.
1911 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1912 for ld_flag in $LDFLAGS; do
1915 aix_use_runtimelinking=yes
1922 exp_sym_flag='-bexport'
1923 no_entry_flag='-bnoentry'
1926 # When large executables or shared objects are built, AIX ld can
1927 # have problems creating the table of contents. If linking a library
1928 # or program results in "error TOC overflow" add -mminimal-toc to
1929 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1930 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1934 hardcode_libdir_separator=':'
1935 if test "$GCC" = yes; then
1936 case $host_os in aix4.[[012]]|aix4.[[012]].*)
1937 collect2name=`${CC} -print-prog-name=collect2`
1938 if test -f "$collect2name" && \
1939 strings "$collect2name" | grep resolve_lib_name >/dev/null
1941 # We have reworked collect2
1944 # We have old collect2
1945 hardcode_direct=unsupported
1946 # It fails to find uninstalled libraries when the uninstalled
1947 # path is not listed in the libpath. Setting hardcode_minus_L
1948 # to unsupported forces relinking
1949 hardcode_minus_L=yes
1950 hardcode_libdir_flag_spec='-L$libdir'
1951 hardcode_libdir_separator=
1955 shared_flag='-shared'
1958 if test "$host_cpu" = ia64; then
1959 shared_flag='${wl}-G'
1961 if test "$aix_use_runtimelinking" = yes; then
1962 shared_flag='${wl}-G'
1964 shared_flag='${wl}-bM:SRE'
1969 # It seems that -bexpall can do strange things, so it is better to
1970 # generate a list of symbols to export.
1971 always_export_symbols=yes
1972 if test "$aix_use_runtimelinking" = yes; then
1973 # Warning - without using the other runtime loading flags (-brtl),
1974 # -berok will link without error, but may produce a broken library.
1975 allow_undefined_flag='-berok'
1976 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1977 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1979 if test "$host_cpu" = ia64; then
1980 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1981 allow_undefined_flag="-z nodefs"
1982 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1984 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1985 # Warning - without using the other run time loading flags,
1986 # -berok will link without error, but may produce a broken library.
1987 allow_undefined_flag='${wl}-berok'
1988 # This is a bit strange, but is similar to how AIX traditionally builds
1989 # it's shared libraries.
1990 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
1996 archive_cmds='$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)'
1997 hardcode_libdir_flag_spec='-L$libdir'
1998 hardcode_minus_L=yes
1999 # see comment about different semantics on the GNU ld section
2003 cygwin* | mingw* | pw32*)
2004 # When not using gcc, we currently assume that we are using
2005 # Microsoft Visual C++.
2006 # hardcode_libdir_flag_spec is actually meaningless, as there is
2007 # no search path for DLLs.
2008 hardcode_libdir_flag_spec=' '
2009 allow_undefined_flag=unsupported
2010 # Tell ltmain to make .lib files, not .a files.
2012 # FIXME: Setting linknames here is a bad hack.
2013 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2014 # The linker will automatically build a .lib file if we build a DLL.
2015 old_archive_from_new_cmds='true'
2016 # FIXME: Should let the user specify the lib program.
2017 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2018 fix_srcfile_path='`cygpath -w "$srcfile"`'
2021 darwin* | rhapsody*)
2023 rhapsody* | darwin1.[[012]])
2024 allow_undefined_flag='-undefined suppress'
2027 allow_undefined_flag='-flat_namespace -undefined suppress'
2030 # FIXME: Relying on posixy $() will cause problems for
2031 # cross-compilation, but unfortunately the echo tests do not
2032 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2033 # `"' quotes if we put them in here... so don't!
2034 archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2035 # We need to add '_' to the symbols in $export_symbols first
2036 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2038 hardcode_shlibpath_var=no
2039 whole_archive_flag_spec='-all_load $convenience'
2046 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2047 # support. Future versions do this automatically, but an explicit c++rt0.o
2048 # does not break anything, and helps significantly (at the cost of a little
2051 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2052 hardcode_libdir_flag_spec='-R$libdir'
2054 hardcode_shlibpath_var=no
2057 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2059 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2061 hardcode_minus_L=yes
2062 hardcode_shlibpath_var=no
2065 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2067 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2068 hardcode_libdir_flag_spec='-R$libdir'
2070 hardcode_shlibpath_var=no
2073 hpux9* | hpux10* | hpux11*)
2075 hpux9*) archive_cmds='$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' ;;
2076 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2078 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2079 hardcode_libdir_separator=:
2081 hardcode_minus_L=yes # Not in the search PATH, but as the default
2082 # location of the library.
2083 export_dynamic_flag_spec='${wl}-E'
2086 irix5* | irix6* | nonstopux*)
2087 if test "$GCC" = yes; then
2088 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2089 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2091 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2092 hardcode_libdir_flag_spec='-rpath $libdir'
2094 hardcode_libdir_separator=:
2095 link_all_deplibs=yes
2099 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2100 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2102 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2104 hardcode_libdir_flag_spec='-R$libdir'
2106 hardcode_shlibpath_var=no
2110 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2112 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2113 hardcode_libdir_separator=:
2114 hardcode_shlibpath_var=no
2119 hardcode_shlibpath_var=no
2120 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2121 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2122 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2123 export_dynamic_flag_spec='${wl}-E'
2126 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2127 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2128 hardcode_libdir_flag_spec='-R$libdir'
2131 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2132 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2139 hardcode_libdir_flag_spec='-L$libdir'
2140 hardcode_minus_L=yes
2141 allow_undefined_flag=unsupported
2142 archive_cmds='$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'
2143 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2147 if test "$GCC" = yes; then
2148 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2149 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2151 allow_undefined_flag=' -expect_unresolved \*'
2152 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2154 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2155 hardcode_libdir_separator=:
2158 osf4* | osf5*) # as osf3* with the addition of -msym flag
2159 if test "$GCC" = yes; then
2160 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2161 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2162 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2164 allow_undefined_flag=' -expect_unresolved \*'
2165 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2166 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2167 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2169 #Both c and cxx compiler support -rpath directly
2170 hardcode_libdir_flag_spec='-rpath $libdir'
2172 hardcode_libdir_separator=:
2176 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2177 hardcode_shlibpath_var=no
2178 runpath_var=LD_RUN_PATH
2179 hardcode_runpath_var=yes
2180 export_dynamic_flag_spec='${wl}-Bexport'
2184 # gcc --version < 3.0 without binutils cannot create self contained
2185 # shared libraries reliably, requiring libgcc.a to resolve some of
2186 # the object symbols generated in some cases. Libraries that use
2187 # assert need libgcc.a to resolve __eprintf, for example. Linking
2188 # a copy of libgcc.a into every shared library to guarantee resolving
2189 # such symbols causes other problems: According to Tim Van Holder
2190 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2191 # (to the application) exception stack for one thing.
2192 no_undefined_flag=' -z defs'
2193 if test "$GCC" = yes; then
2194 case `$CC --version 2>/dev/null` in
2198 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2199 *** create self contained shared libraries on Solaris systems, without
2200 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2201 *** -no-undefined support, which will at least allow you to build shared
2202 *** libraries. However, you may find that when you link such libraries
2203 *** into an application without using GCC, you have to manually add
2204 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2205 *** upgrade to a newer version of GCC. Another option is to rebuild your
2206 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2213 # $CC -shared without GNU ld will not create a library from C++
2214 # object files and a static libstdc++, better avoid it by now
2215 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2216 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2217 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2218 hardcode_libdir_flag_spec='-R$libdir'
2219 hardcode_shlibpath_var=no
2221 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2222 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2223 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2225 link_all_deplibs=yes
2229 if test "x$host_vendor" = xsequent; then
2230 # Use $CC to link under sequent, because it throws in some extra .o
2231 # files that make .init and .fini sections work.
2232 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2234 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2236 hardcode_libdir_flag_spec='-L$libdir'
2238 hardcode_minus_L=yes
2239 hardcode_shlibpath_var=no
2243 case $host_vendor in
2245 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2246 hardcode_direct=yes # is this really true???
2249 ## LD is ld it makes a PLAMLIB
2250 ## CC just makes a GrossModule.
2251 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2252 reload_cmds='$CC -r -o $output$reload_objs'
2256 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2257 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2260 runpath_var='LD_RUN_PATH'
2261 hardcode_shlibpath_var=no
2265 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2266 hardcode_shlibpath_var=no
2267 export_dynamic_flag_spec='-Bexport'
2271 no_undefined_flag=' -z text'
2272 # $CC -shared without GNU ld will not create a library from C++
2273 # object files and a static libstdc++, better avoid it by now
2274 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2275 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2276 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2277 hardcode_libdir_flag_spec=
2278 hardcode_shlibpath_var=no
2279 runpath_var='LD_RUN_PATH'
2283 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2284 hardcode_libdir_flag_spec='-L$libdir'
2285 hardcode_shlibpath_var=no
2289 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2290 hardcode_libdir_flag_spec='-L$libdir'
2291 hardcode_shlibpath_var=no
2295 if test -d /usr/nec; then
2296 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2297 hardcode_shlibpath_var=no
2298 runpath_var=LD_RUN_PATH
2299 hardcode_runpath_var=yes
2305 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2308 hardcode_shlibpath_var=no
2309 hardcode_runpath_var=yes
2310 runpath_var=LD_RUN_PATH
2313 sysv5uw7* | unixware7*)
2314 no_undefined_flag='${wl}-z ${wl}text'
2315 if test "$GCC" = yes; then
2316 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2318 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2320 runpath_var='LD_RUN_PATH'
2321 hardcode_shlibpath_var=no
2329 AC_MSG_RESULT([$ld_shlibs])
2330 test "$ld_shlibs" = no && can_build_shared=no
2332 # Check hardcoding attributes.
2333 AC_MSG_CHECKING([how to hardcode library paths into programs])
2335 if test -n "$hardcode_libdir_flag_spec" || \
2336 test -n "$runpath_var"; then
2338 # We can hardcode non-existant directories.
2339 if test "$hardcode_direct" != no &&
2340 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2341 # have to relink, otherwise we might link with an installed library
2342 # when we should be linking with a yet-to-be-installed one
2343 ## test "$hardcode_shlibpath_var" != no &&
2344 test "$hardcode_minus_L" != no; then
2345 # Linking always hardcodes the temporary library directory.
2346 hardcode_action=relink
2348 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2349 hardcode_action=immediate
2352 # We cannot hardcode anything, or else we can only hardcode existing
2354 hardcode_action=unsupported
2356 AC_MSG_RESULT([$hardcode_action])
2360 AC_MSG_CHECKING([whether stripping libraries is possible])
2361 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2362 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2363 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2364 AC_MSG_RESULT([yes])
2369 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2370 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2372 # PORTME Fill in your ld.so characteristics
2373 AC_MSG_CHECKING([dynamic linker characteristics])
2375 libname_spec='lib$name'
2382 shlibpath_overrides_runpath=unknown
2384 dynamic_linker="$host_os ld.so"
2385 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2386 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2391 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2392 shlibpath_var=LIBPATH
2394 # AIX has no versioning support, so we append a major version to the name.
2395 soname_spec='${libname}${release}.so$major'
2402 hardcode_into_libs=yes
2403 if test "$host_cpu" = ia64; then
2404 # AIX 5 supports IA64
2405 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2406 shlibpath_var=LD_LIBRARY_PATH
2408 # With GCC up to 2.95.x, collect2 would create an import file
2409 # for dependence libraries. The import file would start with
2410 # the line `#! .'. This would cause the generated library to
2411 # depend on `.', always an invalid library. This was fixed in
2412 # development snapshots of GCC prior to 3.0.
2414 aix4 | aix4.[[01]] | aix4.[[01]].*)
2415 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2417 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2424 # AIX (on Power*) has no versioning support, so currently we can
2425 # not hardcode correct soname into executable. Probably we can
2426 # add versioning support to collect2, so additional links can
2427 # be useful in future.
2428 if test "$aix_use_runtimelinking" = yes; then
2429 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2430 # instead of lib<name>.a to let people know that these are not
2431 # typical AIX shared libraries.
2432 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2434 # We preserve .a as extension for shared libraries through AIX4.2
2435 # and later when we are not doing run time linking.
2436 library_names_spec='${libname}${release}.a $libname.a'
2437 soname_spec='${libname}${release}.so$major'
2439 shlibpath_var=LIBPATH
2441 hardcode_into_libs=yes
2445 library_names_spec='$libname.ixlibrary $libname.a'
2446 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2447 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
2451 library_names_spec='${libname}.so'
2452 dynamic_linker="$host_os ld.so"
2453 shlibpath_var=LIBRARY_PATH
2459 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2460 soname_spec='${libname}${release}.so$major'
2461 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2462 shlibpath_var=LD_LIBRARY_PATH
2463 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2464 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2465 export_dynamic_flag_spec=-rdynamic
2466 # the default ld.so.conf also contains /usr/contrib/lib and
2467 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2468 # libtool to hard-code these into programs
2471 cygwin* | mingw* | pw32*)
2472 version_type=windows
2475 case $GCC,$host_os in
2477 library_names_spec='$libname.dll.a'
2478 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2479 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2480 dldir=$destdir/`dirname \$dlpath`~
2481 test -d \$dldir || mkdir -p \$dldir~
2482 $install_prog .libs/$dlname \$dldir/$dlname'
2483 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2484 dlpath=$dir/\$dldll~
2488 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2489 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2492 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2495 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2498 dynamic_linker='Win32 ld.exe'
2499 # FIXME: first we should search . and the directory the executable is in
2503 darwin* | rhapsody*)
2504 dynamic_linker="$host_os dyld"
2508 # FIXME: Relying on posixy $() will cause problems for
2509 # cross-compilation, but unfortunately the echo tests do not
2510 # yet detect zsh echo's removal of \ escapes.
2511 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2512 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2513 shlibpath_overrides_runpath=yes
2514 shlibpath_var=DYLD_LIBRARY_PATH
2522 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2523 version_type=freebsd-$objformat
2524 case $version_type in
2526 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2531 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2535 shlibpath_var=LD_LIBRARY_PATH
2538 shlibpath_overrides_runpath=yes
2541 shlibpath_overrides_runpath=no
2542 hardcode_into_libs=yes
2551 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2552 soname_spec='${libname}${release}.so$major'
2553 shlibpath_var=LD_LIBRARY_PATH
2554 hardcode_into_libs=yes
2557 hpux9* | hpux10* | hpux11*)
2558 # Give a soname corresponding to the major version so that dld.sl refuses to
2559 # link against other versions.
2560 dynamic_linker="$host_os dld.sl"
2564 shlibpath_var=SHLIB_PATH
2565 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2566 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2567 soname_spec='${libname}${release}.sl$major'
2568 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2569 postinstall_cmds='chmod 555 $lib'
2572 irix5* | irix6* | nonstopux*)
2574 nonstopux*) version_type=nonstopux ;;
2575 *) version_type=irix ;;
2579 soname_spec='${libname}${release}.so$major'
2580 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2582 irix5* | nonstopux*)
2586 case $LD in # libtool.m4 will add one of these switches to LD
2587 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2588 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2589 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2590 *) libsuff= shlibsuff= libmagic=never-match;;
2594 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2595 shlibpath_overrides_runpath=no
2596 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2597 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2600 # No shared lib support for Linux oldld, aout, or coff.
2601 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2605 # This must be Linux ELF.
2610 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2611 soname_spec='${libname}${release}.so$major'
2612 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2613 shlibpath_var=LD_LIBRARY_PATH
2614 shlibpath_overrides_runpath=no
2615 # This implies no fast_install, which is unacceptable.
2616 # Some rework will be needed to allow for fast_install
2617 # before this can be enabled.
2618 hardcode_into_libs=yes
2620 # We used to test for /lib/ld.so.1 and disable shared libraries on
2621 # powerpc, because MkLinux only supported shared libraries with the
2622 # GNU dynamic linker. Since this was broken with cross compilers,
2623 # most powerpc-linux boxes support dynamic linking these days and
2624 # people can always --disable-shared, the test was removed, and we
2625 # assume the GNU/Linux dynamic linker is in use.
2626 dynamic_linker='GNU/Linux ld.so'
2628 # Find out which ABI we are using (multilib Linux x86_64 hack).
2632 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2633 if AC_TRY_EVAL(ac_compile); then
2634 case `/usr/bin/file conftest.$ac_objext` in
2645 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
2646 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
2653 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2654 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2655 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2656 dynamic_linker='NetBSD (a.out) ld.so'
2658 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2659 soname_spec='${libname}${release}.so$major'
2660 dynamic_linker='NetBSD ld.elf_so'
2662 shlibpath_var=LD_LIBRARY_PATH
2663 shlibpath_overrides_runpath=yes
2664 hardcode_into_libs=yes
2669 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2670 shlibpath_var=LD_LIBRARY_PATH
2671 shlibpath_overrides_runpath=yes
2678 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2680 openbsd2.[[89]] | openbsd2.[[89]].*)
2681 shlibpath_overrides_runpath=no
2684 shlibpath_overrides_runpath=yes
2688 shlibpath_overrides_runpath=yes
2690 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2691 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2692 shlibpath_var=LD_LIBRARY_PATH
2696 libname_spec='$name'
2698 library_names_spec='$libname.dll $libname.a'
2699 dynamic_linker='OS/2 ld.exe'
2700 shlibpath_var=LIBPATH
2703 osf3* | osf4* | osf5*)
2706 soname_spec='${libname}${release}.so$major'
2707 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2708 shlibpath_var=LD_LIBRARY_PATH
2709 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2710 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2711 hardcode_into_libs=yes
2716 soname_spec='${libname}${release}.so$major'
2717 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2718 shlibpath_var=LD_LIBRARY_PATH
2725 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2726 soname_spec='${libname}${release}.so$major'
2727 shlibpath_var=LD_LIBRARY_PATH
2728 shlibpath_overrides_runpath=yes
2729 hardcode_into_libs=yes
2730 # ldd complains unless libraries are executable
2731 postinstall_cmds='chmod +x $lib'
2736 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2737 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2738 shlibpath_var=LD_LIBRARY_PATH
2739 shlibpath_overrides_runpath=yes
2740 if test "$with_gnu_ld" = yes; then
2746 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2748 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2749 soname_spec='${libname}${release}.so$major'
2750 shlibpath_var=LD_LIBRARY_PATH
2751 case $host_vendor in
2753 shlibpath_overrides_runpath=no
2755 export_dynamic_flag_spec='${wl}-Blargedynsym'
2756 runpath_var=LD_RUN_PATH
2764 shlibpath_overrides_runpath=no
2765 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2772 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2773 soname_spec='${libname}${release}.so$major'
2774 shlibpath_var=LD_LIBRARY_PATH
2781 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2782 soname_spec='${libname}${release}.so$major'
2783 shlibpath_var=LD_LIBRARY_PATH
2787 if test -d /usr/nec ;then
2789 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2790 soname_spec='$libname.so.$major'
2791 shlibpath_var=LD_LIBRARY_PATH
2799 AC_MSG_RESULT([$dynamic_linker])
2800 test "$dynamic_linker" = no && can_build_shared=no
2802 # Report the final consequences.
2803 AC_MSG_CHECKING([if libtool supports shared libraries])
2804 AC_MSG_RESULT([$can_build_shared])
2806 AC_MSG_CHECKING([whether to build shared libraries])
2807 test "$can_build_shared" = "no" && enable_shared=no
2809 # On AIX, shared libraries and static libraries use the same namespace, and
2810 # are all built from PIC.
2813 test "$enable_shared" = yes && enable_static=no
2814 if test -n "$RANLIB"; then
2815 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2816 postinstall_cmds='$RANLIB $lib'
2821 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2822 test "$enable_shared" = yes && enable_static=no
2826 AC_MSG_RESULT([$enable_shared])
2828 AC_MSG_CHECKING([whether to build static libraries])
2829 # Make sure either enable_shared or enable_static is yes.
2830 test "$enable_shared" = yes || enable_static=yes
2831 AC_MSG_RESULT([$enable_static])
2833 if test "$hardcode_action" = relink; then
2834 # Fast installation is not supported
2835 enable_fast_install=no
2836 elif test "$shlibpath_overrides_runpath" = yes ||
2837 test "$enable_shared" = no; then
2838 # Fast installation is not necessary
2839 enable_fast_install=needless
2842 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2843 if test "$GCC" = yes; then
2844 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2847 AC_LIBTOOL_DLOPEN_SELF
2849 if test "$enable_shared" = yes && test "$GCC" = yes; then
2850 case $archive_cmds in
2852 # FIXME: we may have to deal with multi-command sequences.
2855 # Test whether the compiler implicitly links with -lc since on some
2856 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2857 # to ld, don't add -lc before -lgcc.
2858 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2859 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2861 echo 'static int dummy;' > conftest.$ac_ext
2863 if AC_TRY_EVAL(ac_compile); then
2866 libobjs=conftest.$ac_objext
2868 wl=$lt_cv_prog_cc_wl
2874 save_allow_undefined_flag=$allow_undefined_flag
2875 allow_undefined_flag=
2876 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2878 lt_cv_archive_cmds_need_lc=no
2880 lt_cv_archive_cmds_need_lc=yes
2882 allow_undefined_flag=$save_allow_undefined_flag
2884 cat conftest.err 1>&5
2886 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2890 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2892 # The second clause should only fire when bootstrapping the
2893 # libtool distribution, otherwise you forgot to ship ltmain.sh
2894 # with your package, and you will get complaints that there are
2895 # no rules to generate ltmain.sh.
2896 if test -f "$ltmain"; then
2899 # If there is no Makefile yet, we rely on a make rule to execute
2900 # `config.status --recheck' to rerun these tests and create the
2901 # libtool script then.
2902 test -f Makefile && make "$ltmain"
2905 if test -f "$ltmain"; then
2906 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2909 echo creating $ofile
2911 # Now quote all the things that may contain metacharacters while being
2912 # careful not to overquote the AC_SUBSTed values. We take copies of the
2913 # variables and quote the copies for generation of the libtool script.
2914 for var in echo old_CC old_CFLAGS SED \
2915 AR AR_FLAGS CC LD LN_S NM SHELL \
2916 reload_flag reload_cmds wl \
2917 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2918 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2919 library_names_spec soname_spec \
2920 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2921 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2922 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2923 old_striplib striplib file_magic_cmd export_symbols_cmds \
2924 deplibs_check_method allow_undefined_flag no_undefined_flag \
2925 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2926 global_symbol_to_c_name_address \
2927 hardcode_libdir_flag_spec hardcode_libdir_separator \
2928 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2929 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2932 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2933 old_postinstall_cmds | old_postuninstall_cmds | \
2934 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2935 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2936 postinstall_cmds | postuninstall_cmds | \
2937 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2938 # Double-quote double-evaled strings.
2939 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2942 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2947 cat <<__EOF__ > "${ofile}T"
2950 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2951 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2952 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2954 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2955 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2957 # This program is free software; you can redistribute it and/or modify
2958 # it under the terms of the GNU General Public License as published by
2959 # the Free Software Foundation; either version 2 of the License, or
2960 # (at your option) any later version.
2962 # This program is distributed in the hope that it will be useful, but
2963 # WITHOUT ANY WARRANTY; without even the implied warranty of
2964 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2965 # General Public License for more details.
2967 # You should have received a copy of the GNU General Public License
2968 # along with this program; if not, write to the Free Software
2969 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2971 # As a special exception to the GNU General Public License, if you
2972 # distribute this file as part of a program that contains a
2973 # configuration script generated by Autoconf, you may include it under
2974 # the same distribution terms that you use for the rest of that program.
2976 # A sed that does not truncate output.
2979 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2980 Xsed="${SED} -e s/^X//"
2982 # The HP-UX ksh and POSIX shell print the target directory to stdout
2984 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2986 # ### BEGIN LIBTOOL CONFIG
2988 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2990 # Shell to use when invoking shell scripts.
2993 # Whether or not to build shared libraries.
2994 build_libtool_libs=$enable_shared
2996 # Whether or not to build static libraries.
2997 build_old_libs=$enable_static
2999 # Whether or not to add -lc for building shared libraries.
3000 build_libtool_need_lc=$need_lc
3002 # Whether or not to optimize for fast installation.
3003 fast_install=$enable_fast_install
3006 host_alias=$host_alias
3009 # An echo program that does not interpret backslashes.
3014 AR_FLAGS=$lt_AR_FLAGS
3016 # The default C compiler.
3019 # Is the compiler the GNU C compiler?
3022 # The linker used to build libraries.
3025 # Whether we need hard or soft links.
3028 # A BSD-compatible nm program.
3031 # A symbol stripping program
3034 # Used to examine libraries when file_magic_cmd begins "file"
3035 MAGIC_CMD=$MAGIC_CMD
3037 # Used on cygwin: DLL creation program.
3040 # Used on cygwin: object dumper.
3043 # Used on cygwin: assembler.
3046 # The name of the directory that contains temporary libtool files.
3049 # How to create reloadable object files.
3050 reload_flag=$lt_reload_flag
3051 reload_cmds=$lt_reload_cmds
3053 # How to pass a linker flag through the compiler.
3056 # Object file suffix (normally "o").
3059 # Old archive suffix (normally "a").
3062 # Executable file suffix (normally "").
3065 # Additional compiler flags for building library objects.
3066 pic_flag=$lt_pic_flag
3069 # Does compiler simultaneously support -c and -o options?
3070 compiler_c_o=$lt_compiler_c_o
3072 # Can we write directly to a .lo ?
3073 compiler_o_lo=$lt_compiler_o_lo
3075 # Must we lock files when doing compilation ?
3076 need_locks=$lt_need_locks
3078 # Do we need the lib prefix for modules?
3079 need_lib_prefix=$need_lib_prefix
3081 # Do we need a version for libraries?
3082 need_version=$need_version
3084 # Whether dlopen is supported.
3085 dlopen_support=$enable_dlopen
3087 # Whether dlopen of programs is supported.
3088 dlopen_self=$enable_dlopen_self
3090 # Whether dlopen of statically linked programs is supported.
3091 dlopen_self_static=$enable_dlopen_self_static
3093 # Compiler flag to prevent dynamic linking.
3094 link_static_flag=$lt_link_static_flag
3096 # Compiler flag to turn off builtin functions.
3097 no_builtin_flag=$lt_no_builtin_flag
3099 # Compiler flag to allow reflexive dlopens.
3100 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3102 # Compiler flag to generate shared objects directly from archives.
3103 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3105 # Compiler flag to generate thread-safe objects.
3106 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3108 # Library versioning type.
3109 version_type=$version_type
3111 # Format of library name prefix.
3112 libname_spec=$lt_libname_spec
3114 # List of archive names. First name is the real one, the rest are links.
3115 # The last name is the one that the linker finds with -lNAME.
3116 library_names_spec=$lt_library_names_spec
3118 # The coded name of the library, if different from the real name.
3119 soname_spec=$lt_soname_spec
3121 # Commands used to build and install an old-style archive.
3123 old_archive_cmds=$lt_old_archive_cmds
3124 old_postinstall_cmds=$lt_old_postinstall_cmds
3125 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3127 # Create an old-style archive from a shared archive.
3128 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3130 # Create a temporary old-style archive to link instead of a shared archive.
3131 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3133 # Commands used to build and install a shared archive.
3134 archive_cmds=$lt_archive_cmds
3135 archive_expsym_cmds=$lt_archive_expsym_cmds
3136 postinstall_cmds=$lt_postinstall_cmds
3137 postuninstall_cmds=$lt_postuninstall_cmds
3139 # Commands to strip libraries.
3140 old_striplib=$lt_old_striplib
3141 striplib=$lt_striplib
3143 # Method to check whether dependent libraries are shared objects.
3144 deplibs_check_method=$lt_deplibs_check_method
3146 # Command to use when deplibs_check_method == file_magic.
3147 file_magic_cmd=$lt_file_magic_cmd
3149 # Flag that allows shared libraries with undefined symbols to be built.
3150 allow_undefined_flag=$lt_allow_undefined_flag
3152 # Flag that forces no undefined symbols.
3153 no_undefined_flag=$lt_no_undefined_flag
3155 # Commands used to finish a libtool library installation in a directory.
3156 finish_cmds=$lt_finish_cmds
3158 # Same as above, but a single script fragment to be evaled but not shown.
3159 finish_eval=$lt_finish_eval
3161 # Take the output of nm and produce a listing of raw symbols and C names.
3162 global_symbol_pipe=$lt_global_symbol_pipe
3164 # Transform the output of nm in a proper C declaration
3165 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3167 # Transform the output of nm in a C name address pair
3168 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3170 # This is the shared library runtime path variable.
3171 runpath_var=$runpath_var
3173 # This is the shared library path variable.
3174 shlibpath_var=$shlibpath_var
3176 # Is shlibpath searched before the hard-coded library search path?
3177 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3179 # How to hardcode a shared library path into an executable.
3180 hardcode_action=$hardcode_action
3182 # Whether we should hardcode library paths into libraries.
3183 hardcode_into_libs=$hardcode_into_libs
3185 # Flag to hardcode \$libdir into a binary during linking.
3186 # This must work even if \$libdir does not exist.
3187 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3189 # Whether we need a single -rpath flag with a separated argument.
3190 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3192 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3194 hardcode_direct=$hardcode_direct
3196 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3198 hardcode_minus_L=$hardcode_minus_L
3200 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3201 # the resulting binary.
3202 hardcode_shlibpath_var=$hardcode_shlibpath_var
3204 # Variables whose values should be saved in libtool wrapper scripts and
3205 # restored at relink time.
3206 variables_saved_for_relink="$variables_saved_for_relink"
3208 # Whether libtool must link a program against all its dependency libraries.
3209 link_all_deplibs=$link_all_deplibs
3211 # Compile-time system search path for libraries
3212 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3214 # Run-time system search path for libraries
3215 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3217 # Fix the shell variable \$srcfile for the compiler.
3218 fix_srcfile_path="$fix_srcfile_path"
3220 # Set to yes if exported symbols are required.
3221 always_export_symbols=$always_export_symbols
3223 # The commands to list exported symbols.
3224 export_symbols_cmds=$lt_export_symbols_cmds
3226 # The commands to extract the exported symbol list from a shared archive.
3227 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3229 # Symbols that should not be listed in the preloaded symbols.
3230 exclude_expsyms=$lt_exclude_expsyms
3232 # Symbols that must always be exported.
3233 include_expsyms=$lt_include_expsyms
3235 # ### END LIBTOOL CONFIG
3241 cat <<\EOF >> "${ofile}T"
3243 # AIX sometimes has problems with the GCC collect2 program. For some
3244 # reason, if we set the COLLECT_NAMES environment variable, the problems
3245 # vanish in a puff of smoke.
3246 if test "X${COLLECT_NAMES+set}" != Xset; then
3248 export COLLECT_NAMES
3255 cygwin* | mingw* | pw32* | os2*)
3256 cat <<'EOF' >> "${ofile}T"
3257 # This is a source program that is used to create dlls on Windows
3258 # Don't remove nor modify the starting and closing comments
3259 # /* ltdll.c starts here */
3260 # #define WIN32_LEAN_AND_MEAN
3261 # #include <windows.h>
3262 # #undef WIN32_LEAN_AND_MEAN
3263 # #include <stdio.h>
3265 # #ifndef __CYGWIN__
3266 # # ifdef __CYGWIN32__
3267 # # define __CYGWIN__ __CYGWIN32__
3271 # #ifdef __cplusplus
3274 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3275 # #ifdef __cplusplus
3280 # #include <cygwin/cygwin_dll.h>
3281 # DECLARE_CYGWIN_DLL( DllMain );
3283 # HINSTANCE __hDllInstance_base;
3286 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3288 # __hDllInstance_base = hInst;
3291 # /* ltdll.c ends here */
3292 # This is a source program that is used to create import libraries
3293 # on Windows for dlls which lack them. Don't remove nor modify the
3294 # starting and closing comments
3295 # /* impgen.c starts here */
3296 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3298 # This file is part of GNU libtool.
3300 # This program is free software; you can redistribute it and/or modify
3301 # it under the terms of the GNU General Public License as published by
3302 # the Free Software Foundation; either version 2 of the License, or
3303 # (at your option) any later version.
3305 # This program is distributed in the hope that it will be useful,
3306 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3307 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3308 # GNU General Public License for more details.
3310 # You should have received a copy of the GNU General Public License
3311 # along with this program; if not, write to the Free Software
3312 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3315 # #include <stdio.h> /* for printf() */
3316 # #include <unistd.h> /* for open(), lseek(), read() */
3317 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3318 # #include <string.h> /* for strdup() */
3320 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3322 # #define O_BINARY 0
3325 # static unsigned int
3326 # pe_get16 (fd, offset)
3330 # unsigned char b[2];
3331 # lseek (fd, offset, SEEK_SET);
3333 # return b[0] + (b[1]<<8);
3336 # static unsigned int
3337 # pe_get32 (fd, offset)
3341 # unsigned char b[4];
3342 # lseek (fd, offset, SEEK_SET);
3344 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3347 # static unsigned int
3351 # unsigned char *b = ptr;
3352 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3361 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3362 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3363 # unsigned long name_rvas, nexp;
3364 # unsigned char *expdata, *erva;
3365 # char *filename, *dll_name;
3367 # filename = argv[1];
3369 # dll = open(filename, O_RDONLY|O_BINARY);
3373 # dll_name = filename;
3375 # for (i=0; filename[i]; i++)
3376 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3377 # dll_name = filename + i +1;
3379 # pe_header_offset = pe_get32 (dll, 0x3c);
3380 # opthdr_ofs = pe_header_offset + 4 + 20;
3381 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3383 # if (num_entries < 1) /* no exports */
3386 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3387 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3388 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3389 # secptr = (pe_header_offset + 4 + 20 +
3390 # pe_get16 (dll, pe_header_offset + 4 + 16));
3393 # for (i = 0; i < nsections; i++)
3396 # unsigned long secptr1 = secptr + 40 * i;
3397 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3398 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3399 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3400 # lseek(dll, secptr1, SEEK_SET);
3401 # read(dll, sname, 8);
3402 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3404 # expptr = fptr + (export_rva - vaddr);
3405 # if (export_rva + export_size > vaddr + vsize)
3406 # export_size = vsize - (export_rva - vaddr);
3411 # expdata = (unsigned char*)malloc(export_size);
3412 # lseek (dll, expptr, SEEK_SET);
3413 # read (dll, expdata, export_size);
3414 # erva = expdata - export_rva;
3416 # nexp = pe_as32 (expdata+24);
3417 # name_rvas = pe_as32 (expdata+32);
3419 # printf ("EXPORTS\n");
3420 # for (i = 0; i<nexp; i++)
3422 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3423 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3428 # /* impgen.c ends here */
3434 # We use sed instead of cat because bash on DJGPP gets confused if
3435 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3436 # text mode, it properly converts lines to CR/LF. This bash problem
3437 # is reportedly fixed, but why not run on old versions too?
3438 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3440 mv -f "${ofile}T" "$ofile" || \
3441 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3445 ])# _LT_AC_LTCONFIG_HACK
3447 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3448 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3450 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3451 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3453 # AC_ENABLE_SHARED - implement the --enable-shared flag
3454 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3455 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3457 AC_DEFUN([AC_ENABLE_SHARED],
3458 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3459 AC_ARG_ENABLE(shared,
3460 changequote(<<, >>)dnl
3461 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3462 changequote([, ])dnl
3463 [p=${PACKAGE-default}
3465 yes) enable_shared=yes ;;
3466 no) enable_shared=no ;;
3469 # Look at the argument we got. We use all the common list separators.
3470 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3471 for pkg in $enableval; do
3472 if test "X$pkg" = "X$p"; then
3479 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3482 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3483 AC_DEFUN([AC_DISABLE_SHARED],
3484 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3485 AC_ENABLE_SHARED(no)])
3487 # AC_ENABLE_STATIC - implement the --enable-static flag
3488 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3489 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3491 AC_DEFUN([AC_ENABLE_STATIC],
3492 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3493 AC_ARG_ENABLE(static,
3494 changequote(<<, >>)dnl
3495 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3496 changequote([, ])dnl
3497 [p=${PACKAGE-default}
3499 yes) enable_static=yes ;;
3500 no) enable_static=no ;;
3503 # Look at the argument we got. We use all the common list separators.
3504 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3505 for pkg in $enableval; do
3506 if test "X$pkg" = "X$p"; then
3513 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3516 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3517 AC_DEFUN([AC_DISABLE_STATIC],
3518 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3519 AC_ENABLE_STATIC(no)])
3522 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3523 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3524 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3526 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3527 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3528 AC_ARG_ENABLE(fast-install,
3529 changequote(<<, >>)dnl
3530 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3531 changequote([, ])dnl
3532 [p=${PACKAGE-default}
3534 yes) enable_fast_install=yes ;;
3535 no) enable_fast_install=no ;;
3537 enable_fast_install=no
3538 # Look at the argument we got. We use all the common list separators.
3539 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3540 for pkg in $enableval; do
3541 if test "X$pkg" = "X$p"; then
3542 enable_fast_install=yes
3548 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3551 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3552 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3553 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3554 AC_ENABLE_FAST_INSTALL(no)])
3556 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3557 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3558 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3560 AC_DEFUN([AC_LIBTOOL_PICMODE],
3561 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3562 pic_mode=ifelse($#,1,$1,default)])
3565 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3566 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3567 [AC_MSG_CHECKING([for $1])
3568 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3571 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3574 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3577 ac_save_MAGIC_CMD="$MAGIC_CMD"
3578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3579 dnl $ac_dummy forces splitting on constant user-supplied paths.
3580 dnl POSIX.2 word splitting is done only on the output of word expansions,
3581 dnl not every word. This closes a longstanding sh security hole.
3582 ac_dummy="ifelse([$2], , $PATH, [$2])"
3583 for ac_dir in $ac_dummy; do
3584 test -z "$ac_dir" && ac_dir=.
3585 if test -f $ac_dir/$1; then
3586 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3587 if test -n "$file_magic_test_file"; then
3588 case $deplibs_check_method in
3590 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3591 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3592 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3593 egrep "$file_magic_regex" > /dev/null; then
3598 *** Warning: the command libtool uses to detect shared libraries,
3599 *** $file_magic_cmd, produces output that libtool cannot recognize.
3600 *** The result is that libtool may fail to recognize shared libraries
3601 *** as such. This will affect the creation of libtool libraries that
3602 *** depend on shared libraries, but programs linked with such libtool
3603 *** libraries will work regardless of this problem. Nevertheless, you
3604 *** may want to report the problem to your system manager and/or to
3605 *** bug-libtool@gnu.org
3615 MAGIC_CMD="$ac_save_MAGIC_CMD"
3618 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3619 if test -n "$MAGIC_CMD"; then
3620 AC_MSG_RESULT($MAGIC_CMD)
3627 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3628 AC_DEFUN([AC_PATH_MAGIC],
3629 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3630 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3631 if test -z "$lt_cv_path_MAGIC_CMD"; then
3632 if test -n "$ac_tool_prefix"; then
3633 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3641 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3642 AC_DEFUN([AC_PROG_LD],
3643 [AC_ARG_WITH(gnu-ld,
3644 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3645 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3646 AC_REQUIRE([AC_PROG_CC])dnl
3647 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3648 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3649 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3651 if test "$GCC" = yes; then
3652 # Check if gcc -print-prog-name=ld gives a path.
3653 AC_MSG_CHECKING([for ld used by GCC])
3656 # gcc leaves a trailing carriage return which upsets mingw
3657 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3659 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3662 # Accept absolute paths.
3663 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3664 re_direlt='/[[^/]][[^/]]*/\.\./'
3665 # Canonicalize the path of ld
3666 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3667 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3668 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3670 test -z "$LD" && LD="$ac_prog"
3673 # If it fails, then pretend we aren't using GCC.
3677 # If it is relative, then search for the first ld in PATH.
3681 elif test "$with_gnu_ld" = yes; then
3682 AC_MSG_CHECKING([for GNU ld])
3684 AC_MSG_CHECKING([for non-GNU ld])
3686 AC_CACHE_VAL(lt_cv_path_LD,
3687 [if test -z "$LD"; then
3688 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3689 for ac_dir in $PATH; do
3690 test -z "$ac_dir" && ac_dir=.
3691 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3692 lt_cv_path_LD="$ac_dir/$ac_prog"
3693 # Check to see if the program is GNU ld. I'd rather use --version,
3694 # but apparently some GNU ld's only accept -v.
3695 # Break only if it was the GNU/non-GNU ld that we prefer.
3696 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3697 test "$with_gnu_ld" != no && break
3699 test "$with_gnu_ld" != yes && break
3705 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3708 if test -n "$LD"; then
3713 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3718 AC_DEFUN([AC_PROG_LD_GNU],
3719 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3720 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3721 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3722 lt_cv_prog_gnu_ld=yes
3724 lt_cv_prog_gnu_ld=no
3726 with_gnu_ld=$lt_cv_prog_gnu_ld
3729 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3730 # -- PORTME Some linkers may need a different reload flag.
3731 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3732 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3733 [lt_cv_ld_reload_flag='-r'])
3734 reload_flag=$lt_cv_ld_reload_flag
3735 test -n "$reload_flag" && reload_flag=" $reload_flag"
3738 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3739 # -- PORTME fill in with the dynamic library characteristics
3740 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3741 [AC_CACHE_CHECK([how to recognise dependent libraries],
3742 lt_cv_deplibs_check_method,
3743 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3744 lt_cv_file_magic_test_file=
3745 lt_cv_deplibs_check_method='unknown'
3746 # Need to set the preceding variable on all platforms that support
3747 # interlibrary dependencies.
3748 # 'none' -- dependencies not supported.
3749 # `unknown' -- same as none, but documents that we really don't know.
3750 # 'pass_all' -- all dependencies passed with no checks.
3751 # 'test_compile' -- check by making test program.
3752 # 'file_magic [[regex]]' -- check by looking for files in library path
3753 # which responds to the $file_magic_cmd with a given egrep regex.
3754 # If you have `file' or equivalent on your system and you're not sure
3755 # whether `pass_all' will *always* work, you probably want this one.
3759 lt_cv_deplibs_check_method=pass_all
3763 lt_cv_deplibs_check_method=pass_all
3767 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3768 lt_cv_file_magic_cmd='/usr/bin/file -L'
3769 lt_cv_file_magic_test_file=/shlib/libc.so
3772 cygwin* | mingw* | pw32*)
3773 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3774 lt_cv_file_magic_cmd='$OBJDUMP -f'
3777 darwin* | rhapsody*)
3778 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3779 lt_cv_file_magic_cmd='/usr/bin/file -L'
3781 rhapsody* | darwin1.[[012]])
3782 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3785 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3791 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3794 # Not sure whether the presence of OpenBSD here was a mistake.
3795 # Let's accept both of them until this is cleared up.
3796 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3797 lt_cv_file_magic_cmd=/usr/bin/file
3798 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3802 lt_cv_deplibs_check_method=pass_all
3807 lt_cv_deplibs_check_method=pass_all
3811 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3812 lt_cv_file_magic_cmd=/usr/bin/file
3813 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3816 irix5* | irix6* | nonstopux*)
3818 irix5* | nonstopux*)
3819 # this will be overridden with pass_all, but let us keep it just in case
3820 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3824 *-32|*"-32 ") libmagic=32-bit;;
3825 *-n32|*"-n32 ") libmagic=N32;;
3826 *-64|*"-64 ") libmagic=64-bit;;
3827 *) libmagic=never-match;;
3829 # this will be overridden with pass_all, but let us keep it just in case
3830 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3833 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3834 lt_cv_deplibs_check_method=pass_all
3837 # This must be Linux ELF.
3840 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
3841 lt_cv_deplibs_check_method=pass_all ;;
3843 # glibc up to 2.1.1 does not perform some relocations on ARM
3844 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3846 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3850 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3851 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3853 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3858 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3859 lt_cv_file_magic_cmd=/usr/bin/file
3860 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3864 lt_cv_file_magic_cmd=/usr/bin/file
3865 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3866 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3867 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3869 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3873 osf3* | osf4* | osf5*)
3874 # this will be overridden with pass_all, but let us keep it just in case
3875 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3876 lt_cv_file_magic_test_file=/shlib/libc.so
3877 lt_cv_deplibs_check_method=pass_all
3881 lt_cv_deplibs_check_method=pass_all
3885 lt_cv_deplibs_check_method=pass_all
3886 lt_cv_file_magic_test_file=/lib/libc.so
3889 sysv5uw[[78]]* | sysv4*uw2*)
3890 lt_cv_deplibs_check_method=pass_all
3893 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3894 case $host_vendor in
3896 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]]'
3897 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3900 lt_cv_deplibs_check_method=pass_all
3903 lt_cv_file_magic_cmd='/bin/file'
3904 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3907 lt_cv_file_magic_cmd='/bin/file'
3908 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3909 lt_cv_file_magic_test_file=/lib/libc.so
3912 lt_cv_deplibs_check_method=pass_all
3918 file_magic_cmd=$lt_cv_file_magic_cmd
3919 deplibs_check_method=$lt_cv_deplibs_check_method
3923 # AC_PROG_NM - find the path to a BSD-compatible name lister
3924 AC_DEFUN([AC_PROG_NM],
3925 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3926 AC_MSG_CHECKING([for BSD-compatible nm])
3927 AC_CACHE_VAL(lt_cv_path_NM,
3928 [if test -n "$NM"; then
3929 # Let the user override the test.
3932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3933 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3934 test -z "$ac_dir" && ac_dir=.
3935 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3936 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3937 # Check to see if the nm accepts a BSD-compat flag.
3938 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3939 # nm: unknown option "B" ignored
3940 # Tru64's nm complains that /dev/null is an invalid object file
3941 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3942 lt_cv_path_NM="$tmp_nm -B"
3944 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3945 lt_cv_path_NM="$tmp_nm -p"
3948 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3949 continue # so that we can try to find one that supports BSD flags
3954 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3957 AC_MSG_RESULT([$NM])
3960 # AC_CHECK_LIBM - check for math library
3961 AC_DEFUN([AC_CHECK_LIBM],
3962 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3965 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3966 # These system don't have libm
3969 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3970 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3973 AC_CHECK_LIB(m, main, LIBM="-lm")
3978 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3979 # the libltdl convenience library and LTDLINCL to the include flags for
3980 # the libltdl header and adds --enable-ltdl-convenience to the
3981 # configure arguments. Note that LIBLTDL and LTDLINCL are not
3982 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3983 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3984 # with '${top_builddir}/' and LTDLINCL will be prefixed with
3985 # '${top_srcdir}/' (note the single quotes!). If your package is not
3986 # flat and you're not using automake, define top_builddir and
3987 # top_srcdir appropriately in the Makefiles.
3988 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3989 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3990 case $enable_ltdl_convenience in
3991 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3992 "") enable_ltdl_convenience=yes
3993 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3995 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3996 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3997 # For backwards non-gettext consistent compatibility...
4001 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4002 # the libltdl installable library and LTDLINCL to the include flags for
4003 # the libltdl header and adds --enable-ltdl-install to the configure
4004 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4005 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4006 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4007 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4008 # with '${top_srcdir}/' (note the single quotes!). If your package is
4009 # not flat and you're not using automake, define top_builddir and
4010 # top_srcdir appropriately in the Makefiles.
4011 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4012 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4013 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4014 AC_CHECK_LIB(ltdl, main,
4015 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4016 [if test x"$enable_ltdl_install" = xno; then
4017 AC_MSG_WARN([libltdl not installed, but installation disabled])
4019 enable_ltdl_install=yes
4022 if test x"$enable_ltdl_install" = x"yes"; then
4023 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4024 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4025 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4027 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4031 # For backwards non-gettext consistent compatibility...
4036 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4037 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4038 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4039 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4040 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4041 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4042 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4044 # This is just to silence aclocal about the macro not being used
4045 ifelse([AC_DISABLE_FAST_INSTALL])
4047 # NOTE: This macro has been submitted for inclusion into #
4048 # GNU Autoconf as AC_PROG_SED. When it is available in #
4049 # a released version of Autoconf we should remove this #
4050 # macro and use it instead. #
4053 # Check for a fully-functional sed program, that truncates
4054 # as few characters as possible. Prefer GNU sed if found.
4055 AC_DEFUN([LT_AC_PROG_SED],
4056 [AC_MSG_CHECKING([for a sed that does not truncate output])
4057 AC_CACHE_VAL(lt_cv_path_SED,
4058 [# Loop through the user's path and test for sed and gsed.
4059 # Then use that list of sed's as ones to test for truncation.
4060 as_executable_p="test -f"
4061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4065 test -z "$as_dir" && as_dir=.
4066 for ac_prog in sed gsed; do
4067 for ac_exec_ext in '' $ac_executable_extensions; do
4068 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4069 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4075 # Create a temporary directory, and hook for its removal unless debugging.
4078 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4079 trap '{ (exit 1); exit 1; }' 1 2 13 15
4082 # Create a (secure) tmp directory for tmp files.
4085 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4086 test -n "$tmp" && test -d "$tmp"
4089 tmp=$TMPDIR/sed$$-$RANDOM
4090 (umask 077 && mkdir $tmp)
4093 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4094 { (exit 1); exit 1; }
4098 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4099 # along with /bin/sed that truncates output.
4100 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4101 test ! -f ${_sed} && break
4102 cat /dev/null > "$tmp/sed.in"
4104 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4105 # Check for GNU sed and select it if it is found.
4106 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4107 lt_cv_path_SED=${_sed}
4111 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4112 mv "$tmp/sed.tmp" "$tmp/sed.in"
4113 cp "$tmp/sed.in" "$tmp/sed.nl"
4114 echo >>"$tmp/sed.nl"
4115 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4116 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4117 # 40000 chars as input seems more than enough
4118 test $_count -gt 10 && break
4119 _count=`expr $_count + 1`
4120 if test $_count -gt $_max; then
4122 lt_cv_path_SED=$_sed
4128 if test "X$SED" != "X"; then
4133 AC_MSG_RESULT([$SED])
4136 # isc-posix.m4 serial 2 (gettext-0.11.2)
4137 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
4138 dnl This file is free software, distributed under the terms of the GNU
4139 dnl General Public License. As a special exception to the GNU General
4140 dnl Public License, this file may be distributed as part of a program
4141 dnl that contains a configuration script generated by Autoconf, under
4142 dnl the same distribution terms as the rest of that program.
4144 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
4146 # This test replaces the one in autoconf.
4147 # Currently this macro should have the same name as the autoconf macro
4148 # because gettext's gettext.m4 (distributed in the automake package)
4149 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
4150 # give these diagnostics:
4151 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
4152 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
4154 undefine([AC_ISC_POSIX])
4156 AC_DEFUN([AC_ISC_POSIX],
4158 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
4159 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
4164 dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
4165 # serial 1 AC_PROG_INTLTOOL
4166 AC_DEFUN(AC_PROG_INTLTOOL,
4169 if test -n "$1"; then
4170 AC_MSG_CHECKING(for intltool >= $1)
4172 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
4173 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${srcdir}/intltool-update.in`
4175 INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in`
4178 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
4179 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
4181 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.])
4186 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
4187 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
4188 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
4189 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
4190 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
4191 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
4192 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
4193 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
4194 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
4195 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
4196 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
4197 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
4198 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache'
4199 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
4201 AC_SUBST(INTLTOOL_DESKTOP_RULE)
4202 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
4203 AC_SUBST(INTLTOOL_KEYS_RULE)
4204 AC_SUBST(INTLTOOL_PROP_RULE)
4205 AC_SUBST(INTLTOOL_OAF_RULE)
4206 AC_SUBST(INTLTOOL_PONG_RULE)
4207 AC_SUBST(INTLTOOL_SERVER_RULE)
4208 AC_SUBST(INTLTOOL_SHEET_RULE)
4209 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
4210 AC_SUBST(INTLTOOL_UI_RULE)
4211 AC_SUBST(INTLTOOL_XML_RULE)
4212 AC_SUBST(INTLTOOL_CAVES_RULE)
4213 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
4214 AC_SUBST(INTLTOOL_THEME_RULE)
4216 # Use the tools built into the package, not the ones that are installed.
4218 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
4219 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
4220 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
4222 AC_SUBST(INTLTOOL_EXTRACT)
4223 AC_SUBST(INTLTOOL_MERGE)
4224 AC_SUBST(INTLTOOL_UPDATE)
4226 AC_PATH_PROG(INTLTOOL_PERL, perl)
4227 if test -z "$INTLTOOL_PERL"; then
4228 AC_MSG_ERROR([perl not found; required for intltool])
4230 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
4231 AC_MSG_ERROR([perl 5.x required for intltool])
4234 # Remove file type tags (using []) from po/POTFILES.
4236 ifdef([AC_DIVERSION_ICMDS],[
4237 AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
4239 mv -f po/POTFILES po/POTFILES.tmp
4240 sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
4241 rm -f po/POTFILES.tmp
4245 ifdef([AC_CONFIG_COMMANDS_PRE],[
4246 AC_CONFIG_COMMANDS_PRE([
4248 mv -f po/POTFILES po/POTFILES.tmp
4249 sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
4250 rm -f po/POTFILES.tmp
4256 # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
4258 AC_OUTPUT_COMMANDS([
4260 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
4261 if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
4262 rm -f intltool-extract.out
4264 mv -f intltool-extract.out intltool-extract
4266 chmod ugo+x intltool-extract
4267 chmod u+w intltool-extract
4269 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
4270 if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
4271 rm -f intltool-merge.out
4273 mv -f intltool-merge.out intltool-merge
4275 chmod ugo+x intltool-merge
4276 chmod u+w intltool-merge
4278 sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
4279 if cmp -s intltool-update intltool-update.out 2>/dev/null; then
4280 rm -f intltool-update.out
4282 mv -f intltool-update.out intltool-update
4284 chmod ugo+x intltool-update
4285 chmod u+w intltool-update
4287 ], INTLTOOL_PERL=${INTLTOOL_PERL})
4292 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4293 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
4294 dnl also defines GSTUFF_PKG_ERRORS on error
4295 AC_DEFUN(PKG_CHECK_MODULES, [
4298 if test -z "$PKG_CONFIG"; then
4299 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
4302 if test "$PKG_CONFIG" = "no" ; then
4303 echo "*** The pkg-config script could not be found. Make sure it is"
4304 echo "*** in your path, or set the PKG_CONFIG environment variable"
4305 echo "*** to the full path to pkg-config."
4306 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
4308 PKG_CONFIG_MIN_VERSION=0.9.0
4309 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
4310 AC_MSG_CHECKING(for $2)
4312 if $PKG_CONFIG --exists "$2" ; then
4316 AC_MSG_CHECKING($1_CFLAGS)
4317 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
4318 AC_MSG_RESULT($$1_CFLAGS)
4320 AC_MSG_CHECKING($1_LIBS)
4321 $1_LIBS=`$PKG_CONFIG --libs "$2"`
4322 AC_MSG_RESULT($$1_LIBS)
4326 ## If we have a custom action on failure, don't print errors, but
4327 ## do set a variable so people can do so.
4328 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
4329 ifelse([$4], ,echo $$1_PKG_ERRORS,)
4335 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
4336 echo "*** See http://www.freedesktop.org/software/pkgconfig"
4340 if test $succeeded = yes; then
4341 ifelse([$3], , :, [$3])
4343 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
4349 dnl GNOME_COMPILE_WARNINGS
4350 dnl Turn on many useful compiler warnings
4351 dnl For now, only works on GCC
4352 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
4353 dnl ******************************
4354 dnl More compiler warnings
4355 dnl ******************************
4357 if test -z "$1" ; then
4358 default_compile_warnings=yes
4360 default_compile_warnings="$1"
4363 AC_ARG_ENABLE(compile-warnings,
4364 [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.],, [enable_compile_warnings="$default_compile_warnings"])
4367 if test "x$GCC" != xyes; then
4368 enable_compile_warnings=no
4372 realsave_CFLAGS="$CFLAGS"
4374 case "$enable_compile_warnings" in
4379 warning_flags="-Wall"
4382 warning_flags="-Wall -Wmissing-prototypes"
4385 warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
4386 CFLAGS="$warning_flags $CFLAGS"
4387 for option in -Wno-sign-compare; do
4388 SAVE_CFLAGS="$CFLAGS"
4389 CFLAGS="$CFLAGS $option"
4390 AC_MSG_CHECKING([whether gcc understands $option])
4391 AC_TRY_COMPILE([], [],
4394 CFLAGS="$SAVE_CFLAGS"
4395 AC_MSG_RESULT($has_option)
4396 if test $has_option = yes; then
4397 warning_flags="$warning_flags $option"
4403 if test "$enable_compile_warnings" = "error" ; then
4404 warning_flags="$warning_flags -Werror"
4408 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
4411 CFLAGS="$realsave_CFLAGS"
4412 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
4413 AC_MSG_RESULT($warning_flags)
4415 AC_ARG_ENABLE(iso-c,
4416 [ --enable-iso-c Try to warn if code is not ISO C ],,
4419 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
4421 if test "x$enable_iso_c" != "xno"; then
4422 if test "x$GCC" = "xyes"; then
4424 *[\ \ ]-ansi[\ \ ]*) ;;
4425 *) complCFLAGS="$complCFLAGS -ansi" ;;
4428 *[\ \ ]-pedantic[\ \ ]*) ;;
4429 *) complCFLAGS="$complCFLAGS -pedantic" ;;
4433 AC_MSG_RESULT($complCFLAGS)
4435 WARN_CFLAGS="$warning_flags $complCFLAGS"
4436 AC_SUBST(WARN_CFLAGS)
4439 dnl For C++, do basically the same thing.
4441 AC_DEFUN([GNOME_CXX_WARNINGS],[
4442 AC_ARG_ENABLE(cxx-warnings,
4443 [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum)
4445 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
4447 if test "x$GCC" != xyes; then
4448 enable_compile_warnings=no
4450 if test "x$enable_cxx_warnings" != "xno"; then
4451 if test "x$GCC" = "xyes"; then
4452 case " $CXXFLAGS " in
4453 *[\ \ ]-Wall[\ \ ]*) ;;
4454 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
4457 ## -W is not all that useful. And it cannot be controlled
4458 ## with individual -Wno-xxx flags, unlike -Wall
4459 if test "x$enable_cxx_warnings" = "xyes"; then
4460 warnCXXFLAGS="$warnCXXFLAGS -Wmissing-declarations -Wshadow -Woverloaded-virtual"
4464 AC_MSG_RESULT($warnCXXFLAGS)
4466 AC_ARG_ENABLE(iso-cxx,
4467 [ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
4470 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
4472 if test "x$enable_iso_cxx" != "xno"; then
4473 if test "x$GCC" = "xyes"; then
4474 case " $CXXFLAGS " in
4475 *[\ \ ]-ansi[\ \ ]*) ;;
4476 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
4479 case " $CXXFLAGS " in
4480 *[\ \ ]-pedantic[\ \ ]*) ;;
4481 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
4485 AC_MSG_RESULT($complCXXFLAGS)
4486 if test "x$cxxflags_set" != "xyes"; then
4487 CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
4489 AC_SUBST(cxxflags_set)
4493 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
4494 # Copyright (C) 2001-2003 Red Hat, Inc.
4496 # This file is free software, distributed under the terms of the GNU
4497 # General Public License. As a special exception to the GNU General
4498 # Public License, this file may be distributed as part of a program
4499 # that contains a configuration script generated by Autoconf, under
4500 # the same distribution terms as the rest of that program.
4502 # This file can be copied and used freely without restrictions. It can
4503 # be used in projects which are not available under the GNU Public License
4504 # but which still want to provide support for the GNU gettext functionality.
4506 # Macro to add for using GNU gettext.
4507 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
4509 # Modified to never use included libintl.
4510 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
4512 # Major rework to remove unused code
4513 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
4515 # Added better handling of ALL_LINGUAS from GNU gettext version
4516 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
4519 # We need this here as well, since someone might use autoconf-2.5x
4520 # to configure GLib then an older version to configure a package
4521 # using AM_GLIB_GNU_GETTEXT
4525 dnl We go to great lengths to make sure that aclocal won't
4526 dnl try to pull in the installed version of these macros
4527 dnl when running aclocal in the glib directory.
4529 m4_copy([AC_DEFUN],[glib_DEFUN])
4530 m4_copy([AC_REQUIRE],[glib_REQUIRE])
4532 dnl At the end, if we're not within glib, we'll define the public
4533 dnl definitions in terms of our private definitions.
4537 #--------------------
4538 glib_DEFUN([GLIB_LC_MESSAGES],
4539 [AC_CHECK_HEADERS([locale.h])
4540 if test $ac_cv_header_locale_h = yes; then
4541 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
4542 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
4543 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
4544 if test $am_cv_val_LC_MESSAGES = yes; then
4545 AC_DEFINE(HAVE_LC_MESSAGES, 1,
4546 [Define if your <locale.h> file defines LC_MESSAGES.])
4550 # GLIB_PATH_PROG_WITH_TEST
4551 #----------------------------
4552 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
4553 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
4554 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
4555 [# Extract the first word of "$2", so it can be a program name with args.
4556 set dummy $2; ac_word=[$]2
4557 AC_MSG_CHECKING([for $ac_word])
4558 AC_CACHE_VAL(ac_cv_path_$1,
4561 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
4564 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4565 for ac_dir in ifelse([$5], , $PATH, [$5]); do
4566 test -z "$ac_dir" && ac_dir=.
4567 if test -f $ac_dir/$ac_word; then
4569 ac_cv_path_$1="$ac_dir/$ac_word"
4575 dnl If no 4th arg is given, leave the cache variable unset,
4576 dnl so AC_PATH_PROGS will keep looking.
4577 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
4582 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
4583 AC_MSG_RESULT([$]$1)
4592 glib_DEFUN([GLIB_WITH_NLS],
4593 dnl NLS is obligatory
4597 gt_cv_have_gettext=no
4603 AC_CHECK_HEADER(libintl.h,
4604 [gt_cv_func_dgettext_libintl="no"
4605 libintl_extra_libs=""
4608 # First check in libc
4610 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
4612 #include <libintl.h>
4614 [return (int) dgettext ("","")],
4615 gt_cv_func_dgettext_libc=yes,
4616 gt_cv_func_dgettext_libc=no)
4619 if test "$gt_cv_func_dgettext_libc" = "yes" ; then
4620 AC_CHECK_FUNCS(bind_textdomain_codeset)
4624 # If we don't have everything we want, check in libintl
4626 if test "$gt_cv_func_dgettext_libc" != "yes" \
4627 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
4629 AC_CHECK_LIB(intl, bindtextdomain,
4630 [AC_CHECK_LIB(intl, dgettext,
4631 gt_cv_func_dgettext_libintl=yes)])
4633 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
4634 AC_MSG_CHECKING([if -liconv is needed to use gettext])
4636 AC_CHECK_LIB(intl, dcgettext,
4637 [gt_cv_func_dgettext_libintl=yes
4638 libintl_extra_libs=-liconv],
4643 # If we found libintl, then check in it for bind_textdomain_codeset();
4644 # we'll prefer libc if neither have bind_textdomain_codeset(),
4645 # and both have dgettext
4647 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
4648 glib_save_LIBS="$LIBS"
4649 LIBS="$LIBS -lintl $libintl_extra_libs"
4650 unset ac_cv_func_bind_textdomain_codeset
4651 AC_CHECK_FUNCS(bind_textdomain_codeset)
4652 LIBS="$glib_save_LIBS"
4654 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
4655 gt_cv_func_dgettext_libc=no
4657 if test "$gt_cv_func_dgettext_libc" = "yes"; then
4658 gt_cv_func_dgettext_libintl=no
4664 if test "$gt_cv_func_dgettext_libc" = "yes" \
4665 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
4666 gt_cv_have_gettext=yes
4669 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
4670 INTLLIBS="-lintl $libintl_extra_libs"
4673 if test "$gt_cv_have_gettext" = "yes"; then
4674 AC_DEFINE(HAVE_GETTEXT,1,
4675 [Define if the GNU gettext() function is already present or preinstalled.])
4676 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
4677 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
4678 if test "$MSGFMT" != "no"; then
4679 AC_CHECK_FUNCS(dcgettext)
4680 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
4681 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
4682 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
4683 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
4684 return _nl_msg_cat_cntr],
4689 dnl On Solaris, if bind_textdomain_codeset is in libc,
4690 dnl GNU format message catalog is always supported,
4691 dnl since both are added to the libc all together.
4692 dnl Hence, we'd like to go with DATADIRNAME=share and
4693 dnl and CATOBJEXT=.gmo in this case.
4694 AC_CHECK_FUNC(bind_textdomain_codeset,
4707 gt_cv_have_gettext=no
4712 if test "$gt_cv_have_gettext" = "yes" ; then
4713 AC_DEFINE(ENABLE_NLS, 1,
4714 [always defined to indicate that i18n is enabled])
4717 dnl Test whether we really found GNU xgettext.
4718 if test "$XGETTEXT" != ":"; then
4719 dnl If it is not GNU xgettext we define it as : so that the
4720 dnl Makefiles still can work.
4721 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4725 [found xgettext program is not GNU xgettext; ignore it])
4730 # We need to process the po/ directory.
4734 [case "$CONFIG_FILES" in *po/Makefile.in*)
4735 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
4738 dnl These rules are solely for the distribution goal. While doing this
4739 dnl we only have to keep exactly one list of the available catalogs
4740 dnl in configure.in.
4741 for lang in $ALL_LINGUAS; do
4742 GMOFILES="$GMOFILES $lang.gmo"
4743 POFILES="$POFILES $lang.po"
4746 dnl Make all variables we use known to autoconf.
4749 AC_SUBST(DATADIRNAME)
4751 AC_SUBST(INSTOBJEXT)
4753 AC_SUBST(PO_IN_DATADIR_TRUE)
4754 AC_SUBST(PO_IN_DATADIR_FALSE)
4759 # AM_GLIB_GNU_GETTEXT
4760 # -------------------
4761 # Do checks necessary for use of gettext. If a suitable implementation
4762 # of gettext is found in either in libintl or in the C library,
4763 # it will set INTLLIBS to the libraries needed for use of gettext
4764 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
4765 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
4766 # on various variables needed by the Makefile.in.in installed by
4769 glib_DEFUN(GLIB_GNU_GETTEXT,
4770 [AC_REQUIRE([AC_PROG_CC])dnl
4771 AC_REQUIRE([AC_HEADER_STDC])dnl
4776 if test "$gt_cv_have_gettext" = "yes"; then
4777 if test "x$ALL_LINGUAS" = "x"; then
4780 AC_MSG_CHECKING(for catalogs to be installed)
4782 for presentlang in $ALL_LINGUAS; do
4784 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
4785 desiredlanguages="$LINGUAS"
4787 desiredlanguages="$ALL_LINGUAS"
4789 for desiredlang in $desiredlanguages; do
4790 # Use the presentlang catalog if desiredlang is
4791 # a. equal to presentlang, or
4792 # b. a variant of presentlang (because in this case,
4793 # presentlang can be used as a fallback for messages
4794 # which are not translated in the desiredlang catalog).
4795 case "$desiredlang" in
4796 "$presentlang"*) useit=yes;;
4799 if test $useit = yes; then
4800 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
4803 LINGUAS=$NEW_LINGUAS
4804 AC_MSG_RESULT($LINGUAS)
4807 dnl Construct list of names of catalog files to be constructed.
4808 if test -n "$LINGUAS"; then
4809 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4813 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
4814 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
4815 dnl Try to locate is.
4817 if test -n "$ac_aux_dir"; then
4818 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
4820 if test -z "$MKINSTALLDIRS"; then
4821 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
4823 AC_SUBST(MKINSTALLDIRS)
4825 dnl Generate list of files to be processed by xgettext which will
4826 dnl be included in po/Makefile.
4827 test -d po || mkdir po
4828 if test "x$srcdir" != "x."; then
4829 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4830 posrcprefix="$srcdir/"
4832 posrcprefix="../$srcdir/"
4838 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4839 < $srcdir/po/POTFILES.in > po/POTFILES
4842 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
4843 # -------------------------------
4844 # Define VARIABLE to the location where catalog files will
4845 # be installed by po/Makefile.
4846 glib_DEFUN(GLIB_DEFINE_LOCALEDIR,
4847 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
4848 glib_save_prefix="$prefix"
4849 glib_save_exec_prefix="$exec_prefix"
4850 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4851 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
4852 if test "x$CATOBJEXT" = "x.mo" ; then
4853 localedir=`eval echo "${libdir}/locale"`
4855 localedir=`eval echo "${datadir}/locale"`
4857 prefix="$glib_save_prefix"
4858 exec_prefix="$glib_save_exec_prefix"
4859 AC_DEFINE_UNQUOTED($1, "$localedir",
4860 [Define the location where the catalogs will be installed])
4864 dnl Now the definitions that aclocal will find
4866 ifdef(glib_configure_in,[],[
4867 AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)])
4868 AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)])
4871 dnl AM_GCONF_SOURCE_2
4872 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
4873 dnl (i.e. pass to gconftool-2
4874 dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
4875 dnl you should install foo.schemas files
4878 AC_DEFUN(AM_GCONF_SOURCE_2,
4880 if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
4881 GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
4883 GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
4886 AC_ARG_WITH(gconf-source,
4887 [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",)
4889 AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
4890 AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
4892 if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
4893 GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas/'
4895 GCONF_SCHEMA_FILE_DIR=$GCONF_SCHEMA_FILE_DIR
4898 AC_ARG_WITH(gconf-schema-file-dir,
4899 [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",)
4901 AC_SUBST(GCONF_SCHEMA_FILE_DIR)
4902 AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
4904 AC_ARG_ENABLE(schemas-install,
4905 [ --disable-schemas-install Disable the schemas installation],
4906 [case "${enableval}" in
4907 yes) schemas_install=true ;;
4908 no) schemas_install=false ;;
4909 *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
4910 esac],[schemas_install=true])
4911 AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)