2000-06-18 10:59:36 +08:00
|
|
|
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
|
|
|
|
## Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
|
* NEWS: updated
* README: updated (BeOS support, no longer shared libraries
support for AmigaOS), cleanups, we have now two mailing lists
* REAMDE-alpha: autogen -> bootstrap, we have now two mailing lists
* THANKS: added Xavier Pianet
* doc/PLATFORMS: BeOS works
* doc/libtool.texi: we have now to two mailing lists,
updated -dlopen self documentation, documented libltdl's license,
put each author in a separate line,
inter-library dependencies on uninstalled libtool libraries are
now supported, cleanups and minor corrections
* libltdl/COPYING.LIB: new file
* libltdl/ltdl.[ch]: added special exception to the LGPL license
* libtool.spec: removed, it was outdated
* Makefile.am: removed libtool.spec
* ltmain.in: use TMPDIR when possible, create a subdirectory
in the temporary directory, added -export-symbols-regex to the help,
1999-03-28 00:58:10 +08:00
|
|
|
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
1997-04-02 03:18:28 +08:00
|
|
|
##
|
1997-04-02 03:21:43 +08:00
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published by
|
|
|
|
## the Free Software Foundation; either version 2 of the License, or
|
|
|
|
## (at your option) any later version.
|
1997-04-02 03:18:28 +08:00
|
|
|
##
|
1997-04-02 03:21:43 +08:00
|
|
|
## This program is distributed in the hope that it will be useful, but
|
|
|
|
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
## General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU General Public License
|
|
|
|
## along with this program; if not, write to the Free Software
|
|
|
|
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
##
|
|
|
|
## As a special exception to the GNU General Public License, if you
|
|
|
|
## distribute this file as part of a program that contains a
|
|
|
|
## configuration script generated by Autoconf, you may include it under
|
|
|
|
## the same distribution terms that you use for the rest of that program.
|
|
|
|
|
2000-06-18 10:59:36 +08:00
|
|
|
# serial 44 AC_PROG_LIBTOOL
|
2000-05-14 16:07:16 +08:00
|
|
|
AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL])])
|
|
|
|
AC_DEFUN(_AC_PROG_LIBTOOL,
|
1999-03-11 04:24:40 +08:00
|
|
|
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
|
|
|
|
|
|
|
# Save cache, so that ltconfig can load it
|
|
|
|
AC_CACHE_SAVE
|
|
|
|
|
|
|
|
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
1999-11-02 20:33:05 +08:00
|
|
|
AR="$AR" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
2000-02-23 07:35:52 +08:00
|
|
|
MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
1999-11-02 20:33:05 +08:00
|
|
|
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
|
2000-09-01 01:23:44 +08:00
|
|
|
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" ECHO="$ECHO" \
|
1999-11-02 20:33:05 +08:00
|
|
|
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
|
|
|
|
deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
|
1999-03-11 04:24:40 +08:00
|
|
|
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
2000-06-18 10:59:36 +08:00
|
|
|
$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
|
1999-03-11 04:24:40 +08:00
|
|
|
|| AC_MSG_ERROR([libtool configure failed])
|
|
|
|
|
|
|
|
# Reload cache, that may have been modified by ltconfig
|
|
|
|
AC_CACHE_LOAD
|
|
|
|
|
|
|
|
# This can be used to rebuild libtool when needed
|
|
|
|
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
|
|
|
|
|
|
|
# Always use our own libtool.
|
|
|
|
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
|
|
|
AC_SUBST(LIBTOOL)dnl
|
|
|
|
|
|
|
|
# Redirect the config.log output again, so that the ltconfig log is not
|
|
|
|
# clobbered by the next message.
|
|
|
|
exec 5>>./config.log
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN(AC_LIBTOOL_SETUP,
|
|
|
|
[AC_PREREQ(2.13)dnl
|
1999-01-27 08:49:06 +08:00
|
|
|
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
|
|
|
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
1999-03-07 23:27:23 +08:00
|
|
|
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br>
* ltconfig.in, ltmain.in: updated and fixed the patches below
1998-11-04 Thomas Tanner <tanner@gmx.de>
* mdemo/*: added new demo to demonstrate building of dlopenend
modules
* tests/Makefile.am, tests/mdemo*: added some tests for mdemo
1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* demo/configure.in: added AC_EXEEXT macro so that the tests can
work on cywin32/mingw32 hosts. This requires the current CVS
autoconf
1998-11-04 Thomas Tanner <tanner@gmx.de>
* ltmain.in: New flag -export-symbols; new dlpreopen system
* demo/dlmain.c: removed dld_preloaded_symbol_count
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltmain.in: On installation, don't get confused if the same name
appears more than once in the list of library names.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add objext and libext variables. Check for object
suffix. Check for mingw32* as well as cygwin32*. Use objext when
testing compiler. Add support for Visual C++ on cygwin32 when not
using gcc. Add objext, libext, and fix_srcfile_path to generated
libtool script.
* ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path
if it is set. Check for .obj as well as for .o, and for .lib as
well as for .a. Use .${libext} rather than .a when creating old
libraries.
* libtoolize.in: Change initial /bin/sh to @SHELL@.
* libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for
AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the
AC_REQUIRE in AC_CHECK_TOOL.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Look in the right directory for libtool.c in
archive_cmds for cygwin32.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Fix cygwin32 support to avoid using a double
extension, to delete the def file, to set version_type to windows,
and to include versuffix in the DLL name.
* ltmain.in: Add support for a version_type of windows.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add cygwin32 support.
* libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a
cygwin32 host. Pass DLLTOOL and AS to ltconfig.
(AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
|
|
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
AC_REQUIRE([AC_PROG_CC])dnl
|
1999-01-27 08:49:06 +08:00
|
|
|
AC_REQUIRE([AC_PROG_LD])dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
|
1999-01-27 08:49:06 +08:00
|
|
|
AC_REQUIRE([AC_PROG_NM])dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
AC_REQUIRE([AC_PROG_LN_S])dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
|
1999-10-02 00:07:39 +08:00
|
|
|
AC_REQUIRE([AC_OBJEXT])dnl
|
|
|
|
AC_REQUIRE([AC_EXEEXT])dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
dnl
|
1997-04-02 03:18:28 +08:00
|
|
|
|
2000-09-01 01:23:44 +08:00
|
|
|
_LT_AC_PROG_ECHO_BACKSLASH
|
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
# Only perform the check for file, if the check method requires it
|
|
|
|
case "$deplibs_check_method" in
|
|
|
|
file_magic*)
|
2000-02-23 07:35:52 +08:00
|
|
|
if test "$file_magic_cmd" = '${MAGIC}'; then
|
|
|
|
AC_PATH_MAGIC
|
1999-10-10 08:47:55 +08:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-07-20 17:29:31 +08:00
|
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
1999-10-02 00:07:39 +08:00
|
|
|
AC_CHECK_TOOL(STRIP, strip, :)
|
1999-10-07 23:40:07 +08:00
|
|
|
|
1998-02-12 13:45:15 +08:00
|
|
|
# Check for any special flags to pass to ltconfig.
|
1999-03-11 04:24:40 +08:00
|
|
|
libtool_flags="--cache-file=$cache_file"
|
1998-02-12 13:45:15 +08:00
|
|
|
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
|
|
|
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
1999-03-07 23:27:23 +08:00
|
|
|
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
1997-04-02 03:18:28 +08:00
|
|
|
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
1997-07-02 04:04:47 +08:00
|
|
|
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
1999-04-28 04:14:32 +08:00
|
|
|
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
|
|
|
[libtool_flags="$libtool_flags --enable-dlopen"])
|
1999-04-28 23:26:14 +08:00
|
|
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
|
|
|
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
1999-04-28 04:14:32 +08:00
|
|
|
AC_ARG_ENABLE(libtool-lock,
|
|
|
|
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
|
|
|
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
1999-04-01 23:34:13 +08:00
|
|
|
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
1997-04-02 03:18:28 +08:00
|
|
|
|
1999-07-17 17:00:53 +08:00
|
|
|
AC_ARG_WITH(pic,
|
|
|
|
[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
|
|
|
|
pic_mode="$withval", pic_mode=default)
|
|
|
|
test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
|
|
|
|
test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
|
|
|
|
|
1997-06-06 00:50:29 +08:00
|
|
|
# Some flags need to be propagated to the compiler or linker for good
|
|
|
|
# libtool support.
|
2000-06-18 10:59:36 +08:00
|
|
|
case "$host" in
|
1998-03-09 13:34:02 +08:00
|
|
|
*-*-irix6*)
|
1998-02-06 16:38:29 +08:00
|
|
|
# Find out which ABI we are using.
|
|
|
|
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
|
|
|
if AC_TRY_EVAL(ac_compile); then
|
|
|
|
case "`/usr/bin/file conftest.o`" in
|
|
|
|
*32-bit*)
|
|
|
|
LD="${LD-ld} -32"
|
1997-11-08 14:25:09 +08:00
|
|
|
;;
|
1998-02-06 16:38:29 +08:00
|
|
|
*N32*)
|
|
|
|
LD="${LD-ld} -n32"
|
|
|
|
;;
|
|
|
|
*64-bit*)
|
|
|
|
LD="${LD-ld} -64"
|
1997-11-08 14:25:09 +08:00
|
|
|
;;
|
|
|
|
esac
|
1998-02-06 16:38:29 +08:00
|
|
|
fi
|
|
|
|
rm -rf conftest*
|
1997-04-02 03:53:01 +08:00
|
|
|
;;
|
|
|
|
|
|
|
|
*-*-sco3.2v5*)
|
|
|
|
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
1998-11-02 16:21:18 +08:00
|
|
|
SAVE_CFLAGS="$CFLAGS"
|
1997-04-02 03:53:01 +08:00
|
|
|
CFLAGS="$CFLAGS -belf"
|
1998-11-02 16:21:18 +08:00
|
|
|
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
2000-01-31 08:15:31 +08:00
|
|
|
[AC_LANG_SAVE
|
|
|
|
AC_LANG_C
|
|
|
|
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
|
|
|
|
AC_LANG_RESTORE])
|
1998-11-02 16:21:18 +08:00
|
|
|
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
|
|
|
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
1998-11-04 16:15:36 +08:00
|
|
|
CFLAGS="$SAVE_CFLAGS"
|
1998-11-02 16:21:18 +08:00
|
|
|
fi
|
1997-04-02 03:53:01 +08:00
|
|
|
;;
|
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br>
* ltconfig.in, ltmain.in: updated and fixed the patches below
1998-11-04 Thomas Tanner <tanner@gmx.de>
* mdemo/*: added new demo to demonstrate building of dlopenend
modules
* tests/Makefile.am, tests/mdemo*: added some tests for mdemo
1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* demo/configure.in: added AC_EXEEXT macro so that the tests can
work on cywin32/mingw32 hosts. This requires the current CVS
autoconf
1998-11-04 Thomas Tanner <tanner@gmx.de>
* ltmain.in: New flag -export-symbols; new dlpreopen system
* demo/dlmain.c: removed dld_preloaded_symbol_count
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltmain.in: On installation, don't get confused if the same name
appears more than once in the list of library names.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add objext and libext variables. Check for object
suffix. Check for mingw32* as well as cygwin32*. Use objext when
testing compiler. Add support for Visual C++ on cygwin32 when not
using gcc. Add objext, libext, and fix_srcfile_path to generated
libtool script.
* ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path
if it is set. Check for .obj as well as for .o, and for .lib as
well as for .a. Use .${libext} rather than .a when creating old
libraries.
* libtoolize.in: Change initial /bin/sh to @SHELL@.
* libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for
AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the
AC_REQUIRE in AC_CHECK_TOOL.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Look in the right directory for libtool.c in
archive_cmds for cygwin32.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Fix cygwin32 support to avoid using a double
extension, to delete the def file, to set version_type to windows,
and to include versuffix in the DLL name.
* ltmain.in: Add support for a version_type of windows.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add cygwin32 support.
* libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a
cygwin32 host. Pass DLLTOOL and AS to ltconfig.
(AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
|
|
|
|
1999-04-29 15:36:57 +08:00
|
|
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
|
|
|
[*-*-cygwin* | *-*-mingw*)
|
1999-04-01 23:34:13 +08:00
|
|
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
|
|
|
AC_CHECK_TOOL(AS, as, false)
|
1999-04-26 02:54:24 +08:00
|
|
|
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
1999-07-24 00:09:49 +08:00
|
|
|
|
|
|
|
# recent cygwin and mingw systems supply a stub DllMain which the user
|
|
|
|
# can override, but on older systems we have to supply one
|
|
|
|
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
|
1999-10-19 04:03:57 +08:00
|
|
|
[AC_TRY_LINK([],
|
|
|
|
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
|
|
|
|
DllMain (0, 0, 0);],
|
2000-01-14 20:14:41 +08:00
|
|
|
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
|
1999-07-24 00:09:49 +08:00
|
|
|
|
2000-06-18 10:59:36 +08:00
|
|
|
case "$host/$CC" in
|
1999-10-21 02:30:08 +08:00
|
|
|
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
|
1999-07-26 20:45:03 +08:00
|
|
|
# old mingw systems require "-dll" to link a DLL, while more recent ones
|
|
|
|
# require "-mdll"
|
|
|
|
SAVE_CFLAGS="$CFLAGS"
|
1999-07-26 23:16:10 +08:00
|
|
|
CFLAGS="$CFLAGS -mdll"
|
1999-07-26 20:45:03 +08:00
|
|
|
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
|
|
|
|
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
|
|
|
|
CFLAGS="$SAVE_CFLAGS" ;;
|
1999-10-19 04:03:57 +08:00
|
|
|
*-*-cygwin*)
|
|
|
|
# cygwin systems need to pass --dll to the linker, and not link
|
|
|
|
# crt.o which will require a WinMain@16 definition.
|
|
|
|
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
|
1999-07-24 00:09:49 +08:00
|
|
|
esac
|
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br>
* ltconfig.in, ltmain.in: updated and fixed the patches below
1998-11-04 Thomas Tanner <tanner@gmx.de>
* mdemo/*: added new demo to demonstrate building of dlopenend
modules
* tests/Makefile.am, tests/mdemo*: added some tests for mdemo
1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* demo/configure.in: added AC_EXEEXT macro so that the tests can
work on cywin32/mingw32 hosts. This requires the current CVS
autoconf
1998-11-04 Thomas Tanner <tanner@gmx.de>
* ltmain.in: New flag -export-symbols; new dlpreopen system
* demo/dlmain.c: removed dld_preloaded_symbol_count
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltmain.in: On installation, don't get confused if the same name
appears more than once in the list of library names.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add objext and libext variables. Check for object
suffix. Check for mingw32* as well as cygwin32*. Use objext when
testing compiler. Add support for Visual C++ on cygwin32 when not
using gcc. Add objext, libext, and fix_srcfile_path to generated
libtool script.
* ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path
if it is set. Check for .obj as well as for .o, and for .lib as
well as for .a. Use .${libext} rather than .a when creating old
libraries.
* libtoolize.in: Change initial /bin/sh to @SHELL@.
* libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for
AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the
AC_REQUIRE in AC_CHECK_TOOL.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Look in the right directory for libtool.c in
archive_cmds for cygwin32.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Fix cygwin32 support to avoid using a double
extension, to delete the def file, to set version_type to windows,
and to include versuffix in the DLL name.
* ltmain.in: Add support for a version_type of windows.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add cygwin32 support.
* libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a
cygwin32 host. Pass DLLTOOL and AS to ltconfig.
(AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
|
|
|
;;
|
1999-07-26 20:45:03 +08:00
|
|
|
])
|
1998-02-06 16:38:29 +08:00
|
|
|
esac
|
1997-04-02 03:18:28 +08:00
|
|
|
])
|
1997-06-15 11:00:00 +08:00
|
|
|
|
2000-09-01 01:23:44 +08:00
|
|
|
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
|
|
|
|
# ---------------------------------
|
|
|
|
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
|
|
|
|
[# Find the correct PATH separator. Usually this is `:', but
|
|
|
|
# DJGPP uses `;' like DOS.
|
|
|
|
if test "X${PATH_SEPARATOR+set}" != Xset; then
|
|
|
|
UNAME=${UNAME-`uname 2>/dev/null`}
|
|
|
|
case X$UNAME in
|
|
|
|
*-DOS) lt_cv_sys_path_separator=';' ;;
|
|
|
|
*) lt_cv_sys_path_separator=':' ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
|
|
|
|
|
|
|
|
# _LT_AC_PROG_ECHO_BACKSLASH
|
|
|
|
# --------------------------
|
|
|
|
# Add some code to the start of the generated configure script which
|
|
|
|
# will find an echo command which doesn;t interpret backslashes.
|
|
|
|
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
|
|
|
|
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
|
|
|
|
[AC_DIVERT_PUSH(NOTICE)])
|
|
|
|
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
|
|
|
|
|
|
|
|
# Check that we are running under the correct shell.
|
|
|
|
SHELL=${CONFIG_SHELL-/bin/sh}
|
|
|
|
|
|
|
|
case "X$ECHO" in
|
|
|
|
X*--fallback-echo)
|
|
|
|
# Remove one level of quotation (which was required for Make).
|
|
|
|
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
lt_echo=${ECHO-echo}
|
|
|
|
if test "X[$]1" = X--no-reexec; then
|
|
|
|
# Discard the --no-reexec flag, and continue.
|
|
|
|
shift
|
|
|
|
elif test "X[$]1" = X--fallback-echo; then
|
|
|
|
# Avoid inline document here, it may be left over
|
|
|
|
:
|
|
|
|
elif test "X`($lt_echo '\t') 2>/dev/null`" = 'X\t'; then
|
|
|
|
# Yippee, $lt_echo works!
|
|
|
|
:
|
|
|
|
else
|
|
|
|
# Restart under the correct shell.
|
|
|
|
exec "$SHELL" "[$]0" --no-reexec ${1+"[$]@"}
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "X[$]1" = X--fallback-echo; then
|
|
|
|
# used as fallback echo
|
|
|
|
shift
|
|
|
|
cat <<EOF
|
|
|
|
$*
|
|
|
|
EOF
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
|
|
|
# if CDPATH is set.
|
|
|
|
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
|
|
|
|
|
|
|
|
if test -z "$ECHO"; then
|
|
|
|
if test "X${lt_echo_test_string+set}" != Xset; then
|
|
|
|
# find a string as large as possible, as long as the shell can cope with it
|
|
|
|
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
|
|
|
|
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
|
|
|
|
if (lt_echo_test_string="`eval $cmd`") 2>/dev/null &&
|
|
|
|
lt_echo_test_string="`eval $cmd`" &&
|
|
|
|
(test "X$lt_echo_test_string" = "X$lt_echo_test_string") 2>/dev/null
|
|
|
|
then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "X`($lt_echo '\t') 2>/dev/null`" = 'X\t' &&
|
|
|
|
lt_echo_testing_string=`($lt_echo "$lt_echo_test_string") 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = "X$lt_echo_test_string"; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
# The Solaris, AIX, and Digital Unix default echo programs unquote
|
|
|
|
# backslashes. This makes it impossible to quote backslashes using
|
|
|
|
# echo "$something" | sed 's/\\/\\\\/g'
|
|
|
|
#
|
|
|
|
# So, first we look for a working echo in the user's PATH.
|
|
|
|
|
|
|
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
|
|
|
|
for dir in $PATH /usr/ucb; do
|
|
|
|
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
|
|
|
|
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
|
|
|
|
lt_echo_testing_string=`($dir/echo "$lt_echo_test_string") 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = "X$lt_echo_test_string"; then
|
|
|
|
lt_echo="$dir/echo"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$save_ifs"
|
|
|
|
|
|
|
|
if test "X$lt_echo" = Xecho; then
|
|
|
|
# We didn't find a better echo, so look for alternatives.
|
|
|
|
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
|
|
|
|
lt_echo_testing_string=`(print -r "$lt_echo_test_string") 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = "X$lt_echo_test_string"; then
|
|
|
|
# This shell has a builtin print -r that does the trick.
|
|
|
|
lt_echo='print -r'
|
|
|
|
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
|
|
|
|
test "X$CONFIG_SHELL" != X/bin/ksh; then
|
|
|
|
# If we have ksh, try running ltconfig again with it.
|
|
|
|
ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
|
|
|
|
export ORIGINAL_CONFIG_SHELL
|
|
|
|
CONFIG_SHELL=/bin/ksh
|
|
|
|
export CONFIG_SHELL
|
|
|
|
exec "$CONFIG_SHELL" "[$]0" --no-reexec ${1+"$@"}
|
|
|
|
else
|
|
|
|
# Try using printf.
|
|
|
|
lt_echo='printf %s\n'
|
|
|
|
if test "X`($lt_echo '\t') 2>/dev/null`" = 'X\t' &&
|
|
|
|
lt_echo_testing_string=`($lt_echo "$lt_echo_test_string") 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = "X$lt_echo_test_string"; then
|
|
|
|
# Cool, printf works
|
|
|
|
:
|
|
|
|
elif lt_echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "[$]0" --fallback-echo '\t') 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = 'X\t' &&
|
|
|
|
lt_echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "[$]0" --fallback-echo "$lt_echo_test_string") 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = "X$lt_echo_test_string"; then
|
|
|
|
CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
|
|
|
|
export CONFIG_SHELL
|
|
|
|
SHELL="$CONFIG_SHELL"
|
|
|
|
export SHELL
|
|
|
|
lt_echo="$CONFIG_SHELL [$]0 --fallback-echo"
|
|
|
|
elif lt_echo_testing_string=`("$CONFIG_SHELL" "[$]0" --fallback-echo '\t') 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = 'X\t' &&
|
|
|
|
lt_echo_testing_string=`("$CONFIG_SHELL" "[$]0" --fallback-echo "$lt_echo_test_string") 2>/dev/null` &&
|
|
|
|
test "X$lt_echo_testing_string" = "X$lt_echo_test_string"; then
|
|
|
|
lt_echo="$CONFIG_SHELL [$]0 --fallback-echo"
|
|
|
|
else
|
|
|
|
# maybe with a smaller string...
|
|
|
|
prev=:
|
|
|
|
|
|
|
|
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
|
|
|
|
if (test "X$lt_echo_test_string" = "X`eval $cmd`") 2>/dev/null
|
|
|
|
then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
prev="$cmd"
|
|
|
|
done
|
|
|
|
|
|
|
|
if test "$prev" != 'sed 50q "[$]0"'; then
|
|
|
|
lt_echo_test_string=`eval $prev`
|
|
|
|
export lt_echo_test_string
|
|
|
|
exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "[$]0" ${1+"$@"}
|
|
|
|
else
|
|
|
|
# Oops. We lost completely, so just stick with echo.
|
|
|
|
lt_echo=echo
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Copy lt_echo and quote the copy suitably for passing to ltconfig from
|
|
|
|
# the Makefile, instead of quoting the original, which is used later.
|
|
|
|
ECHO=$lt_echo
|
|
|
|
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
|
|
|
|
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ECHO)
|
|
|
|
AC_DIVERT_POP
|
|
|
|
])# _LT_AC_PROG_ECHO_BACKSLASH
|
|
|
|
|
|
|
|
|
1999-04-01 23:34:13 +08:00
|
|
|
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
1999-02-16 00:46:55 +08:00
|
|
|
|
1999-04-28 23:26:14 +08:00
|
|
|
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
1999-04-28 23:26:14 +08:00
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
|
|
|
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
1998-02-12 13:45:15 +08:00
|
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
|
|
|
# `yes'.
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
1999-04-28 04:14:32 +08:00
|
|
|
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
AC_ARG_ENABLE(shared,
|
|
|
|
changequote(<<, >>)dnl
|
1999-01-27 08:49:06 +08:00
|
|
|
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
1998-02-12 13:45:15 +08:00
|
|
|
changequote([, ])dnl
|
1998-03-06 00:23:43 +08:00
|
|
|
[p=${PACKAGE-default}
|
|
|
|
case "$enableval" in
|
|
|
|
yes) enable_shared=yes ;;
|
|
|
|
no) enable_shared=no ;;
|
|
|
|
*)
|
1998-02-12 13:45:15 +08:00
|
|
|
enable_shared=no
|
1998-03-06 00:23:43 +08:00
|
|
|
# Look at the argument we got. We use all the common list separators.
|
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
|
|
|
for pkg in $enableval; do
|
|
|
|
if test "X$pkg" = "X$p"; then
|
|
|
|
enable_shared=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$ac_save_ifs"
|
|
|
|
;;
|
|
|
|
esac],
|
1999-01-27 08:49:06 +08:00
|
|
|
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
])
|
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|
|
|
AC_ENABLE_SHARED(no)])
|
1998-02-12 13:45:15 +08:00
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
# AC_ENABLE_STATIC - implement the --enable-static flag
|
|
|
|
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
1998-02-12 13:45:15 +08:00
|
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
|
|
|
# `yes'.
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
1999-04-28 04:14:32 +08:00
|
|
|
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
AC_ARG_ENABLE(static,
|
|
|
|
changequote(<<, >>)dnl
|
1999-01-27 08:49:06 +08:00
|
|
|
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
1998-02-12 13:45:15 +08:00
|
|
|
changequote([, ])dnl
|
1998-03-06 00:23:43 +08:00
|
|
|
[p=${PACKAGE-default}
|
|
|
|
case "$enableval" in
|
|
|
|
yes) enable_static=yes ;;
|
|
|
|
no) enable_static=no ;;
|
|
|
|
*)
|
1998-02-12 13:45:15 +08:00
|
|
|
enable_static=no
|
1998-03-06 00:23:43 +08:00
|
|
|
# Look at the argument we got. We use all the common list separators.
|
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
|
|
|
for pkg in $enableval; do
|
|
|
|
if test "X$pkg" = "X$p"; then
|
|
|
|
enable_static=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$ac_save_ifs"
|
|
|
|
;;
|
|
|
|
esac],
|
1999-01-27 08:49:06 +08:00
|
|
|
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
1998-02-12 13:45:15 +08:00
|
|
|
])
|
|
|
|
|
1999-03-07 23:27:23 +08:00
|
|
|
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|
|
|
AC_ENABLE_STATIC(no)])
|
1999-03-07 23:27:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
|
|
|
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
|
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
|
|
|
# `yes'.
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
1999-04-28 04:14:32 +08:00
|
|
|
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
1999-03-07 23:27:23 +08:00
|
|
|
AC_ARG_ENABLE(fast-install,
|
|
|
|
changequote(<<, >>)dnl
|
|
|
|
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
|
|
|
changequote([, ])dnl
|
|
|
|
[p=${PACKAGE-default}
|
|
|
|
case "$enableval" in
|
|
|
|
yes) enable_fast_install=yes ;;
|
|
|
|
no) enable_fast_install=no ;;
|
|
|
|
*)
|
|
|
|
enable_fast_install=no
|
|
|
|
# Look at the argument we got. We use all the common list separators.
|
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
|
|
|
for pkg in $enableval; do
|
|
|
|
if test "X$pkg" = "X$p"; then
|
|
|
|
enable_fast_install=yes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$ac_save_ifs"
|
|
|
|
;;
|
|
|
|
esac],
|
|
|
|
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
|
|
|
])
|
|
|
|
|
2000-04-11 02:39:30 +08:00
|
|
|
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|
|
|
AC_ENABLE_FAST_INSTALL(no)])
|
1998-02-12 13:45:15 +08:00
|
|
|
|
2000-04-11 02:39:30 +08:00
|
|
|
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
|
|
|
|
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
|
|
|
|
# Where MODE is either `yes' or `no'. If omitted, it defaults to
|
|
|
|
# `both'.
|
|
|
|
AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
|
|
|
pic_mode=ifelse($#,1,$1,default)])
|
|
|
|
|
1999-10-04 04:41:21 +08:00
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
|
|
|
|
AC_DEFUN(AC_PATH_TOOL_PREFIX,
|
|
|
|
[AC_MSG_CHECKING([for $1])
|
2000-02-23 07:35:52 +08:00
|
|
|
AC_CACHE_VAL(lt_cv_path_MAGIC,
|
|
|
|
[case "$MAGIC" in
|
1999-10-04 04:41:21 +08:00
|
|
|
/*)
|
2000-02-23 07:35:52 +08:00
|
|
|
lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
|
1999-10-04 04:41:21 +08:00
|
|
|
;;
|
|
|
|
?:/*)
|
2000-02-23 07:35:52 +08:00
|
|
|
ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
|
1999-10-04 04:41:21 +08:00
|
|
|
;;
|
|
|
|
*)
|
2000-02-23 07:35:52 +08:00
|
|
|
ac_save_MAGIC="$MAGIC"
|
1999-10-04 04:41:21 +08:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
|
|
dnl $ac_dummy forces splitting on constant user-supplied paths.
|
|
|
|
dnl POSIX.2 word splitting is done only on the output of word expansions,
|
|
|
|
dnl not every word. This closes a longstanding sh security hole.
|
1999-10-10 08:47:55 +08:00
|
|
|
ac_dummy="ifelse([$2], , $PATH, [$2])"
|
1999-10-04 04:41:21 +08:00
|
|
|
for ac_dir in $ac_dummy; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
1999-10-10 08:47:55 +08:00
|
|
|
if test -f $ac_dir/$1; then
|
2000-02-23 07:35:52 +08:00
|
|
|
lt_cv_path_MAGIC="$ac_dir/$1"
|
1999-10-10 08:47:55 +08:00
|
|
|
if test -n "$file_magic_test_file"; then
|
2000-01-20 04:34:37 +08:00
|
|
|
case "$deplibs_check_method" in
|
|
|
|
"file_magic "*)
|
|
|
|
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
|
2000-02-23 07:35:52 +08:00
|
|
|
MAGIC="$lt_cv_path_MAGIC"
|
2000-01-20 04:34:37 +08:00
|
|
|
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
|
|
|
|
egrep "$file_magic_regex" > /dev/null; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
cat <<EOF 1>&2
|
1999-10-10 08:47:55 +08:00
|
|
|
|
|
|
|
*** Warning: the command libtool uses to detect shared libraries,
|
|
|
|
*** $file_magic_cmd, produces output that libtool cannot recognize.
|
|
|
|
*** The result is that libtool may fail to recognize shared libraries
|
|
|
|
*** as such. This will affect the creation of libtool libraries that
|
|
|
|
*** depend on shared libraries, but programs linked with such libtool
|
|
|
|
*** libraries will work regardless of this problem. Nevertheless, you
|
|
|
|
*** may want to report the problem to your system manager and/or to
|
|
|
|
*** bug-libtool@gnu.org
|
|
|
|
|
|
|
|
EOF
|
2000-01-20 04:34:37 +08:00
|
|
|
fi ;;
|
|
|
|
esac
|
1999-10-10 08:47:55 +08:00
|
|
|
fi
|
1999-10-04 04:41:21 +08:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$ac_save_ifs"
|
2000-02-23 07:35:52 +08:00
|
|
|
MAGIC="$ac_save_MAGIC"
|
1999-10-04 04:41:21 +08:00
|
|
|
;;
|
1999-10-10 08:47:55 +08:00
|
|
|
esac])
|
2000-02-23 07:35:52 +08:00
|
|
|
MAGIC="$lt_cv_path_MAGIC"
|
|
|
|
if test -n "$MAGIC"; then
|
|
|
|
AC_MSG_RESULT($MAGIC)
|
1999-10-04 04:41:21 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2000-02-23 07:35:52 +08:00
|
|
|
# AC_PATH_MAGIC - find a file program which can recognise a shared library
|
|
|
|
AC_DEFUN(AC_PATH_MAGIC,
|
1999-10-04 04:41:21 +08:00
|
|
|
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
|
2000-02-23 07:35:52 +08:00
|
|
|
if test -z "$lt_cv_path_MAGIC"; then
|
1999-10-10 08:47:55 +08:00
|
|
|
if test -n "$ac_tool_prefix"; then
|
|
|
|
AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
|
|
|
|
else
|
2000-02-23 07:35:52 +08:00
|
|
|
MAGIC=:
|
1999-10-04 04:41:21 +08:00
|
|
|
fi
|
1999-10-10 08:47:55 +08:00
|
|
|
fi
|
1999-10-04 04:41:21 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
|
|
|
AC_DEFUN(AC_PROG_LD,
|
1997-07-02 04:04:47 +08:00
|
|
|
[AC_ARG_WITH(gnu-ld,
|
|
|
|
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
|
|
|
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
1998-11-28 02:42:12 +08:00
|
|
|
AC_REQUIRE([AC_PROG_CC])dnl
|
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
|
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
1997-08-21 13:16:08 +08:00
|
|
|
ac_prog=ld
|
|
|
|
if test "$ac_cv_prog_gcc" = yes; then
|
|
|
|
# Check if gcc -print-prog-name=ld gives a path.
|
|
|
|
AC_MSG_CHECKING([for ld used by GCC])
|
2000-06-18 10:59:36 +08:00
|
|
|
case $host in
|
1999-08-03 19:44:17 +08:00
|
|
|
*-*-mingw*)
|
|
|
|
# gcc leaves a trailing carriage return which upsets mingw
|
|
|
|
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
|
|
|
*)
|
|
|
|
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
|
|
|
esac
|
1997-08-21 13:16:08 +08:00
|
|
|
case "$ac_prog" in
|
1998-11-28 00:52:37 +08:00
|
|
|
# Accept absolute paths.
|
1998-04-15 00:29:20 +08:00
|
|
|
changequote(,)dnl
|
1999-04-07 06:08:59 +08:00
|
|
|
[\\/]* | [A-Za-z]:[\\/]*)
|
1998-11-28 02:42:12 +08:00
|
|
|
re_direlt='/[^/][^/]*/\.\./'
|
1998-04-15 00:29:20 +08:00
|
|
|
changequote([,])dnl
|
1998-11-28 00:52:37 +08:00
|
|
|
# Canonicalize the path of ld
|
1999-02-27 00:17:43 +08:00
|
|
|
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
1998-11-28 00:52:37 +08:00
|
|
|
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
1999-02-27 00:17:43 +08:00
|
|
|
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
1998-11-28 00:52:37 +08:00
|
|
|
done
|
1999-02-27 00:17:43 +08:00
|
|
|
test -z "$LD" && LD="$ac_prog"
|
1998-11-28 00:52:37 +08:00
|
|
|
;;
|
1997-08-21 13:16:08 +08:00
|
|
|
"")
|
|
|
|
# If it fails, then pretend we aren't using GCC.
|
|
|
|
ac_prog=ld
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# If it is relative, then search for the first ld in PATH.
|
|
|
|
with_gnu_ld=unknown
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
elif test "$with_gnu_ld" = yes; then
|
1997-07-02 04:04:47 +08:00
|
|
|
AC_MSG_CHECKING([for GNU ld])
|
|
|
|
else
|
|
|
|
AC_MSG_CHECKING([for non-GNU ld])
|
|
|
|
fi
|
1997-06-30 20:20:49 +08:00
|
|
|
AC_CACHE_VAL(ac_cv_path_LD,
|
1997-10-15 02:33:24 +08:00
|
|
|
[if test -z "$LD"; then
|
1999-04-07 06:08:59 +08:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
1997-06-15 11:00:00 +08:00
|
|
|
for ac_dir in $PATH; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
1999-04-10 13:42:35 +08:00
|
|
|
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
1997-08-21 13:16:08 +08:00
|
|
|
ac_cv_path_LD="$ac_dir/$ac_prog"
|
1997-06-15 11:00:00 +08:00
|
|
|
# Check to see if the program is GNU ld. I'd rather use --version,
|
|
|
|
# but apparently some GNU ld's only accept -v.
|
1997-07-02 04:04:47 +08:00
|
|
|
# Break only if it was the GNU/non-GNU ld that we prefer.
|
1997-07-20 13:03:16 +08:00
|
|
|
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
1997-08-21 13:16:08 +08:00
|
|
|
test "$with_gnu_ld" != no && break
|
1997-06-15 11:00:00 +08:00
|
|
|
else
|
1999-01-17 19:19:40 +08:00
|
|
|
test "$with_gnu_ld" != yes && break
|
1997-06-15 11:00:00 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$ac_save_ifs"
|
1997-10-15 02:33:24 +08:00
|
|
|
else
|
|
|
|
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
|
|
|
fi])
|
1997-06-30 20:20:49 +08:00
|
|
|
LD="$ac_cv_path_LD"
|
1997-06-15 11:00:00 +08:00
|
|
|
if test -n "$LD"; then
|
|
|
|
AC_MSG_RESULT($LD)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
1999-01-27 08:49:06 +08:00
|
|
|
AC_PROG_LD_GNU
|
1997-07-02 04:04:47 +08:00
|
|
|
])
|
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
AC_DEFUN(AC_PROG_LD_GNU,
|
1997-09-06 03:13:09 +08:00
|
|
|
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
1997-07-02 04:04:47 +08:00
|
|
|
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
1997-09-06 03:13:09 +08:00
|
|
|
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
1997-07-02 04:04:47 +08:00
|
|
|
ac_cv_prog_gnu_ld=yes
|
|
|
|
else
|
|
|
|
ac_cv_prog_gnu_ld=no
|
|
|
|
fi])
|
1999-10-02 00:07:39 +08:00
|
|
|
with_gnu_ld=$ac_cv_prog_gnu_ld
|
1997-06-15 11:00:00 +08:00
|
|
|
])
|
1997-07-13 05:39:00 +08:00
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
|
|
|
|
# -- PORTME Some linkers may need a different reload flag.
|
|
|
|
AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
|
|
|
|
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
|
|
|
|
[lt_cv_ld_reload_flag='-r'])
|
1999-11-02 20:33:05 +08:00
|
|
|
reload_flag=$lt_cv_ld_reload_flag
|
1999-10-10 08:47:55 +08:00
|
|
|
test -n "$reload_flag" && reload_flag=" $reload_flag"
|
|
|
|
])
|
|
|
|
|
|
|
|
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
|
|
|
|
# -- PORTME fill in with the dynamic library characteristics
|
|
|
|
AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
|
2000-01-25 04:34:46 +08:00
|
|
|
[AC_CACHE_CHECK([how to recognise dependant libraries],
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_deplibs_check_method,
|
2000-02-23 07:35:52 +08:00
|
|
|
[lt_cv_file_magic_cmd='${MAGIC}'
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_file_magic_test_file=
|
|
|
|
lt_cv_deplibs_check_method='unknown'
|
|
|
|
# Need to set the preceding variable on all platforms that support
|
|
|
|
# interlibrary dependencies.
|
|
|
|
# 'none' -- dependencies not supported.
|
|
|
|
# `unknown' -- same as none, but documents that we really don't know.
|
|
|
|
# 'pass_all' -- all dependencies passed with no checks.
|
|
|
|
# 'test_compile' -- check by making test program.
|
|
|
|
# 'file_magic [regex]' -- check by looking for files in library path
|
|
|
|
# which responds to the $file_magic_cmd with a given egrep regex.
|
|
|
|
# If you have `file' or equivalent on your system and you're not sure
|
|
|
|
# whether `pass_all' will *always* work, you probably want this one.
|
|
|
|
|
|
|
|
case "$host_os" in
|
2000-05-03 08:34:45 +08:00
|
|
|
aix4*)
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
|
|
|
|
|
|
|
beos*)
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
2000-01-25 04:34:46 +08:00
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
bsdi4*)
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote(,)dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote([, ])dnl
|
2000-05-30 01:15:37 +08:00
|
|
|
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_file_magic_test_file=/shlib/libc.so
|
2000-01-25 04:34:46 +08:00
|
|
|
;;
|
1999-10-10 08:47:55 +08:00
|
|
|
|
|
|
|
cygwin* | mingw*)
|
|
|
|
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
|
|
|
|
lt_cv_file_magic_cmd='${OBJDUMP} -f'
|
|
|
|
;;
|
|
|
|
|
|
|
|
freebsd*)
|
2000-07-10 14:08:09 +08:00
|
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
2000-05-30 00:53:24 +08:00
|
|
|
case "$host_cpu" in
|
|
|
|
i*86 )
|
2000-05-30 01:04:11 +08:00
|
|
|
changequote(,)dnl
|
2000-05-30 00:53:24 +08:00
|
|
|
lt_cv_deplibs_check_method=='file_magic OpenBSD/i[3-9]86 demand paged shared library'
|
2000-05-30 01:04:11 +08:00
|
|
|
changequote([, ])dnl
|
2000-05-30 00:53:24 +08:00
|
|
|
lt_cv_file_magic_cmd=/usr/bin/file
|
|
|
|
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
|
|
|
|
;;
|
|
|
|
esac
|
2000-07-10 14:08:09 +08:00
|
|
|
else
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
fi
|
1999-10-10 08:47:55 +08:00
|
|
|
;;
|
2000-01-25 04:34:46 +08:00
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
gnu*)
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
2000-01-25 04:34:46 +08:00
|
|
|
|
2000-05-03 08:34:45 +08:00
|
|
|
hpux10.20*)
|
|
|
|
# TODO: Does this work for hpux-11 too?
|
|
|
|
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
|
|
|
|
lt_cv_file_magic_cmd=/usr/bin/file
|
|
|
|
lt_cv_file_magic_test_file=/usr/lib/libc.sl
|
|
|
|
;;
|
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
irix5* | irix6*)
|
|
|
|
case "$host_os" in
|
|
|
|
irix5*)
|
|
|
|
# this will be overridden with pass_all, but let us keep it just in case
|
|
|
|
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
case "$LD" in
|
|
|
|
*-32|*"-32 ") libmagic=32-bit;;
|
|
|
|
*-n32|*"-n32 ") libmagic=N32;;
|
|
|
|
*-64|*"-64 ") libmagic=64-bit;;
|
|
|
|
*) libmagic=never-match;;
|
|
|
|
esac
|
|
|
|
# this will be overridden with pass_all, but let us keep it just in case
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote(,)dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote([, ])dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
|
|
|
|
|
|
|
# This must be Linux ELF.
|
|
|
|
linux-gnu*)
|
|
|
|
case "$host_cpu" in
|
2000-05-29 22:27:37 +08:00
|
|
|
alpha* | i*86 | powerpc* | sparc* | ia64* )
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_deplibs_check_method=pass_all ;;
|
|
|
|
*)
|
|
|
|
# glibc up to 2.1.1 does not perform some relocations on ARM
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote(,)dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote([, ])dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
esac
|
|
|
|
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
|
|
|
|
;;
|
|
|
|
|
2000-05-30 02:02:07 +08:00
|
|
|
netbsd*)
|
|
|
|
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
|
|
|
|
else
|
|
|
|
changequote(,)dnl
|
|
|
|
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
|
|
|
|
changequote([, ])dnl
|
|
|
|
lt_cv_file_magic_cmd='/usr/bin/file -L'
|
|
|
|
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
osf3* | osf4* | osf5*)
|
|
|
|
# this will be overridden with pass_all, but let us keep it just in case
|
|
|
|
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
|
|
|
|
lt_cv_file_magic_test_file=/shlib/libc.so
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
|
|
|
|
|
|
|
sco3.2v5*)
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
2000-01-25 04:34:46 +08:00
|
|
|
|
1999-10-10 08:47:55 +08:00
|
|
|
solaris*)
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
lt_cv_file_magic_test_file=/lib/libc.so
|
|
|
|
;;
|
|
|
|
|
|
|
|
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
|
|
|
|
case "$host_vendor" in
|
|
|
|
ncr)
|
|
|
|
lt_cv_deplibs_check_method=pass_all
|
|
|
|
;;
|
|
|
|
motorola)
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote(,)dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
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]'
|
2000-01-29 07:28:57 +08:00
|
|
|
changequote([, ])dnl
|
1999-10-10 08:47:55 +08:00
|
|
|
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
])
|
|
|
|
file_magic_cmd=$lt_cv_file_magic_cmd
|
|
|
|
deplibs_check_method=$lt_cv_deplibs_check_method
|
|
|
|
])
|
|
|
|
|
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
|
|
|
AC_DEFUN(AC_PROG_NM,
|
1997-07-13 05:39:00 +08:00
|
|
|
[AC_MSG_CHECKING([for BSD-compatible nm])
|
|
|
|
AC_CACHE_VAL(ac_cv_path_NM,
|
1998-04-20 03:29:28 +08:00
|
|
|
[if test -n "$NM"; then
|
|
|
|
# Let the user override the test.
|
|
|
|
ac_cv_path_NM="$NM"
|
|
|
|
else
|
1999-04-07 18:55:44 +08:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
1999-01-13 18:38:45 +08:00
|
|
|
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
1998-03-06 00:23:43 +08:00
|
|
|
test -z "$ac_dir" && ac_dir=.
|
2000-07-10 17:42:21 +08:00
|
|
|
tmp_nm=$ac_dir/${ac_tool_prefix}nm
|
|
|
|
if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
|
1997-07-13 05:39:00 +08:00
|
|
|
# Check to see if the nm accepts a BSD-compat flag.
|
1998-02-17 04:13:54 +08:00
|
|
|
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
1997-11-29 01:23:28 +08:00
|
|
|
# nm: unknown option "B" ignored
|
2000-07-10 17:42:21 +08:00
|
|
|
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
|
|
|
ac_cv_path_NM="$tmp_nm -B"
|
1999-01-13 18:38:45 +08:00
|
|
|
break
|
2000-07-10 17:42:21 +08:00
|
|
|
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
|
|
|
ac_cv_path_NM="$tmp_nm -p"
|
1999-01-13 18:38:45 +08:00
|
|
|
break
|
1997-07-13 05:39:00 +08:00
|
|
|
else
|
2000-07-10 17:42:21 +08:00
|
|
|
ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
|
1999-01-13 18:38:45 +08:00
|
|
|
continue # so that we can try to find one that supports BSD flags
|
1997-07-13 05:39:00 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$ac_save_ifs"
|
|
|
|
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
1998-04-20 03:29:28 +08:00
|
|
|
fi])
|
1997-07-13 05:39:00 +08:00
|
|
|
NM="$ac_cv_path_NM"
|
|
|
|
AC_MSG_RESULT([$NM])
|
|
|
|
])
|
1998-11-04 Alexandre Oliva <oliva@dcc.unicamp.br>
* ltconfig.in, ltmain.in: updated and fixed the patches below
1998-11-04 Thomas Tanner <tanner@gmx.de>
* mdemo/*: added new demo to demonstrate building of dlopenend
modules
* tests/Makefile.am, tests/mdemo*: added some tests for mdemo
1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* demo/configure.in: added AC_EXEEXT macro so that the tests can
work on cywin32/mingw32 hosts. This requires the current CVS
autoconf
1998-11-04 Thomas Tanner <tanner@gmx.de>
* ltmain.in: New flag -export-symbols; new dlpreopen system
* demo/dlmain.c: removed dld_preloaded_symbol_count
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltmain.in: On installation, don't get confused if the same name
appears more than once in the list of library names.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add objext and libext variables. Check for object
suffix. Check for mingw32* as well as cygwin32*. Use objext when
testing compiler. Add support for Visual C++ on cygwin32 when not
using gcc. Add objext, libext, and fix_srcfile_path to generated
libtool script.
* ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path
if it is set. Check for .obj as well as for .o, and for .lib as
well as for .a. Use .${libext} rather than .a when creating old
libraries.
* libtoolize.in: Change initial /bin/sh to @SHELL@.
* libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for
AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the
AC_REQUIRE in AC_CHECK_TOOL.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Look in the right directory for libtool.c in
archive_cmds for cygwin32.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Fix cygwin32 support to avoid using a double
extension, to delete the def file, to set version_type to windows,
and to include versuffix in the DLL name.
* ltmain.in: Add support for a version_type of windows.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add cygwin32 support.
* libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a
cygwin32 host. Pass DLLTOOL and AS to ltconfig.
(AM_SYS_LIBTOOL_CYGWIN32): New macro.
1998-11-04 17:43:29 +08:00
|
|
|
|
1999-02-13 23:43:04 +08:00
|
|
|
# AC_CHECK_LIBM - check for math library
|
1999-03-20 08:27:33 +08:00
|
|
|
AC_DEFUN(AC_CHECK_LIBM,
|
|
|
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
1999-03-31 03:22:41 +08:00
|
|
|
LIBM=
|
2000-06-18 10:59:36 +08:00
|
|
|
case "$host" in
|
1999-03-20 08:27:33 +08:00
|
|
|
*-*-beos* | *-*-cygwin*)
|
|
|
|
# These system don't have libm
|
|
|
|
;;
|
|
|
|
*-ncr-sysv4.3*)
|
1999-03-31 03:22:41 +08:00
|
|
|
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
1999-04-03 08:36:06 +08:00
|
|
|
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
1999-03-20 08:27:33 +08:00
|
|
|
;;
|
|
|
|
*)
|
1999-04-03 08:36:06 +08:00
|
|
|
AC_CHECK_LIB(m, main, LIBM="-lm")
|
1999-03-20 08:27:33 +08:00
|
|
|
;;
|
|
|
|
esac
|
1999-02-13 23:43:04 +08:00
|
|
|
])
|
|
|
|
|
1999-03-10 06:02:09 +08:00
|
|
|
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
2000-05-14 16:24:37 +08:00
|
|
|
# the libltdl convenience library and INCLTDL to the include flags for
|
|
|
|
# the libltdl header and adds --enable-ltdl-convenience to the
|
|
|
|
# configure arguments. Note that LIBLTDL and INCLTDL are not
|
|
|
|
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
|
|
|
|
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
|
|
|
|
# with '${top_builddir}/' and INCLTDL will be prefixed with
|
|
|
|
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
|
|
|
# flat and you're not using automake, define top_builddir and
|
|
|
|
# top_srcdir appropriately in the Makefiles.
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
1999-03-11 05:23:37 +08:00
|
|
|
case "$enable_ltdl_convenience" in
|
|
|
|
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
|
|
|
"") enable_ltdl_convenience=yes
|
|
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
|
|
|
esac
|
2000-05-14 16:23:57 +08:00
|
|
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
|
|
|
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
1999-03-10 06:02:09 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
2000-05-14 16:24:37 +08:00
|
|
|
# the libltdl installable library and INCLTDL to the include flags for
|
|
|
|
# the libltdl header and adds --enable-ltdl-install to the configure
|
|
|
|
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
|
|
|
|
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
|
|
|
|
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
|
|
|
|
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
|
|
|
|
# with '${top_srcdir}/' (note the single quotes!). If your package is
|
|
|
|
# not flat and you're not using automake, define top_builddir and
|
|
|
|
# top_srcdir appropriately in the Makefiles.
|
1999-03-10 06:02:09 +08:00
|
|
|
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
1999-04-29 01:31:54 +08:00
|
|
|
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
1999-03-31 03:22:41 +08:00
|
|
|
AC_CHECK_LIB(ltdl, main,
|
|
|
|
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
|
|
|
[if test x"$enable_ltdl_install" = xno; then
|
|
|
|
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
|
|
|
else
|
|
|
|
enable_ltdl_install=yes
|
|
|
|
fi
|
1999-03-10 06:02:09 +08:00
|
|
|
])
|
1999-03-31 03:22:41 +08:00
|
|
|
if test x"$enable_ltdl_install" = x"yes"; then
|
|
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
2000-05-14 16:23:57 +08:00
|
|
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
|
|
|
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
1999-03-31 03:22:41 +08:00
|
|
|
else
|
|
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
|
|
|
LIBLTDL="-lltdl"
|
1999-05-21 01:54:09 +08:00
|
|
|
INCLTDL=
|
1999-03-10 06:02:09 +08:00
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
1999-01-27 08:49:06 +08:00
|
|
|
dnl old names
|
|
|
|
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
|
|
|
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
|
|
|
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
|
|
|
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
|
|
|
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
|
|
|
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
|
|
|
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
1999-04-29 01:31:54 +08:00
|
|
|
|
1999-05-01 04:21:15 +08:00
|
|
|
dnl This is just to silence aclocal about the macro not being used
|
|
|
|
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|