libtool/configure.ac

208 lines
6.6 KiB
Plaintext
Raw Normal View History

## Process this file with autoconf to create configure. -*- autoconf -*-
# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
#
# 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.
#
# 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
AC_PREREQ(2.58) ## We use AS_HELP_STRING
## Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
## ------------------------ ##
## Autoconf initialisation. ##
## ------------------------ ##
AC_INIT([libtool], [1.9e], [bug-libtool@gnu.org])
AC_CONFIG_HEADERS([config.h:config-h.in])
My thanks to Alexandre Duret-Lutz <adl@gnu.org> for the insight required to write this changeset -- especially that ltmain.sh is the same on any machine for a given release, which I hadn't noticed for some bizarre reason: It turns out that generating distributed files from configure causes no end of hassle, as evidenced by the many patches I've generated over the last few days to try and get the dist and distcheck make rules to work. Instead of all that hair, we now simply generate our distributed files (now including ltmain.sh) with make rules -- and since automake creates make variables for all AC_SUBSTs, that is really easy. The code looks a lot more like automake and autoconf Makefile.ams now, and doesn't have all the rough edges the earlier hacky solution suffered from. We still generate libtool from config.status, but that is not a distributed file, and doesn't break the golden rule. Besides, there is way more going on there than a bunch of substitutions: * Makefile.am (edit): New common sed substitutions for files now generated by make instead of config.status. (CLEANFILES): Clean new tmp files. (EXTRA_DIST): Add ltmain.sh. (vcl-tmp): Reinstated. (m4/ltversion.m4, config/ltmain.sh): New rules. Generate from here instead of config.status. (libtoolize): Ditto. (libtool): Call config.status to regenerate if necessary. (dist-hook): Removed. * config/ltmain.in: Moved here from top_srcdir. * README-alpha: Update instructions to check AS_SHELL_SANITIZE is up to date. * bootstrap: Rewritten. Generate m4/ltversion.m4 and config/ltmain.sh because configure depends on them. * configure.ac (AC_CONFIG_SRCDIR): Use libtoolize.in now that ltmain.in has moved. (AC_CONFIG_FILES): Don't generate distributed files, config/ltmain.sh and libtoolize from config.status. We have make rules to do that now.
2004-07-31 07:02:39 +08:00
AC_CONFIG_SRCDIR([libtoolize.in])
* bootstrap: Rewritten to use autoreconf. * config.guess, config.sub, mkstamp: Moved from here... * config/config.guess, config/config.sub, config/mkstamp: ...to here, respectively. * libtool.m4, ltdl.m4: Moved from here... * m4/libtool.m4, m4/ltdl.m4: ...to here, respectively. * configure.ac: Removed various acinclude.m4 hackery, as these files are no longer needed with automake 1.8. * Makefile.am: Removed various acinclude.m4 hackery, as these files are no longer needed with automake 1.8. (AUTOMAKE_OPTIONS): Require CVS automake. (CONF_SUBDIRS, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, FFLAGS, FLIBS): Automake now makes a Make variable from every AC_SUBST, so these are NOP. (aclocal_macros): These files are now in their own m4 subdir. Changed all clients. (EXTRA_DIST): mkstamp has moved to the new config subdir. Changed all clients. (pkgdata_SCRIPTS): Ditto wrt config.guess and config.sub. (pkgdata_DATA): Ditto wrt ltmain.sh. * f77demo/configure.ac, libltdl/configure.ac (AM_CONFIG_HEADER): Is deprecated in favour of AC_CONFIG_HEADERS. Updated to the latter. * Makefile.am, cdemo/Makefile.am, demo/Makefile.am, depdemo/Makefile.am, f77demo/Makefile.am, mdemo/Makefile.am, mdemo2/Makefile.am, pdemo/Makefile.am, tagdemo/Makefile.am (EXTRA_DIST): Remove acinclude.m4. (ACLOCAL_AMFLAGS): Search new `m4' macro directory. * configure.ac, cdemo/configure.ac, demo/configure.ac, depdemo/configure.ac, f77demo/configure.ac, mdemo/configure.ac, mdemo2/configure.ac, pdemo/configure.ac, tagdemo/configure.ac (AC_CONFIG_AUX_DIR): Declare that config helper scripts are now kept in the new config subdir. * libltdl/configure.ac (AC_CONFIG_AUX_DIR): Removed. Defaults to `.' anyway.
2003-09-25 19:22:29 +08:00
AC_CONFIG_AUX_DIR([config])
## ------------------------ ##
## Autotest initialisation. ##
## ------------------------ ##
dnl AC_CONFIG_TESTDIR([tests])
dnl AC_CONFIG_FILES([tests/atlocal])
Refactor all the test case common code into shell functions in tests/defs, and move the various demo directories out of $top_srcdir, and into tests too. The refactoring showed up a number of inconsistencies and latent bugs, as well as fixing (I think!!) the long-standing annoyance with some of the tests giving spurious failures intermittently. While I was here, emacs kindly removed a lot of bogus whitespace and added copyright notices for us: * cdemo, demo, depdemo, f77demo, mdemo, mdemo2, pdemo, tagdemo: Moved from here... * tests/cdemo, tests/demo, tests/depdemo, tests/f77demo, tests/mdemo, tests/mdemo2, tests/pdemo, tests/tagdemo: ...to here. * tests/defs: Factor much common functionality from the test scripts into shell functions. Added a copyright notice. * tests/assign.test, tests/cdemo-conf.test, tests/cdemo-exec.test, tests/cdemo-make.test, tests/cdemo-shared.test, tests/cdemo-static.test, tests/demo-conf.test, tests/demo-deplibs.test, tests/demo-exec.test, tests/demo-inst.test, tests/demo-make.test, tests/demo-nofast.test, tests/demo-nopic.test, tests/demo-pic.test, tests/demo-shared.test, tests/demo-static.test, tests/demo-unst.test, tests/depdemo-conf.test, tests/depdemo-exec.test, tests/depdemo-inst.test, tests/depdemo-make.test, tests/depdemo-nofast.test, tests/depdemo-shared.test, tests/depdemo-static.test, tests/depdemo-unst.test, tests/f77demo-conf.test, tests/f77demo-exec.test, tests/f77demo-make.test, tests/f77demo-shared.test, tests/f77demo-static.test, tests/link-2.test, tests/link.test, tests/mdemo-conf.test, tests/mdemo-exec.test, tests/mdemo-inst.test, tests/mdemo-make.test, tests/mdemo-shared.test, tests/mdemo-static.test, tests/mdemo-unst.test, tests/mdemo2-conf.test, tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test, tests/pdemo-exec.test, tests/pdemo-inst.test, tests/pdemo-make.test, tests/pdemo-unst.test, tests/quote.test, tests/sh.test, tests/suffix.test, tests/tagdemo-conf.test, tests/tagdemo-exec.test, tests/tagdemo-make.test, tests/tagdemo-shared.test, tests/tagdemo-static.test: Refactored to use new functions in tests/defs. Added a copyright notice. * tests/hardcode.test, noinst-link.test, tests/relink.test, tests/relink.test, tests/mdryrun.test: Ditto. Moved from here... * tests/demo-hardcode.test, demo-noinst-link.test, tests/demo-relink.test, tests/depdemo-relink.test, tests/mdemo-dryrun.test: ...to here respectively. * Makefile.am: Added a copyright notice. * tests/sh.test: Check libtoolize.in for non-portabilities too. * libtoolize.in: Fix non-portabilities found by tests/sh.test.
2003-10-15 05:45:03 +08:00
## ---------------------------------------- ##
## Display a configure time version banner. ##
## ---------------------------------------- ##
# Calculating the previous version is somewhat involved, so do it once
# here, and SUBST the result for the maintainer release rules. The
# versioning scheme we use is described here:
# http://www.gnu.org/software/libtool/contribute.html
# First we break the version number up into its constituent parts.
lt_major=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
lt_minor=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
lt_micro=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
lt_alpha=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`
test "$lt_minor" = "AC_PACKAGE_VERSION" && lt_minor=0
test "$lt_micro" = "AC_PACKAGE_VERSION" && lt_micro=""
# Then we try to work out what the release before this one would have been
# numbered. The only time we come unstuck is when this is the first release
# from a stable branch (lt_micro=lt_alpha=""), so LASTRELEASE is the last
# release from the old stable branch, and we don't know what version that
# was, so leave it unset so that the Makefile can complain.
case $lt_alpha in
[[ab]])
case $lt_micro in
[.[01]])
LASTRELEASE="$lt_major.$lt_minor" ;;
*)
LASTRELEASE="$lt_major.$lt_minor$lt_micro" ;;
esac
;;
[[cegikmoqsuwy]])
LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'c-y' 'b-w'` ;;
[[dfhjlnprtvxz]])
LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'd-z' 'b-x'` ;;
*) # No lt_alpha component
case $lt_micro in
.0)
LASTRELEASE="" ;;
.1)
LASTRELEASE="$lt_major.$lt_minor" ;;
.*)
lt_micro_value=`echo $lt_micro | sed 's,^\.,,'`
LASTRELEASE="$lt_major.$lt_minor.`expr $lt_micro_value - 1`" ;;
*)
LASTRELEASE="" ;;
esac
;;
esac
AC_SUBST([LASTRELEASE])
# This is a sanity check so we can see which version is used in bug reports.
# It is assumed that we only want to see the date extension for cvs libtool
# versions (i.e. "odd" letters) and not actual alpha releases.
TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog`
package_revision=`( set $TIMESTAMP; echo $1; )`
case $lt_alpha in
[[bdfhjlnprtvxz]])
TIMESTAMP=
;;
esac
AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+" (Build:$TIMESTAMP)"} AC_PACKAGE_VERSION])
echo
AC_SUBST([TIMESTAMP])
AC_SUBST([package_revision])
## ------------------------ ##
## Automake Initialisation. ##
## ------------------------ ##
dnl These are bootstrap requirements, once built, libtool may work with
dnl much older releases of autoconf and automake. See release notes.
AM_INIT_AUTOMAKE([1.8 gnits dist-bzip2]) ## We use auto-m4_including
dnl We use m4sh to generate libtool's portable shell scripts
AC_SUBST([M4SH], ['autom4te -l m4sh'])
dnl Make sure config.status is regenerated when the version timestamp changes
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_builddir)/stamp-vcl'])
## ------------------------------- ##
## Libtool specific configuration. ##
## ------------------------------- ##
pkgdatadir='${datadir}'"/${PACKAGE}"
AC_SUBST([pkgdatadir]) # automake does not need this, but libtoolize does
1997-04-02 02:29:23 +08:00
aclocaldir='${datadir}/aclocal'
AC_SUBST([aclocaldir])
AC_ARG_ENABLE(ltdl-install,
[AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
if test x"${enable_ltdl_install+set}" != xset; then
enable_ltdl_install=yes
fi
# All subdirectories that are configured on demand, but that must be
# included in the distribution. This substitution is for tests/Makefile.am,
# so the directory names are relative to that directory.
CONF_SUBDIRS="cdemo demo depdemo f77demo mdemo mdemo2 pdemo tagdemo"
AC_SUBST([CONF_SUBDIRS])
DIST_MAKEFILE_LIST=
for dir in $CONF_SUBDIRS; do
DIST_MAKEFILE_LIST="${DIST_MAKEFILE_LIST}tests/$dir/Makefile "
done
AC_SUBST([DIST_MAKEFILE_LIST])
## ---------------- ##
## compiler checks. ##
## ---------------- ##
1997-04-02 02:29:23 +08:00
# Need to be sure that we have a working C compiler, otherwise even with
# a good C compiler: if the following C++ tests fail, the whole libtool
# build fails!
AC_PROG_CC
AC_PROG_CPP
# The Autoconf tests for C++ and Fortran 77 sometimes call AC_MSG_ERROR
# and we don't want that to be an error whilst creating the libtool script.
# As these are AC_REQUIREd inside libtool.m4 we can simply call them here
# and catch the errors now.
pushdef([AC_MSG_ERROR], [caught_CXX_error=yes])
AC_PROG_CXX
AC_PROG_CXXCPP
popdef([AC_MSG_ERROR])
pushdef([AC_MSG_ERROR], [caught_F77_error=yes])
AC_PROG_F77
popdef([AC_MSG_ERROR])
## ----------------------- ##
## Libtool initialisation. ##
## ----------------------- ##
LT_INIT([dlopen win32-dll])
The Grand Renaming. In preparation for libtool-2.0, move all of the many and varied m4 symbols accumulated by libtool over the years, considering also that modern autoconf can detect unexpanded macros even without AC in the macro name: * bootstrap: Remove libltdl/config.h from previous releases. * m4/libtool.m4, m4/ltdl.m4, doc/libtool.texi: Basically, run a giant sed transformation like this: s,AC_LIB_LTDL,LTDL_INIT,g s,AC_LIBLTDL_CONVENIENCE,LTDL_CONVENIENCE,g s,AC_LIBLTDL_INSTALLABLE,LTDL_INSTALLABLE,g s,AC_WITH_LTDL,LT_WITH_LTDL,g s,AC_LTDL_ENABLE_INSTALL,_LT_ENABLE_INSTALL,g s,AC_DEPLIBS_CHECK_METHOD,_LT_CHECK_MAGIC_METHOD,g s,AC_LIBTOOL_OBJDIR,_LT_CHECK_OBJDIR,g s,AC_LTDL_OBJDIR,_LT_CHECK_OBJDIR,g s,AC_LTDL_DLPREOPEN,_LT_CHECK_DLPREOPEN,g s,AC_LIBTOOL_SYS_MAX_CMD_LEN,LT_CMD_MAX_LEN,g s,AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE,_LT_CMD_GLOBAL_SYMBOLS,g s,AC_LIBTOOL_SYS_OLD_ARCHIVE,_LT_CMD_OLD_ARCHIVE,g s,AC_PROG_LD_RELOAD_FLAG,_LT_CMD_RELOAD,g s,AC_LIBTOOL_SYS_LIB_STRIP,_LT_CMD_STRIPLIB,g s,AC_CHECK_LIBM,LT_LIB_M,g s,AC_LTDL_DLLIB,LT_LIB_DLLOAD,g s,AC_LIBTOOL_COMPILER_OPTION,_LT_COMPILER_OPTION,g s,AC_LIBTOOL_PROG_CC_C_O,_LT_COMPILER_C_O,g s,AC_LIBTOOL_PROG_COMPILER_NO_RTTI,_LT_COMPILER_NO_RTTI,g s,AC_LIBTOOL_PROG_COMPILER_PIC,_LT_COMPILER_PIC,g s,AC_LIBTOOL_SYS_HARD_LINK_LOCKS,_LT_COMPILER_FILE_LOCKS,g s,AC_LTDL_DLSYM_USCORE,LT_FUNC_DLSYM_USCORE,g s,AC_LIBTOOL_LINKER_OPTION,_LT_LINKER_OPTION,g s,AC_LIBTOOL_PROG_LD_SHLIBS,_LT_LINKER_SHLIBS,g s,AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH,_LT_LINKER_HARDCODE_LIBPATH,g s,AC_PATH_MAGIC,_LT_PATH_MAGIC,g s,AC_PATH_TOOL_PREFIX,_LT_PATH_TOOL_PREFIX,g s,AC_PROG_LD,LT_PATH_LD,g s,AC_PROG_LD_GNU,_LT_PATH_LD_GNU,g s,AC_PROG_NM,LT_PATH_NM,g s,AC_LTDL_SYS_DLOPEN_DEPLIBS,LT_SYS_DLOPEN_DEPLIBS,g s,AC_LIBTOOL_DLOPEN_SELF,LT_SYS_DLOPEN_SELF,g s,AC_LIBTOOL_POSTDEP_PREDEP,_LT_SYS_HIDDEN_LIBDEPS,g s,AC_LTDL_SYSSEARCHPATH,LT_SYS_DLSEARCH_PATH,g s,AC_LTDL_SHLIBEXT,LT_SYS_MODULE_EXT,g s,AC_LTDL_SHLIBPATH,LT_SYS_MODULE_PATH,g s,AC_LTDL_SYMBOL_USCORE,LT_SYS_SYMBOL_USCORE,g s,AC_LIBTOOL_SYS_DYNAMIC_LINKER,_LT_SYS_DYNAMIC_LINKER,g s,_LT_AC_TAGVAR,_LT_TAGVAR,g s,_LT_AC_SYS_COMPILER,_LT_TAG_COMPILER,g s,_LT_AC_PROG_ECHO_BACKSLASH,_LT_PROG_ECHO_BACKSLASH,g s,_LT_AC_SYS_LIBPATH_AIX,_LT_SYS_MODULE_PATH_AIX,g s,_LT_AC_SHELL_INIT,_LT_SHELL_INIT,g s,_LT_AC_LOCK,_LT_ENABLE_LOCK,g s,_LT_AC_CHECK_DLFCN,_LT_HEADER_DLFCN,g s,_LT_AC_TRY_DLOPEN_SELF,_LT_TRY_DLOPEN_SELF,g s,LT_AC_PROG_EGREP,_LT_DECL_EGREP,g s,LT_AC_PROG_SED,_LT_DECL_SED,g * doc/libtool.texi (Autoconf macros): Document exported macros. * libtoolize.in: Compare ltdl.m4 serial numbers for LTDL_INIT instead of newly obsoleted AC_LIB_LTDL. (func_scan_files): Also set seen_ltdl for LTDL_INIT and LT_WITH_LTDL. * libltdl/ltdl.c (lt_dlforeachfile): LT_SYS_LIBSEARCH_PATH is not an environment variable, it is an actual path. Reported by Noah Mish <noah@cs.caltech.edu>
2004-08-23 06:02:07 +08:00
LTDL_INIT
# Enable all the language support we can
LT_LANG(C++)
LT_LANG(Fortran 77)
LT_LANG(Java)
LT_LANG(Windows Resource)
## --------------------------- ##
## Work out which tests to run ##
## --------------------------- ##
AM_CONDITIONAL(HAVE_CXX,
[test "X$caught_CXX_error" != "Xyes" &&
The Grand Renaming. In preparation for libtool-2.0, move all of the many and varied m4 symbols accumulated by libtool over the years, considering also that modern autoconf can detect unexpanded macros even without AC in the macro name: * bootstrap: Remove libltdl/config.h from previous releases. * m4/libtool.m4, m4/ltdl.m4, doc/libtool.texi: Basically, run a giant sed transformation like this: s,AC_LIB_LTDL,LTDL_INIT,g s,AC_LIBLTDL_CONVENIENCE,LTDL_CONVENIENCE,g s,AC_LIBLTDL_INSTALLABLE,LTDL_INSTALLABLE,g s,AC_WITH_LTDL,LT_WITH_LTDL,g s,AC_LTDL_ENABLE_INSTALL,_LT_ENABLE_INSTALL,g s,AC_DEPLIBS_CHECK_METHOD,_LT_CHECK_MAGIC_METHOD,g s,AC_LIBTOOL_OBJDIR,_LT_CHECK_OBJDIR,g s,AC_LTDL_OBJDIR,_LT_CHECK_OBJDIR,g s,AC_LTDL_DLPREOPEN,_LT_CHECK_DLPREOPEN,g s,AC_LIBTOOL_SYS_MAX_CMD_LEN,LT_CMD_MAX_LEN,g s,AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE,_LT_CMD_GLOBAL_SYMBOLS,g s,AC_LIBTOOL_SYS_OLD_ARCHIVE,_LT_CMD_OLD_ARCHIVE,g s,AC_PROG_LD_RELOAD_FLAG,_LT_CMD_RELOAD,g s,AC_LIBTOOL_SYS_LIB_STRIP,_LT_CMD_STRIPLIB,g s,AC_CHECK_LIBM,LT_LIB_M,g s,AC_LTDL_DLLIB,LT_LIB_DLLOAD,g s,AC_LIBTOOL_COMPILER_OPTION,_LT_COMPILER_OPTION,g s,AC_LIBTOOL_PROG_CC_C_O,_LT_COMPILER_C_O,g s,AC_LIBTOOL_PROG_COMPILER_NO_RTTI,_LT_COMPILER_NO_RTTI,g s,AC_LIBTOOL_PROG_COMPILER_PIC,_LT_COMPILER_PIC,g s,AC_LIBTOOL_SYS_HARD_LINK_LOCKS,_LT_COMPILER_FILE_LOCKS,g s,AC_LTDL_DLSYM_USCORE,LT_FUNC_DLSYM_USCORE,g s,AC_LIBTOOL_LINKER_OPTION,_LT_LINKER_OPTION,g s,AC_LIBTOOL_PROG_LD_SHLIBS,_LT_LINKER_SHLIBS,g s,AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH,_LT_LINKER_HARDCODE_LIBPATH,g s,AC_PATH_MAGIC,_LT_PATH_MAGIC,g s,AC_PATH_TOOL_PREFIX,_LT_PATH_TOOL_PREFIX,g s,AC_PROG_LD,LT_PATH_LD,g s,AC_PROG_LD_GNU,_LT_PATH_LD_GNU,g s,AC_PROG_NM,LT_PATH_NM,g s,AC_LTDL_SYS_DLOPEN_DEPLIBS,LT_SYS_DLOPEN_DEPLIBS,g s,AC_LIBTOOL_DLOPEN_SELF,LT_SYS_DLOPEN_SELF,g s,AC_LIBTOOL_POSTDEP_PREDEP,_LT_SYS_HIDDEN_LIBDEPS,g s,AC_LTDL_SYSSEARCHPATH,LT_SYS_DLSEARCH_PATH,g s,AC_LTDL_SHLIBEXT,LT_SYS_MODULE_EXT,g s,AC_LTDL_SHLIBPATH,LT_SYS_MODULE_PATH,g s,AC_LTDL_SYMBOL_USCORE,LT_SYS_SYMBOL_USCORE,g s,AC_LIBTOOL_SYS_DYNAMIC_LINKER,_LT_SYS_DYNAMIC_LINKER,g s,_LT_AC_TAGVAR,_LT_TAGVAR,g s,_LT_AC_SYS_COMPILER,_LT_TAG_COMPILER,g s,_LT_AC_PROG_ECHO_BACKSLASH,_LT_PROG_ECHO_BACKSLASH,g s,_LT_AC_SYS_LIBPATH_AIX,_LT_SYS_MODULE_PATH_AIX,g s,_LT_AC_SHELL_INIT,_LT_SHELL_INIT,g s,_LT_AC_LOCK,_LT_ENABLE_LOCK,g s,_LT_AC_CHECK_DLFCN,_LT_HEADER_DLFCN,g s,_LT_AC_TRY_DLOPEN_SELF,_LT_TRY_DLOPEN_SELF,g s,LT_AC_PROG_EGREP,_LT_DECL_EGREP,g s,LT_AC_PROG_SED,_LT_DECL_SED,g * doc/libtool.texi (Autoconf macros): Document exported macros. * libtoolize.in: Compare ltdl.m4 serial numbers for LTDL_INIT instead of newly obsoleted AC_LIB_LTDL. (func_scan_files): Also set seen_ltdl for LTDL_INIT and LT_WITH_LTDL. * libltdl/ltdl.c (lt_dlforeachfile): LT_SYS_LIBSEARCH_PATH is not an environment variable, it is an actual path. Reported by Noah Mish <noah@cs.caltech.edu>
2004-08-23 06:02:07 +08:00
test -n "[$]_LT_TAGVAR(compiler, CXX)"])
AM_CONDITIONAL(HAVE_F77,
[test "X$caught_F77_error" != "Xyes" &&
The Grand Renaming. In preparation for libtool-2.0, move all of the many and varied m4 symbols accumulated by libtool over the years, considering also that modern autoconf can detect unexpanded macros even without AC in the macro name: * bootstrap: Remove libltdl/config.h from previous releases. * m4/libtool.m4, m4/ltdl.m4, doc/libtool.texi: Basically, run a giant sed transformation like this: s,AC_LIB_LTDL,LTDL_INIT,g s,AC_LIBLTDL_CONVENIENCE,LTDL_CONVENIENCE,g s,AC_LIBLTDL_INSTALLABLE,LTDL_INSTALLABLE,g s,AC_WITH_LTDL,LT_WITH_LTDL,g s,AC_LTDL_ENABLE_INSTALL,_LT_ENABLE_INSTALL,g s,AC_DEPLIBS_CHECK_METHOD,_LT_CHECK_MAGIC_METHOD,g s,AC_LIBTOOL_OBJDIR,_LT_CHECK_OBJDIR,g s,AC_LTDL_OBJDIR,_LT_CHECK_OBJDIR,g s,AC_LTDL_DLPREOPEN,_LT_CHECK_DLPREOPEN,g s,AC_LIBTOOL_SYS_MAX_CMD_LEN,LT_CMD_MAX_LEN,g s,AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE,_LT_CMD_GLOBAL_SYMBOLS,g s,AC_LIBTOOL_SYS_OLD_ARCHIVE,_LT_CMD_OLD_ARCHIVE,g s,AC_PROG_LD_RELOAD_FLAG,_LT_CMD_RELOAD,g s,AC_LIBTOOL_SYS_LIB_STRIP,_LT_CMD_STRIPLIB,g s,AC_CHECK_LIBM,LT_LIB_M,g s,AC_LTDL_DLLIB,LT_LIB_DLLOAD,g s,AC_LIBTOOL_COMPILER_OPTION,_LT_COMPILER_OPTION,g s,AC_LIBTOOL_PROG_CC_C_O,_LT_COMPILER_C_O,g s,AC_LIBTOOL_PROG_COMPILER_NO_RTTI,_LT_COMPILER_NO_RTTI,g s,AC_LIBTOOL_PROG_COMPILER_PIC,_LT_COMPILER_PIC,g s,AC_LIBTOOL_SYS_HARD_LINK_LOCKS,_LT_COMPILER_FILE_LOCKS,g s,AC_LTDL_DLSYM_USCORE,LT_FUNC_DLSYM_USCORE,g s,AC_LIBTOOL_LINKER_OPTION,_LT_LINKER_OPTION,g s,AC_LIBTOOL_PROG_LD_SHLIBS,_LT_LINKER_SHLIBS,g s,AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH,_LT_LINKER_HARDCODE_LIBPATH,g s,AC_PATH_MAGIC,_LT_PATH_MAGIC,g s,AC_PATH_TOOL_PREFIX,_LT_PATH_TOOL_PREFIX,g s,AC_PROG_LD,LT_PATH_LD,g s,AC_PROG_LD_GNU,_LT_PATH_LD_GNU,g s,AC_PROG_NM,LT_PATH_NM,g s,AC_LTDL_SYS_DLOPEN_DEPLIBS,LT_SYS_DLOPEN_DEPLIBS,g s,AC_LIBTOOL_DLOPEN_SELF,LT_SYS_DLOPEN_SELF,g s,AC_LIBTOOL_POSTDEP_PREDEP,_LT_SYS_HIDDEN_LIBDEPS,g s,AC_LTDL_SYSSEARCHPATH,LT_SYS_DLSEARCH_PATH,g s,AC_LTDL_SHLIBEXT,LT_SYS_MODULE_EXT,g s,AC_LTDL_SHLIBPATH,LT_SYS_MODULE_PATH,g s,AC_LTDL_SYMBOL_USCORE,LT_SYS_SYMBOL_USCORE,g s,AC_LIBTOOL_SYS_DYNAMIC_LINKER,_LT_SYS_DYNAMIC_LINKER,g s,_LT_AC_TAGVAR,_LT_TAGVAR,g s,_LT_AC_SYS_COMPILER,_LT_TAG_COMPILER,g s,_LT_AC_PROG_ECHO_BACKSLASH,_LT_PROG_ECHO_BACKSLASH,g s,_LT_AC_SYS_LIBPATH_AIX,_LT_SYS_MODULE_PATH_AIX,g s,_LT_AC_SHELL_INIT,_LT_SHELL_INIT,g s,_LT_AC_LOCK,_LT_ENABLE_LOCK,g s,_LT_AC_CHECK_DLFCN,_LT_HEADER_DLFCN,g s,_LT_AC_TRY_DLOPEN_SELF,_LT_TRY_DLOPEN_SELF,g s,LT_AC_PROG_EGREP,_LT_DECL_EGREP,g s,LT_AC_PROG_SED,_LT_DECL_SED,g * doc/libtool.texi (Autoconf macros): Document exported macros. * libtoolize.in: Compare ltdl.m4 serial numbers for LTDL_INIT instead of newly obsoleted AC_LIB_LTDL. (func_scan_files): Also set seen_ltdl for LTDL_INIT and LT_WITH_LTDL. * libltdl/ltdl.c (lt_dlforeachfile): LT_SYS_LIBSEARCH_PATH is not an environment variable, it is an actual path. Reported by Noah Mish <noah@cs.caltech.edu>
2004-08-23 06:02:07 +08:00
test -n "[$]_LT_TAGVAR(compiler, F77)"])
AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"])
AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
## -------- ##
## Outputs. ##
## -------- ##
AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
This pervasive changeset makes two intertwined deep changes to the operation of libtool (neither would work alone). First, there is a new feature that allows libraries to preopen modules. This entails a backwards incompatible change to the libltdl API for separating out the preloaded symbol lists by owner. Second, in the tradition of "eating our own dogfood", libltdl now preloads its own dlloaders. The internal API for dlloaders has also had to change in a backwards incompatible way in support of the new library preloading feature. If you don't use preloaded libraries, you needn't change your project sources, though you will need to recompile against the new libltdl. The API changes are mostly confined to dlloaders, so you probably needn't worry about those (unless you have written a custom loader that you want libltdl to use): * configure.ac (AC_CONFIG_FILES): Add libltdl/loaders/Makefile. * libltdl/configure.ac (AC_CONFIG_FILES): Add loaders/Makefile. * libltdl/loaders: New directory for module loaders, to simplify Makefile rules, and to give the loaders themselves names that are unique in the first few characters. * libtoolize.in (func_copy_all_files): Copy recursively to pick up the loaders directory contents. * libltdl/loaders/Makefile.am: New file. Move module building rules to here... * libltdl/Makefile.am: ...from here. (VERSION_INFO): Bumped version info to signify interface changes. (libltdl_la_CPPFLAGS, libltdlc_la_CPPFLAGS): Set LTDLOPEN appropriately for each library. * libltdl/loader-dld_link.c, libltdl/loader-dlopen.c, libltdl/loader-dyld.c, libltdl/loader-load_add_on.c, libltdl/loader-loadlibrary.c libltdl/loader-preopen.c, libltdl/loader-shl_load.c: Moved from here... * libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: ...to here. (get_vtable): New entry function for each. * libltdl/loaders/preopen.c (lt_dlsymlists_t): Replaced by... (symlist_chain): ...a new structure which maps lists of preloaded symbols from the object that loads them. (lt_dlpreload_open): New function to automatically open all preloaded modules belonging to a named object (ORIGINATOR). * libltdl/lt__alloc.c (lt__zalloc): New function to return a block of zeroed out new memory. * libltdl/lt__alloc.h (lt__zalloc): Prototype it. * libltdl/lt__private.h (lt__alloc_die_callback): Add missing prototype. (lt__error_strings): Make this opaque to callers. * libltdl/lt_error.c (lt__error_strings): Move the implementation to here. * libltdl/lt_dlloader.h (lt_user_dlloader): Add extra fields to make originator focused preloading possible. *BREAKS BACKWARDS COMPATIBILITY* (lt_dlloader_add): Take advantage of new fields to simplify paramater list. * libltdl/lt_system.h (LT_STR): New ANSI stringification macro. (LT_CONC): Fix it to work from within macros. * libltdl/ltdl.c (loader_init, loader_init_callback): Simplify dlloader loading. (get_vtable, preloaded_symbols): Point these at the preopen.c symbols to bootstrap the loader chain. (lt_dlinit): Load the preopen dlloader manually, and then use it to load any other preloaded dlloaders. (lt_dlloader_add): Simplify parameter list. Populate new fields. Chain new loaders according to priority field. * libltdl/ltdl.h (lt_dlsymlist): Add a new originator field. (lt_dlpreload_callback_func): Type of a callback for automatic lt_dlpreload_open loading. (LTDL_SET_PRELOADED_SYMBOLS): Adjust to hook into preloaded symbols from the "@PROGRAM@" originator. * tests/demo/dlmain.c (main): Use mangled preloaded_symbols symbol. * tests/pdemo/longer_file_name_dlmain.c (main): Ditto. * ltmain.in: Don't spew spurious warnings when dlopening and dlpreopening modules. (func_generate_dlsyms): Factored out from multiple copies in the rest of the code. Generate originator keyed symbol lists. (func_extract_archives): Also factored. Extract the contents of convenience archives for linking with dependent libraries when --whole-archive is not available. [darwin]: Don't try to link $old_library unless it exists, and $lib is a bundle. * m4/ltdl.m4 (AC_LTDL_DLLIB): Check for all possible dynamic loading libraries/apis rather that stopping when an acceptable one is discovered. (LT_DLLOADERS): New variable for holding dlloaders that can be preloaded. * doc/libtool.texi: Document interface changes. * NEWS: Updated.
2004-07-15 20:14:48 +08:00
doc/Makefile tests/Makefile])
AC_OUTPUT