]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.in (AC_CONFIG_SUBDIRS): add libltdl, demo, mdemo and
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Sun, 10 Jan 1999 19:16:30 +0000 (19:16 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 10 Jan 1999 19:16:30 +0000 (19:16 +0000)
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

ChangeLog
Makefile.am
configure.in
libltdl/Makefile.am
libltdl/configure.in
mdemo/Makefile.am
mdemo/foo1.c
mdemo/main.c
tests/mdemo-exec.test
tests/mdemo-inst.test

index d8f522906defedfcf21a1ce80170362c9de33731..fec13b3ee6db86da763bb3a3ba10b31eed15d060 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
 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,
        and don't redefine it if already defined; default to 1024, as on
        most systems
index 4f2bc74955bb010d868bddd51a958e92e11de73d..77383d7805462fb41758de2536f9b32980254167 100644 (file)
@@ -1,8 +1,8 @@
 ## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
 ## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 AUTOMAKE_OPTIONS = gnits
-SUBDIRS = . doc tests
-DIST_SUBDIRS = $(SUBDIRS) demo libltdl mdemo
+SUBDIRS = . doc tests $(BUILD_LTDL)
+DIST_SUBDIRS = . doc tests libltdl demo mdemo # depdemo
 
 # We need to export these variables when we run ltconfig.
 CFLAGS = @CFLAGS@
index a7304de65ebc4dba9e839702235f3a15d07cac6a..6dec2f1018ba5d55d0f8f6362a1cad070c9d44ec 100644 (file)
@@ -8,6 +8,16 @@ AC_SUBST(pkgdatadir)
 aclocaldir='${datadir}/aclocal'
 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.
 AC_PROG_CC
 AC_PROG_RANLIB
@@ -18,6 +28,8 @@ AC_PROG_LN_S
 dnl For the `lineno' script (which puts line numbers into `ltconfig').
 AC_PROG_AWK
 
+AC_CONFIG_SUBDIRS(libltdl demo mdemo  dnl #depdemo
+)
 AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
 
 # Local Variables:
index f93cd96a22e397ba00846b4e24f68e2b262a1c4d..bd39633c2f2d2a0b2dc49a2ea99edfda8d13f0c7 100644 (file)
@@ -12,10 +12,20 @@ LTDL_FLAGS =
 noinst_HEADERS = ltdl.h
 endif
 
-EXTRA_LTLIBRARIES = libltdl.la
+EXTRA_LTLIBRARIES = libltdl.la libtest.la
 
 lib_LTLIBRARIES = @LIBLIBS@
 noinst_LTLIBRARIES = @NOINSTLIBS@
 
 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
index a60e8e430a0cd4f2a8fbfbf2fe2a0610acea5db7..4b3cccf2d5aca8ab3bfbd76332903d9797b70bed 100644 (file)
@@ -4,7 +4,7 @@ AC_INIT(ltdl.c)
 AM_INIT_AUTOMAKE(libltdl,0.1)
 
 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)
 if test x$enable_ltdl_install = xyes; then
   LIBLIBS=libltdl.la
index 98635f7529bcdfa85b6d1d8015d0bac8d82d680c..224c09a5b71cb2eef2581122dde892bd26cb1525 100644 (file)
@@ -6,20 +6,10 @@ INCLUDES = -I$(srcdir)/../libltdl
 
 EXTRA_DIST = acinclude.m4
 
-# A little hack to build libltdl in a subdirectory
-libltdl/libltdl.la:
-       -mkdir $(top_builddir)/libltdl
-       (here=`pwd` && cd $(top_builddir)/libltdl && \
-       $$here/../libltdl/configure --srcdir=$$here/../libltdl && \
-       $(MAKE) all)
-       
-distclean-local:
-       -rm -rf $(top_builddir)/libltdl
+lib_LTLIBRARIES = foo1.la libfoo2.la
 
-lib_LTLIBRARIES = libfoo1.la libfoo2.la
-
-libfoo1_la_SOURCES = foo1.c
-libfoo1_la_LDFLAGS = $(LIBADD_M) -module -avoid-versioning
+foo1_la_SOURCES = foo1.c
+foo1_la_LDFLAGS = $(LIBADD_M) -module -avoid-versioning
 
 libfoo2_la_SOURCES = foo2.c
 libfoo2_la_LDFLAGS = $(LIBADD_M) -module
@@ -28,15 +18,19 @@ noinst_HEADERS = foo.h
 
 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.
 mdemo_SOURCES = main.c
-mdemo_LDADD = libltdl/libltdl.la \
-       $(LIBADD_M) # We won't need this when libltdl takes care of dependencies
-mdemo_LDFLAGS = -dlopen libfoo1.la -dlopen libfoo2.la
-mdemo_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
+mdemo_LDADD = ../libltdl/libtest.la
+mdemo_LDFLAGS = -export-dynamic -dlopen foo1.la -dlopen libfoo2.la
+mdemo_DEPENDENCIES = ../libltdl/libtest.la foo1.la libfoo2.la
 
 # Create an easier-to-debug version of mdemo.
 mdemo_debug_SOURCES = main.c
-mdemo_debug_LDADD = libltdl/libltdl.la
-mdemo_debug_LDFLAGS = -static -dlopen libfoo1.la -dlopen libfoo2.la
-mdemo_debug_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
+mdemo_debug_LDADD = ../libltdl/libtest.la
+mdemo_debug_LDFLAGS = -static -export-dynamic \
+       -dlopen foo1.la -dlopen libfoo2.la
+mdemo_debug_DEPENDENCIES = ../libltdl/libtest.la foo1.la libfoo2.la
index d98c554b09e16ebd63fd53b1259048efede46cb9..d84233cadddc0199b5dbf2ae3d32646cd2e25ebc 100644 (file)
@@ -25,9 +25,9 @@ USA. */
 #include <math.h>
 #endif
 
-#define nothing libfoo1_LTX_nothing
-#define foo1   libfoo1_LTX_foo1
-#define hello  libfoo1_LTX_hello
+#define nothing foo1_LTX_nothing
+#define foo1   foo1_LTX_foo1
+#define hello  foo1_LTX_hello
 
 /* Give a global variable definition. */
 int nothing;
index cfc0d14337192270e856d0e1135975bb85afa640..5efc0df7b3c23805c98d06de259bd08f9b5a2043 100644 (file)
@@ -22,18 +22,6 @@ USA. */
 #include "ltdl.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
 test_dl (char *filename)
 {
index 1d6faca0149b03f95a9cd038bc9f80026748b3ae..d8651f033d3fc3ca9524a0598eac721cdb6ab2e3 100755 (executable)
@@ -20,13 +20,13 @@ fi
 echo "Executing uninstalled programs in ../mdemo"
 
 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
   echo "$0: cannot execute ../mdemo/mdemo.debug" 1>&2
   status=1
 fi
 
-if ../mdemo/mdemo ../mdemo/libfoo1.la ../mdemo/libfoo2.la; then :
+if ../mdemo/mdemo ../mdemo/foo1.la ../mdemo/libfoo2.la; then :
 else
   echo "$0: cannot execute ../mdemo/mdemo" 1>&2
   status=1
index 60628acc7a89ebf752398d39a6910f677cd21d12..c4fd7fab7a33d46da48d8989ef81d45fe5192f04 100755 (executable)
@@ -26,13 +26,13 @@ $make install || exit 1
 echo "= Executing installed programs"
 
 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
   echo "$0: cannot execute $prefix/bin/mdemo.debug" 1>&2
   status=1
 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
   echo "$0: cannot execute $prefix/bin/mdemo" 1>&2