* configure.in (AC_CONFIG_SUBDIRS): added cdemo

* Makefile.am (DIST_SUBDIRS): ditto
	(ACINCLUDE_M4_LIST): ditto
	* tests/Makefile.am (TESTS): added cdemo-shared.test
	* tests/cdemo-static.test: disable shared libraries here
	* tests/cdemo-shared.test: disable static libraries here
	* doc/libtool.texi (Test descriptions): added cdemo tests
	* THANKS: added Edouard G. Parmelan

1999-01-13  Edouard G. Parmelan  <Edouard.Parmelan@France.NCR.COM>

	* ltmain.in: fix convenience libraries when static libraries
	are disables.
	* cdemo/README, cdemo/Makefile.am, cdemo/configure.in, cdemo/foo.h,
	cdemo/foo1.c, cdemo/main.c, cdemo/.cvsignore, test/cdemo-conf.test,
	test/cdemo-make.test, test/cdemo-exec.test, test/cdemo-static.test:
	new tests for convenience libraries.
	* autogen, Makefile.am, test/Makefile.am: ditto.

	* ltconfig.in, doc/PLATFORMS: Added support for NCR MP-RAS
	(i586-ncr-sysv4.3*) with native compiler.
	* README, doc/libtool.texi: Added note for NCR MP-RAS compiler.
This commit is contained in:
Alexandre Oliva 1999-01-13 08:28:35 +00:00 committed by Alexandre Oliva
parent 89aa144652
commit f956b65fc4
23 changed files with 394 additions and 8 deletions

View File

@ -1,3 +1,28 @@
1999-01-13 Alexandre Oliva <oliva@dcc.unicamp.br>
* configure.in (AC_CONFIG_SUBDIRS): added cdemo
* Makefile.am (DIST_SUBDIRS): ditto
(ACINCLUDE_M4_LIST): ditto
* tests/Makefile.am (TESTS): added cdemo-shared.test
* tests/cdemo-static.test: disable shared libraries here
* tests/cdemo-shared.test: disable static libraries here
* doc/libtool.texi (Test descriptions): added cdemo tests
* THANKS: added Edouard G. Parmelan
1999-01-13 Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
* ltmain.in: fix convenience libraries when static libraries
are disables.
* cdemo/README, cdemo/Makefile.am, cdemo/configure.in, cdemo/foo.h,
cdemo/foo1.c, cdemo/main.c, cdemo/.cvsignore, test/cdemo-conf.test,
test/cdemo-make.test, test/cdemo-exec.test, test/cdemo-static.test:
new tests for convenience libraries.
* autogen, Makefile.am, test/Makefile.am: ditto.
* ltconfig.in, doc/PLATFORMS: Added support for NCR MP-RAS
(i586-ncr-sysv4.3*) with native compiler.
* README, doc/libtool.texi: Added note for NCR MP-RAS compiler.
1999-01-12 Thomas Tanner <tanner@gmx.de>
* ltmain.in: before using LN_S remove the symlink

View File

@ -2,7 +2,7 @@
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
AUTOMAKE_OPTIONS = gnits
SUBDIRS = . doc tests $(BUILD_LTDL)
DIST_SUBDIRS = . doc tests libltdl demo mdemo # depdemo
DIST_SUBDIRS = . doc tests libltdl demo mdemo cdemo # depdemo
# We need to export these variables when we run ltconfig.
CFLAGS = @CFLAGS@
@ -61,9 +61,11 @@ $(srcdir)/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in
# We use our own libtool.m4 for these.
ACINCLUDE_M4_LIST = \
$(srcdir)/acinclude.m4 \
$(srcdir)/demo/acinclude.m4 \
$(srcdir)/libltdl/acinclude.m4 \
$(srcdir)/mdemo/acinclude.m4
$(srcdir)/demo/acinclude.m4 \
$(srcdir)/mdemo/acinclude.m4 \
$(srcdir)/cdemo/acinclude.m4 # \ #
# $(srcdir)/depdemo/acinclude.m4
# All our rules should depend on these demo files.
all check: $(ACINCLUDE_M4_LIST) $(LIBTOOL_DEPS)

5
README
View File

