mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-18 14:16:00 +08:00
* configure.in (AC_CONFIG_SUBDIRS): add libltdl, demo, mdemo and
depdemo commented out, so that `dist' works before `check' (BUILD_LTDL): will contain libltdl if --enable-ltdl-install * Makefile.am (DIST_SUBDIRS): expand SUBDIRS and add depdemo, commented out (SUBDIRS): add $(BUILT_LTDL) * libltdl/Makefile.am (EXTRA_LTLIBRARIES): add libtest.la, the same as libltdl but always a convenience library. Not built by default. Both libraries now depend on the libtool script, that depends on ../libtool and is rebuilt when needed * mdemo/Makefile.am (mdemo, mdemo.debug): depend on and link with ../libltdl/libtest.la, that is rebuilt if needed (mdemo_LDADD): removed $(LIBADD_M), to avoid silent failures (foo1.la): renamed from libfoo1.la; test removing the lib prefix * mdemo/foo1.c: renamed libfoo1_LTX symbols to foo1_LTX * mdemo/main.c: don't include string.h nor math.h, nor refer to sin nor cos * tests/mdemo-exec.test: renamed libfoo1.la to foo1.la * tests/mdemo-inst.test: ditto
This commit is contained in:
parent
48fcf6a997
commit
fbd5377930
20
ChangeLog
20
ChangeLog
@ -1,5 +1,25 @@
|
|||||||
1999-01-10 Alexandre Oliva <oliva@dcc.unicamp.br>
|
1999-01-10 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||||
|
|
||||||
|
* configure.in (AC_CONFIG_SUBDIRS): add libltdl, demo, mdemo and
|
||||||
|
depdemo commented out, so that `dist' works before `check'
|
||||||
|
(BUILD_LTDL): will contain libltdl if --enable-ltdl-install
|
||||||
|
* Makefile.am (DIST_SUBDIRS): expand SUBDIRS and add depdemo,
|
||||||
|
commented out
|
||||||
|
(SUBDIRS): add $(BUILT_LTDL)
|
||||||
|
* libltdl/Makefile.am (EXTRA_LTLIBRARIES): add libtest.la, the
|
||||||
|
same as libltdl but always a convenience library. Not built by
|
||||||
|
default. Both libraries now depend on the libtool script, that
|
||||||
|
depends on ../libtool and is rebuilt when needed
|
||||||
|
* mdemo/Makefile.am (mdemo, mdemo.debug): depend on and link with
|
||||||
|
../libltdl/libtest.la, that is rebuilt if needed
|
||||||
|
(mdemo_LDADD): removed $(LIBADD_M), to avoid silent failures
|
||||||
|
(foo1.la): renamed from libfoo1.la; test removing the lib prefix
|
||||||
|
* mdemo/foo1.c: renamed libfoo1_LTX symbols to foo1_LTX
|
||||||
|
* mdemo/main.c: don't include string.h nor math.h, nor refer to
|
||||||
|
sin nor cos
|
||||||
|
* tests/mdemo-exec.test: renamed libfoo1.la to foo1.la
|
||||||
|
* tests/mdemo-inst.test: ditto
|
||||||
|
|
||||||
* libltdl/ltdl.c (FILENAME_MAX): use it instead of MAX_FILENAME,
|
* libltdl/ltdl.c (FILENAME_MAX): use it instead of MAX_FILENAME,
|
||||||
and don't redefine it if already defined; default to 1024, as on
|
and don't redefine it if already defined; default to 1024, as on
|
||||||
most systems
|
most systems
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
|
## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
|
||||||
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||||
AUTOMAKE_OPTIONS = gnits
|
AUTOMAKE_OPTIONS = gnits
|
||||||
SUBDIRS = . doc tests
|
SUBDIRS = . doc tests $(BUILD_LTDL)
|
||||||
DIST_SUBDIRS = $(SUBDIRS) demo libltdl mdemo
|
DIST_SUBDIRS = . doc tests libltdl demo mdemo # depdemo
|
||||||
|
|
||||||
# We need to export these variables when we run ltconfig.
|
# We need to export these variables when we run ltconfig.
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
|
12
configure.in
12
configure.in
@ -8,6 +8,16 @@ AC_SUBST(pkgdatadir)
|
|||||||
aclocaldir='${datadir}/aclocal'
|
aclocaldir='${datadir}/aclocal'
|
||||||
AC_SUBST(aclocaldir)
|
AC_SUBST(aclocaldir)
|
||||||
|
|
||||||
|
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
|
||||||
|
BUILD_LTDL=libltdl
|
||||||
|
else
|
||||||
|
BUILD_LTDL=
|
||||||
|
fi
|
||||||
|
AC_SUBST(BUILD_LTDL)
|
||||||
|
|
||||||
dnl Use the specified CC, RANLIB, and LD while running ltconfig.
|
dnl Use the specified CC, RANLIB, and LD while running ltconfig.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
@ -18,6 +28,8 @@ AC_PROG_LN_S
|
|||||||
dnl For the `lineno' script (which puts line numbers into `ltconfig').
|
dnl For the `lineno' script (which puts line numbers into `ltconfig').
|
||||||
AC_PROG_AWK
|
AC_PROG_AWK
|
||||||
|
|
||||||
|
AC_CONFIG_SUBDIRS(libltdl demo mdemo dnl #depdemo
|
||||||
|
)
|
||||||
AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
|
AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
|
@ -12,10 +12,20 @@ LTDL_FLAGS =
|
|||||||
noinst_HEADERS = ltdl.h
|
noinst_HEADERS = ltdl.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_LTLIBRARIES = libltdl.la
|
EXTRA_LTLIBRARIES = libltdl.la libtest.la
|
||||||
|
|
||||||
lib_LTLIBRARIES = @LIBLIBS@
|
lib_LTLIBRARIES = @LIBLIBS@
|
||||||
noinst_LTLIBRARIES = @NOINSTLIBS@
|
noinst_LTLIBRARIES = @NOINSTLIBS@
|
||||||
|
|
||||||
libltdl_la_SOURCES = ltdl.c
|
libltdl_la_SOURCES = ltdl.c
|
||||||
libltdl_la_LDFLAGS = $(LTDL_FLAGS) $(LIBADD_DL)
|
libltdl_la_LDFLAGS = $(LTDL_FLAGS)
|
||||||
|
libltdl_la_LIBADD = $(LIBADD_DL)
|
||||||
|
libltdl_la_DEPENDENCIES = libtool
|
||||||
|
|
||||||
|
libtest_la_SOURCES = $(libltdl_la_SOURCES)
|
||||||
|
libtest_la_LDFLAGS =
|
||||||
|
libtest_la_LIBADD = $(libltdl_la_LIBADD)
|
||||||
|
libltdl_la_DEPENDENCIES = libtool
|
||||||
|
|
||||||
|
libtool: ../libtool
|
||||||
|
./config.status --recheck
|
||||||
|
@ -4,7 +4,7 @@ AC_INIT(ltdl.c)
|
|||||||
AM_INIT_AUTOMAKE(libltdl,0.1)
|
AM_INIT_AUTOMAKE(libltdl,0.1)
|
||||||
|
|
||||||
AC_ARG_ENABLE(ltdl-install,
|
AC_ARG_ENABLE(ltdl-install,
|
||||||
[--enable-ltdl-install install libltdl (breaks check before install)])
|
[--enable-ltdl-install install libltdl])
|
||||||
AM_CONDITIONAL(INSTALL_LTDL, test x$enable_ltdl_install = xyes)
|
AM_CONDITIONAL(INSTALL_LTDL, test x$enable_ltdl_install = xyes)
|
||||||
if test x$enable_ltdl_install = xyes; then
|
if test x$enable_ltdl_install = xyes; then
|
||||||
LIBLIBS=libltdl.la
|
LIBLIBS=libltdl.la
|
||||||
|
@ -6,20 +6,10 @@ INCLUDES = -I$(srcdir)/../libltdl
|
|||||||
|
|
||||||
EXTRA_DIST = acinclude.m4
|
EXTRA_DIST = acinclude.m4
|
||||||
|
|
||||||
# A little hack to build libltdl in a subdirectory
|
lib_LTLIBRARIES = foo1.la libfoo2.la
|
||||||
libltdl/libltdl.la:
|
|
||||||
-mkdir $(top_builddir)/libltdl
|
|
||||||
(here=`pwd` && cd $(top_builddir)/libltdl && \
|
|
||||||
$$here/../libltdl/configure --srcdir=$$here/../libltdl && \
|
|
||||||
$(MAKE) all)
|
|
||||||
|
|
||||||
distclean-local:
|
foo1_la_SOURCES = foo1.c
|
||||||
-rm -rf $(top_builddir)/libltdl
|
foo1_la_LDFLAGS = $(LIBADD_M) -module -avoid-versioning
|
||||||
|
|
||||||
lib_LTLIBRARIES = libfoo1.la libfoo2.la
|
|
||||||
|
|
||||||
libfoo1_la_SOURCES = foo1.c
|
|
||||||
libfoo1_la_LDFLAGS = $(LIBADD_M) -module -avoid-versioning
|
|
||||||
|
|
||||||
libfoo2_la_SOURCES = foo2.c
|
libfoo2_la_SOURCES = foo2.c
|
||||||
libfoo2_la_LDFLAGS = $(LIBADD_M) -module
|
libfoo2_la_LDFLAGS = $(LIBADD_M) -module
|
||||||
@ -28,15 +18,19 @@ noinst_HEADERS = foo.h
|
|||||||
|
|
||||||
bin_PROGRAMS = mdemo mdemo.debug
|
bin_PROGRAMS = mdemo mdemo.debug
|
||||||
|
|
||||||
|
../libltdl/libtest.la: ../libltdl/libtool \
|
||||||
|
$(srcdir)/../libltdl/ltdl.c $(srcdir)/../libltdl/ltdl.h
|
||||||
|
(cd ../libltdl; $(MAKE) libtest.la)
|
||||||
|
|
||||||
# Create a version of mdemo that does dlopen.
|
# Create a version of mdemo that does dlopen.
|
||||||
mdemo_SOURCES = main.c
|
mdemo_SOURCES = main.c
|
||||||
mdemo_LDADD = libltdl/libltdl.la \
|
mdemo_LDADD = ../libltdl/libtest.la
|
||||||
$(LIBADD_M) # We won't need this when libltdl takes care of dependencies
|
mdemo_LDFLAGS = -export-dynamic -dlopen foo1.la -dlopen libfoo2.la
|
||||||
mdemo_LDFLAGS = -dlopen libfoo1.la -dlopen libfoo2.la
|
mdemo_DEPENDENCIES = ../libltdl/libtest.la foo1.la libfoo2.la
|
||||||
mdemo_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
|
|
||||||
|
|
||||||
# Create an easier-to-debug version of mdemo.
|
# Create an easier-to-debug version of mdemo.
|
||||||
mdemo_debug_SOURCES = main.c
|
mdemo_debug_SOURCES = main.c
|
||||||
mdemo_debug_LDADD = libltdl/libltdl.la
|
mdemo_debug_LDADD = ../libltdl/libtest.la
|
||||||
mdemo_debug_LDFLAGS = -static -dlopen libfoo1.la -dlopen libfoo2.la
|
mdemo_debug_LDFLAGS = -static -export-dynamic \
|
||||||
mdemo_debug_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
|
-dlopen foo1.la -dlopen libfoo2.la
|
||||||
|
mdemo_debug_DEPENDENCIES = ../libltdl/libtest.la foo1.la libfoo2.la
|
||||||
|
@ -25,9 +25,9 @@ USA. */
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define nothing libfoo1_LTX_nothing
|
#define nothing foo1_LTX_nothing
|
||||||
#define foo1 libfoo1_LTX_foo1
|
#define foo1 foo1_LTX_foo1
|
||||||
#define hello libfoo1_LTX_hello
|
#define hello foo1_LTX_hello
|
||||||
|
|
||||||
/* Give a global variable definition. */
|
/* Give a global variable definition. */
|
||||||
int nothing;
|
int nothing;
|
||||||
|
12
mdemo/main.c
12
mdemo/main.c
@ -22,18 +22,6 @@ USA. */
|
|||||||
#include "ltdl.h"
|
#include "ltdl.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
|
||||||
#include <string.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_MATH_H
|
|
||||||
#include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* import sin and cos (used by the modules) */
|
|
||||||
extern double sin (double x);
|
|
||||||
extern double cos (double x);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
test_dl (char *filename)
|
test_dl (char *filename)
|
||||||
{
|
{
|
||||||
|
@ -20,13 +20,13 @@ fi
|
|||||||
echo "Executing uninstalled programs in ../mdemo"
|
echo "Executing uninstalled programs in ../mdemo"
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
if ../mdemo/mdemo.debug ../mdemo/libfoo1.la ../mdemo/libfoo2.la; then :
|
if ../mdemo/mdemo.debug ../mdemo/foo1.la ../mdemo/libfoo2.la; then :
|
||||||
else
|
else
|
||||||
echo "$0: cannot execute ../mdemo/mdemo.debug" 1>&2
|
echo "$0: cannot execute ../mdemo/mdemo.debug" 1>&2
|
||||||
status=1
|
status=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ../mdemo/mdemo ../mdemo/libfoo1.la ../mdemo/libfoo2.la; then :
|
if ../mdemo/mdemo ../mdemo/foo1.la ../mdemo/libfoo2.la; then :
|
||||||
else
|
else
|
||||||
echo "$0: cannot execute ../mdemo/mdemo" 1>&2
|
echo "$0: cannot execute ../mdemo/mdemo" 1>&2
|
||||||
status=1
|
status=1
|
||||||
|
@ -26,13 +26,13 @@ $make install || exit 1
|
|||||||
echo "= Executing installed programs"
|
echo "= Executing installed programs"
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
if $prefix/bin/mdemo.debug $prefix/lib/libfoo1.la $prefix/lib/libfoo2.la; then :
|
if $prefix/bin/mdemo.debug $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then :
|
||||||
else
|
else
|
||||||
echo "$0: cannot execute $prefix/bin/mdemo.debug" 1>&2
|
echo "$0: cannot execute $prefix/bin/mdemo.debug" 1>&2
|
||||||
status=1
|
status=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $prefix/bin/mdemo $prefix/lib/libfoo1.la $prefix/lib/libfoo2.la; then :
|
if $prefix/bin/mdemo $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then :
|
||||||
else
|
else
|
||||||
echo "$0: cannot execute $prefix/bin/mdemo" 1>&2
|
echo "$0: cannot execute $prefix/bin/mdemo" 1>&2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user