files in generating uninstalled libtool libraries.
* mdemo2/main.c, mdemo2/Makefile.am, mdemo2/README,
mdemo2/configure.ac, mdemo2/.cvsignore, mdemo/mlib.c,
tests/mdemo2-conf.test, tests/mdemo2-exec.test,
tests/mdemo2-make.test: New files for testing above feature.
* configure.ac, bootstrap, tests/Makefile.am: Accomodate new
test directory.
* mdemo/Makefile.am: Build libmlib.la for mdemo2 tests.
+2003-07-31 Greg Eisenhauer <eisen@cc.gatech.edu>
+
+ * ltmain.in: Provide absolute paths for dlopen and dlpreopen
+ files in generating uninstalled libtool libraries.
+ * mdemo2/main.c, mdemo2/Makefile.am, mdemo2/README,
+ mdemo2/configure.ac, mdemo2/.cvsignore, mdemo/mlib.c,
+ tests/mdemo2-conf.test, tests/mdemo2-exec.test,
+ tests/mdemo2-make.test: New files for testing above feature.
+ * configure.ac, bootstrap, tests/Makefile.am: Accomodate new
+ test directory.
+ * mdemo/Makefile.am: Build libmlib.la for mdemo2 tests.
+
2003-07-30 Tony Wyatt <wyattaw@optushome.com.au>
* libtool.m4: Remove parentheses around finish_eval part which
touch libtoolize
(cd libltdl && touch ltmain.sh)
-for sub in . libltdl cdemo demo depdemo mdemo pdemo tagdemo f77demo; do
+for sub in . libltdl cdemo demo depdemo mdemo mdemo2 pdemo tagdemo f77demo; do
case $sub in
.)
top_srcdir=.
# all subdirectories that are configured on demand, but that must be
# included in the distribution
-CONF_SUBDIRS="cdemo pdemo demo depdemo mdemo tagdemo f77demo"
+CONF_SUBDIRS="cdemo pdemo demo depdemo mdemo mdemo2 tagdemo f77demo"
AC_SUBST([CONF_SUBDIRS])
ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4"
newdlprefiles="$newdlprefiles $libdir/$name"
done
dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
fi
$rm $output
# place dlname in correct position for cygwin
EXTRA_DIST = acinclude.m4
-lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la
+lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la libmlib.la
foo1_la_SOURCES = foo1.c
foo1_la_LIBADD = $(LIBM) libsub.la
libsub_la_SOURCES = sub.c
libsub_la_LDFLAGS = -no-undefined
+libmlib_la_SOURCES = mlib.c
+libmlib_la_LIBADD = @LIBLTDL@ "-dlopen" foo1.la "-dlopen" libfoo2.la
+libmlib_la_LDFLAGS = -no-undefined
+libmlib_la_DEPENDENCIES = @LIBLTDL@ libsub.la foo1.la libfoo2.la
+
noinst_HEADERS = foo.h
bin_PROGRAMS = mdemo mdemo_static
--- /dev/null
+.deps
+.libs
+Makefile
+Makefile.in
+acinclude.m4
+aclocal.m4
+configure
+config.*
+conftest*
+libtool
+*.lo
+*.la
+mdemo2
+mdemo2_static
+mdemo2.static
--- /dev/null
+## Process this file with automake to produce Makefile.in
+
+AUTOMAKE_OPTIONS = no-dependencies foreign
+
+INCLUDES = $(INCLTDL)
+
+EXTRA_DIST = acinclude.m4
+
+bin_PROGRAMS = mdemo2 mdemo2_static
+
+# Create a version of mdemo2 that links a library that does dlopen.
+mdemo2_SOURCES = main.c
+mdemo2_LDFLAGS = -export-dynamic
+mdemo2_LDADD = ../mdemo/libmlib.la
+
+# Create a statically linked version of mdemo.
+mdemo2_static_SOURCES = $(mdemo2_SOURCES)
+mdemo2_static_LDFLAGS = $(STATIC) $(mdemo2_LDFLAGS)
+mdemo2_static_LDADD = $(mdemo2_LDADD)
+mdemo2_static_DEPENDENCIES = $(mdemo2_DEPENDENCIES)
+
+$(OBJECTS): libtool
+libtool: $(LIBTOOL_DEPS)
+ $(SHELL) ./config.status --recheck
--- /dev/null
+This is mdemo2, an example package that attempts to use GNU libtool to
+link with a library that itself does dlopening of libtool modules.
+
+This demo depends upon the libraries generated in ../mdemo.
+
--- /dev/null
+## Process this file with autoconf to create configure. -*- autoconf -*-
+# Copyright 2001 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.50)
+
+
+## ------------------------ ##
+## Autoconf initialisation. ##
+## ------------------------ ##
+AC_INIT([mdemo2], [0.1], [bug-libtool@gnu.org])
+AC_CONFIG_SRCDIR([main.c])
+
+
+## ------------------------ ##
+## Automake Initialisation. ##
+## ------------------------ ##
+AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
+
+
+## ------------------ ##
+## C compiler checks. ##
+## ------------------ ##
+AC_PROG_CC
+AC_C_CONST
+
+
+## ----------------------- ##
+## Libtool initialisation. ##
+## ----------------------- ##
+AM_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+
+if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+ STATIC=-static
+else
+ STATIC=
+fi
+AC_SUBST([STATIC])
+
+
+## ---------------------------- ##
+## C headers required by mdemo2. ##
+## ---------------------------- ##
+
+
+## ---------------------------- ##
+## Libraries required by cdemo. ##
+## ---------------------------- ##
+
+
+## -------- ##
+## Outputs. ##
+## -------- ##
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
--- /dev/null
+/* main.c -- mdemo2 test program
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Originally by Greg Eisenhauer < eisen at cc.gatech.edu >
+ This file is part of GNU Libtool.
+
+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. */
+
+#include <stdio.h>
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int ret = 0;
+
+ printf ("Welcome to GNU libtool mdemo2!\n");
+
+ if (argc < 2) {
+ fprintf (stderr, "usage: %s module [module...]\n", argv[0]);
+ }
+
+ ret = mlib_func(argc, argv);
+
+ return ret;
+}
mdemo-inst.test mdemo-unst.test \
assign.test link.test link-2.test nomode.test \
quote.test sh.test suffix.test pdemo-conf.test \
- pdemo-make.test pdemo-exec.test pdemo-inst.test
+ pdemo-make.test pdemo-exec.test pdemo-inst.test \
+ mdemo-conf.test mdemo-make.test mdemo2-conf.test \
+ mdemo2-make.test mdemo2-exec.test
+
if HAVE_CXX
if HAVE_F77