@ -19,6 +19,7 @@ Shared library support has been implemented for these platforms:
GNU/Linux ELF (*-*-linux-gnu*, except aout, coff, and oldld)
HP-UX 9.x, 10.x, 11.x (*-*-hpux9*, *-*-hpux10*, *-*-hpux11*) [see note]
IRIX 5.x, 6.x (*-*-irix5*, *-*-irix6*)
NCR MP-RAS 3.x (*-ncr-sysv4.3*) [see note]
NetBSD 1.x (*-*-netbsd*)
OpenBSD 2.x (*-*-openbsd*)
OS/2 using EMX (*-*-os2*)
@ -35,6 +36,10 @@ libtool's requirements, so users may report unusual problems. There
is no workaround except to install a working sed (such as GNU sed) on
these systems.
NOTE: The vendor-distributed NCR MP-RAS cc programs emits copyright
on standard error that confuse tests on size of conftest.err. The
workaround is to specify CC when run configure with CC='cc -Hnocopyr'.
NOTE: Any earlier DG/UX system with ELF executables, such as R3.10 or
R4.10, is also likely to work, but hasn't been explicitly tested.

1
THANKS
View File

@ -13,6 +13,7 @@ Bruno Haible <haible@ilog.fr>
Carl D. Roth <roth@cse.ucsc.edu>
Charles S. Kerr <cskerr@delenn.jccbi.gov>
Chris P. Ross <cross@eng.us.uu.net>
Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
Eric Estievenart <eric@via.ecp.fr>
Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
H.J. Lu <hjl@gnu.org>

View File

@ -10,7 +10,7 @@ aclocal
automake --gnits --add-missing
autoconf
for sub in demo depdemo libltdl mdemo; do
for sub in demo depdemo libltdl mdemo cdemo; do
cd $sub
rm -f acinclude.m4
ln -s ../libtool.m4 acinclude.m4

13
cdemo/.cvsignore Normal file
View File

@ -0,0 +1,13 @@
.deps
.libs
Makefile
Makefile.in
aclocal.m4
acinclude.m4
configure
config.*
conftest*
libtool
*.lo
*.la
cdemo

18
cdemo/Makefile.am Normal file
View File

@ -0,0 +1,18 @@
# A brief demonstration of Libtool modules. -*-Makefile-*-
#
AUTOMAKE_OPTIONS = no-dependencies foreign
INCLUDES = -I$(srcdir)/../libltdl
EXTRA_DIST = acinclude.m4
noinst_LTLIBRARIES = libfoo1.la
libfoo1_la_SOURCES = foo1.c
noinst_HEADERS = foo.h
bin_PROGRAMS = cdemo
cdemo_SOURCES = main.c
cdemo_LDADD = libfoo1.la $(LIBADD_M)

4
cdemo/README Normal file
View File

@ -0,0 +1,4 @@
This is mdemo, an example package that uses GNU libtool with an
Automake-generated environment to build two simple libraries and programs.
It demonstrates how to build convenience libraries

15
cdemo/configure.in Normal file
View File

@ -0,0 +1,15 @@
dnl Initialize the cdemo package.
AC_INIT(main.c)
AM_INIT_AUTOMAKE(cdemo,0.1)
AC_PROG_CC
AC_EXEEXT
AM_PROG_LIBTOOL
AC_CHECK_HEADERS(string.h math.h)
AC_CHECK_LIB(m, cos, LIBADD_M="-lm", LIBADD_M=)
AC_SUBST(LIBADD_M)
dnl Output the makefile
AC_OUTPUT(Makefile)

29
cdemo/foo.h Normal file
View File

@ -0,0 +1,29 @@
/* foo.h -- interface to the libfoo* libraries
Copyright (C) 1998-1999 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@gmx.de>
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. */
/* Only include this header file once. */
#ifndef _FOO_H_
#define _FOO_H_ 1
/* Silly constants that the functions return. */
#define HELLO_RET 0xe110
#define FOO_RET 0xf00
#endif /* !_FOO_H_ */

42
cdemo/foo1.c Normal file
View File

@ -0,0 +1,42 @@
/* foo1.c -- trivial test library
Copyright (C) 1998-1999 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@gmx.de>
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 "foo.h"
#include <stdio.h>
#ifdef HAVE_MATH_H
#include <math.h>
#endif
/* exported functions */
int
foo1()
{
printf ("cos (0.0) = %g\n", (double) cos ((double) 0.0));
return FOO_RET;
}
int
hello()
{
printf ("** This is foolib 1 **\n");
return HELLO_RET;
}

