1 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 dnl cloned from autoconf 2.13 acspecific.m4
15 AC_DEFUN([AC_C_LONG_LONG],
16 [AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
17 [if test "$GCC" = yes; then
20 AC_TRY_RUN([int main() {
22 exit(sizeof(long long) < sizeof(long)); }],
23 ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
25 if test $ac_cv_c_long_long = yes; then
26 AC_DEFINE(HAVE_LONG_LONG)
30 dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight
32 AC_DEFUN([AC_STRUCT_TIMEZONE_DAYLIGHT],
33 [AC_REQUIRE([AC_STRUCT_TM])dnl
34 AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
35 [AC_TRY_COMPILE([#include <sys/types.h>
36 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
37 ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
38 if test "$ac_cv_struct_tm_zone" = yes; then
39 AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
41 AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
43 changequote(<<, >>)dnl
45 #ifndef tzname /* For SGI. */
46 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
49 [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
50 if test $ac_cv_var_tzname = yes; then
51 AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME])
54 AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
55 [AC_TRY_COMPILE([#include <sys/types.h>
56 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
57 ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
58 if test "$ac_cv_struct_tm_isdst" = yes; then
59 AC_DEFINE(HAVE_TM_ISDST)
61 AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
63 changequote(<<, >>)dnl
65 #ifndef daylight /* In case IRIX #defines this, too */
69 [atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)])
70 if test $ac_cv_var_daylight = yes; then
71 AC_DEFINE(HAVE_DAYLIGHT)
75 dnl from autoconf 2.13 acgeneral.m4, with patch:
76 dnl Date: Fri, 15 Jan 1999 05:52:41 -0800
77 dnl Message-ID: <199901151352.FAA18237@shade.twinsun.com>
78 dnl From: eggert@twinsun.com (Paul Eggert)
79 dnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars
80 dnl Newsgroups: gnu.utils.bug
82 dnl now include <stdint.h> if available
84 dnl AC_CHECK_TYPE2_STDC(TYPE, DEFAULT)
85 AC_DEFUN([AC_CHECK_TYPE2_STDC],
86 [AC_REQUIRE([AC_HEADER_STDC])dnl
87 AC_REQUIRE([AC_HEADER_STDINT])dnl
88 AC_MSG_CHECKING(for $1)
89 AC_CACHE_VAL(ac_cv_type_$1,
91 [(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
95 #include <sys/types.h>
99 #endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
100 if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
104 AC_DEFINE_UNQUOTED($1, $2)
108 dnl from autoconf 2.13 acgeneral.m4, with additional third argument
109 dnl AC_CHECK_SIZEOF_INCLUDES(TYPE [, CROSS-SIZE [, INCLUDES]])
110 AC_DEFUN([AC_CHECK_SIZEOF_INCLUDES],
111 [dnl The name to #define.
112 define([AC_TYPE_NAME], translit(sizeof_$1, [[[a-z *]]], [[[A-Z_P]]]))dnl
113 dnl The cache variable name.
114 define([AC_CV_NAME], translit(ac_cv_sizeof_$1, [[[ *]]], [[[_p]]]))dnl
115 AC_MSG_CHECKING(size of $1)
116 AC_CACHE_VAL(AC_CV_NAME,
121 FILE *f=fopen("conftestval", "w");
123 fprintf(f, "%d\n", sizeof($1));
125 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
126 AC_MSG_RESULT($AC_CV_NAME)
127 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
128 undefine([AC_TYPE_NAME])dnl
129 undefine([AC_CV_NAME])dnl
132 dnl AC_CHECK_SIZEOF_STDC_HEADERS(TYPE [, CROSS_SIZE])
133 AC_DEFUN([AC_CHECK_SIZEOF_STDC_HEADERS],
134 [AC_REQUIRE([AC_HEADER_STDC])dnl
135 AC_REQUIRE([AC_HEADER_STDINT])dnl
136 AC_CHECK_SIZEOF_INCLUDES($1, $2,
140 #include <sys/types.h>
148 dnl AC_CHECK_TYPE_STDC(TYPE, DEFAULT)
149 AC_DEFUN([AC_CHECK_TYPE_STDC],
150 [AC_REQUIRE([AC_HEADER_STDC])dnl
151 AC_REQUIRE([AC_HEADER_STDINT])dnl
152 AC_MSG_CHECKING(for $1)
153 AC_CACHE_VAL(ac_cv_type_$1,
155 [(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
159 #include <sys/types.h>
163 #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
164 AC_MSG_RESULT($ac_cv_type_$1)
165 if test $ac_cv_type_$1 = no; then
171 AC_DEFUN([AC_HEADER_STDINT], [AC_CHECK_HEADERS(stdint.h)])
175 dnl By default, many hosts won't let programs access large files;
176 dnl one must use special compiler options to get large-file access to work.
177 dnl For more details about this brain damage please see:
178 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
180 dnl Written by Paul Eggert <eggert@twinsun.com>.
182 dnl Internal subroutine of AC_SYS_LARGEFILE.
183 dnl AC_SYS_LARGEFILE_TEST_INCLUDES
184 AC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES],
185 [[#include <sys/types.h>
186 /* Check that off_t can represent 2**63 - 1 correctly.
187 We can't simply "#define LARGE_OFF_T 9223372036854775807",
188 since some C++ compilers masquerading as C compilers
189 incorrectly reject 9223372036854775807. */
190 # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
191 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
192 && LARGE_OFF_T % 2147483647 == 1)
196 dnl Internal subroutine of AC_SYS_LARGEFILE.
197 dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLU=
199 AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
200 [AC_CACHE_CHECK([for $1 value needed for large files], $3,
205 [AC_TRY_COMPILE([#define $1 $2]
210 if test "[$]$3" != no; then
211 AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
214 AC_DEFUN([AC_SYS_LARGEFILE],
215 [AC_REQUIRE([AC_PROG_CC])
216 AC_ARG_ENABLE(largefile,
217 [ --disable-largefile omit support for large files])
218 if test "$enable_largefile" != no; then
220 AC_CACHE_CHECK([for special C compiler options needed for large files=
222 ac_cv_sys_largefile_CC,
223 [ac_cv_sys_largefile_CC=no
224 if test "$GCC" != yes; then
225 # IRIX 6.2 and later do not support large files by default,
226 # so use the C compiler's -n32 option if that helps.
227 AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
230 AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
231 ac_cv_sys_largefile_CC=' -n32')
234 if test "$ac_cv_sys_largefile_CC" != no; then
235 CC="$CC$ac_cv_sys_largefile_CC"
238 AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
239 ac_cv_sys_file_offset_bits,
240 [Number of bits in a file offset, on hosts where this is settable.],
241 AC_SYS_LARGEFILE_TEST_INCLUDES)
242 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
243 ac_cv_sys_large_files,
244 [Define for large files, on AIX-style hosts.],
245 AC_SYS_LARGEFILE_TEST_INCLUDES)
249 AC_DEFUN([AC_FUNC_FSEEKO],
250 [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
251 ac_cv_sys_largefile_source,
252 [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
253 [#include <stdio.h>], [return !fseeko;])
254 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
255 # in glibc 2.1.3, but that breaks too many other things.
256 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
258 AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
259 [ac_cv_func_fseeko=no
260 AC_TRY_LINK([#include <stdio.h>],
261 [return fseeko && fseeko (stdin, 0, 0);],
262 [ac_cv_func_fseeko=yes])])
263 if test $ac_cv_func_fseeko != no; then
264 AC_DEFINE(HAVE_FSEEKO, 1,
265 [Define if fseeko (and presumably ftello) exists and is declared.])
272 # BeOS 5 has <wchar.h> but does not define mbstate_t,
273 # so you can't declare an object of that type.
274 # Check for this incompatibility with Standard C.
276 # Include stdlib.h first, because otherwise this test would fail on Linux
277 # (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
278 # a syntax error in wchar.h due to the use of undefined __int32_t.
279 AC_DEFUN([AC_MBSTATE_T],
281 AC_CHECK_HEADERS(stdlib.h)
283 AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
289 [mbstate_t x; return sizeof x;],
290 ac_cv_type_mbstate_t=yes,
291 ac_cv_type_mbstate_t=no)])
292 if test $ac_cv_type_mbstate_t = no; then
293 AC_DEFINE(mbstate_t, int,
294 [Define to a type if <wchar.h> does not define.])
299 # Do all the work for Automake. -*- Autoconf -*-
301 # This macro actually does too much some checks are only needed if
302 # your package does certain things. But this isn't really a big deal.
304 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
305 # Free Software Foundation, Inc.
307 # This program is free software; you can redistribute it and/or modify
308 # it under the terms of the GNU General Public License as published by
309 # the Free Software Foundation; either version 2, or (at your option)
312 # This program is distributed in the hope that it will be useful,
313 # but WITHOUT ANY WARRANTY; without even the implied warranty of
314 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
315 # GNU General Public License for more details.
317 # You should have received a copy of the GNU General Public License
318 # along with this program; if not, write to the Free Software
319 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
324 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
325 # written in clear, in which case automake, when reading aclocal.m4,
326 # will think it sees a *use*, and therefore will trigger all it's
327 # C support machinery. Also note that it means that autoscan, seeing
328 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
333 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
334 # the ones we care about.
335 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
337 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
338 # AM_INIT_AUTOMAKE([OPTIONS])
339 # -----------------------------------------------
340 # The call with PACKAGE and VERSION arguments is the old style
341 # call (pre autoconf-2.50), which is being phased out. PACKAGE
342 # and VERSION should now be passed to AC_INIT and removed from
343 # the call to AM_INIT_AUTOMAKE.
344 # We support both call styles for the transition. After
345 # the next Automake release, Autoconf can make the AC_INIT
346 # arguments mandatory, and then we can depend on a new Autoconf
347 # release and drop the old call support.
348 AC_DEFUN([AM_INIT_AUTOMAKE],
349 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
350 AC_REQUIRE([AC_PROG_INSTALL])dnl
351 # test to see if srcdir already configured
352 if test "`cd $srcdir && pwd`" != "`pwd`" &&
353 test -f $srcdir/config.status; then
354 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
357 # Define the identity of the package.
358 dnl Distinguish between old-style and new-style calls.
360 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
361 AC_SUBST([PACKAGE], [$1])dnl
362 AC_SUBST([VERSION], [$2])],
363 [_AM_SET_OPTIONS([$1])dnl
364 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
365 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
367 _AM_IF_OPTION([no-define],,
368 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
369 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
371 # Some tools Automake needs.
372 AC_REQUIRE([AM_SANITY_CHECK])dnl
373 AC_REQUIRE([AC_ARG_PROGRAM])dnl
374 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
375 AM_MISSING_PROG(AUTOCONF, autoconf)
376 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
377 AM_MISSING_PROG(AUTOHEADER, autoheader)
378 AM_MISSING_PROG(MAKEINFO, makeinfo)
379 AM_MISSING_PROG(AMTAR, tar)
381 AM_PROG_INSTALL_STRIP
382 # We need awk for the "check" target. The system "awk" is bad on
384 AC_REQUIRE([AC_PROG_AWK])dnl
385 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
387 _AM_IF_OPTION([no-dependencies],,
388 [AC_PROVIDE_IFELSE([AC_PROG_][CC],
389 [_AM_DEPENDENCIES(CC)],
390 [define([AC_PROG_][CC],
391 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
392 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
393 [_AM_DEPENDENCIES(CXX)],
394 [define([AC_PROG_][CXX],
395 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
399 # Copyright 2002 Free Software Foundation, Inc.
401 # This program is free software; you can redistribute it and/or modify
402 # it under the terms of the GNU General Public License as published by
403 # the Free Software Foundation; either version 2, or (at your option)
406 # This program is distributed in the hope that it will be useful,
407 # but WITHOUT ANY WARRANTY; without even the implied warranty of
408 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
409 # GNU General Public License for more details.
411 # You should have received a copy of the GNU General Public License
412 # along with this program; if not, write to the Free Software
413 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
415 # AM_AUTOMAKE_VERSION(VERSION)
416 # ----------------------------
417 # Automake X.Y traces this macro to ensure aclocal.m4 has been
418 # generated from the m4 files accompanying Automake X.Y.
419 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
421 # AM_SET_CURRENT_AUTOMAKE_VERSION
422 # -------------------------------
423 # Call AM_AUTOMAKE_VERSION so it can be traced.
424 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
425 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
426 [AM_AUTOMAKE_VERSION([1.6.3])])
428 # Helper functions for option handling. -*- Autoconf -*-
430 # Copyright 2001, 2002 Free Software Foundation, Inc.
432 # This program is free software; you can redistribute it and/or modify
433 # it under the terms of the GNU General Public License as published by
434 # the Free Software Foundation; either version 2, or (at your option)
437 # This program is distributed in the hope that it will be useful,
438 # but WITHOUT ANY WARRANTY; without even the implied warranty of
439 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
440 # GNU General Public License for more details.
442 # You should have received a copy of the GNU General Public License
443 # along with this program; if not, write to the Free Software
444 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
449 # _AM_MANGLE_OPTION(NAME)
450 # -----------------------
451 AC_DEFUN([_AM_MANGLE_OPTION],
452 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
454 # _AM_SET_OPTION(NAME)
455 # ------------------------------
456 # Set option NAME. Presently that only means defining a flag for this option.
457 AC_DEFUN([_AM_SET_OPTION],
458 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
460 # _AM_SET_OPTIONS(OPTIONS)
461 # ----------------------------------
462 # OPTIONS is a space-separated list of Automake options.
463 AC_DEFUN([_AM_SET_OPTIONS],
464 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
466 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
467 # -------------------------------------------
468 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
469 AC_DEFUN([_AM_IF_OPTION],
470 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
473 # Check to make sure that the build environment is sane.
476 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
478 # This program is free software; you can redistribute it and/or modify
479 # it under the terms of the GNU General Public License as published by
480 # the Free Software Foundation; either version 2, or (at your option)
483 # This program is distributed in the hope that it will be useful,
484 # but WITHOUT ANY WARRANTY; without even the implied warranty of
485 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
486 # GNU General Public License for more details.
488 # You should have received a copy of the GNU General Public License
489 # along with this program; if not, write to the Free Software
490 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
497 AC_DEFUN([AM_SANITY_CHECK],
498 [AC_MSG_CHECKING([whether build environment is sane])
501 echo timestamp > conftest.file
502 # Do `set' in a subshell so we don't clobber the current shell's
503 # arguments. Must try -L first in case configure is actually a
504 # symlink; some systems play weird games with the mod time of symlinks
505 # (eg FreeBSD returns the mod time of the symlink's containing
508 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
509 if test "$[*]" = "X"; then
511 set X `ls -t $srcdir/configure conftest.file`
514 if test "$[*]" != "X $srcdir/configure conftest.file" \
515 && test "$[*]" != "X conftest.file $srcdir/configure"; then
517 # If neither matched, then we have a broken ls. This can happen
518 # if, for instance, CONFIG_SHELL is bash and it inherits a
519 # broken ls alias from the environment. This has actually
520 # happened. Such a system could not be considered "sane".
521 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
522 alias in your environment])
525 test "$[2]" = conftest.file
531 AC_MSG_ERROR([newly created file is older than distributed files!
532 Check your system clock])
539 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
541 # This program is free software; you can redistribute it and/or modify
542 # it under the terms of the GNU General Public License as published by
543 # the Free Software Foundation; either version 2, or (at your option)
546 # This program is distributed in the hope that it will be useful,
547 # but WITHOUT ANY WARRANTY; without even the implied warranty of
548 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
549 # GNU General Public License for more details.
551 # You should have received a copy of the GNU General Public License
552 # along with this program; if not, write to the Free Software
553 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
558 # AM_MISSING_PROG(NAME, PROGRAM)
559 # ------------------------------
560 AC_DEFUN([AM_MISSING_PROG],
561 [AC_REQUIRE([AM_MISSING_HAS_RUN])
562 $1=${$1-"${am_missing_run}$2"}
568 # Define MISSING if not defined so far and test if it supports --run.
569 # If it does, set am_missing_run to use it, otherwise, to nothing.
570 AC_DEFUN([AM_MISSING_HAS_RUN],
571 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
572 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
573 # Use eval to expand $SHELL
574 if eval "$MISSING --run true"; then
575 am_missing_run="$MISSING --run "
578 AC_MSG_WARN([`missing' script is too old or missing])
584 # Copyright 2001 Free Software Foundation, Inc.
586 # This program is free software; you can redistribute it and/or modify
587 # it under the terms of the GNU General Public License as published by
588 # the Free Software Foundation; either version 2, or (at your option)
591 # This program is distributed in the hope that it will be useful,
592 # but WITHOUT ANY WARRANTY; without even the implied warranty of
593 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
594 # GNU General Public License for more details.
596 # You should have received a copy of the GNU General Public License
597 # along with this program; if not, write to the Free Software
598 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
601 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
602 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
603 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
605 # Of course, Automake must honor this variable whenever it calls a
606 # tool from the auxiliary directory. The problem is that $srcdir (and
607 # therefore $ac_aux_dir as well) can be either absolute or relative,
608 # depending on how configure is run. This is pretty annoying, since
609 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
610 # source directory, any form will work fine, but in subdirectories a
611 # relative path needs to be adjusted first.
613 # $ac_aux_dir/missing
614 # fails when called from a subdirectory if $ac_aux_dir is relative
615 # $top_srcdir/$ac_aux_dir/missing
616 # fails if $ac_aux_dir is absolute,
617 # fails when called from a subdirectory in a VPATH build with
618 # a relative $ac_aux_dir
620 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
621 # are both prefixed by $srcdir. In an in-source build this is usually
622 # harmless because $srcdir is `.', but things will broke when you
623 # start a VPATH build or use an absolute $srcdir.
625 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
626 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
627 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
628 # and then we would define $MISSING as
629 # MISSING="\${SHELL} $am_aux_dir/missing"
630 # This will work as long as MISSING is not called from configure, because
631 # unfortunately $(top_srcdir) has no meaning in configure.
632 # However there are other variables, like CC, which are often used in
633 # configure, and could therefore not use this "fixed" $ac_aux_dir.
635 # Another solution, used here, is to always expand $ac_aux_dir to an
636 # absolute PATH. The drawback is that using absolute paths prevent a
637 # configured tree to be moved without reconfiguration.
639 # Rely on autoconf to set up CDPATH properly.
642 AC_DEFUN([AM_AUX_DIR_EXPAND], [
643 # expand $ac_aux_dir to an absolute path
644 am_aux_dir=`cd $ac_aux_dir && pwd`
649 # Define $install_sh.
651 # Copyright 2001 Free Software Foundation, Inc.
653 # This program is free software; you can redistribute it and/or modify
654 # it under the terms of the GNU General Public License as published by
655 # the Free Software Foundation; either version 2, or (at your option)
658 # This program is distributed in the hope that it will be useful,
659 # but WITHOUT ANY WARRANTY; without even the implied warranty of
660 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
661 # GNU General Public License for more details.
663 # You should have received a copy of the GNU General Public License
664 # along with this program; if not, write to the Free Software
665 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
668 AC_DEFUN([AM_PROG_INSTALL_SH],
669 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
670 install_sh=${install_sh-"$am_aux_dir/install-sh"}
671 AC_SUBST(install_sh)])
673 # AM_PROG_INSTALL_STRIP
675 # Copyright 2001 Free Software Foundation, Inc.
677 # This program is free software; you can redistribute it and/or modify
678 # it under the terms of the GNU General Public License as published by
679 # the Free Software Foundation; either version 2, or (at your option)
682 # This program is distributed in the hope that it will be useful,
683 # but WITHOUT ANY WARRANTY; without even the implied warranty of
684 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
685 # GNU General Public License for more details.
687 # You should have received a copy of the GNU General Public License
688 # along with this program; if not, write to the Free Software
689 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
692 # One issue with vendor `install' (even GNU) is that you can't
693 # specify the program used to strip binaries. This is especially
694 # annoying in cross-compiling environments, where the build's strip
695 # is unlikely to handle the host's binaries.
696 # Fortunately install-sh will honor a STRIPPROG variable, so we
697 # always use install-sh in `make install-strip', and initialize
698 # STRIPPROG with the value of the STRIP variable (set by the user).
699 AC_DEFUN([AM_PROG_INSTALL_STRIP],
700 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
701 # Installed binaries are usually stripped using `strip' when the user
702 # run `make install-strip'. However `strip' might not be the right
703 # tool to use in cross-compilation environments, therefore Automake
704 # will honor the `STRIP' environment variable to overrule this program.
705 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
706 if test "$cross_compiling" != no; then
707 AC_CHECK_TOOL([STRIP], [strip], :)
709 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
710 AC_SUBST([INSTALL_STRIP_PROGRAM])])
712 # serial 4 -*- Autoconf -*-
714 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
716 # This program is free software; you can redistribute it and/or modify
717 # it under the terms of the GNU General Public License as published by
718 # the Free Software Foundation; either version 2, or (at your option)
721 # This program is distributed in the hope that it will be useful,
722 # but WITHOUT ANY WARRANTY; without even the implied warranty of
723 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
724 # GNU General Public License for more details.
726 # You should have received a copy of the GNU General Public License
727 # along with this program; if not, write to the Free Software
728 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
732 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
733 # written in clear, in which case automake, when reading aclocal.m4,
734 # will think it sees a *use*, and therefore will trigger all it's
735 # C support machinery. Also note that it means that autoscan, seeing
736 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
740 # _AM_DEPENDENCIES(NAME)
741 # ----------------------
742 # See how the compiler implements dependency checking.
743 # NAME is "CC", "CXX", "GCJ", or "OBJC".
744 # We try a few techniques and use that to set a single cache variable.
746 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
747 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
748 # dependency, and given that the user is not expected to run this macro,
749 # just rely on AC_PROG_CC.
750 AC_DEFUN([_AM_DEPENDENCIES],
751 [AC_REQUIRE([AM_SET_DEPDIR])dnl
752 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
753 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
754 AC_REQUIRE([AM_DEP_TRACK])dnl
756 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
757 [$1], CXX, [depcc="$CXX" am_compiler_list=],
758 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
759 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
760 [depcc="$$1" am_compiler_list=])
762 AC_CACHE_CHECK([dependency style of $depcc],
763 [am_cv_$1_dependencies_compiler_type],
764 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
765 # We make a subdir and do the tests there. Otherwise we can end up
766 # making bogus files that we don't know about and never remove. For
767 # instance it was reported that on HP-UX the gcc test will end up
768 # making a dummy file named `D' -- because `-MD' means `put the output
771 # Copy depcomp to subdir because otherwise we won't find it if we're
772 # using a relative directory.
773 cp "$am_depcomp" conftest.dir
776 am_cv_$1_dependencies_compiler_type=none
777 if test "$am_compiler_list" = ""; then
778 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
780 for depmode in $am_compiler_list; do
781 # We need to recreate these files for each test, as the compiler may
782 # overwrite some of them when testing with obscure command lines.
783 # This happens at least with the AIX C compiler.
784 echo '#include "conftest.h"' > conftest.c
785 echo 'int i;' > conftest.h
786 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
790 # after this tag, mechanisms are not by side-effect, so they'll
791 # only be used when explicitly requested
792 if test "x$enable_dependency_tracking" = xyes; then
800 # We check with `-c' and `-o' for the sake of the "dashmstdout"
801 # mode. It turns out that the SunPro C++ compiler does not properly
802 # handle `-M -o', and we need to detect this.
803 if depmode=$depmode \
804 source=conftest.c object=conftest.o \
805 depfile=conftest.Po tmpdepfile=conftest.TPo \
806 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
807 grep conftest.h conftest.Po > /dev/null 2>&1 &&
808 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
809 am_cv_$1_dependencies_compiler_type=$depmode
817 am_cv_$1_dependencies_compiler_type=none
820 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
826 # Choose a directory name for dependency files.
827 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
828 AC_DEFUN([AM_SET_DEPDIR],
829 [rm -f .deps 2>/dev/null
830 mkdir .deps 2>/dev/null
831 if test -d .deps; then
834 # MS-DOS does not allow filenames that begin with a dot.
837 rmdir .deps 2>/dev/null
844 AC_DEFUN([AM_DEP_TRACK],
845 [AC_ARG_ENABLE(dependency-tracking,
846 [ --disable-dependency-tracking Speeds up one-time builds
847 --enable-dependency-tracking Do not reject slow dependency extractors])
848 if test "x$enable_dependency_tracking" != xno; then
849 am_depcomp="$ac_aux_dir/depcomp"
852 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
853 AC_SUBST([AMDEPBACKSLASH])
856 # Generate code to set up dependency tracking. -*- Autoconf -*-
858 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
860 # This program is free software; you can redistribute it and/or modify
861 # it under the terms of the GNU General Public License as published by
862 # the Free Software Foundation; either version 2, or (at your option)
865 # This program is distributed in the hope that it will be useful,
866 # but WITHOUT ANY WARRANTY; without even the implied warranty of
867 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
868 # GNU General Public License for more details.
870 # You should have received a copy of the GNU General Public License
871 # along with this program; if not, write to the Free Software
872 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
877 # _AM_OUTPUT_DEPENDENCY_COMMANDS
878 # ------------------------------
879 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
880 [for mf in $CONFIG_FILES; do
881 # Strip MF so we end up with the name of the file.
882 mf=`echo "$mf" | sed -e 's/:.*$//'`
883 # Check whether this is an Automake generated Makefile or not.
884 # We used to match only the files named `Makefile.in', but
885 # some people rename them; so instead we look at the file content.
886 # Grep'ing the first line is not enough: some people post-process
887 # each Makefile.in and add a new line on top of each file to say so.
888 # So let's grep whole file.
889 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
890 dirpart=`AS_DIRNAME("$mf")`
894 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
895 # Extract the definition of DEP_FILES from the Makefile without
897 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
898 test -z "$DEPDIR" && continue
899 # When using ansi2knr, U may be empty or an underscore; expand it
900 U=`sed -n -e '/^U = / s///p' < "$mf"`
901 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
902 # We invoke sed twice because it is the simplest approach to
903 # changing $(DEPDIR) to its actual value in the expansion.
904 for file in `sed -n -e '
905 /^DEP_FILES = .*\\\\$/ {
914 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
915 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
916 # Make sure the directory exists.
917 test -f "$dirpart/$file" && continue
918 fdir=`AS_DIRNAME(["$file"])`
919 AS_MKDIR_P([$dirpart/$fdir])
920 # echo "creating $dirpart/$file"
921 echo '# dummy' > "$dirpart/$file"
924 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
927 # AM_OUTPUT_DEPENDENCY_COMMANDS
928 # -----------------------------
929 # This macro should only be invoked once -- use via AC_REQUIRE.
931 # This code is only required when automatic dependency tracking
932 # is enabled. FIXME. This creates each `.P' file that we will
933 # need in order to bootstrap the dependency handling code.
934 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
935 [AC_CONFIG_COMMANDS([depfiles],
936 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
937 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
940 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
942 # This program is free software; you can redistribute it and/or modify
943 # it under the terms of the GNU General Public License as published by
944 # the Free Software Foundation; either version 2, or (at your option)
947 # This program is distributed in the hope that it will be useful,
948 # but WITHOUT ANY WARRANTY; without even the implied warranty of
949 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
950 # GNU General Public License for more details.
952 # You should have received a copy of the GNU General Public License
953 # along with this program; if not, write to the Free Software
954 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
961 # Check to see how make treats includes.
962 AC_DEFUN([AM_MAKE_INCLUDE],
963 [am_make=${MAKE-make}
964 cat > confinc << 'END'
968 # If we don't find an include directive, just comment out the code.
969 AC_MSG_CHECKING([for style of include used by $am_make])
973 # First try GNU make style include.
974 echo "include confinc" > confmf
975 # We grep out `Entering directory' and `Leaving directory'
976 # messages which can occur if `w' ends up in MAKEFLAGS.
977 # In particular we don't look at `^make:' because GNU make might
978 # be invoked under some other name (usually "gmake"), in which
979 # case it prints its new name instead of `make'.
980 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
985 # Now try BSD make style include.
986 if test "$am__include" = "#"; then
987 echo '.include "confinc"' > confmf
988 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
994 AC_SUBST(am__include)
996 AC_MSG_RESULT($_am_result)
1000 # AM_CONDITIONAL -*- Autoconf -*-
1002 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1004 # This program is free software; you can redistribute it and/or modify
1005 # it under the terms of the GNU General Public License as published by
1006 # the Free Software Foundation; either version 2, or (at your option)
1007 # any later version.
1009 # This program is distributed in the hope that it will be useful,
1010 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1012 # GNU General Public License for more details.
1014 # You should have received a copy of the GNU General Public License
1015 # along with this program; if not, write to the Free Software
1016 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1023 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1024 # -------------------------------------
1025 # Define a conditional.
1026 AC_DEFUN([AM_CONDITIONAL],
1027 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1028 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1030 AC_SUBST([$1_FALSE])
1038 AC_CONFIG_COMMANDS_PRE(
1039 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1040 AC_MSG_ERROR([conditional \"$1\" was never defined.
1041 Usually this means the macro was only invoked conditionally.])
1044 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1046 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1048 # This program is free software; you can redistribute it and/or modify
1049 # it under the terms of the GNU General Public License as published by
1050 # the Free Software Foundation; either version 2, or (at your option)
1051 # any later version.
1053 # This program is distributed in the hope that it will be useful,
1054 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1055 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1056 # GNU General Public License for more details.
1058 # You should have received a copy of the GNU General Public License
1059 # along with this program; if not, write to the Free Software
1060 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1067 # When config.status generates a header, we must update the stamp-h file.
1068 # This file resides in the same directory as the config header
1069 # that is generated. We must strip everything past the first ":",
1070 # and everything past the last "/".
1074 # Like AS_DIRNAME, only do it during macro expansion
1075 AC_DEFUN([_AM_DIRNAME],
1076 [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
1077 m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
1078 m4_if(regexp([$1], [^/.*]), -1,
1080 patsubst([$1], [^\(/\).*], [\1])),
1081 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
1082 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
1086 # The stamp files are numbered to have different names.
1087 # We could number them on a directory basis, but that's additional
1088 # complications, let's have a unique counter.
1089 m4_define([_AM_STAMP_Count], [0])
1094 # The name of the stamp file for HEADER.
1095 AC_DEFUN([_AM_STAMP],
1096 [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
1097 AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
1098 [:.*])))/stamp-h[]_AM_STAMP_Count])
1101 # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
1102 # ------------------------------------------------------------
1103 # We used to try to get a real timestamp in stamp-h. But the fear is that
1104 # that will cause unnecessary cvs conflicts.
1105 AC_DEFUN([_AM_CONFIG_HEADER],
1106 [# Add the stamp file to the list of files AC keeps track of,
1107 # along with our hook.
1108 AC_CONFIG_HEADERS([$1],
1109 [# update the timestamp
1110 echo 'timestamp for $1' >"_AM_STAMP([$1])"
1113 ])# _AM_CONFIG_HEADER
1116 # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
1117 # --------------------------------------------------------------
1118 AC_DEFUN([AM_CONFIG_HEADER],
1119 [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
1120 ])# AM_CONFIG_HEADER
1122 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1124 # serial 46 AC_PROG_LIBTOOL
1126 AC_DEFUN([AC_PROG_LIBTOOL],
1127 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1129 # This can be used to rebuild libtool when needed
1130 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1132 # Always use our own libtool.
1133 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1134 AC_SUBST(LIBTOOL)dnl
1136 # Prevent multiple expansion
1137 define([AC_PROG_LIBTOOL], [])
1140 AC_DEFUN([AC_LIBTOOL_SETUP],
1142 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1143 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1144 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1145 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1146 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1147 AC_REQUIRE([AC_PROG_CC])dnl
1148 AC_REQUIRE([AC_PROG_LD])dnl
1149 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1150 AC_REQUIRE([AC_PROG_NM])dnl
1151 AC_REQUIRE([AC_PROG_LN_S])dnl
1152 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1153 AC_REQUIRE([AC_OBJEXT])dnl
1154 AC_REQUIRE([AC_EXEEXT])dnl
1157 _LT_AC_PROG_ECHO_BACKSLASH
1158 # Only perform the check for file, if the check method requires it
1159 case $deplibs_check_method in
1161 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1167 AC_CHECK_TOOL(RANLIB, ranlib, :)
1168 AC_CHECK_TOOL(STRIP, strip, :)
1170 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1171 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1172 enable_win32_dll=yes, enable_win32_dll=no)
1174 AC_ARG_ENABLE(libtool-lock,
1175 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1176 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1178 # Some flags need to be propagated to the compiler or linker for good
1182 # Find out which ABI we are using.
1183 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1184 if AC_TRY_EVAL(ac_compile); then
1185 case `/usr/bin/file conftest.$ac_objext` in
1201 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1202 SAVE_CFLAGS="$CFLAGS"
1203 CFLAGS="$CFLAGS -belf"
1204 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1207 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1209 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1210 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1211 CFLAGS="$SAVE_CFLAGS"
1215 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1216 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1217 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1218 AC_CHECK_TOOL(AS, as, false)
1219 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1221 # recent cygwin and mingw systems supply a stub DllMain which the user
1222 # can override, but on older systems we have to supply one
1223 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1225 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1226 DllMain (0, 0, 0);],
1227 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1230 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1231 # old mingw systems require "-dll" to link a DLL, while more recent ones
1233 SAVE_CFLAGS="$CFLAGS"
1234 CFLAGS="$CFLAGS -mdll"
1235 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1236 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1237 CFLAGS="$SAVE_CFLAGS" ;;
1238 *-*-cygwin* | *-*-pw32*)
1239 # cygwin systems need to pass --dll to the linker, and not link
1240 # crt.o which will require a WinMain@16 definition.
1241 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1247 _LT_AC_LTCONFIG_HACK
1251 # AC_LIBTOOL_HEADER_ASSERT
1252 # ------------------------
1253 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1254 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1255 [lt_cv_func_assert_works],
1258 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1259 case `$CC --version 2>/dev/null` in
1260 [[12]].*) lt_cv_func_assert_works=no ;;
1261 *) lt_cv_func_assert_works=yes ;;
1267 if test "x$lt_cv_func_assert_works" = xyes; then
1268 AC_CHECK_HEADERS(assert.h)
1270 ])# AC_LIBTOOL_HEADER_ASSERT
1272 # _LT_AC_CHECK_DLFCN
1273 # --------------------
1274 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1275 [AC_CHECK_HEADERS(dlfcn.h)
1276 ])# _LT_AC_CHECK_DLFCN
1278 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1279 # ---------------------------------
1280 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1281 [AC_REQUIRE([AC_CANONICAL_HOST])
1282 AC_REQUIRE([AC_PROG_NM])
1283 AC_REQUIRE([AC_OBJEXT])
1284 # Check for command to grab the raw symbol name followed by C symbol from nm.
1285 AC_MSG_CHECKING([command to parse $NM output])
1286 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1288 # These are sane defaults that work on at least a few old systems.
1289 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1291 # Character class describing NM global symbol codes.
1292 symcode='[[BCDEGRST]]'
1294 # Regexp to match symbols that can be accessed directly from C.
1295 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1297 # Transform the above into a raw symbol and a C symbol.
1298 symxfrm='\1 \2\3 \3'
1300 # Transform an extracted symbol line into a proper C declaration
1301 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1303 # Transform an extracted symbol line into symbol name and symbol address
1304 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'"
1306 # Define system-specific variables.
1311 cygwin* | mingw* | pw32*)
1312 symcode='[[ABCDGISTW]]'
1314 hpux*) # Its linker distinguishes data from code symbols
1315 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1316 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'"
1319 symcode='[[BCDEGRST]]'
1325 symcode='[[DFNSTU]]'
1329 # Handle CRLF in mingw tool chain
1333 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1337 # If we're using GNU nm, then use its standard symbol codes.
1338 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1339 symcode='[[ABCDGISTW]]'
1342 # Try without a prefix undercore, then with it.
1343 for ac_symprfx in "" "_"; do
1345 # Write the raw and C identifiers.
1346 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1348 # Check to see that the pipe works correctly.
1351 cat > conftest.$ac_ext <<EOF
1356 void nm_test_func(){}
1360 int main(){nm_test_var='a';nm_test_func();return(0);}
1363 if AC_TRY_EVAL(ac_compile); then
1364 # Now try to grab the symbols.
1366 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1367 # Try sorting and uniquifying the output.
1368 if sort "$nlist" | uniq > "$nlist"T; then
1369 mv -f "$nlist"T "$nlist"
1374 # Make sure that we snagged all the symbols we need.
1375 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1376 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1377 cat <<EOF > conftest.$ac_ext
1383 # Now generate the symbol file.
1384 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1386 cat <<EOF >> conftest.$ac_ext
1387 #if defined (__STDC__) && __STDC__
1388 # define lt_ptr void *
1390 # define lt_ptr char *
1394 /* The mapping between symbol names and symbols. */
1399 lt_preloaded_symbols[[]] =
1402 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1403 cat <<\EOF >> conftest.$ac_ext
1411 # Now try linking the two files.
1412 mv conftest.$ac_objext conftstm.$ac_objext
1414 save_CFLAGS="$CFLAGS"
1415 LIBS="conftstm.$ac_objext"
1416 CFLAGS="$CFLAGS$no_builtin_flag"
1417 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1421 CFLAGS="$save_CFLAGS"
1423 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1426 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1429 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1432 echo "$progname: failed program was:" >&AC_FD_CC
1433 cat conftest.$ac_ext >&5
1435 rm -f conftest* conftst*
1437 # Do not use the global_symbol_pipe unless it works.
1438 if test "$pipe_works" = yes; then
1441 lt_cv_sys_global_symbol_pipe=
1445 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1446 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1447 global_symbol_to_cdecl=
1448 global_symbol_to_c_name_address=
1450 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1451 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1453 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1455 AC_MSG_RESULT(failed)
1459 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1461 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1462 # ---------------------------------
1463 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1464 [# Find the correct PATH separator. Usually this is `:', but
1465 # DJGPP uses `;' like DOS.
1466 if test "X${PATH_SEPARATOR+set}" != Xset; then
1467 UNAME=${UNAME-`uname 2>/dev/null`}
1469 *-DOS) lt_cv_sys_path_separator=';' ;;
1470 *) lt_cv_sys_path_separator=':' ;;
1472 PATH_SEPARATOR=$lt_cv_sys_path_separator
1474 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1476 # _LT_AC_PROG_ECHO_BACKSLASH
1477 # --------------------------
1478 # Add some code to the start of the generated configure script which
1479 # will find an echo command which doesn't interpret backslashes.
1480 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1481 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1482 [AC_DIVERT_PUSH(NOTICE)])
1483 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1485 # Check that we are running under the correct shell.
1486 SHELL=${CONFIG_SHELL-/bin/sh}
1490 # Remove one level of quotation (which was required for Make).
1491 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1496 if test "X[$]1" = X--no-reexec; then
1497 # Discard the --no-reexec flag, and continue.
1499 elif test "X[$]1" = X--fallback-echo; then
1500 # Avoid inline document here, it may be left over
1502 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1503 # Yippee, $echo works!
1506 # Restart under the correct shell.
1507 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1510 if test "X[$]1" = X--fallback-echo; then
1511 # used as fallback echo
1519 # The HP-UX ksh and POSIX shell print the target directory to stdout
1521 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1523 if test -z "$ECHO"; then
1524 if test "X${echo_test_string+set}" != Xset; then
1525 # find a string as large as possible, as long as the shell can cope with it
1526 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1527 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1528 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1529 echo_test_string="`eval $cmd`" &&
1530 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1537 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1538 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1539 test "X$echo_testing_string" = "X$echo_test_string"; then
1542 # The Solaris, AIX, and Digital Unix default echo programs unquote
1543 # backslashes. This makes it impossible to quote backslashes using
1544 # echo "$something" | sed 's/\\/\\\\/g'
1546 # So, first we look for a working echo in the user's PATH.
1548 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1549 for dir in $PATH /usr/ucb; do
1550 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1551 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1552 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1553 test "X$echo_testing_string" = "X$echo_test_string"; then
1560 if test "X$echo" = Xecho; then
1561 # We didn't find a better echo, so look for alternatives.
1562 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1563 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1564 test "X$echo_testing_string" = "X$echo_test_string"; then
1565 # This shell has a builtin print -r that does the trick.
1567 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1568 test "X$CONFIG_SHELL" != X/bin/ksh; then
1569 # If we have ksh, try running configure again with it.
1570 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1571 export ORIGINAL_CONFIG_SHELL
1572 CONFIG_SHELL=/bin/ksh
1574 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1578 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1579 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1580 test "X$echo_testing_string" = "X$echo_test_string"; then
1581 # Cool, printf works
1583 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1584 test "X$echo_testing_string" = 'X\t' &&
1585 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1586 test "X$echo_testing_string" = "X$echo_test_string"; then
1587 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1589 SHELL="$CONFIG_SHELL"
1591 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1592 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1593 test "X$echo_testing_string" = 'X\t' &&
1594 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1595 test "X$echo_testing_string" = "X$echo_test_string"; then
1596 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1598 # maybe with a smaller string...
1601 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1602 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1609 if test "$prev" != 'sed 50q "[$]0"'; then
1610 echo_test_string=`eval $prev`
1611 export echo_test_string
1612 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1614 # Oops. We lost completely, so just stick with echo.
1623 # Copy echo and quote the copy suitably for passing to libtool from
1624 # the Makefile, instead of quoting the original, which is used later.
1626 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1627 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1632 ])# _LT_AC_PROG_ECHO_BACKSLASH
1634 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1635 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1636 # ------------------------------------------------------------------
1637 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1638 [if test "$cross_compiling" = yes; then :
1641 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1642 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1643 lt_status=$lt_dlunknown
1644 cat > conftest.$ac_ext <<EOF
1645 [#line __oline__ "configure"
1646 #include "confdefs.h"
1655 # define LT_DLGLOBAL RTLD_GLOBAL
1658 # define LT_DLGLOBAL DL_GLOBAL
1660 # define LT_DLGLOBAL 0
1664 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1665 find out it does not work in some platform. */
1666 #ifndef LT_DLLAZY_OR_NOW
1668 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1671 # define LT_DLLAZY_OR_NOW DL_LAZY
1674 # define LT_DLLAZY_OR_NOW RTLD_NOW
1677 # define LT_DLLAZY_OR_NOW DL_NOW
1679 # define LT_DLLAZY_OR_NOW 0
1687 extern "C" void exit (int);
1690 void fnord() { int i=42;}
1693 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1694 int status = $lt_dlunknown;
1698 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1699 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1700 /* dlclose (self); */
1706 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1707 (./conftest; exit; ) 2>/dev/null
1710 x$lt_dlno_uscore) $1 ;;
1711 x$lt_dlneed_uscore) $2 ;;
1712 x$lt_unknown|x*) $3 ;;
1715 # compilation failed
1720 ])# _LT_AC_TRY_DLOPEN_SELF
1722 # AC_LIBTOOL_DLOPEN_SELF
1723 # -------------------
1724 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1725 [if test "x$enable_dlopen" != xyes; then
1726 enable_dlopen=unknown
1727 enable_dlopen_self=unknown
1728 enable_dlopen_self_static=unknown
1735 lt_cv_dlopen="load_add_on"
1737 lt_cv_dlopen_self=yes
1740 cygwin* | mingw* | pw32*)
1741 lt_cv_dlopen="LoadLibrary"
1746 AC_CHECK_FUNC([shl_load],
1747 [lt_cv_dlopen="shl_load"],
1748 [AC_CHECK_LIB([dld], [shl_load],
1749 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1750 [AC_CHECK_FUNC([dlopen],
1751 [lt_cv_dlopen="dlopen"],
1752 [AC_CHECK_LIB([dl], [dlopen],
1753 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1754 [AC_CHECK_LIB([svld], [dlopen],
1755 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1756 [AC_CHECK_LIB([dld], [dld_link],
1757 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1766 if test "x$lt_cv_dlopen" != xno; then
1772 case $lt_cv_dlopen in
1774 save_CPPFLAGS="$CPPFLAGS"
1775 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1776 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1778 save_LDFLAGS="$LDFLAGS"
1779 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1782 LIBS="$lt_cv_dlopen_libs $LIBS"
1784 AC_CACHE_CHECK([whether a program can dlopen itself],
1785 lt_cv_dlopen_self, [dnl
1786 _LT_AC_TRY_DLOPEN_SELF(
1787 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1788 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1791 if test "x$lt_cv_dlopen_self" = xyes; then
1792 LDFLAGS="$LDFLAGS $link_static_flag"
1793 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1794 lt_cv_dlopen_self_static, [dnl
1795 _LT_AC_TRY_DLOPEN_SELF(
1796 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1797 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1801 CPPFLAGS="$save_CPPFLAGS"
1802 LDFLAGS="$save_LDFLAGS"
1807 case $lt_cv_dlopen_self in
1808 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1809 *) enable_dlopen_self=unknown ;;
1812 case $lt_cv_dlopen_self_static in
1813 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1814 *) enable_dlopen_self_static=unknown ;;
1817 ])# AC_LIBTOOL_DLOPEN_SELF
1819 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1820 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1821 # Sed substitution that helps us do robust quoting. It backslashifies
1822 # metacharacters that are still active within double-quoted strings.
1823 Xsed='sed -e s/^X//'
1824 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1826 # Same as above, but do not quote variable references.
1827 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1829 # Sed substitution to delay expansion of an escaped shell variable in a
1830 # double_quote_subst'ed string.
1831 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1837 default_ofile=libtool
1838 can_build_shared=yes
1840 # All known linkers require a `.a' archive for static linking (except M$VC,
1841 # which needs '.lib').
1843 ltmain="$ac_aux_dir/ltmain.sh"
1844 ofile="$default_ofile"
1845 with_gnu_ld="$lt_cv_prog_gnu_ld"
1846 need_locks="$enable_libtool_lock"
1849 old_CFLAGS="$CFLAGS"
1851 # Set sane defaults for various variables
1852 test -z "$AR" && AR=ar
1853 test -z "$AR_FLAGS" && AR_FLAGS=cru
1854 test -z "$AS" && AS=as
1855 test -z "$CC" && CC=cc
1856 test -z "$DLLTOOL" && DLLTOOL=dlltool
1857 test -z "$LD" && LD=ld
1858 test -z "$LN_S" && LN_S="ln -s"
1859 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1860 test -z "$NM" && NM=nm
1861 test -z "$OBJDUMP" && OBJDUMP=objdump
1862 test -z "$RANLIB" && RANLIB=:
1863 test -z "$STRIP" && STRIP=:
1864 test -z "$ac_objext" && ac_objext=o
1866 if test x"$host" != x"$build"; then
1867 ac_tool_prefix=${host_alias}-
1872 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1875 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1880 # AIX sometimes has problems with the GCC collect2 program. For some
1881 # reason, if we set the COLLECT_NAMES environment variable, the problems
1882 # vanish in a puff of smoke.
1883 if test "X${COLLECT_NAMES+set}" != Xset; then
1885 export COLLECT_NAMES
1890 # Determine commands to create old-style static archives.
1891 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1892 old_postinstall_cmds='chmod 644 $oldlib'
1893 old_postuninstall_cmds=
1895 if test -n "$RANLIB"; then
1898 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1901 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1904 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1907 # Allow CC to be a program name with arguments.
1911 AC_MSG_CHECKING([for objdir])
1912 rm -f .libs 2>/dev/null
1913 mkdir .libs 2>/dev/null
1914 if test -d .libs; then
1917 # MS-DOS does not allow filenames that begin with a dot.
1920 rmdir .libs 2>/dev/null
1921 AC_MSG_RESULT($objdir)
1925 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1926 pic_mode="$withval", pic_mode=default)
1927 test -z "$pic_mode" && pic_mode=default
1929 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1930 # in isolation, and that seeing it set (from the cache) indicates that
1931 # the associated values are set (in the cache) correctly too.
1932 AC_MSG_CHECKING([for $compiler option to produce PIC])
1933 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1934 [ lt_cv_prog_cc_pic=
1935 lt_cv_prog_cc_shlib=
1937 lt_cv_prog_cc_static=
1938 lt_cv_prog_cc_no_builtin=
1939 lt_cv_prog_cc_can_build_shared=$can_build_shared
1941 if test "$GCC" = yes; then
1942 lt_cv_prog_cc_wl='-Wl,'
1943 lt_cv_prog_cc_static='-static'
1947 # Below there is a dirty hack to force normal static linking with -ldl
1948 # The problem is because libdl dynamically linked with both libc and
1949 # libC (AIX C++ library), which obviously doesn't included in libraries
1950 # list by gcc. This cause undefined symbols with -static flags.
1951 # This hack allows C programs to be linked with "-static -ldl", but
1952 # not sure about C++ programs.
1953 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1956 # FIXME: we need at least 68020 code to build shared libraries, but
1957 # adding the `-m68020' flag to GCC prevents building anything better,
1959 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1961 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1962 # PIC is the default for these OSes.
1964 darwin* | rhapsody*)
1965 # PIC is the default on this platform
1966 # Common symbols not allowed in MH_DYLIB files
1967 lt_cv_prog_cc_pic='-fno-common'
1969 cygwin* | mingw* | pw32* | os2*)
1970 # This hack is so that the source file can tell whether it is being
1971 # built for inclusion in a dll (and should export symbols for example).
1972 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1975 if test -d /usr/nec; then
1976 lt_cv_prog_cc_pic=-Kconform_pic
1980 lt_cv_prog_cc_pic='-fPIC'
1984 # PORTME Check for PIC flags for the system compiler.
1986 aix3* | aix4* | aix5*)
1987 lt_cv_prog_cc_wl='-Wl,'
1988 # All AIX code is PIC.
1989 if test "$host_cpu" = ia64; then
1990 # AIX 5 now supports IA64 processor
1991 lt_cv_prog_cc_static='-Bstatic'
1993 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1997 hpux9* | hpux10* | hpux11*)
1998 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1999 lt_cv_prog_cc_wl='-Wl,'
2000 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
2001 lt_cv_prog_cc_pic='+Z'
2005 lt_cv_prog_cc_wl='-Wl,'
2006 lt_cv_prog_cc_static='-non_shared'
2007 # PIC (with -KPIC) is the default.
2010 cygwin* | mingw* | pw32* | os2*)
2011 # This hack is so that the source file can tell whether it is being
2012 # built for inclusion in a dll (and should export symbols for example).
2013 lt_cv_prog_cc_pic='-DDLL_EXPORT'
2017 lt_cv_prog_cc_pic='-KPIC'
2018 lt_cv_prog_cc_static='-Bstatic'
2021 osf3* | osf4* | osf5*)
2022 # All OSF/1 code is PIC.
2023 lt_cv_prog_cc_wl='-Wl,'
2024 lt_cv_prog_cc_static='-non_shared'
2028 lt_cv_prog_cc_pic='-Kpic'
2029 lt_cv_prog_cc_static='-dn'
2030 lt_cv_prog_cc_shlib='-belf'
2034 lt_cv_prog_cc_pic='-KPIC'
2035 lt_cv_prog_cc_static='-Bstatic'
2036 lt_cv_prog_cc_wl='-Wl,'
2040 lt_cv_prog_cc_pic='-PIC'
2041 lt_cv_prog_cc_static='-Bstatic'
2042 lt_cv_prog_cc_wl='-Qoption ld '
2045 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2046 lt_cv_prog_cc_pic='-KPIC'
2047 lt_cv_prog_cc_static='-Bstatic'
2048 if test "x$host_vendor" = xsni; then
2049 lt_cv_prog_cc_wl='-LD'
2051 lt_cv_prog_cc_wl='-Wl,'
2056 lt_cv_prog_cc_pic='-pic'
2057 lt_cv_prog_cc_static='-Bstatic'
2061 if test -d /usr/nec ;then
2062 lt_cv_prog_cc_pic='-Kconform_pic'
2063 lt_cv_prog_cc_static='-Bstatic'
2068 lt_cv_prog_cc_can_build_shared=no
2073 if test -z "$lt_cv_prog_cc_pic"; then
2074 AC_MSG_RESULT([none])
2076 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
2078 # Check to make sure the pic_flag actually works.
2079 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
2080 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
2081 save_CFLAGS="$CFLAGS"
2082 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2083 AC_TRY_COMPILE([], [], [dnl
2085 hpux9* | hpux10* | hpux11*)
2086 # On HP-UX, both CC and GCC only warn that PIC is supported... then
2087 # they create non-PIC objects. So, if there were any warnings, we
2088 # assume that PIC is not supported.
2089 if test -s conftest.err; then
2090 lt_cv_prog_cc_pic_works=no
2092 lt_cv_prog_cc_pic_works=yes
2096 lt_cv_prog_cc_pic_works=yes
2100 lt_cv_prog_cc_pic_works=no
2102 CFLAGS="$save_CFLAGS"
2105 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2107 lt_cv_prog_cc_can_build_shared=no
2109 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2112 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
2115 # Check for any special shared library compilation flags.
2116 if test -n "$lt_cv_prog_cc_shlib"; then
2117 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2118 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2120 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2121 lt_cv_prog_cc_can_build_shared=no
2125 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2126 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2127 lt_cv_prog_cc_static_works=no
2128 save_LDFLAGS="$LDFLAGS"
2129 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2130 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2131 LDFLAGS="$save_LDFLAGS"
2134 # Belt *and* braces to stop my trousers falling down:
2135 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2136 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2138 pic_flag="$lt_cv_prog_cc_pic"
2139 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2140 wl="$lt_cv_prog_cc_wl"
2141 link_static_flag="$lt_cv_prog_cc_static"
2142 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2143 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2146 # Check to see if options -o and -c are simultaneously supported by compiler
2147 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2148 AC_CACHE_VAL([lt_cv_compiler_c_o], [
2149 $rm -r conftest 2>/dev/null
2152 echo "int some_variable = 0;" > conftest.$ac_ext
2154 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2155 # that will create temporary files in the current directory regardless of
2156 # the output directory. Thus, making CWD read-only will cause this test
2157 # to fail, enabling locking or at least warning the user not to do parallel
2160 save_CFLAGS="$CFLAGS"
2161 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2163 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2164 # The compiler can only warn and ignore the option if not recognized
2165 # So say no if there are warnings
2166 if test -s out/conftest.err; then
2167 lt_cv_compiler_c_o=no
2169 lt_cv_compiler_c_o=yes
2172 # Append any errors to the config.log.
2173 cat out/conftest.err 1>&AC_FD_CC
2174 lt_cv_compiler_c_o=no
2176 CFLAGS="$save_CFLAGS"
2182 $rm -r conftest 2>/dev/null
2184 compiler_c_o=$lt_cv_compiler_c_o
2185 AC_MSG_RESULT([$compiler_c_o])
2187 if test x"$compiler_c_o" = x"yes"; then
2188 # Check to see if we can write to a .lo
2189 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2190 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2191 lt_cv_compiler_o_lo=no
2192 save_CFLAGS="$CFLAGS"
2193 CFLAGS="$CFLAGS -c -o conftest.lo"
2194 save_objext="$ac_objext"
2196 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2197 # The compiler can only warn and ignore the option if not recognized
2198 # So say no if there are warnings
2199 if test -s conftest.err; then
2200 lt_cv_compiler_o_lo=no
2202 lt_cv_compiler_o_lo=yes
2205 ac_objext="$save_objext"
2206 CFLAGS="$save_CFLAGS"
2208 compiler_o_lo=$lt_cv_compiler_o_lo
2209 AC_MSG_RESULT([$compiler_o_lo])
2214 # Check to see if we can do hard links to lock some files if needed
2215 hard_links="nottested"
2216 if test "$compiler_c_o" = no && test "$need_locks" != no; then
2217 # do not overwrite the value of need_locks provided by the user
2218 AC_MSG_CHECKING([if we can lock with hard links])
2221 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2223 ln conftest.a conftest.b 2>&5 || hard_links=no
2224 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2225 AC_MSG_RESULT([$hard_links])
2226 if test "$hard_links" = no; then
2227 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2234 if test "$GCC" = yes; then
2235 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2236 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2237 echo "int some_variable = 0;" > conftest.$ac_ext
2238 save_CFLAGS="$CFLAGS"
2239 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2240 compiler_rtti_exceptions=no
2241 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2242 # The compiler can only warn and ignore the option if not recognized
2243 # So say no if there are warnings
2244 if test -s conftest.err; then
2245 compiler_rtti_exceptions=no
2247 compiler_rtti_exceptions=yes
2250 CFLAGS="$save_CFLAGS"
2251 AC_MSG_RESULT([$compiler_rtti_exceptions])
2253 if test "$compiler_rtti_exceptions" = "yes"; then
2254 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2256 no_builtin_flag=' -fno-builtin'
2260 # See if the linker supports building shared libraries.
2261 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2263 allow_undefined_flag=
2265 need_lib_prefix=unknown
2266 need_version=unknown
2267 # when you set need_version to no, make sure it does not cause -set_version
2268 # flags to be left without arguments
2270 archive_expsym_cmds=
2271 old_archive_from_new_cmds=
2272 old_archive_from_expsyms_cmds=
2273 export_dynamic_flag_spec=
2274 whole_archive_flag_spec=
2275 thread_safe_flag_spec=
2276 hardcode_into_libs=no
2277 hardcode_libdir_flag_spec=
2278 hardcode_libdir_separator=
2281 hardcode_shlibpath_var=unsupported
2283 link_all_deplibs=unknown
2284 always_export_symbols=no
2285 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2286 # include_expsyms should be a list of space-separated symbols to be *always*
2287 # included in the symbol list
2289 # exclude_expsyms can be an egrep regular expression of symbols to exclude
2290 # it will be wrapped by ` (' and `)$', so one must not match beginning or
2291 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2292 # as well as any symbol that contains `d'.
2293 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2294 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2295 # platforms (ab)use it in PIC code, but their linkers get confused if
2296 # the symbol is explicitly referenced. Since portable code cannot
2297 # rely on this symbol name, it's probably fine to never include it in
2298 # preloaded symbol tables.
2299 extract_expsyms_cmds=
2302 cygwin* | mingw* | pw32*)
2303 # FIXME: the MSVC++ port hasn't been tested in a loooong time
2304 # When not using gcc, we currently assume that we are using
2305 # Microsoft Visual C++.
2306 if test "$GCC" != yes; then
2316 if test "$with_gnu_ld" = yes; then
2317 # If archive_cmds runs LD, not CC, wlarc should be empty
2320 # See if GNU ld supports shared libraries.
2322 aix3* | aix4* | aix5*)
2323 # On AIX, the GNU linker is very broken
2324 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2328 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
2329 *** to be unable to reliably create shared libraries on AIX.
2330 *** Therefore, libtool is disabling shared libraries support. If you
2331 *** really care for shared libraries, you may want to modify your PATH
2332 *** so that a non-GNU linker is found, and then restart.
2338 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)'
2339 hardcode_libdir_flag_spec='-L$libdir'
2340 hardcode_minus_L=yes
2342 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2343 # that the semantics of dynamic libraries on AmigaOS, at least up
2344 # to version 4, is to share data among multiple programs linked
2345 # with the same dynamic library. Since this doesn't match the
2346 # behavior of shared libraries on other platforms, we can use
2352 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2353 allow_undefined_flag=unsupported
2354 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2355 # support --undefined. This deserves some investigation. FIXME
2356 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2362 cygwin* | mingw* | pw32*)
2363 # hardcode_libdir_flag_spec is actually meaningless, as there is
2364 # no search path for DLLs.
2365 hardcode_libdir_flag_spec='-L$libdir'
2366 allow_undefined_flag=unsupported
2367 always_export_symbols=yes
2369 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2370 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2371 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2372 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2373 else $CC -o impgen impgen.c ; fi)~
2374 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2376 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2378 # cygwin and mingw dlls have different entry points and sets of symbols
2380 # FIXME: what about values for MSVC?
2381 dll_entry=__cygwin_dll_entry@12
2382 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2386 dll_entry=_DllMainCRTStartup@12
2387 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2391 # mingw and cygwin differ, and it's simplest to just exclude the union
2392 # of the two symbol sets.
2393 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2395 # recent cygwin and mingw systems supply a stub DllMain which the user
2396 # can override, but on older systems we have to supply one (in ltdll.c)
2397 if test "x$lt_cv_need_dllmain" = "xyes"; then
2398 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2399 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~
2400 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2406 # Extract the symbol export list from an `--export-all' def file,
2407 # then regenerate the def file from the symbol export list, so that
2408 # the compiled dll only exports the symbol export list.
2409 # Be careful not to strip the DATA tag left be newer dlltools.
2410 export_symbols_cmds="$ltdll_cmds"'
2411 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2412 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2414 # If the export-symbols file already is a .def file (1st line
2415 # is EXPORTS), use it as is.
2416 # If DATA tags from a recent dlltool are present, honour them!
2417 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2418 cp $export_symbols $output_objdir/$soname-def;
2420 echo EXPORTS > $output_objdir/$soname-def;
2422 cat $export_symbols | while read symbol; do
2425 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2426 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2428 _lt_hint=`expr 1 + \$_lt_hint`;
2432 $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~
2433 $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~
2434 $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~
2435 $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~
2436 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2440 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2441 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2444 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2445 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2450 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2454 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2455 *** create shared libraries on Solaris systems. Therefore, libtool
2456 *** is disabling shared libraries support. We urge you to upgrade GNU
2457 *** binutils to release 2.9.1 or newer. Another option is to modify
2458 *** your PATH or compiler configuration so that the native linker is
2459 *** used, and then restart.
2462 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2463 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2464 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2471 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2474 hardcode_shlibpath_var=no
2478 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2479 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2480 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2487 if test "$ld_shlibs" = yes; then
2488 runpath_var=LD_RUN_PATH
2489 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2490 export_dynamic_flag_spec='${wl}--export-dynamic'
2492 cygwin* | mingw* | pw32*)
2493 # dlltool doesn't understand --whole-archive et. al.
2494 whole_archive_flag_spec=
2497 # ancient GNU ld didn't support --whole-archive et. al.
2498 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2499 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2501 whole_archive_flag_spec=
2507 # PORTME fill in a description of your system's linker (not GNU ld)
2510 allow_undefined_flag=unsupported
2511 always_export_symbols=yes
2512 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'
2513 # Note: this linker hardcodes the directories in LIBPATH if there
2514 # are no directories specified by -L.
2515 hardcode_minus_L=yes
2516 if test "$GCC" = yes && test -z "$link_static_flag"; then
2517 # Neither direct hardcoding nor static linking is supported with a
2519 hardcode_direct=unsupported
2524 if test "$host_cpu" = ia64; then
2525 # On IA64, the linker does run time linking by default, so we don't
2526 # have to do anything special.
2527 aix_use_runtimelinking=no
2528 exp_sym_flag='-Bexport'
2531 aix_use_runtimelinking=no
2533 # Test if we are trying to use run time linking or normal
2534 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2535 # need to do runtime linking.
2536 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2537 for ld_flag in $LDFLAGS; do
2538 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2539 aix_use_runtimelinking=yes
2545 exp_sym_flag='-bexport'
2546 no_entry_flag='-bnoentry'
2549 # When large executables or shared objects are built, AIX ld can
2550 # have problems creating the table of contents. If linking a library
2551 # or program results in "error TOC overflow" add -mminimal-toc to
2552 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2553 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2557 hardcode_libdir_separator=':'
2558 if test "$GCC" = yes; then
2559 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2560 collect2name=`${CC} -print-prog-name=collect2`
2561 if test -f "$collect2name" && \
2562 strings "$collect2name" | grep resolve_lib_name >/dev/null
2564 # We have reworked collect2
2567 # We have old collect2
2568 hardcode_direct=unsupported
2569 # It fails to find uninstalled libraries when the uninstalled
2570 # path is not listed in the libpath. Setting hardcode_minus_L
2571 # to unsupported forces relinking
2572 hardcode_minus_L=yes
2573 hardcode_libdir_flag_spec='-L$libdir'
2574 hardcode_libdir_separator=
2578 shared_flag='-shared'
2581 if test "$host_cpu" = ia64; then
2582 shared_flag='${wl}-G'
2584 if test "$aix_use_runtimelinking" = yes; then
2585 shared_flag='${wl}-G'
2587 shared_flag='${wl}-bM:SRE'
2592 # It seems that -bexpall can do strange things, so it is better to
2593 # generate a list of symbols to export.
2594 always_export_symbols=yes
2595 if test "$aix_use_runtimelinking" = yes; then
2596 # Warning - without using the other runtime loading flags (-brtl),
2597 # -berok will link without error, but may produce a broken library.
2598 allow_undefined_flag='-berok'
2599 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2600 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"
2602 if test "$host_cpu" = ia64; then
2603 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2604 allow_undefined_flag="-z nodefs"
2605 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"
2607 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2608 # Warning - without using the other run time loading flags,
2609 # -berok will link without error, but may produce a broken library.
2610 allow_undefined_flag='${wl}-berok'
2611 # This is a bit strange, but is similar to how AIX traditionally builds
2612 # it's shared libraries.
2613 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'
2619 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)'
2620 hardcode_libdir_flag_spec='-L$libdir'
2621 hardcode_minus_L=yes
2622 # see comment about different semantics on the GNU ld section
2626 cygwin* | mingw* | pw32*)
2627 # When not using gcc, we currently assume that we are using
2628 # Microsoft Visual C++.
2629 # hardcode_libdir_flag_spec is actually meaningless, as there is
2630 # no search path for DLLs.
2631 hardcode_libdir_flag_spec=' '
2632 allow_undefined_flag=unsupported
2633 # Tell ltmain to make .lib files, not .a files.
2635 # FIXME: Setting linknames here is a bad hack.
2636 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2637 # The linker will automatically build a .lib file if we build a DLL.
2638 old_archive_from_new_cmds='true'
2639 # FIXME: Should let the user specify the lib program.
2640 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2641 fix_srcfile_path='`cygpath -w "$srcfile"`'
2644 darwin* | rhapsody*)
2646 rhapsody* | darwin1.[[012]])
2647 allow_undefined_flag='-undefined suppress'
2650 allow_undefined_flag='-flat_namespace -undefined suppress'
2653 # FIXME: Relying on posixy $() will cause problems for
2654 # cross-compilation, but unfortunately the echo tests do not
2655 # yet detect zsh echo's removal of \ escapes.
2656 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2657 # We need to add '_' to the symbols in $export_symbols first
2658 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2660 hardcode_shlibpath_var=no
2661 whole_archive_flag_spec='-all_load $convenience'
2668 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2669 # support. Future versions do this automatically, but an explicit c++rt0.o
2670 # does not break anything, and helps significantly (at the cost of a little
2673 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2674 hardcode_libdir_flag_spec='-R$libdir'
2676 hardcode_shlibpath_var=no
2679 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2681 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2683 hardcode_minus_L=yes
2684 hardcode_shlibpath_var=no
2687 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2689 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2690 hardcode_libdir_flag_spec='-R$libdir'
2692 hardcode_shlibpath_var=no
2695 hpux9* | hpux10* | hpux11*)
2697 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' ;;
2698 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2700 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2701 hardcode_libdir_separator=:
2703 hardcode_minus_L=yes # Not in the search PATH, but as the default
2704 # location of the library.
2705 export_dynamic_flag_spec='${wl}-E'
2709 if test "$GCC" = yes; then
2710 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'
2712 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'
2714 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2715 hardcode_libdir_separator=:
2716 link_all_deplibs=yes
2720 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2721 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2723 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2725 hardcode_libdir_flag_spec='-R$libdir'
2727 hardcode_shlibpath_var=no
2731 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2733 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2734 hardcode_libdir_separator=:
2735 hardcode_shlibpath_var=no
2740 hardcode_shlibpath_var=no
2741 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2742 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2743 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2744 export_dynamic_flag_spec='${wl}-E'
2747 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2748 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2749 hardcode_libdir_flag_spec='-R$libdir'
2752 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2753 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2760 hardcode_libdir_flag_spec='-L$libdir'
2761 hardcode_minus_L=yes
2762 allow_undefined_flag=unsupported
2763 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'
2764 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2768 if test "$GCC" = yes; then
2769 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2770 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'
2772 allow_undefined_flag=' -expect_unresolved \*'
2773 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'
2775 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2776 hardcode_libdir_separator=:
2779 osf4* | osf5*) # as osf3* with the addition of -msym flag
2780 if test "$GCC" = yes; then
2781 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2782 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'
2783 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2785 allow_undefined_flag=' -expect_unresolved \*'
2786 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'
2787 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2788 $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'
2790 #Both c and cxx compiler support -rpath directly
2791 hardcode_libdir_flag_spec='-rpath $libdir'
2793 hardcode_libdir_separator=:
2797 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2798 hardcode_shlibpath_var=no
2799 runpath_var=LD_RUN_PATH
2800 hardcode_runpath_var=yes
2801 export_dynamic_flag_spec='${wl}-Bexport'
2805 # gcc --version < 3.0 without binutils cannot create self contained
2806 # shared libraries reliably, requiring libgcc.a to resolve some of
2807 # the object symbols generated in some cases. Libraries that use
2808 # assert need libgcc.a to resolve __eprintf, for example. Linking
2809 # a copy of libgcc.a into every shared library to guarantee resolving
2810 # such symbols causes other problems: According to Tim Van Holder
2811 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2812 # (to the application) exception stack for one thing.
2813 no_undefined_flag=' -z defs'
2814 if test "$GCC" = yes; then
2815 case `$CC --version 2>/dev/null` in
2819 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2820 *** create self contained shared libraries on Solaris systems, without
2821 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2822 *** -no-undefined support, which will at least allow you to build shared
2823 *** libraries. However, you may find that when you link such libraries
2824 *** into an application without using GCC, you have to manually add
2825 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2826 *** upgrade to a newer version of GCC. Another option is to rebuild your
2827 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2834 # $CC -shared without GNU ld will not create a library from C++
2835 # object files and a static libstdc++, better avoid it by now
2836 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2837 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2838 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2839 hardcode_libdir_flag_spec='-R$libdir'
2840 hardcode_shlibpath_var=no
2842 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2843 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2844 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2846 link_all_deplibs=yes
2850 if test "x$host_vendor" = xsequent; then
2851 # Use $CC to link under sequent, because it throws in some extra .o
2852 # files that make .init and .fini sections work.
2853 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2855 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2857 hardcode_libdir_flag_spec='-L$libdir'
2859 hardcode_minus_L=yes
2860 hardcode_shlibpath_var=no
2864 if test "x$host_vendor" = xsno; then
2865 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2866 hardcode_direct=yes # is this really true???
2868 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2869 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2871 runpath_var='LD_RUN_PATH'
2872 hardcode_shlibpath_var=no
2876 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2877 hardcode_shlibpath_var=no
2878 export_dynamic_flag_spec='-Bexport'
2882 no_undefined_flag=' -z text'
2883 # $CC -shared without GNU ld will not create a library from C++
2884 # object files and a static libstdc++, better avoid it by now
2885 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2886 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2887 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2888 hardcode_libdir_flag_spec=
2889 hardcode_shlibpath_var=no
2890 runpath_var='LD_RUN_PATH'
2894 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2895 hardcode_libdir_flag_spec='-L$libdir'
2896 hardcode_shlibpath_var=no
2900 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2901 hardcode_libdir_flag_spec='-L$libdir'
2902 hardcode_shlibpath_var=no
2906 if test -d /usr/nec; then
2907 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2908 hardcode_shlibpath_var=no
2909 runpath_var=LD_RUN_PATH
2910 hardcode_runpath_var=yes
2916 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2919 hardcode_shlibpath_var=no
2920 hardcode_runpath_var=yes
2921 runpath_var=LD_RUN_PATH
2924 sysv5uw7* | unixware7*)
2925 no_undefined_flag='${wl}-z ${wl}text'
2926 if test "$GCC" = yes; then
2927 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2929 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2931 runpath_var='LD_RUN_PATH'
2932 hardcode_shlibpath_var=no
2940 AC_MSG_RESULT([$ld_shlibs])
2941 test "$ld_shlibs" = no && can_build_shared=no
2943 # Check hardcoding attributes.
2944 AC_MSG_CHECKING([how to hardcode library paths into programs])
2946 if test -n "$hardcode_libdir_flag_spec" || \
2947 test -n "$runpath_var"; then
2949 # We can hardcode non-existant directories.
2950 if test "$hardcode_direct" != no &&
2951 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2952 # have to relink, otherwise we might link with an installed library
2953 # when we should be linking with a yet-to-be-installed one
2954 ## test "$hardcode_shlibpath_var" != no &&
2955 test "$hardcode_minus_L" != no; then
2956 # Linking always hardcodes the temporary library directory.
2957 hardcode_action=relink
2959 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2960 hardcode_action=immediate
2963 # We cannot hardcode anything, or else we can only hardcode existing
2965 hardcode_action=unsupported
2967 AC_MSG_RESULT([$hardcode_action])
2971 AC_MSG_CHECKING([whether stripping libraries is possible])
2972 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2973 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2974 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2975 AC_MSG_RESULT([yes])
2980 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2981 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2983 # PORTME Fill in your ld.so characteristics
2984 AC_MSG_CHECKING([dynamic linker characteristics])
2986 libname_spec='lib$name'
2993 shlibpath_overrides_runpath=unknown
2995 dynamic_linker="$host_os ld.so"
2996 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2997 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3002 library_names_spec='${libname}${release}.so$versuffix $libname.a'
3003 shlibpath_var=LIBPATH
3005 # AIX has no versioning support, so we append a major version to the name.
3006 soname_spec='${libname}${release}.so$major'
3011 if test "$host_cpu" = ia64; then
3012 # AIX 5 supports IA64
3013 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
3014 shlibpath_var=LD_LIBRARY_PATH
3016 # With GCC up to 2.95.x, collect2 would create an import file
3017 # for dependence libraries. The import file would start with
3018 # the line `#! .'. This would cause the generated library to
3019 # depend on `.', always an invalid library. This was fixed in
3020 # development snapshots of GCC prior to 3.0.
3022 aix4 | aix4.[[01]] | aix4.[[01]].*)
3023 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3025 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3032 # AIX (on Power*) has no versioning support, so currently we can
3033 # not hardcode correct soname into executable. Probably we can
3034 # add versioning support to collect2, so additional links can
3035 # be useful in future.
3036 if test "$aix_use_runtimelinking" = yes; then
3037 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3038 # instead of lib<name>.a to let people know that these are not
3039 # typical AIX shared libraries.
3040 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3042 # We preserve .a as extension for shared libraries through AIX4.2
3043 # and later when we are not doing run time linking.
3044 library_names_spec='${libname}${release}.a $libname.a'
3045 soname_spec='${libname}${release}.so$major'
3047 shlibpath_var=LIBPATH
3052 library_names_spec='$libname.ixlibrary $libname.a'
3053 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3054 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'
3058 library_names_spec='${libname}.so'
3059 dynamic_linker="$host_os ld.so"
3060 shlibpath_var=LIBRARY_PATH
3066 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3067 soname_spec='${libname}${release}.so$major'
3068 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3069 shlibpath_var=LD_LIBRARY_PATH
3070 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3071 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3072 export_dynamic_flag_spec=-rdynamic
3073 # the default ld.so.conf also contains /usr/contrib/lib and
3074 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3075 # libtool to hard-code these into programs
3078 cygwin* | mingw* | pw32*)
3079 version_type=windows
3082 case $GCC,$host_os in
3084 library_names_spec='$libname.dll.a'
3085 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3086 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3087 dldir=$destdir/`dirname \$dlpath`~
3088 test -d \$dldir || mkdir -p \$dldir~
3089 $install_prog .libs/$dlname \$dldir/$dlname'
3090 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3091 dlpath=$dir/\$dldll~
3095 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3096 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3099 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3102 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3105 dynamic_linker='Win32 ld.exe'
3106 # FIXME: first we should search . and the directory the executable is in
3110 darwin* | rhapsody*)
3111 dynamic_linker="$host_os dyld"
3115 # FIXME: Relying on posixy $() will cause problems for
3116 # cross-compilation, but unfortunately the echo tests do not
3117 # yet detect zsh echo's removal of \ escapes.
3118 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)'
3119 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3120 shlibpath_overrides_runpath=yes
3121 shlibpath_var=DYLD_LIBRARY_PATH
3129 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3130 version_type=freebsd-$objformat
3131 case $version_type in
3133 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3138 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3142 shlibpath_var=LD_LIBRARY_PATH
3145 shlibpath_overrides_runpath=yes
3148 shlibpath_overrides_runpath=no
3149 hardcode_into_libs=yes
3158 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3159 soname_spec='${libname}${release}.so$major'
3160 shlibpath_var=LD_LIBRARY_PATH
3161 hardcode_into_libs=yes
3164 hpux9* | hpux10* | hpux11*)
3165 # Give a soname corresponding to the major version so that dld.sl refuses to
3166 # link against other versions.
3167 dynamic_linker="$host_os dld.sl"
3171 shlibpath_var=SHLIB_PATH
3172 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3173 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3174 soname_spec='${libname}${release}.sl$major'
3175 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3176 postinstall_cmds='chmod 555 $lib'
3183 soname_spec='${libname}${release}.so$major'
3184 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3190 case $LD in # libtool.m4 will add one of these switches to LD
3191 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3192 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3193 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3194 *) libsuff= shlibsuff= libmagic=never-match;;
3198 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3199 shlibpath_overrides_runpath=no
3200 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3201 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3204 # No shared lib support for Linux oldld, aout, or coff.
3205 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3209 # This must be Linux ELF.
3214 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3215 soname_spec='${libname}${release}.so$major'
3216 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3217 shlibpath_var=LD_LIBRARY_PATH
3218 shlibpath_overrides_runpath=no
3219 # This implies no fast_install, which is unacceptable.
3220 # Some rework will be needed to allow for fast_install
3221 # before this can be enabled.
3222 hardcode_into_libs=yes
3224 # We used to test for /lib/ld.so.1 and disable shared libraries on
3225 # powerpc, because MkLinux only supported shared libraries with the
3226 # GNU dynamic linker. Since this was broken with cross compilers,
3227 # most powerpc-linux boxes support dynamic linking these days and
3228 # people can always --disable-shared, the test was removed, and we
3229 # assume the GNU/Linux dynamic linker is in use.
3230 dynamic_linker='GNU/Linux ld.so'
3237 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3238 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3239 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3240 dynamic_linker='NetBSD (a.out) ld.so'
3242 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3243 soname_spec='${libname}${release}.so$major'
3244 dynamic_linker='NetBSD ld.elf_so'
3246 shlibpath_var=LD_LIBRARY_PATH
3247 shlibpath_overrides_runpath=yes
3248 hardcode_into_libs=yes
3253 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3254 shlibpath_var=LD_LIBRARY_PATH
3255 shlibpath_overrides_runpath=yes
3262 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3264 openbsd2.[[89]] | openbsd2.[[89]].*)
3265 shlibpath_overrides_runpath=no
3268 shlibpath_overrides_runpath=yes
3272 shlibpath_overrides_runpath=yes
3274 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3275 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3276 shlibpath_var=LD_LIBRARY_PATH
3280 libname_spec='$name'
3282 library_names_spec='$libname.dll $libname.a'
3283 dynamic_linker='OS/2 ld.exe'
3284 shlibpath_var=LIBPATH
3287 osf3* | osf4* | osf5*)
3290 soname_spec='${libname}${release}.so'
3291 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3292 shlibpath_var=LD_LIBRARY_PATH
3293 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3294 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3299 soname_spec='${libname}${release}.so$major'
3300 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3301 shlibpath_var=LD_LIBRARY_PATH
3308 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3309 soname_spec='${libname}${release}.so$major'
3310 shlibpath_var=LD_LIBRARY_PATH
3311 shlibpath_overrides_runpath=yes
3312 hardcode_into_libs=yes
3313 # ldd complains unless libraries are executable
3314 postinstall_cmds='chmod +x $lib'
3319 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3320 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3321 shlibpath_var=LD_LIBRARY_PATH
3322 shlibpath_overrides_runpath=yes
3323 if test "$with_gnu_ld" = yes; then
3329 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3331 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3332 soname_spec='${libname}${release}.so$major'
3333 shlibpath_var=LD_LIBRARY_PATH
3334 case $host_vendor in
3336 shlibpath_overrides_runpath=no
3341 shlibpath_overrides_runpath=no
3342 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3349 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3350 soname_spec='${libname}${release}.so$major'
3351 shlibpath_var=LD_LIBRARY_PATH
3358 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3359 soname_spec='${libname}${release}.so$major'
3360 shlibpath_var=LD_LIBRARY_PATH
3364 if test -d /usr/nec ;then
3366 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3367 soname_spec='$libname.so.$major'
3368 shlibpath_var=LD_LIBRARY_PATH
3376 AC_MSG_RESULT([$dynamic_linker])
3377 test "$dynamic_linker" = no && can_build_shared=no
3379 # Report the final consequences.
3380 AC_MSG_CHECKING([if libtool supports shared libraries])
3381 AC_MSG_RESULT([$can_build_shared])
3383 AC_MSG_CHECKING([whether to build shared libraries])
3384 test "$can_build_shared" = "no" && enable_shared=no
3386 # On AIX, shared libraries and static libraries use the same namespace, and
3387 # are all built from PIC.
3390 test "$enable_shared" = yes && enable_static=no
3391 if test -n "$RANLIB"; then
3392 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3393 postinstall_cmds='$RANLIB $lib'
3398 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3399 test "$enable_shared" = yes && enable_static=no
3403 AC_MSG_RESULT([$enable_shared])
3405 AC_MSG_CHECKING([whether to build static libraries])
3406 # Make sure either enable_shared or enable_static is yes.
3407 test "$enable_shared" = yes || enable_static=yes
3408 AC_MSG_RESULT([$enable_static])
3410 if test "$hardcode_action" = relink; then
3411 # Fast installation is not supported
3412 enable_fast_install=no
3413 elif test "$shlibpath_overrides_runpath" = yes ||
3414 test "$enable_shared" = no; then
3415 # Fast installation is not necessary
3416 enable_fast_install=needless
3419 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3420 if test "$GCC" = yes; then
3421 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3424 AC_LIBTOOL_DLOPEN_SELF
3426 if test "$enable_shared" = yes && test "$GCC" = yes; then
3427 case $archive_cmds in
3429 # FIXME: we may have to deal with multi-command sequences.
3432 # Test whether the compiler implicitly links with -lc since on some
3433 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3434 # to ld, don't add -lc before -lgcc.
3435 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3436 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3438 echo 'static int dummy;' > conftest.$ac_ext
3440 if AC_TRY_EVAL(ac_compile); then
3443 libobjs=conftest.$ac_objext
3445 wl=$lt_cv_prog_cc_wl
3451 save_allow_undefined_flag=$allow_undefined_flag
3452 allow_undefined_flag=
3453 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3455 lt_cv_archive_cmds_need_lc=no
3457 lt_cv_archive_cmds_need_lc=yes
3459 allow_undefined_flag=$save_allow_undefined_flag
3461 cat conftest.err 1>&5
3463 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3467 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3469 # The second clause should only fire when bootstrapping the
3470 # libtool distribution, otherwise you forgot to ship ltmain.sh
3471 # with your package, and you will get complaints that there are
3472 # no rules to generate ltmain.sh.
3473 if test -f "$ltmain"; then
3476 # If there is no Makefile yet, we rely on a make rule to execute
3477 # `config.status --recheck' to rerun these tests and create the
3478 # libtool script then.
3479 test -f Makefile && make "$ltmain"
3482 if test -f "$ltmain"; then
3483 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3486 echo creating $ofile
3488 # Now quote all the things that may contain metacharacters while being
3489 # careful not to overquote the AC_SUBSTed values. We take copies of the
3490 # variables and quote the copies for generation of the libtool script.
3491 for var in echo old_CC old_CFLAGS \
3492 AR AR_FLAGS CC LD LN_S NM SHELL \
3493 reload_flag reload_cmds wl \
3494 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3495 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3496 library_names_spec soname_spec \
3497 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3498 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3499 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3500 old_striplib striplib file_magic_cmd export_symbols_cmds \
3501 deplibs_check_method allow_undefined_flag no_undefined_flag \
3502 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3503 global_symbol_to_c_name_address \
3504 hardcode_libdir_flag_spec hardcode_libdir_separator \
3505 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3506 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3509 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3510 old_postinstall_cmds | old_postuninstall_cmds | \
3511 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3512 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3513 postinstall_cmds | postuninstall_cmds | \
3514 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3515 # Double-quote double-evaled strings.
3516 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3519 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3524 cat <<__EOF__ > "${ofile}T"
3527 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3528 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3529 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3531 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3532 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3534 # This program is free software; you can redistribute it and/or modify
3535 # it under the terms of the GNU General Public License as published by
3536 # the Free Software Foundation; either version 2 of the License, or
3537 # (at your option) any later version.
3539 # This program is distributed in the hope that it will be useful, but
3540 # WITHOUT ANY WARRANTY; without even the implied warranty of
3541 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3542 # General Public License for more details.
3544 # You should have received a copy of the GNU General Public License
3545 # along with this program; if not, write to the Free Software
3546 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3548 # As a special exception to the GNU General Public License, if you
3549 # distribute this file as part of a program that contains a
3550 # configuration script generated by Autoconf, you may include it under
3551 # the same distribution terms that you use for the rest of that program.
3553 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3554 Xsed="sed -e s/^X//"
3556 # The HP-UX ksh and POSIX shell print the target directory to stdout
3558 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3560 # ### BEGIN LIBTOOL CONFIG
3562 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3564 # Shell to use when invoking shell scripts.
3567 # Whether or not to build shared libraries.
3568 build_libtool_libs=$enable_shared
3570 # Whether or not to build static libraries.
3571 build_old_libs=$enable_static
3573 # Whether or not to add -lc for building shared libraries.
3574 build_libtool_need_lc=$need_lc
3576 # Whether or not to optimize for fast installation.
3577 fast_install=$enable_fast_install
3580 host_alias=$host_alias
3583 # An echo program that does not interpret backslashes.
3588 AR_FLAGS=$lt_AR_FLAGS
3590 # The default C compiler.
3593 # Is the compiler the GNU C compiler?
3596 # The linker used to build libraries.
3599 # Whether we need hard or soft links.
3602 # A BSD-compatible nm program.
3605 # A symbol stripping program
3608 # Used to examine libraries when file_magic_cmd begins "file"
3609 MAGIC_CMD=$MAGIC_CMD
3611 # Used on cygwin: DLL creation program.
3614 # Used on cygwin: object dumper.
3617 # Used on cygwin: assembler.
3620 # The name of the directory that contains temporary libtool files.
3623 # How to create reloadable object files.
3624 reload_flag=$lt_reload_flag
3625 reload_cmds=$lt_reload_cmds
3627 # How to pass a linker flag through the compiler.
3630 # Object file suffix (normally "o").
3633 # Old archive suffix (normally "a").
3636 # Executable file suffix (normally "").
3639 # Additional compiler flags for building library objects.
3640 pic_flag=$lt_pic_flag
3643 # Does compiler simultaneously support -c and -o options?
3644 compiler_c_o=$lt_compiler_c_o
3646 # Can we write directly to a .lo ?
3647 compiler_o_lo=$lt_compiler_o_lo
3649 # Must we lock files when doing compilation ?
3650 need_locks=$lt_need_locks
3652 # Do we need the lib prefix for modules?
3653 need_lib_prefix=$need_lib_prefix
3655 # Do we need a version for libraries?
3656 need_version=$need_version
3658 # Whether dlopen is supported.
3659 dlopen_support=$enable_dlopen
3661 # Whether dlopen of programs is supported.
3662 dlopen_self=$enable_dlopen_self
3664 # Whether dlopen of statically linked programs is supported.
3665 dlopen_self_static=$enable_dlopen_self_static
3667 # Compiler flag to prevent dynamic linking.
3668 link_static_flag=$lt_link_static_flag
3670 # Compiler flag to turn off builtin functions.
3671 no_builtin_flag=$lt_no_builtin_flag
3673 # Compiler flag to allow reflexive dlopens.
3674 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3676 # Compiler flag to generate shared objects directly from archives.
3677 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3679 # Compiler flag to generate thread-safe objects.
3680 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3682 # Library versioning type.
3683 version_type=$version_type
3685 # Format of library name prefix.
3686 libname_spec=$lt_libname_spec
3688 # List of archive names. First name is the real one, the rest are links.
3689 # The last name is the one that the linker finds with -lNAME.
3690 library_names_spec=$lt_library_names_spec
3692 # The coded name of the library, if different from the real name.
3693 soname_spec=$lt_soname_spec
3695 # Commands used to build and install an old-style archive.
3697 old_archive_cmds=$lt_old_archive_cmds
3698 old_postinstall_cmds=$lt_old_postinstall_cmds
3699 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3701 # Create an old-style archive from a shared archive.
3702 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3704 # Create a temporary old-style archive to link instead of a shared archive.
3705 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3707 # Commands used to build and install a shared archive.
3708 archive_cmds=$lt_archive_cmds
3709 archive_expsym_cmds=$lt_archive_expsym_cmds
3710 postinstall_cmds=$lt_postinstall_cmds
3711 postuninstall_cmds=$lt_postuninstall_cmds
3713 # Commands to strip libraries.
3714 old_striplib=$lt_old_striplib
3715 striplib=$lt_striplib
3717 # Method to check whether dependent libraries are shared objects.
3718 deplibs_check_method=$lt_deplibs_check_method
3720 # Command to use when deplibs_check_method == file_magic.
3721 file_magic_cmd=$lt_file_magic_cmd
3723 # Flag that allows shared libraries with undefined symbols to be built.
3724 allow_undefined_flag=$lt_allow_undefined_flag
3726 # Flag that forces no undefined symbols.
3727 no_undefined_flag=$lt_no_undefined_flag
3729 # Commands used to finish a libtool library installation in a directory.
3730 finish_cmds=$lt_finish_cmds
3732 # Same as above, but a single script fragment to be evaled but not shown.
3733 finish_eval=$lt_finish_eval
3735 # Take the output of nm and produce a listing of raw symbols and C names.
3736 global_symbol_pipe=$lt_global_symbol_pipe
3738 # Transform the output of nm in a proper C declaration
3739 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3741 # Transform the output of nm in a C name address pair
3742 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3744 # This is the shared library runtime path variable.
3745 runpath_var=$runpath_var
3747 # This is the shared library path variable.
3748 shlibpath_var=$shlibpath_var
3750 # Is shlibpath searched before the hard-coded library search path?
3751 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3753 # How to hardcode a shared library path into an executable.
3754 hardcode_action=$hardcode_action
3756 # Whether we should hardcode library paths into libraries.
3757 hardcode_into_libs=$hardcode_into_libs
3759 # Flag to hardcode \$libdir into a binary during linking.
3760 # This must work even if \$libdir does not exist.
3761 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3763 # Whether we need a single -rpath flag with a separated argument.
3764 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3766 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3768 hardcode_direct=$hardcode_direct
3770 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3772 hardcode_minus_L=$hardcode_minus_L
3774 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3775 # the resulting binary.
3776 hardcode_shlibpath_var=$hardcode_shlibpath_var
3778 # Variables whose values should be saved in libtool wrapper scripts and
3779 # restored at relink time.
3780 variables_saved_for_relink="$variables_saved_for_relink"
3782 # Whether libtool must link a program against all its dependency libraries.
3783 link_all_deplibs=$link_all_deplibs
3785 # Compile-time system search path for libraries
3786 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3788 # Run-time system search path for libraries
3789 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3791 # Fix the shell variable \$srcfile for the compiler.
3792 fix_srcfile_path="$fix_srcfile_path"
3794 # Set to yes if exported symbols are required.
3795 always_export_symbols=$always_export_symbols
3797 # The commands to list exported symbols.
3798 export_symbols_cmds=$lt_export_symbols_cmds
3800 # The commands to extract the exported symbol list from a shared archive.
3801 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3803 # Symbols that should not be listed in the preloaded symbols.
3804 exclude_expsyms=$lt_exclude_expsyms
3806 # Symbols that must always be exported.
3807 include_expsyms=$lt_include_expsyms
3809 # ### END LIBTOOL CONFIG
3815 cat <<\EOF >> "${ofile}T"
3817 # AIX sometimes has problems with the GCC collect2 program. For some
3818 # reason, if we set the COLLECT_NAMES environment variable, the problems
3819 # vanish in a puff of smoke.
3820 if test "X${COLLECT_NAMES+set}" != Xset; then
3822 export COLLECT_NAMES
3829 cygwin* | mingw* | pw32* | os2*)
3830 cat <<'EOF' >> "${ofile}T"
3831 # This is a source program that is used to create dlls on Windows
3832 # Don't remove nor modify the starting and closing comments
3833 # /* ltdll.c starts here */
3834 # #define WIN32_LEAN_AND_MEAN
3835 # #include <windows.h>
3836 # #undef WIN32_LEAN_AND_MEAN
3837 # #include <stdio.h>
3839 # #ifndef __CYGWIN__
3840 # # ifdef __CYGWIN32__
3841 # # define __CYGWIN__ __CYGWIN32__
3845 # #ifdef __cplusplus
3848 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3849 # #ifdef __cplusplus
3854 # #include <cygwin/cygwin_dll.h>
3855 # DECLARE_CYGWIN_DLL( DllMain );
3857 # HINSTANCE __hDllInstance_base;
3860 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3862 # __hDllInstance_base = hInst;
3865 # /* ltdll.c ends here */
3866 # This is a source program that is used to create import libraries
3867 # on Windows for dlls which lack them. Don't remove nor modify the
3868 # starting and closing comments
3869 # /* impgen.c starts here */
3870 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3872 # This file is part of GNU libtool.
3874 # This program is free software; you can redistribute it and/or modify
3875 # it under the terms of the GNU General Public License as published by
3876 # the Free Software Foundation; either version 2 of the License, or
3877 # (at your option) any later version.
3879 # This program is distributed in the hope that it will be useful,
3880 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3881 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3882 # GNU General Public License for more details.
3884 # You should have received a copy of the GNU General Public License
3885 # along with this program; if not, write to the Free Software
3886 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3889 # #include <stdio.h> /* for printf() */
3890 # #include <unistd.h> /* for open(), lseek(), read() */
3891 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3892 # #include <string.h> /* for strdup() */
3894 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3896 # #define O_BINARY 0
3899 # static unsigned int
3900 # pe_get16 (fd, offset)
3904 # unsigned char b[2];
3905 # lseek (fd, offset, SEEK_SET);
3907 # return b[0] + (b[1]<<8);
3910 # static unsigned int
3911 # pe_get32 (fd, offset)
3915 # unsigned char b[4];
3916 # lseek (fd, offset, SEEK_SET);
3918 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3921 # static unsigned int
3925 # unsigned char *b = ptr;
3926 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3935 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3936 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3937 # unsigned long name_rvas, nexp;
3938 # unsigned char *expdata, *erva;
3939 # char *filename, *dll_name;
3941 # filename = argv[1];
3943 # dll = open(filename, O_RDONLY|O_BINARY);
3947 # dll_name = filename;
3949 # for (i=0; filename[i]; i++)
3950 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3951 # dll_name = filename + i +1;
3953 # pe_header_offset = pe_get32 (dll, 0x3c);
3954 # opthdr_ofs = pe_header_offset + 4 + 20;
3955 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3957 # if (num_entries < 1) /* no exports */
3960 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3961 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3962 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3963 # secptr = (pe_header_offset + 4 + 20 +
3964 # pe_get16 (dll, pe_header_offset + 4 + 16));
3967 # for (i = 0; i < nsections; i++)
3970 # unsigned long secptr1 = secptr + 40 * i;
3971 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3972 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3973 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3974 # lseek(dll, secptr1, SEEK_SET);
3975 # read(dll, sname, 8);
3976 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3978 # expptr = fptr + (export_rva - vaddr);
3979 # if (export_rva + export_size > vaddr + vsize)
3980 # export_size = vsize - (export_rva - vaddr);
3985 # expdata = (unsigned char*)malloc(export_size);
3986 # lseek (dll, expptr, SEEK_SET);
3987 # read (dll, expdata, export_size);
3988 # erva = expdata - export_rva;
3990 # nexp = pe_as32 (expdata+24);
3991 # name_rvas = pe_as32 (expdata+32);
3993 # printf ("EXPORTS\n");
3994 # for (i = 0; i<nexp; i++)
3996 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3997 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
4002 # /* impgen.c ends here */
4008 # We use sed instead of cat because bash on DJGPP gets confused if
4009 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4010 # text mode, it properly converts lines to CR/LF. This bash problem
4011 # is reportedly fixed, but why not run on old versions too?
4012 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
4014 mv -f "${ofile}T" "$ofile" || \
4015 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
4019 ])# _LT_AC_LTCONFIG_HACK
4021 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
4022 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
4024 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
4025 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
4027 # AC_ENABLE_SHARED - implement the --enable-shared flag
4028 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
4029 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4031 AC_DEFUN([AC_ENABLE_SHARED],
4032 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4033 AC_ARG_ENABLE(shared,
4034 changequote(<<, >>)dnl
4035 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
4036 changequote([, ])dnl
4037 [p=${PACKAGE-default}
4039 yes) enable_shared=yes ;;
4040 no) enable_shared=no ;;
4043 # Look at the argument we got. We use all the common list separators.
4044 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4045 for pkg in $enableval; do
4046 if test "X$pkg" = "X$p"; then
4053 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
4056 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
4057 AC_DEFUN([AC_DISABLE_SHARED],
4058 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4059 AC_ENABLE_SHARED(no)])
4061 # AC_ENABLE_STATIC - implement the --enable-static flag
4062 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
4063 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4065 AC_DEFUN([AC_ENABLE_STATIC],
4066 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4067 AC_ARG_ENABLE(static,
4068 changequote(<<, >>)dnl
4069 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4070 changequote([, ])dnl
4071 [p=${PACKAGE-default}
4073 yes) enable_static=yes ;;
4074 no) enable_static=no ;;
4077 # Look at the argument we got. We use all the common list separators.
4078 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4079 for pkg in $enableval; do
4080 if test "X$pkg" = "X$p"; then
4087 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4090 # AC_DISABLE_STATIC - set the default static flag to --disable-static
4091 AC_DEFUN([AC_DISABLE_STATIC],
4092 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4093 AC_ENABLE_STATIC(no)])
4096 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4097 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4098 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4100 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4101 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4102 AC_ARG_ENABLE(fast-install,
4103 changequote(<<, >>)dnl
4104 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4105 changequote([, ])dnl
4106 [p=${PACKAGE-default}
4108 yes) enable_fast_install=yes ;;
4109 no) enable_fast_install=no ;;
4111 enable_fast_install=no
4112 # Look at the argument we got. We use all the common list separators.
4113 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4114 for pkg in $enableval; do
4115 if test "X$pkg" = "X$p"; then
4116 enable_fast_install=yes
4122 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4125 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4126 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4127 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4128 AC_ENABLE_FAST_INSTALL(no)])
4130 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
4131 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
4132 # Where MODE is either `yes' or `no'. If omitted, it defaults to
4134 AC_DEFUN([AC_LIBTOOL_PICMODE],
4135 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4136 pic_mode=ifelse($#,1,$1,default)])
4139 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4140 AC_DEFUN([AC_PATH_TOOL_PREFIX],
4141 [AC_MSG_CHECKING([for $1])
4142 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4145 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4148 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4151 ac_save_MAGIC_CMD="$MAGIC_CMD"
4152 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4153 dnl $ac_dummy forces splitting on constant user-supplied paths.
4154 dnl POSIX.2 word splitting is done only on the output of word expansions,
4155 dnl not every word. This closes a longstanding sh security hole.
4156 ac_dummy="ifelse([$2], , $PATH, [$2])"
4157 for ac_dir in $ac_dummy; do
4158 test -z "$ac_dir" && ac_dir=.
4159 if test -f $ac_dir/$1; then
4160 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4161 if test -n "$file_magic_test_file"; then
4162 case $deplibs_check_method in
4164 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4165 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4166 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4167 egrep "$file_magic_regex" > /dev/null; then
4172 *** Warning: the command libtool uses to detect shared libraries,
4173 *** $file_magic_cmd, produces output that libtool cannot recognize.
4174 *** The result is that libtool may fail to recognize shared libraries
4175 *** as such. This will affect the creation of libtool libraries that
4176 *** depend on shared libraries, but programs linked with such libtool
4177 *** libraries will work regardless of this problem. Nevertheless, you
4178 *** may want to report the problem to your system manager and/or to
4179 *** bug-libtool@gnu.org
4189 MAGIC_CMD="$ac_save_MAGIC_CMD"
4192 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4193 if test -n "$MAGIC_CMD"; then
4194 AC_MSG_RESULT($MAGIC_CMD)
4201 # AC_PATH_MAGIC - find a file program which can recognise a shared library
4202 AC_DEFUN([AC_PATH_MAGIC],
4203 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4204 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4205 if test -z "$lt_cv_path_MAGIC_CMD"; then
4206 if test -n "$ac_tool_prefix"; then
4207 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4215 # AC_PROG_LD - find the path to the GNU or non-GNU linker
4216 AC_DEFUN([AC_PROG_LD],
4217 [AC_ARG_WITH(gnu-ld,
4218 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4219 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4220 AC_REQUIRE([AC_PROG_CC])dnl
4221 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4222 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4223 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4225 if test "$GCC" = yes; then
4226 # Check if gcc -print-prog-name=ld gives a path.
4227 AC_MSG_CHECKING([for ld used by GCC])
4230 # gcc leaves a trailing carriage return which upsets mingw
4231 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4233 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4236 # Accept absolute paths.
4237 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4238 re_direlt='/[[^/]][[^/]]*/\.\./'
4239 # Canonicalize the path of ld
4240 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4241 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4242 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4244 test -z "$LD" && LD="$ac_prog"
4247 # If it fails, then pretend we aren't using GCC.
4251 # If it is relative, then search for the first ld in PATH.
4255 elif test "$with_gnu_ld" = yes; then
4256 AC_MSG_CHECKING([for GNU ld])
4258 AC_MSG_CHECKING([for non-GNU ld])
4260 AC_CACHE_VAL(lt_cv_path_LD,
4261 [if test -z "$LD"; then
4262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4263 for ac_dir in $PATH; do
4264 test -z "$ac_dir" && ac_dir=.
4265 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4266 lt_cv_path_LD="$ac_dir/$ac_prog"
4267 # Check to see if the program is GNU ld. I'd rather use --version,
4268 # but apparently some GNU ld's only accept -v.
4269 # Break only if it was the GNU/non-GNU ld that we prefer.
4270 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4271 test "$with_gnu_ld" != no && break
4273 test "$with_gnu_ld" != yes && break
4279 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4282 if test -n "$LD"; then
4287 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4292 AC_DEFUN([AC_PROG_LD_GNU],
4293 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4294 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4295 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4296 lt_cv_prog_gnu_ld=yes
4298 lt_cv_prog_gnu_ld=no
4300 with_gnu_ld=$lt_cv_prog_gnu_ld
4303 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4304 # -- PORTME Some linkers may need a different reload flag.
4305 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4306 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4307 [lt_cv_ld_reload_flag='-r'])
4308 reload_flag=$lt_cv_ld_reload_flag
4309 test -n "$reload_flag" && reload_flag=" $reload_flag"
4312 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4313 # -- PORTME fill in with the dynamic library characteristics
4314 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4315 [AC_CACHE_CHECK([how to recognise dependant libraries],
4316 lt_cv_deplibs_check_method,
4317 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4318 lt_cv_file_magic_test_file=
4319 lt_cv_deplibs_check_method='unknown'
4320 # Need to set the preceding variable on all platforms that support
4321 # interlibrary dependencies.
4322 # 'none' -- dependencies not supported.
4323 # `unknown' -- same as none, but documents that we really don't know.
4324 # 'pass_all' -- all dependencies passed with no checks.
4325 # 'test_compile' -- check by making test program.
4326 # 'file_magic [[regex]]' -- check by looking for files in library path
4327 # which responds to the $file_magic_cmd with a given egrep regex.
4328 # If you have `file' or equivalent on your system and you're not sure
4329 # whether `pass_all' will *always* work, you probably want this one.
4333 lt_cv_deplibs_check_method=pass_all
4337 lt_cv_deplibs_check_method=pass_all
4341 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4342 lt_cv_file_magic_cmd='/usr/bin/file -L'
4343 lt_cv_file_magic_test_file=/shlib/libc.so
4346 cygwin* | mingw* | pw32*)
4347 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4348 lt_cv_file_magic_cmd='$OBJDUMP -f'
4351 darwin* | rhapsody*)
4352 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4353 lt_cv_file_magic_cmd='/usr/bin/file -L'
4355 rhapsody* | darwin1.[[012]])
4356 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4359 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4365 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4368 # Not sure whether the presence of OpenBSD here was a mistake.
4369 # Let's accept both of them until this is cleared up.
4370 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4371 lt_cv_file_magic_cmd=/usr/bin/file
4372 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4376 lt_cv_deplibs_check_method=pass_all
4381 lt_cv_deplibs_check_method=pass_all
4385 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4386 lt_cv_file_magic_cmd=/usr/bin/file
4387 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4393 # this will be overridden with pass_all, but let us keep it just in case
4394 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4398 *-32|*"-32 ") libmagic=32-bit;;
4399 *-n32|*"-n32 ") libmagic=N32;;
4400 *-64|*"-64 ") libmagic=64-bit;;
4401 *) libmagic=never-match;;
4403 # this will be overridden with pass_all, but let us keep it just in case
4404 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4407 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4408 lt_cv_deplibs_check_method=pass_all
4411 # This must be Linux ELF.
4414 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
4415 lt_cv_deplibs_check_method=pass_all ;;
4417 # glibc up to 2.1.1 does not perform some relocations on ARM
4418 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4420 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4424 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4425 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4427 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4432 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4433 lt_cv_file_magic_cmd=/usr/bin/file
4434 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4438 lt_cv_file_magic_cmd=/usr/bin/file
4439 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4440 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4441 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4443 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4447 osf3* | osf4* | osf5*)
4448 # this will be overridden with pass_all, but let us keep it just in case
4449 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4450 lt_cv_file_magic_test_file=/shlib/libc.so
4451 lt_cv_deplibs_check_method=pass_all
4455 lt_cv_deplibs_check_method=pass_all
4459 lt_cv_deplibs_check_method=pass_all
4460 lt_cv_file_magic_test_file=/lib/libc.so
4463 sysv5uw[[78]]* | sysv4*uw2*)
4464 lt_cv_deplibs_check_method=pass_all
4467 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4468 case $host_vendor in
4470 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]]'
4471 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4474 lt_cv_deplibs_check_method=pass_all
4477 lt_cv_file_magic_cmd='/bin/file'
4478 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4481 lt_cv_file_magic_cmd='/bin/file'
4482 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4483 lt_cv_file_magic_test_file=/lib/libc.so
4489 file_magic_cmd=$lt_cv_file_magic_cmd
4490 deplibs_check_method=$lt_cv_deplibs_check_method
4494 # AC_PROG_NM - find the path to a BSD-compatible name lister
4495 AC_DEFUN([AC_PROG_NM],
4496 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4497 AC_MSG_CHECKING([for BSD-compatible nm])
4498 AC_CACHE_VAL(lt_cv_path_NM,
4499 [if test -n "$NM"; then
4500 # Let the user override the test.
4503 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4504 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4505 test -z "$ac_dir" && ac_dir=.
4506 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4507 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4508 # Check to see if the nm accepts a BSD-compat flag.
4509 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4510 # nm: unknown option "B" ignored
4511 # Tru64's nm complains that /dev/null is an invalid object file
4512 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4513 lt_cv_path_NM="$tmp_nm -B"
4515 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4516 lt_cv_path_NM="$tmp_nm -p"
4519 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4520 continue # so that we can try to find one that supports BSD flags
4525 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4528 AC_MSG_RESULT([$NM])
4531 # AC_CHECK_LIBM - check for math library
4532 AC_DEFUN([AC_CHECK_LIBM],
4533 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4536 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4537 # These system don't have libm
4540 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4541 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4544 AC_CHECK_LIB(m, main, LIBM="-lm")
4549 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4550 # the libltdl convenience library and INCLTDL to the include flags for
4551 # the libltdl header and adds --enable-ltdl-convenience to the
4552 # configure arguments. Note that LIBLTDL and INCLTDL are not
4553 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4554 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4555 # with '${top_builddir}/' and INCLTDL will be prefixed with
4556 # '${top_srcdir}/' (note the single quotes!). If your package is not
4557 # flat and you're not using automake, define top_builddir and
4558 # top_srcdir appropriately in the Makefiles.
4559 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4560 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4561 case $enable_ltdl_convenience in
4562 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4563 "") enable_ltdl_convenience=yes
4564 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4566 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4567 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4570 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4571 # the libltdl installable library and INCLTDL to the include flags for
4572 # the libltdl header and adds --enable-ltdl-install to the configure
4573 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4574 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4575 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4576 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4577 # with '${top_srcdir}/' (note the single quotes!). If your package is
4578 # not flat and you're not using automake, define top_builddir and
4579 # top_srcdir appropriately in the Makefiles.
4580 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4581 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4582 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4583 AC_CHECK_LIB(ltdl, main,
4584 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4585 [if test x"$enable_ltdl_install" = xno; then
4586 AC_MSG_WARN([libltdl not installed, but installation disabled])
4588 enable_ltdl_install=yes
4591 if test x"$enable_ltdl_install" = x"yes"; then
4592 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4593 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4594 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4596 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4603 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4604 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4605 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4606 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4607 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4608 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4609 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4611 # This is just to silence aclocal about the macro not being used
4612 ifelse([AC_DISABLE_FAST_INSTALL])