* libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE):

new macros
* NEWS: ditto
* libltdl/configure.in: if none of the new macros or configure
arguments are used, warn and build convenience library only
* libltdl/Makefile.am: conditionally build convenience libltdl.la
* mdemo/configure.in: use AC_LIBLTDL_CONVENIENCE
* mdemo/Makefile.am: refer to @LIBLTDL@
This commit is contained in:
Alexandre Oliva 1999-03-09 22:02:09 +00:00 committed by Alexandre Oliva
parent 2eeb030d23
commit 68799c0077
7 changed files with 72 additions and 7 deletions

View File

@ -1,3 +1,14 @@
1999-03-09 Alexandre Oliva <oliva@dcc.unicamp.br>
* libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE):
new macros
* NEWS: ditto
* libltdl/configure.in: if none of the new macros or configure
arguments are used, warn and build convenience library only
* libltdl/Makefile.am: conditionally build convenience libltdl.la
* mdemo/configure.in: use AC_LIBLTDL_CONVENIENCE
* mdemo/Makefile.am: refer to @LIBLTDL@
1999-03-09 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* NEWS: updated.

2
NEWS
View File

@ -1,6 +1,8 @@
NEWS - list of user-visible changes between releases of GNU Libtool
New in 1.2e: CVS version; 1.2f: 1999-?-?, Libtool team:
* New AC_LIBLTDL_CONVENIENCE and AC_LIBLTDL_INSTALLABLE macros, to select
convenience and/or installable versions of libltdl.
* In order for libtool to attempt to link a shared library (dll) on win32
platforms, you must pass the -no-undefined flag to libtool in link mode.
* The path to GNU ld now works on cygwin-b18 to cygwin-b20.2 at least.

View File

@ -10,7 +10,9 @@ else
noinst_HEADERS = ltdl.h
endif
if CONVENIENCE_LTDL
noinst_LTLIBRARIES = libltdl.la
endif
libltdl_la_SOURCES = ltdl.c
libltdl_la_LIBADD = $(LIBADD_DL)

View File

@ -9,16 +9,25 @@ AM_MAINTAINER_MODE
TOINST=toinst
AC_SUBST(TOINST)
if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
AC_MSG_WARN([*** Neither AC_LIBLTDL_INSTALLABLE nor AC_LIBLTDL_CONVENIENCE wre used])
AC_MSG_WARN([*** in configure.in; building convenience library for backward])
AC_MSG_WARN([*** compatibility. This is deprecated, and will not work in the future])
enable_ltdl_convenience=yes
fi
AC_ARG_ENABLE(ltdl-install,
[--enable-ltdl-install install libltdl])
AM_CONDITIONAL(INSTALL_LTDL, test x$enable_ltdl_install = xyes)
if test x$enable_ltdl_install = xyes; then
if test x"$enable_ltdl_install" != xno; then
LIBLIBS=$TOINST/libltdl.la
else
LIBLIBS=
fi
AC_SUBST(LIBLIBS)
AM_CONDITIONAL(INSTALL_LTDL, test x"$enable_ltdl_install" != xno)
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"$enable_ltdl_convenience" != xno)
AC_PROG_CC
AC_C_CONST
AC_C_INLINE

34
libtool.m4 vendored
View File

@ -21,7 +21,7 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 32 AC_PROG_LIBTOOL
# serial 33 AC_PROG_LIBTOOL
AC_DEFUN(AC_PROG_LIBTOOL,
[AC_PREREQ(2.12.2)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
@ -601,6 +601,38 @@ AC_CHECK_LIB(mw, _mwvalidcheckl)
AC_CHECK_LIB(m, cos)
])
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library, adds --enable-ltdl-convenience to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
ac_configure_args="$ac_configure_args --enable-ltdl-convenience"
])
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library, and adds --enable-ltdl-install to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [
AC_CHECK_LIB(ltdl, main, LIBLTDL="-lltdl", [
enable_ltdl_install=yes
ac_configure_args="$ac_configure_args --enable-ltdl-install"
])
if test x"$enable_ltdl_install" = x"yes"; then
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/toinst/libltdl.la
fi
])
dnl old names
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl

View File

@ -18,9 +18,11 @@ noinst_HEADERS = foo.h
bin_PROGRAMS = mdemo mdemo.static
../libltdl/libltdl.la: ../libtool ../libltdl/libtool \
## use @LIBLTDL@ because some broken makes do not accept macros in targets
## we can only do this because our LIBLTDL does not contain ${top_builddir}
@LIBLTDL@: ../libtool ../libltdl/libtool \
$(srcdir)/../libltdl/ltdl.c $(srcdir)/../libltdl/ltdl.h
(cd ../libltdl; $(MAKE) libltdl.la)
(cd ../libltdl; $(MAKE) `echo $(LIBLTDL) | sed 's,.*\.\./libltdl/,,g'`)
# Without the following line, the check may fail if libltdl/libtool is
# removed after libltdl is configured
../libltdl/libtool:
@ -30,9 +32,9 @@ mdemo_SOURCES = main.c
mdemo_LDFLAGS = -export-dynamic ## FIXME: remove this when libtool and libltdl
## handle dependencies of modules
## The quotes around -dlopen below fool automake into accepting it
mdemo_LDADD = ../libltdl/libltdl.la "-dlopen" self \
mdemo_LDADD = @LIBLTDL@ "-dlopen" self \
"-dlopen" foo1.la "-dlopen" libfoo2.la
mdemo_DEPENDENCIES = ../libltdl/libltdl.la foo1.la libfoo2.la
mdemo_DEPENDENCIES = @LIBLTDL@ foo1.la libfoo2.la
# Create a statically linked version of mdemo.
mdemo_static_SOURCES = $(mdemo_SOURCES)

View File

@ -8,6 +8,13 @@ AC_EXEEXT
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
dnl AC_LIBLTDL_CONVENIENCE(['${top_builddir}/../libltdl'])
dnl Since the package is flat, we need not use the line above,
dnl and not having macros in LIBLTDL allows us to build LIBLTDL
dnl on demand even with broken makes
AC_LIBLTDL_CONVENIENCE(../libltdl)
AC_SUBST(LIBLTDL)
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
STATIC=-static
else