41
cdemo/main.c Normal file
View File

@ -0,0 +1,41 @@
/* main.c -- cdemo test program
Copyright (C) 1998-1999 Free Software Foundation, Inc.
Originally by Thomas Tanner <tanner@gmx.de>
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 "foo.h"
#include <stdio.h>
int
main (int argc, char **argv)
{
int value;
printf ("Welcome GNU libtool cdemo!\n");
value = hello();
printf ("hello returned: %i\n", value);
if (value == HELLO_RET)
printf("hello is ok!\n");
if (foo1 () == FOO_RET)
printf("foo1 is ok!\n");
return 0;
}

View File

@ -28,8 +28,7 @@ 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_CONFIG_SUBDIRS(libltdl demo mdemo cdemo) dnl #depdemo
AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
# Local Variables:

View File

@ -36,6 +36,7 @@ i386-unknown-netbsd1.3I egcs 1.2e ok
i386-unknown-netbsd1.3.3 gcc 1.2e ok gcc/g++ 2.7.2.2, gas 1.92.3
i386-unknown-openbsd2.4 gcc 1.2e ok
i486-ncr-sysv4.3.03 gcc 1.2e ok
i586-ncr-sysv4.3.03 cc 1.2e ok cc -Hnocopyr
i586-pc-gnu0.3 gcc 1.2b ok
i586-dg-dguxR4.20MU01 gcc 1.2 ok
i486-pc-linux-gnulibc1 gcc 1.2e ok

View File

@ -2610,8 +2610,39 @@ load modules. The library @file{libltdl} provides an experimental
dlopen wrapper for various platforms (Linux, Solaris, HP/UX, Win32 etc.)
including support for dlpreopened modules (@pxref{Dlpreopening}).
NOTE: The tests @file{mdemo-exec.test} and @file{mdemo-inst.test} are known
to fail on platforms that do not fully support inter-library dependencies.
NOTE: The tests @file{mdemo-exec.test} and @file{mdemo-inst.test} are
known to fail on platforms that do not fully support inter-library
dependencies. We'd appreciate your help in porting the recently
introduced inter-library dependencies code to various platforms, even
some very common platforms haven't been updated yet (@pxref{Porting
inter-library dependencies}).
@item cdemo-conf.test
@itemx cdemo-exec.test
@itemx cdemo-make.test
@itemx cdemo-static.test
@itemx cdemo-shared.test
@pindex cdemo-conf.test
@pindex cdemo-exec.test
@pindex cdemo-make.test
@pindex cdemo-static.test
These programs check to see that the @file{cdemo} subdirectory of the
libtool distribution can be configured and built correctly.
The @file{cdemo} subdirectory contains a demonstration of libtool
convenience libraries, a mechanism that allows build-time static
libraries to be created, in a way that their components can be later
linked into programs or other libraries, even shared ones.
The tests @file{cdemo-make.test} and @file{cdemo-exec.test} are executed
three times, under three different libtool configurations:
@file{cdemo-conf.test} configures @file{cdemo/libtool} to build both
static and shared libraries, @file{cdemo-static.test} builds only static
libraries (@samp{--disable-shared}), and @file{cdemo-shared.test} builds
only shared libraries (@samp{--disable-static}).
NOTE: The tests after @file{cdemo-static.test} are known to fail on all
platforms. A fix is underway.
@item hardcode.test
@pindex hardcode.test
@ -2877,6 +2908,11 @@ broken, and cannot handle libtool's requirements, so users may report
unusual problems. There is no workaround except to install a working
@code{sed} (such as GNU @code{sed}) on these systems.
Note: The vendor-distributed NCR MP-RAS @code{cc} programs emits
copyright on standard error that confuse tests on size of
@file{conftest.err}. The workaround is to specify @code{CC}
when run @code{configure} with @kbd{CC='cc -Hnocopyr'}.
@node Platform quirks
@section Platform quirks

View File

@ -1294,6 +1294,14 @@ else
hardcode_shlibpath_var=no
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
hardcode_direct=no
hardcode_minus_L=no
hardcode_shlibpath_var=no
export_dynamic_flag_spec='-Bexport'
;;
uts4*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs'
hardcode_libdir_flag_spec='-L$libdir'

View File

@ -1292,6 +1292,7 @@ compiler."
libext=al
oldlibs="$output_objdir/$libname.$libext $oldlibs"
build_libtool_libs=convenience
build_old_libs=yes
dependency_libs="$deplibs"
if test -n "$vinfo"; then

View File

@ -6,6 +6,9 @@ TESTS = demo-conf.test demo-make.test demo-exec.test \
demo-inst.test demo-unst.test hardcode.test \
mdemo-conf.test mdemo-make.test mdemo-exec.test \
mdemo-inst.test mdemo-unst.test \
cdemo-conf.test cdemo-make.test cdemo-exec.test \
cdemo-static.test cdemo-make.test cdemo-exec.test \
cdemo-shared.test cdemo-make.test cdemo-exec.test \
link.test link-2.test nomode.test \
quote.test sh.test suffix.test

30
tests/cdemo-conf.test Executable file
View File

@ -0,0 +1,30 @@
#! /bin/sh
# cdemo-conf.test - try configuring the ../cdemo subdirectory
# Test script header.
need_prefix=yes
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
# Maybe we have a VPATH build, in which case, create a new subdir.
test -d ../cdemo || mkdir ../cdemo
# Change to our build directory.
cd ../cdemo || exit 1
# Possibly clean up the distribution.
if test -f Makefile; then
echo "= Running $make distclean in ../demo"
$make distclean
fi
rm -f config.cache
# Configure the demonstration.
echo "= Configuring in ../cdemo (prefix=$prefix)"
CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix || exit 1
exit 0

28
tests/cdemo-exec.test Executable file
View File

@ -0,0 +1,28 @@
#! /bin/sh
# cdemo-exec.test - check that programs in the ../cdemo subdirectory are viable
# Test script header.
need_prefix=no
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
if test -f ../cdemo/cdemo; then :
else
echo "You must run cdemo-make.test before running $0" 1>&2
exit 1
fi
# Check to see if the programs really run.
echo "Executing uninstalled programs in ../cdemo"
if ../cdemo/cdemo; then :
else
echo "$0: cannot execute ../cdemo/cdemo" 1>&2
status=1
fi
exit $status

25
tests/cdemo-make.test Executable file
View File

@ -0,0 +1,25 @@
#! /bin/sh
# cdemo-make.test - try building in the ../cdemo subdirectory
# Test script header.
need_prefix=no
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
if test -f ../cdemo/Makefile; then :
else
echo "You must run cdemo-conf.test before running $0" 1>&2
exit 1
fi
# Change to our build directory.
cd ../cdemo || exit 1
# Do the actual build.
echo "Making in ../cdemo"
$make || exit 1
exit 0

30
tests/cdemo-shared.test Executable file
View File

@ -0,0 +1,30 @@
#! /bin/sh
# cdemo-conf.test - try configuring the ../cdemo subdirectory
# Test script header.
need_prefix=yes
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
# Maybe we have a VPATH build, in which case, create a new subdir.
test -d ../cdemo || mkdir ../cdemo
# Change to our build directory.
cd ../cdemo || exit 1
# Possibly clean up the distribution.
if test -f Makefile; then
echo "= Running $make distclean in ../demo"
$make distclean
fi
rm -f config.cache
# Configure the demonstration.
echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static"
CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-static || exit 1
exit 0

30
tests/cdemo-static.test Executable file
View File

@ -0,0 +1,30 @@
#! /bin/sh
# cdemo-conf.test - try configuring the ../cdemo subdirectory
# Test script header.
need_prefix=yes
if test -z "$srcdir"; then
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
test "$srcdir" = "$0" && srcdir=.
test "${VERBOSE+set}" != "set" && VERBOSE=yes
fi
. $srcdir/defs || exit 1
# Maybe we have a VPATH build, in which case, create a new subdir.
test -d ../cdemo || mkdir ../cdemo
# Change to our build directory.
cd ../cdemo || exit 1
# Possibly clean up the distribution.
if test -f Makefile; then
echo "= Running $make distclean in ../demo"
$make distclean
fi
rm -f config.cache
# Configure the demonstration.
echo "= Configuring in ../cdemo (prefix=$prefix) with --disable-static"
CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../cdemo/configure --srcdir=$srcdir/../cdemo --prefix=$prefix --disable-shared || exit 1
exit 0