1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 # Define a conditional.
15 AC_DEFUN([AM_CONDITIONAL],
26 dnl This provides configure definitions used by all the newlib
27 dnl configure.in files.
29 dnl Basic newlib configury. This calls basic introductory stuff,
30 dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
31 dnl configure.host. The only argument is the relative path to the top
34 AC_DEFUN(NEWLIB_CONFIGURE,
36 dnl Default to --enable-multilib
37 AC_ARG_ENABLE(multilib,
38 [ --enable-multilib build many library versions (default)],
39 [case "${enableval}" in
42 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
43 esac], [multilib=yes])dnl
45 dnl Support --enable-target-optspace
46 AC_ARG_ENABLE(target-optspace,
47 [ --enable-target-optspace optimize for space],
48 [case "${enableval}" in
49 yes) target_optspace=yes ;;
50 no) target_optspace=no ;;
51 *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
52 esac], [target_optspace=])dnl
54 dnl Support --enable-malloc-debugging - currently only supported for Cygwin
55 AC_ARG_ENABLE(malloc-debugging,
56 [ --enable-malloc-debugging indicate malloc debugging requested],
57 [case "${enableval}" in
58 yes) malloc_debugging=yes ;;
59 no) malloc_debugging=no ;;
60 *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
61 esac], [malloc_debugging=])dnl
63 dnl Support --enable-newlib-mb
64 AC_ARG_ENABLE(newlib-mb,
65 [ --enable-newlib-mb enable multibyte support],
66 [case "${enableval}" in
69 *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;
70 esac], [newlib_mb=])dnl
72 dnl Support --enable-newlib-iconv
73 AC_ARG_ENABLE(newlib-iconv,
74 [ --enable-newlib-iconv enable iconv library support],
75 [case "${enableval}" in
76 yes) newlib_iconv=yes ;;
77 no) newlib_iconv=no ;;
78 *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
79 esac], [newlib_iconv=])dnl
81 dnl Support --enable-newlib-builtin-converters
82 AC_ARG_ENABLE(newlib-builtin-converters,
83 [ --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in],
84 [if test x${enableval} = x; then
85 AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list)
87 builtin_converters=${enableval}
88 ], [builtin_converters=])dnl
90 dnl Support --enable-newlib-multithread
91 AC_ARG_ENABLE(newlib-multithread,
92 [ --enable-newlib-multithread enable support for multiple threads],
93 [case "${enableval}" in
94 yes) newlib_multithread=yes ;;
95 no) newlib_multithread=no ;;
96 *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
97 esac], [newlib_multithread=yes])dnl
99 dnl Support --enable-newlib-elix-level
100 AC_ARG_ENABLE(newlib-elix-level,
101 [ --enable-newlib-elix-level supply desired elix library level (1-4)],
102 [case "${enableval}" in
103 0) newlib_elix_level=0 ;;
104 1) newlib_elix_level=1 ;;
105 2) newlib_elix_level=2 ;;
106 3) newlib_elix_level=3 ;;
107 4) newlib_elix_level=4 ;;
108 *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
109 esac], [newlib_elix_level=0])dnl
111 dnl Support --disable-newlib-io-float
112 AC_ARG_ENABLE(newlib-io-float,
113 [ --disable-newlib-io-float disable printf/scanf family float support],
114 [case "${enableval}" in
115 yes) newlib_io_float=yes ;;
116 no) newlib_io_float=no ;;
117 *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
118 esac], [newlib_io_float=yes])dnl
120 dnl Support --disable-newlib-supplied-syscalls
121 AC_ARG_ENABLE(newlib-supplied-syscalls,
122 [ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
123 [case "${enableval}" in
124 yes) newlib_may_supply_syscalls=yes ;;
125 no) newlib_may_supply_syscalls=no ;;
126 *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
127 esac], [newlib_may_supply_syscalls=yes])dnl
129 AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
131 dnl We may get other options which we don't document:
132 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
134 test -z "[$]{with_target_subdir}" && with_target_subdir=.
136 if test "[$]{srcdir}" = "."; then
137 if test "[$]{with_target_subdir}" != "."; then
138 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
140 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
143 newlib_basedir="[$]{srcdir}/$1"
145 AC_SUBST(newlib_basedir)
149 AM_INIT_AUTOMAKE(newlib, 1.12.0)
151 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
152 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
153 # are probably using a cross compiler, which will not be able to fully
154 # link an executable. This should really be fixed in autoconf
157 AC_DEFUN(LIB_AC_PROG_CC,
158 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
159 AC_CHECK_PROG(CC, gcc, gcc)
160 if test -z "$CC"; then
161 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
162 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
167 if test $ac_cv_prog_gcc = yes; then
169 dnl Check whether -g works, even if CFLAGS is set, in case the package
170 dnl plays around with CFLAGS (such as to build both debugging and
171 dnl normal versions of a library), tasteless as that idea is.
172 ac_test_CFLAGS="${CFLAGS+set}"
173 ac_save_CFLAGS="$CFLAGS"
176 if test "$ac_test_CFLAGS" = set; then
177 CFLAGS="$ac_save_CFLAGS"
178 elif test $ac_cv_prog_cc_g = yes; then
185 test "${CFLAGS+set}" = set || CFLAGS="-g"
191 AC_CHECK_TOOL(AS, as)
192 AC_CHECK_TOOL(AR, ar)
193 AC_CHECK_TOOL(RANLIB, ranlib, :)
199 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
200 # at least currently, we never actually build a program, so we never
201 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
202 # fails, because we are probably configuring with a cross compiler
203 # which can't create executables. So we include AC_EXEEXT to keep
204 # automake happy, but we don't execute it, since we don't care about
210 . [$]{newlib_basedir}/configure.host
212 newlib_cflags="[$]{newlib_cflags} -fno-builtin"
214 NEWLIB_CFLAGS=${newlib_cflags}
215 AC_SUBST(NEWLIB_CFLAGS)
220 AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
221 AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
222 AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
223 AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
224 AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
226 AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
228 # Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
229 # use oext, which is set in configure.host based on the target platform.
236 AC_SUBST(libm_machine_dir)
237 AC_SUBST(machine_dir)
241 # Do all the work for Automake. This macro actually does too much --
242 # some checks are only needed if your package does certain things.
243 # But this isn't really a big deal.
248 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
250 AC_DEFUN([AM_INIT_AUTOMAKE],
251 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
252 AC_REQUIRE([AC_PROG_INSTALL])
257 dnl test to see if srcdir already configured
258 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
259 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
262 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
263 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
264 AC_REQUIRE([AM_SANITY_CHECK])
265 AC_REQUIRE([AC_ARG_PROGRAM])
266 dnl FIXME This is truly gross.
267 missing_dir=`cd $ac_aux_dir && pwd`
268 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
269 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
270 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
271 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
272 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
273 AC_REQUIRE([AC_PROG_MAKE_SET])])
275 # Copyright 2002 Free Software Foundation, Inc.
277 # This program is free software; you can redistribute it and/or modify
278 # it under the terms of the GNU General Public License as published by
279 # the Free Software Foundation; either version 2, or (at your option)
282 # This program is distributed in the hope that it will be useful,
283 # but WITHOUT ANY WARRANTY; without even the implied warranty of
284 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
285 # GNU General Public License for more details.
287 # You should have received a copy of the GNU General Public License
288 # along with this program; if not, write to the Free Software
289 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
291 # AM_AUTOMAKE_VERSION(VERSION)
292 # ----------------------------
293 # Automake X.Y traces this macro to ensure aclocal.m4 has been
294 # generated from the m4 files accompanying Automake X.Y.
295 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
297 # AM_SET_CURRENT_AUTOMAKE_VERSION
298 # -------------------------------
299 # Call AM_AUTOMAKE_VERSION so it can be traced.
300 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
301 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
302 [AM_AUTOMAKE_VERSION([1.4-p6])])
305 # Check to make sure that the build environment is sane.
308 AC_DEFUN([AM_SANITY_CHECK],
309 [AC_MSG_CHECKING([whether build environment is sane])
312 echo timestamp > conftestfile
313 # Do `set' in a subshell so we don't clobber the current shell's
314 # arguments. Must try -L first in case configure is actually a
315 # symlink; some systems play weird games with the mod time of symlinks
316 # (eg FreeBSD returns the mod time of the symlink's containing
319 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
320 if test "[$]*" = "X"; then
322 set X `ls -t $srcdir/configure conftestfile`
324 if test "[$]*" != "X $srcdir/configure conftestfile" \
325 && test "[$]*" != "X conftestfile $srcdir/configure"; then
327 # If neither matched, then we have a broken ls. This can happen
328 # if, for instance, CONFIG_SHELL is bash and it inherits a
329 # broken ls alias from the environment. This has actually
330 # happened. Such a system could not be considered "sane".
331 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
332 alias in your environment])
335 test "[$]2" = conftestfile
341 AC_MSG_ERROR([newly created file is older than distributed files!
342 Check your system clock])
347 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
348 dnl The program must properly implement --version.
349 AC_DEFUN([AM_MISSING_PROG],
350 [AC_MSG_CHECKING(for working $2)
351 # Run test in a subshell; some versions of sh will print an error if
352 # an executable is not found, even if stderr is redirected.
353 # Redirect stdin to placate older versions of autoconf. Sigh.
354 if ($2 --version) < /dev/null > /dev/null 2>&1; then
359 AC_MSG_RESULT(missing)
363 # Add --enable-maintainer-mode option to configure.
368 AC_DEFUN([AM_MAINTAINER_MODE],
369 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
370 dnl maintainer-mode is disabled by default
371 AC_ARG_ENABLE(maintainer-mode,
372 [ --enable-maintainer-mode enable make rules and dependencies not useful
373 (and sometimes confusing) to the casual installer],
374 USE_MAINTAINER_MODE=$enableval,
375 USE_MAINTAINER_MODE=no)
376 AC_MSG_RESULT($USE_MAINTAINER_MODE)
377 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
378 MAINT=$MAINTAINER_MODE_TRUE
384 # serial 46 AC_PROG_LIBTOOL
385 AC_DEFUN([AC_PROG_LIBTOOL],
386 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
387 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
388 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
389 AC_PROVIDE_IFELSE([AC_PROG_CXX],
391 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
394 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
395 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
396 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
397 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
399 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
401 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
403 [ifdef([AC_PROG_GCJ],
404 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
406 ifdef([A][M_PROG_GCJ],
407 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
409 ifdef([LT_AC_PROG_GCJ],
410 [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
413 AC_DEFUN([_AC_PROG_LIBTOOL],
414 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
415 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
416 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
418 # Save cache, so that ltconfig can load it
421 # Actually configure libtool. ac_aux_dir is where install-sh is found.
422 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
423 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
424 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
425 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
426 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
427 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
428 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
429 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
430 || AC_MSG_ERROR([libtool configure failed])
432 # Reload cache, that may have been modified by ltconfig
435 # This can be used to rebuild libtool when needed
436 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
438 # Always use our own libtool.
439 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
442 # Redirect the config.log output again, so that the ltconfig log is not
443 # clobbered by the next message.
447 AC_DEFUN([AC_LIBTOOL_SETUP],
449 AC_REQUIRE([AC_ENABLE_SHARED])dnl
450 AC_REQUIRE([AC_ENABLE_STATIC])dnl
451 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
452 AC_REQUIRE([AC_CANONICAL_HOST])dnl
453 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
454 AC_REQUIRE([AC_PROG_CC])dnl
455 AC_REQUIRE([AC_PROG_LD])dnl
456 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
457 AC_REQUIRE([AC_PROG_NM])dnl
458 AC_REQUIRE([AC_PROG_LN_S])dnl
459 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
460 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
461 AC_REQUIRE([AC_OBJEXT])dnl
462 AC_REQUIRE([AC_EXEEXT])dnl
465 # Only perform the check for file, if the check method requires it
466 case $deplibs_check_method in
468 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
474 AC_CHECK_TOOL(RANLIB, ranlib, :)
475 AC_CHECK_TOOL(STRIP, strip, :)
477 # Check for any special flags to pass to ltconfig.
478 libtool_flags="--cache-file=$cache_file"
479 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
480 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
481 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
482 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
483 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
484 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
485 [libtool_flags="$libtool_flags --enable-dlopen"])
486 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
487 [libtool_flags="$libtool_flags --enable-win32-dll"])
488 AC_ARG_ENABLE(libtool-lock,
489 [ --disable-libtool-lock avoid locking (might break parallel builds)])
490 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
491 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
494 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
495 pic_mode="$withval", pic_mode=default)
496 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
497 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
499 # Some flags need to be propagated to the compiler or linker for good
503 # Find out which ABI we are using.
504 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
505 if AC_TRY_EVAL(ac_compile); then
506 case `/usr/bin/file conftest.$ac_objext` in
522 # Find out which ABI we are using.
523 echo 'int i;' > conftest.$ac_ext
524 if AC_TRY_EVAL(ac_compile); then
525 case "`/usr/bin/file conftest.o`" in
538 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
539 SAVE_CFLAGS="$CFLAGS"
540 CFLAGS="$CFLAGS -belf"
541 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
544 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
546 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
547 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
548 CFLAGS="$SAVE_CFLAGS"
552 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
553 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
554 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
555 AC_CHECK_TOOL(AS, as, false)
556 AC_CHECK_TOOL(OBJDUMP, objdump, false)
558 # recent cygwin and mingw systems supply a stub DllMain which the user
559 # can override, but on older systems we have to supply one
560 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
562 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
564 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
567 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
568 # old mingw systems require "-dll" to link a DLL, while more recent ones
570 SAVE_CFLAGS="$CFLAGS"
571 CFLAGS="$CFLAGS -mdll"
572 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
573 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
574 CFLAGS="$SAVE_CFLAGS" ;;
575 *-*-cygwin* | *-*-pw32*)
576 # cygwin systems need to pass --dll to the linker, and not link
577 # crt.o which will require a WinMain@16 definition.
578 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
585 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
586 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
588 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
589 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
591 # AC_ENABLE_SHARED - implement the --enable-shared flag
592 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
593 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
595 AC_DEFUN([AC_ENABLE_SHARED],
596 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
597 AC_ARG_ENABLE(shared,
598 changequote(<<, >>)dnl
599 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
601 [p=${PACKAGE-default}
603 yes) enable_shared=yes ;;
604 no) enable_shared=no ;;
607 # Look at the argument we got. We use all the common list separators.
608 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
609 for pkg in $enableval; do
610 if test "X$pkg" = "X$p"; then
617 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
620 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
621 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
622 AC_ENABLE_SHARED(no)])
624 # AC_ENABLE_STATIC - implement the --enable-static flag
625 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
626 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
628 AC_DEFUN([AC_ENABLE_STATIC],
629 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
630 AC_ARG_ENABLE(static,
631 changequote(<<, >>)dnl
632 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
634 [p=${PACKAGE-default}
636 yes) enable_static=yes ;;
637 no) enable_static=no ;;
640 # Look at the argument we got. We use all the common list separators.
641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
642 for pkg in $enableval; do
643 if test "X$pkg" = "X$p"; then
650 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
653 # AC_DISABLE_STATIC - set the default static flag to --disable-static
654 AC_DEFUN([AC_DISABLE_STATIC],
655 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
656 AC_ENABLE_STATIC(no)])
659 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
660 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
661 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
663 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
664 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
665 AC_ARG_ENABLE(fast-install,
666 changequote(<<, >>)dnl
667 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
669 [p=${PACKAGE-default}
671 yes) enable_fast_install=yes ;;
672 no) enable_fast_install=no ;;
674 enable_fast_install=no
675 # Look at the argument we got. We use all the common list separators.
676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
677 for pkg in $enableval; do
678 if test "X$pkg" = "X$p"; then
679 enable_fast_install=yes
685 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
688 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
689 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
690 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
691 AC_ENABLE_FAST_INSTALL(no)])
693 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
694 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
695 # Where MODE is either `yes' or `no'. If omitted, it defaults to
697 AC_DEFUN([AC_LIBTOOL_PICMODE],
698 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
699 pic_mode=ifelse($#,1,$1,default)])
702 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
703 AC_DEFUN([AC_PATH_TOOL_PREFIX],
704 [AC_MSG_CHECKING([for $1])
705 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
708 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
711 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
714 ac_save_MAGIC_CMD="$MAGIC_CMD"
715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
716 dnl $ac_dummy forces splitting on constant user-supplied paths.
717 dnl POSIX.2 word splitting is done only on the output of word expansions,
718 dnl not every word. This closes a longstanding sh security hole.
719 ac_dummy="ifelse([$2], , $PATH, [$2])"
720 for ac_dir in $ac_dummy; do
721 test -z "$ac_dir" && ac_dir=.
722 if test -f $ac_dir/$1; then
723 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
724 if test -n "$file_magic_test_file"; then
725 case $deplibs_check_method in
727 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
728 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
729 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
730 egrep "$file_magic_regex" > /dev/null; then
735 *** Warning: the command libtool uses to detect shared libraries,
736 *** $file_magic_cmd, produces output that libtool cannot recognize.
737 *** The result is that libtool may fail to recognize shared libraries
738 *** as such. This will affect the creation of libtool libraries that
739 *** depend on shared libraries, but programs linked with such libtool
740 *** libraries will work regardless of this problem. Nevertheless, you
741 *** may want to report the problem to your system manager and/or to
742 *** bug-libtool@gnu.org
752 MAGIC_CMD="$ac_save_MAGIC_CMD"
755 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
756 if test -n "$MAGIC_CMD"; then
757 AC_MSG_RESULT($MAGIC_CMD)
764 # AC_PATH_MAGIC - find a file program which can recognise a shared library
765 AC_DEFUN([AC_PATH_MAGIC],
766 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
767 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
768 if test -z "$lt_cv_path_MAGIC_CMD"; then
769 if test -n "$ac_tool_prefix"; then
770 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
778 # AC_PROG_LD - find the path to the GNU or non-GNU linker
779 AC_DEFUN([AC_PROG_LD],
781 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
782 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
783 AC_REQUIRE([AC_PROG_CC])dnl
784 AC_REQUIRE([AC_CANONICAL_HOST])dnl
785 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
787 if test "$GCC" = yes; then
788 # Check if gcc -print-prog-name=ld gives a path.
789 AC_MSG_CHECKING([for ld used by GCC])
792 # gcc leaves a trailing carriage return which upsets mingw
793 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
795 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
798 # Accept absolute paths.
799 [[\\/]* | [A-Za-z]:[\\/]*)]
800 re_direlt=['/[^/][^/]*/\.\./']
801 # Canonicalize the path of ld
802 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
803 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
804 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
806 test -z "$LD" && LD="$ac_prog"
809 # If it fails, then pretend we aren't using GCC.
813 # If it is relative, then search for the first ld in PATH.
817 elif test "$with_gnu_ld" = yes; then
818 AC_MSG_CHECKING([for GNU ld])
820 AC_MSG_CHECKING([for non-GNU ld])
822 AC_CACHE_VAL(lt_cv_path_LD,
823 [if test -z "$LD"; then
824 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
825 for ac_dir in $PATH; do
826 test -z "$ac_dir" && ac_dir=.
827 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
828 lt_cv_path_LD="$ac_dir/$ac_prog"
829 # Check to see if the program is GNU ld. I'd rather use --version,
830 # but apparently some GNU ld's only accept -v.
831 # Break only if it was the GNU/non-GNU ld that we prefer.
832 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
833 test "$with_gnu_ld" != no && break
835 test "$with_gnu_ld" != yes && break
841 lt_cv_path_LD="$LD" # Let the user override the test with a path.
844 if test -n "$LD"; then
849 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
853 AC_DEFUN([AC_PROG_LD_GNU],
854 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
855 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
856 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
857 lt_cv_prog_gnu_ld=yes
861 with_gnu_ld=$lt_cv_prog_gnu_ld
864 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
865 # -- PORTME Some linkers may need a different reload flag.
866 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
867 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
868 [lt_cv_ld_reload_flag='-r'])
869 reload_flag=$lt_cv_ld_reload_flag
870 test -n "$reload_flag" && reload_flag=" $reload_flag"
873 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
874 # -- PORTME fill in with the dynamic library characteristics
875 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
876 [AC_CACHE_CHECK([how to recognise dependant libraries],
877 lt_cv_deplibs_check_method,
878 [lt_cv_file_magic_cmd='$MAGIC_CMD'
879 lt_cv_file_magic_test_file=
880 lt_cv_deplibs_check_method='unknown'
881 # Need to set the preceding variable on all platforms that support
882 # interlibrary dependencies.
883 # 'none' -- dependencies not supported.
884 # `unknown' -- same as none, but documents that we really don't know.
885 # 'pass_all' -- all dependencies passed with no checks.
886 # 'test_compile' -- check by making test program.
887 # 'file_magic [regex]' -- check by looking for files in library path
888 # which responds to the $file_magic_cmd with a given egrep regex.
889 # If you have `file' or equivalent on your system and you're not sure
890 # whether `pass_all' will *always* work, you probably want this one.
894 lt_cv_deplibs_check_method=pass_all
898 lt_cv_deplibs_check_method=pass_all
902 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
903 lt_cv_file_magic_cmd='/usr/bin/file -L'
904 lt_cv_file_magic_test_file=/shlib/libc.so
907 cygwin* | mingw* |pw32*)
908 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
909 lt_cv_file_magic_cmd='$OBJDUMP -f'
913 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
914 lt_cv_file_magic_cmd='/usr/bin/file -L'
916 rhapsody* | darwin1.[012])
917 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
920 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
926 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
929 # Not sure whether the presence of OpenBSD here was a mistake.
930 # Let's accept both of them until this is cleared up.
931 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
932 lt_cv_file_magic_cmd=/usr/bin/file
933 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
937 lt_cv_deplibs_check_method=pass_all
942 lt_cv_deplibs_check_method=pass_all
948 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
949 lt_cv_file_magic_cmd=/usr/bin/file
950 lt_cv_file_magic_test_file=/usr/lib/libc.sl
953 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
954 lt_cv_file_magic_cmd=/usr/bin/file
955 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
963 # this will be overridden with pass_all, but let us keep it just in case
964 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
968 *-32|*"-32 ") libmagic=32-bit;;
969 *-n32|*"-n32 ") libmagic=N32;;
970 *-64|*"-64 ") libmagic=64-bit;;
971 *) libmagic=never-match;;
973 # this will be overridden with pass_all, but let us keep it just in case
974 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
977 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
978 lt_cv_deplibs_check_method=pass_all
981 # This must be Linux ELF.
984 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
985 lt_cv_deplibs_check_method=pass_all ;;
987 # glibc up to 2.1.1 does not perform some relocations on ARM
988 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
990 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
994 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
995 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
997 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
1002 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
1003 lt_cv_file_magic_cmd=/usr/bin/file
1004 lt_cv_file_magic_test_file=/usr/lib/libnls.so
1007 osf3* | osf4* | osf5*)
1008 # this will be overridden with pass_all, but let us keep it just in case
1009 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1010 lt_cv_file_magic_test_file=/shlib/libc.so
1011 lt_cv_deplibs_check_method=pass_all
1015 lt_cv_deplibs_check_method=pass_all
1019 lt_cv_deplibs_check_method=pass_all
1020 lt_cv_file_magic_test_file=/lib/libc.so
1023 [sysv5uw[78]* | sysv4*uw2*)]
1024 lt_cv_deplibs_check_method=pass_all
1027 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1028 case $host_vendor in
1030 lt_cv_deplibs_check_method=pass_all
1033 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]']
1034 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1040 file_magic_cmd=$lt_cv_file_magic_cmd
1041 deplibs_check_method=$lt_cv_deplibs_check_method
1045 # AC_PROG_NM - find the path to a BSD-compatible name lister
1046 AC_DEFUN([AC_PROG_NM],
1047 [AC_MSG_CHECKING([for BSD-compatible nm])
1048 AC_CACHE_VAL(lt_cv_path_NM,
1049 [if test -n "$NM"; then
1050 # Let the user override the test.
1053 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1054 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1055 test -z "$ac_dir" && ac_dir=.
1056 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1057 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1058 # Check to see if the nm accepts a BSD-compat flag.
1059 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1060 # nm: unknown option "B" ignored
1061 # Tru64's nm complains that /dev/null is an invalid object file
1062 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1063 lt_cv_path_NM="$tmp_nm -B"
1065 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1066 lt_cv_path_NM="$tmp_nm -p"
1069 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1070 continue # so that we can try to find one that supports BSD flags
1075 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1078 AC_MSG_RESULT([$NM])
1081 # AC_CHECK_LIBM - check for math library
1082 AC_DEFUN([AC_CHECK_LIBM],
1083 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1086 *-*-beos* | *-*-cygwin* | *-*-pw32*)
1087 # These system don't have libm
1090 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
1091 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
1094 AC_CHECK_LIB(m, main, LIBM="-lm")
1099 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
1100 # the libltdl convenience library and INCLTDL to the include flags for
1101 # the libltdl header and adds --enable-ltdl-convenience to the
1102 # configure arguments. Note that LIBLTDL and INCLTDL are not
1103 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
1104 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
1105 # with '${top_builddir}/' and INCLTDL will be prefixed with
1106 # '${top_srcdir}/' (note the single quotes!). If your package is not
1107 # flat and you're not using automake, define top_builddir and
1108 # top_srcdir appropriately in the Makefiles.
1109 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
1110 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1111 case $enable_ltdl_convenience in
1112 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
1113 "") enable_ltdl_convenience=yes
1114 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1116 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
1117 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
1120 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
1121 # the libltdl installable library and INCLTDL to the include flags for
1122 # the libltdl header and adds --enable-ltdl-install to the configure
1123 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
1124 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
1125 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
1126 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
1127 # with '${top_srcdir}/' (note the single quotes!). If your package is
1128 # not flat and you're not using automake, define top_builddir and
1129 # top_srcdir appropriately in the Makefiles.
1130 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
1131 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
1132 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1133 AC_CHECK_LIB(ltdl, main,
1134 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
1135 [if test x"$enable_ltdl_install" = xno; then
1136 AC_MSG_WARN([libltdl not installed, but installation disabled])
1138 enable_ltdl_install=yes
1141 if test x"$enable_ltdl_install" = x"yes"; then
1142 ac_configure_args="$ac_configure_args --enable-ltdl-install"
1143 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
1144 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
1146 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
1152 # If this macro is not defined by Autoconf, define it here.
1153 ifdef([AC_PROVIDE_IFELSE],
1155 [define([AC_PROVIDE_IFELSE],
1156 [ifdef([AC_PROVIDE_$1],
1159 # AC_LIBTOOL_CXX - enable support for C++ libraries
1160 AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
1162 AC_DEFUN([_AC_LIBTOOL_CXX],
1163 [AC_REQUIRE([AC_PROG_CXX])
1164 AC_REQUIRE([AC_PROG_CXXCPP])
1165 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
1167 lt_save_CFLAGS="$CFLAGS"
1168 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
1169 dnl is set to the C++ compiler.
1170 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
1171 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1172 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1173 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1174 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1175 deplibs_check_method="$deplibs_check_method" \
1176 file_magic_cmd="$file_magic_cmd" \
1177 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
1178 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
1179 || AC_MSG_ERROR([libtool tag configuration failed])
1181 CFLAGS="$lt_save_CFLAGS"
1183 # Redirect the config.log output again, so that the ltconfig log is not
1184 # clobbered by the next message.
1185 exec 5>>./config.log
1188 # AC_LIBTOOL_GCJ - enable support for GCJ libraries
1189 AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
1191 AC_DEFUN([_AC_LIBTOOL_GCJ],
1192 [AC_REQUIRE([AC_PROG_LIBTOOL])
1193 AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
1194 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
1195 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
1196 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
1197 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
1198 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
1199 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
1201 lt_save_CFLAGS="$CFLAGS"
1202 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
1203 dnl is set to the C++ compiler.
1204 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
1205 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1206 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1207 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1208 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1209 deplibs_check_method="$deplibs_check_method" \
1210 file_magic_cmd="$file_magic_cmd" \
1211 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
1212 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
1213 || AC_MSG_ERROR([libtool tag configuration failed])
1215 CFLAGS="$lt_save_CFLAGS"
1217 # Redirect the config.log output again, so that the ltconfig log is not
1218 # clobbered by the next message.
1219 exec 5>>./config.log
1223 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
1224 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
1225 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
1226 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
1227 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
1228 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
1229 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
1231 dnl This is just to silence aclocal about the macro not being used
1232 ifelse([AC_DISABLE_FAST_INSTALL])dnl
1234 AC_DEFUN([LT_AC_PROG_GCJ],
1235 [AC_CHECK_TOOL(GCJ, gcj, no)
1236 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"