+2002-01-20 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (CONFIGURES_RPATH*): New variables.
+ ($(srcdir)/tests/rpath*/Makefile.in): New rules.
+ ($(srcdir)/tests/rpath*/aclocal.m4): New rules.
+ ($(srcdir)/tests/rpath*/configure): New rules.
+ (SUBCONFIGURES): New variable.
+ (subconfigures): New target.
+ (distdir): Depend on subconfigures.
+ * configure.in: Propagate GCC, LD, with_gnu_ld to Makefiles.
+ Postprocess Makefile because of distdir dependency.
+
2002-01-12 Bruno Haible <bruno@clisp.org>
* INSTALL: Add instructions for using Intel icc.
html:
cd doc && $(MAKE) html
+
+
+# Subdirectories with separate autoconfiguration.
+
+CONFIGURES_RPATHX = $(srcdir)/tests/rpathx/Makefile.in $(srcdir)/tests/rpathx/aclocal.m4 $(srcdir)/tests/rpathx/configure
+$(srcdir)/tests/rpathx/Makefile.in: $(srcdir)/tests/rpathx/Makefile.am $(srcdir)/tests/rpathx/configure.in
+ cd $(srcdir)/tests/rpathx && automake Makefile
+$(srcdir)/tests/rpathx/aclocal.m4: $(srcdir)/tests/rpathx/configure.in
+ cd $(srcdir)/tests/rpathx && aclocal -I ../../m4
+$(srcdir)/tests/rpathx/configure: $(srcdir)/tests/rpathx/configure.in $(srcdir)/tests/rpathx/aclocal.m4
+ cd $(srcdir)/tests/rpathx && autoconf
+
+CONFIGURES_RPATHY = $(srcdir)/tests/rpathy/Makefile.in $(srcdir)/tests/rpathy/aclocal.m4 $(srcdir)/tests/rpathy/configure
+$(srcdir)/tests/rpathy/Makefile.in: $(srcdir)/tests/rpathy/Makefile.am $(srcdir)/tests/rpathy/configure.in
+ cd $(srcdir)/tests/rpathy && automake Makefile
+$(srcdir)/tests/rpathy/aclocal.m4: $(srcdir)/tests/rpathy/configure.in
+ cd $(srcdir)/tests/rpathy && aclocal -I ../../m4
+$(srcdir)/tests/rpathy/configure: $(srcdir)/tests/rpathy/configure.in $(srcdir)/tests/rpathy/aclocal.m4
+ cd $(srcdir)/tests/rpathy && autoconf
+
+CONFIGURES_RPATHLX = $(srcdir)/tests/rpathlx/Makefile.in $(srcdir)/tests/rpathlx/aclocal.m4 $(srcdir)/tests/rpathlx/configure
+$(srcdir)/tests/rpathlx/Makefile.in: $(srcdir)/tests/rpathlx/Makefile.am $(srcdir)/tests/rpathlx/configure.in
+ cd $(srcdir)/tests/rpathlx && automake Makefile
+$(srcdir)/tests/rpathlx/aclocal.m4: $(srcdir)/tests/rpathlx/configure.in $(srcdir)/m4/lib-link.m4 $(srcdir)/m4/lib-prefix.m4 $(srcdir)/m4/lib-ld.m4
+ cd $(srcdir)/tests/rpathlx && aclocal -I ../../m4
+$(srcdir)/tests/rpathlx/configure: $(srcdir)/tests/rpathlx/configure.in $(srcdir)/tests/rpathlx/aclocal.m4
+ cd $(srcdir)/tests/rpathlx && autoconf
+
+CONFIGURES_RPATHLY = $(srcdir)/tests/rpathly/Makefile.in $(srcdir)/tests/rpathly/aclocal.m4 $(srcdir)/tests/rpathly/configure
+$(srcdir)/tests/rpathly/Makefile.in: $(srcdir)/tests/rpathly/Makefile.am $(srcdir)/tests/rpathly/configure.in
+ cd $(srcdir)/tests/rpathly && automake Makefile
+$(srcdir)/tests/rpathly/aclocal.m4: $(srcdir)/tests/rpathly/configure.in $(srcdir)/m4/lib-link.m4 $(srcdir)/m4/lib-prefix.m4 $(srcdir)/m4/lib-ld.m4
+ cd $(srcdir)/tests/rpathly && aclocal -I ../../m4
+$(srcdir)/tests/rpathly/configure: $(srcdir)/tests/rpathly/configure.in $(srcdir)/tests/rpathly/aclocal.m4
+ cd $(srcdir)/tests/rpathly && autoconf
+
+CONFIGURES_RPATHLYX = $(srcdir)/tests/rpathlyx/Makefile.in $(srcdir)/tests/rpathlyx/aclocal.m4 $(srcdir)/tests/rpathlyx/configure
+$(srcdir)/tests/rpathlyx/Makefile.in: $(srcdir)/tests/rpathlyx/Makefile.am $(srcdir)/tests/rpathlyx/configure.in
+ cd $(srcdir)/tests/rpathlyx && automake Makefile
+$(srcdir)/tests/rpathlyx/aclocal.m4: $(srcdir)/tests/rpathlyx/configure.in $(srcdir)/m4/lib-link.m4 $(srcdir)/m4/lib-prefix.m4 $(srcdir)/m4/lib-ld.m4
+ cd $(srcdir)/tests/rpathlyx && aclocal -I ../../m4
+$(srcdir)/tests/rpathlyx/configure: $(srcdir)/tests/rpathlyx/configure.in $(srcdir)/tests/rpathlyx/aclocal.m4
+ cd $(srcdir)/tests/rpathlyx && autoconf
+
+SUBCONFIGURES = $(CONFIGURES_RPATHX) $(CONFIGURES_RPATHY) $(CONFIGURES_RPATHLX) $(CONFIGURES_RPATHLY) $(CONFIGURES_RPATHLYX)
+
+subconfigures: $(SUBCONFIGURES)
+
+# Hidden from automake, but really activated. Works around an automake-1.5 bug.
+#distdir: subconfigures
+
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.13)
AC_INIT(src/msgfmt.c)
-AM_INIT_AUTOMAKE(gettext, 0.11-pre5)
+AM_INIT_AUTOMAKE(gettext, 0.11-pre5+)
RELEASE_DATE=2001-05-23 dnl in "date +%Y-%m-%d" format
AM_CONFIG_HEADER(config.h)
fi
fi
+dnl Checks for tests/rpathcfg.
+AC_SUBST(GCC)
+AC_SUBST(LD)
+AC_SUBST(with_gnu_ld)
+
dnl Generate the version information file in the intl/ directory.
test -d intl || mkdir intl
echo "GNU gettext library from $PACKAGE-$VERSION" > intl/VERSION
mv $m.tmp $m
done
dnl Fix an automake-1.5 bug.
- for m in doc/Makefile; do
+ for m in Makefile doc/Makefile; do
sed -e 's,^#distdir:,distdir:,' < $m > $m.tmp
mv $m.tmp $m
done
+2002-01-20 Bruno Haible <bruno@clisp.org>
+
+ * rpathx: New subdirectory.
+ * rpathy: New subdirectory.
+ * rpathlx: New subdirectory.
+ * rpathly: New subdirectory.
+ * rpathlyx: New subdirectory.
+ * rpath-1[ab], rpath-1: New files.
+ * rpath-2[ab][ab][abcd], rpath-2_[ab], rpath-2.README: New files.
+ * rpathcfg.sh: New file.
+ * Makefile.am (TESTS): Add rpath-1[ab], rpath-2[ab][ab][abcd].
+ (EXTRA_DIST): Add rpathx/*, rpathy/*, rpathlx/*, rpathly/*, rpathlyx/*,
+ rpath-2.README, rpathcfg.sh.
+ (TESTS_ENVIRONMENT): Also set CONFIG_SHELL.
+ (rpathcfg): New target.
+ (MOSTLYCLEANFILES): New variable.
+
2002-01-12 Bruno Haible <bruno@clisp.org>
* lang-c: Include config.h, needed by xsetenv.h.
format-pascal-1 format-pascal-2 \
format-ycp-1 format-ycp-2 \
plural-1 plural-2 \
- lang-c lang-c++ lang-objc lang-clisp lang-elisp lang-librep lang-java lang-pascal lang-ycp lang-po lang-rst
+ lang-c lang-c++ lang-objc lang-clisp lang-elisp lang-librep lang-java lang-pascal lang-ycp lang-po lang-rst \
+ rpath-1a rpath-1b \
+ rpath-2aaa rpath-2aab rpath-2aac rpath-2aad \
+ rpath-2aba rpath-2abb rpath-2abc rpath-2abd \
+ rpath-2baa rpath-2bab rpath-2bac rpath-2bad \
+ rpath-2bba rpath-2bbb rpath-2bbc rpath-2bbd
-EXTRA_DIST = $(TESTS) test.mo xg-test1.ok.po mex-test2.ok msguniq-a.in msguniq-a.out
+EXTRA_DIST = $(TESTS) \
+ test.mo xg-test1.ok.po mex-test2.ok msguniq-a.in msguniq-a.out \
+ rpathx/configure.in rpathx/aclocal.m4 rpathx/configure \
+ rpathx/Makefile.am rpathx/Makefile.in rpathx/rpathx.c \
+ rpathy/configure.in rpathy/aclocal.m4 rpathy/configure \
+ rpathy/Makefile.am rpathy/Makefile.in rpathy/rpathy.c \
+ rpathlx/configure.in rpathlx/aclocal.m4 rpathlx/configure \
+ rpathlx/Makefile.am rpathlx/Makefile.in rpathlx/usex.c \
+ rpathly/configure.in rpathly/aclocal.m4 rpathly/configure \
+ rpathly/Makefile.am rpathly/Makefile.in rpathly/usey.c \
+ rpathlyx/configure.in rpathlyx/aclocal.m4 rpathlyx/configure \
+ rpathlyx/Makefile.am rpathlyx/Makefile.in rpathlyx/usey.c \
+ rpath-1 rpath-2_a rpath-2_b rpath-2.README rpathcfg.sh
XGETTEXT = ../src/xgettext
CPPFLAGS='@CPPFLAGS@' LDFLAGS='@LDFLAGS@' \
INTLLIBS='@INTLLIBS@' \
TESTJAVA='@TESTJAVA@' \
+ CONFIG_SHELL='$(SHELL)' \
$(SHELL)
xg-test1.ok.po: $(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
$(top_srcdir)/src/xgettext.c $(top_srcdir)/src/msgfmt.c \
$(top_srcdir)/src/gettext.c
-# Two auxiliary programs used by the tests.
+# Three auxiliary programs used by the tests.
INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
LDADD = $(LDADD_@USE_INCLUDED_LIBINTL@)
tstngettext_LDADD = ../lib/libgettextlib.la $(LDADD)
cake_SOURCES = plural-1-prg.c setlocale.c
cake_LDADD = ../lib/libgettextlib.la $(LDADD)
+
+# Help maintaining config.rpath.
+rpathcfg: rpathcfg.sh
+ top_srcdir=$(top_srcdir) \
+ CONFIG_SHELL='$(SHELL)' \
+ CC='@CC@' GCC='@GCC@' \
+ LDFLAGS='@LDFLAGS@' \
+ LD='@LD@' with_gnu_ld='@with_gnu_ld@' \
+ host='@host@' \
+ $(SHELL) $(srcdir)/rpathcfg.sh > rpathcfg 2> rpathcfg.log
+MOSTLYCLEANFILES = rpathcfg rpathcfg.log
--- /dev/null
+# Common portion of all rpath-1* tests.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+builddir=`pwd`
+global_top_srcdir=`cd "$top_srcdir" && pwd`
+export global_top_srcdir
+
+tmpfiles="$tmpfiles $rp-prefix"
+rm -rf $rp-prefix
+mkdir $rp-prefix
+
+tmpfiles="$tmpfiles $rp-build1"
+rm -rf $rp-build1
+mkdir $rp-build1
+(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd $rp-build1 && tar xf -)
+(cd $rp-build1
+ ${CONFIG_SHELL-/bin/sh} ./configure $build1_configure_flags --prefix=$builddir/$rp-prefix > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+
+tmpfiles="$tmpfiles $rp-build2"
+rm -rf $rp-build2
+mkdir $rp-build2
+(cd $top_srcdir/tests/rpathlx && tar cf - *) | (cd $rp-build2 && tar xf -)
+(cd $rp-build2
+ ${CONFIG_SHELL-/bin/sh} ./configure --prefix=$builddir/$rp-prefix > configure.log 2>&1
+ make > make.log 2>&1
+ make check >> make.log
+)
+result=$?
+
+rm -rf $tmpfiles
+
+exit $result
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# Simple case: a static library.
+
+rp=rp1a
+build1_configure_flags=--disable-shared
+
+. $srcdir/rpath-1
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# Simple case: a shared library.
+
+rp=rp1b
+build1_configure_flags=
+
+. $srcdir/rpath-1
--- /dev/null
+Tests for config.rpath and lib-link.m4.
+
+rpath-1 w
+ |
+ +---- a = static, b = shared
+
+rpath-2 u v w
+ | | |
+ | | +---- a = static/static, b = static/shared,
+ | | c = shared/static, d = shared/shared.
+ | |
+ | +------ a = all libraries and the program have the same prefix,
+ | b = the libraries are in different directories.
+ |
+ +-------- a = all shared libraries use the libtool *.la files for
+ resolving dependencies, b = dependencies are given as
+ AC_LIB_LINKFLAGS argument instead.
+
+The rpath-2* tests are sensitive to
+ - incomplete shared library in the system,
+ - bugs in libtool that creates the shared libraries,
+ - bugs in lib-link.m4.
+
+Known failures:
+
+* FreeBSD4: rpath-2bad, rpath-2bbd fail because of a combination of a bug
+ in libtool (the libtool command line for creating librpathy.la contains
+ a -rpath command, but the resulting gcc command line doesn't) and a bug
+ in FreeBSD's runtime loader (it searches for librpathx.so.0 twice, and
+ in the second search it not only ignores the success in the first search
+ but also the rpath given in the executable).
+
--- /dev/null
+# Common portion of all rpath-2?a? tests.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+builddir=`pwd`
+global_top_srcdir=`cd "$top_srcdir" && pwd`
+export global_top_srcdir
+
+tmpfiles="$tmpfiles $rp-prefix"
+rm -rf $rp-prefix
+mkdir $rp-prefix
+
+tmpfiles="$tmpfiles $rp-build1"
+rm -rf $rp-build1
+mkdir $rp-build1
+(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd $rp-build1 && tar xf -)
+(cd $rp-build1
+ ${CONFIG_SHELL-/bin/sh} ./configure $build1_configure_flags --prefix=$builddir/$rp-prefix > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+if test $remove_la = yes; then
+ rm -f $rp-prefix/lib/librpathx.la
+fi
+
+tmpfiles="$tmpfiles $rp-build2"
+rm -rf $rp-build2
+mkdir $rp-build2
+(cd $top_srcdir/tests/rpathy && tar cf - *) | (cd $rp-build2 && tar xf -)
+(cd $rp-build2
+ ${CONFIG_SHELL-/bin/sh} ./configure $build2_configure_flags --prefix=$builddir/$rp-prefix > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+if test $remove_la = yes; then
+ rm -f $rp-prefix/lib/librpathy.la
+fi
+
+tmpfiles="$tmpfiles $rp-build3"
+rm -rf $rp-build3
+mkdir $rp-build3
+(cd $top_srcdir/tests/$build3_package && tar cf - *) | (cd $rp-build3 && tar xf -)
+(cd $rp-build3
+ ${CONFIG_SHELL-/bin/sh} ./configure --prefix=$builddir/$rp-prefix > configure.log 2>&1
+ make > make.log 2>&1
+ make check >> make.log
+)
+result=$?
+
+rm -rf $tmpfiles
+
+exit $result
--- /dev/null
+# Common portion of all rpath-2?b? tests.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+builddir=`pwd`
+global_top_srcdir=`cd "$top_srcdir" && pwd`
+export global_top_srcdir
+
+tmpfiles="$tmpfiles $rp-prefix1"
+rm -rf $rp-prefix1
+mkdir $rp-prefix1
+
+tmpfiles="$tmpfiles $rp-prefix2"
+rm -rf $rp-prefix2
+mkdir $rp-prefix2
+
+tmpfiles="$tmpfiles $rp-prefix"
+rm -rf $rp-prefix
+mkdir $rp-prefix
+
+tmpfiles="$tmpfiles $rp-build1"
+rm -rf $rp-build1
+mkdir $rp-build1
+(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd $rp-build1 && tar xf -)
+(cd $rp-build1
+ ${CONFIG_SHELL-/bin/sh} ./configure $build1_configure_flags --prefix=$builddir/$rp-prefix1 > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+if test $remove_la = yes; then
+ rm -f $rp-prefix1/lib/librpathx.la
+fi
+
+tmpfiles="$tmpfiles $rp-build2"
+rm -rf $rp-build2
+mkdir $rp-build2
+(cd $top_srcdir/tests/rpathy && tar cf - *) | (cd $rp-build2 && tar xf -)
+(cd $rp-build2
+ ${CONFIG_SHELL-/bin/sh} ./configure $build2_configure_flags --prefix=$builddir/$rp-prefix2 --with-librpathx-prefix=$builddir/$rp-prefix1 > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+if test $remove_la = yes; then
+ rm -f $rp-prefix2/lib/librpathy.la
+fi
+
+tmpfiles="$tmpfiles $rp-build3"
+rm -rf $rp-build3
+mkdir $rp-build3
+(cd $top_srcdir/tests/$build3_package && tar cf - *) | (cd $rp-build3 && tar xf -)
+(cd $rp-build3
+ if test $remove_la = yes; then
+ build3_configure_flags=--with-librpathx-prefix=$builddir/$rp-prefix1
+ else
+ build3_configure_flags=
+ fi
+ ${CONFIG_SHELL-/bin/sh} ./configure --prefix=$builddir/$rp-prefix --with-librpathy-prefix=$builddir/$rp-prefix2 $build3_configure_flags > configure.log 2>&1
+ make > make.log 2>&1
+ make check >> make.log
+)
+result=$?
+
+rm -rf $tmpfiles
+
+exit $result
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a static library.
+
+rp=rp2aaa
+build1_configure_flags=--disable-shared
+build2_configure_flags=--disable-shared
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a shared library.
+
+rp=rp2aab
+build1_configure_flags=
+build2_configure_flags=--disable-shared
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a static library.
+
+rp=rp2aac
+build1_configure_flags=--disable-shared
+build2_configure_flags=
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a shared library.
+
+rp=rp2aad
+build1_configure_flags=
+build2_configure_flags=
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a static library.
+# Each library installed with a different prefix.
+
+rp=rp2aba
+build1_configure_flags=--disable-shared
+build2_configure_flags=--disable-shared
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a shared library.
+# Each library installed with a different prefix.
+
+rp=rp2abb
+build1_configure_flags=
+build2_configure_flags=--disable-shared
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a static library.
+# Each library installed with a different prefix.
+
+rp=rp2abc
+build1_configure_flags=--disable-shared
+build2_configure_flags=
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a shared library.
+# Each library installed with a different prefix.
+
+rp=rp2abd
+build1_configure_flags=
+build2_configure_flags=
+build3_package=rpathly
+remove_la=no
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a static library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+
+rp=rp2baa
+build1_configure_flags=--disable-shared
+build2_configure_flags=--disable-shared
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a shared library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+
+rp=rp2bab
+build1_configure_flags=
+build2_configure_flags=--disable-shared
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a static library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+
+rp=rp2bac
+build1_configure_flags=--disable-shared
+build2_configure_flags=
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a shared library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+
+rp=rp2bad
+build1_configure_flags=
+build2_configure_flags=
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_a
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a static library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+# Each library installed with a different prefix.
+
+rp=rp2bba
+build1_configure_flags=--disable-shared
+build2_configure_flags=--disable-shared
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a static library depending on a shared library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+# Each library installed with a different prefix.
+
+rp=rp2bbb
+build1_configure_flags=
+build2_configure_flags=--disable-shared
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a static library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+# Each library installed with a different prefix.
+
+rp=rp2bbc
+build1_configure_flags=--disable-shared
+build2_configure_flags=
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# With dependencies: a shared library depending on a shared library.
+# No libtool *.la files are assumed, dependencies given as AC_LIB_LINKFLAGS
+# argument instead.
+# Each library installed with a different prefix.
+
+rp=rp2bbd
+build1_configure_flags=
+build2_configure_flags=
+build3_package=rpathlyx
+remove_la=yes
+
+. $top_srcdir/tests/rpath-2_b
--- /dev/null
+#!/bin/sh
+# Prints information for maintaining config.rpath.
+
+# The caller should set the environment variables
+# top_srcdir, CONFIG_SHELL, CC, GCC, LDFLAGS, LD, with_gnu_ld, host.
+
+echo "=============== rpathcfg for $host ==============="
+echo
+echo "--------------- config.rpath output ---------------"
+${CONFIG_SHELL-/bin/sh} $top_srcdir/config.rpath "$host" | sed -e 's/^acl_cv_//'
+echo "--------------- experimentally determined ---------------"
+abs_top_srcdir=`cd $top_srcdir && pwd`
+builddir=`pwd`
+global_top_srcdir=`cd "$top_srcdir" && pwd`
+export global_top_srcdir
+rm -rf tstprefix tstbuild tstlib
+
+eval `${CONFIG_SHELL-/bin/sh} $top_srcdir/config.rpath "$host" | grep '^acl_cv_wl='`
+wl="$acl_cv_wl"
+
+# Static library suffix (normally "a").
+mkdir tstprefix
+mkdir tstbuild
+(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd tstbuild && tar xf -)
+(cd tstbuild
+ ${CONFIG_SHELL-/bin/sh} ./configure --disable-shared --prefix=$builddir/tstprefix > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+rm -rf tstbuild
+libext=
+cd tstprefix/lib
+for f in *; do
+ case $f in
+ *.la) ;;
+ *[0-9]) ;;
+ *) libext=`echo $f | sed -e 's/^.*\.//'`;;
+ esac
+ if test -n "$libext"; then
+ break
+ fi
+done
+cd ../..
+rm -rf tstprefix
+
+# Shared library suffix (normally "so").
+mkdir tstprefix
+mkdir tstbuild
+(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd tstbuild && tar xf -)
+(cd tstbuild
+ ${CONFIG_SHELL-/bin/sh} ./configure --disable-static --prefix=$builddir/tstprefix > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+rm -rf tstbuild
+shlibext=
+cd tstprefix/lib || exit 1
+for f in *; do
+ case $f in
+ *.la) ;;
+ *[0-9]) ;;
+ *) shlibext=`echo $f | sed -e 's/^.*\.//'`;;
+ esac
+ if test -n "$shlibext"; then
+ break
+ fi
+done
+cd ../..
+rm -rf tstprefix
+
+# Prepare hardcoding tests.
+mkdir tstprefix
+mkdir tstbuild
+(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd tstbuild && tar xf -)
+(cd tstbuild
+ ${CONFIG_SHELL-/bin/sh} ./configure --disable-static --prefix=$builddir/tstprefix > configure.log 2>&1
+ make > make.log 2>&1
+ make install > install.log 2>&1
+)
+rm -rf tstbuild
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=
+for spec in \
+ '-L$libdir' \
+ '-R$libdir' \
+ '-rpath $libdir' '${wl}-rpath ${wl}$libdir' \
+ '${wl}+b ${wl}$libdir' \
+ '${wl}-R $libdir:/usr/lib:/lib' \
+ '${wl}-blibpath:$libdir:/usr/lib:/lib' \
+ '${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' \
+ ; do
+ mv tstprefix/lib tstlib
+ libdir=`pwd`/tstprefix/lib
+ eval flag=\"$spec\"
+ echo 1>&2
+ echo "$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstlib/librpathx.$shlibext $flag -o a.out" 1>&2
+ $CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstlib/librpathx.$shlibext $flag -o a.out
+ if test $? = 0; then
+ mv tstlib tstprefix/lib
+ echo "ok, running created a.out." 1>&2
+ if ./a.out; then
+ hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec$spec
+"
+ fi
+ else
+ mv tstlib tstprefix/lib
+ fi
+ rm -f a.out
+done
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=
+if test -n "$hardcode_libdir_flag_spec"; then
+ spec=`echo "$hardcode_libdir_flag_spec" | sed -e '2,$d'`
+ # Try with multiple -rpath flags.
+ mv tstprefix/lib tstlib
+ libdir=`pwd`/tstprefix/lib
+ eval flag1=\"$spec\"
+ libdir=/tmp
+ eval flag2=\"$spec\"
+ echo 1>&2
+ echo "$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstlib/librpathx.$shlibext $flag1 $flag2 -o a.out" 1>&2
+ $CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstlib/librpathx.$shlibext $flag1 $flag2 -o a.out
+ if test $? = 0; then
+ mv tstlib tstprefix/lib
+ echo "ok, running created a.out." 1>&2
+ if ./a.out; then
+ hardcode_libdir_separator=NONE
+ fi
+ else
+ mv tstlib tstprefix/lib
+ fi
+ rm -f a.out
+ if test -z "$hardcode_libdir_separator"; then
+ # Try with a single -rpath flag.
+ mv tstprefix/lib tstlib
+ libdir=`pwd`/tstprefix/lib:/tmp
+ eval flag=\"$spec\"
+ echo 1>&2
+ echo "$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstlib/librpathx.$shlibext $flag -o a.out" 1>&2
+ $CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstlib/librpathx.$shlibext $flag -o a.out
+ if test $? = 0; then
+ mv tstlib tstprefix/lib
+ echo "ok, running created a.out." 1>&2
+ if ./a.out; then
+ hardcode_libdir_separator=:
+ fi
+ else
+ mv tstlib tstprefix/lib
+ fi
+ rm -f a.out
+ fi
+ if test -z "$hardcode_libdir_separator"; then
+ echo "hardcode_libdir_separator test failed!" 1>&2
+ else
+ if test "$hardcode_libdir_separator" = NONE; then
+ hardcode_libdir_separator=
+ fi
+ fi
+fi
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=no
+echo 1>&2
+echo "$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstprefix/lib/librpathx.$shlibext -o a.out" 1>&2
+$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c tstprefix/lib/librpathx.$shlibext -o a.out
+if test $? = 0; then
+ echo "ok, running created a.out." 1>&2
+ if ./a.out; then
+ hardcode_direct=yes
+ fi
+fi
+rm -f a.out
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=no
+echo 1>&2
+echo "$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c -Ltstprefix/lib -lrpathx -o a.out" 1>&2
+$CC $LDFLAGS $top_srcdir/tests/rpathlx/usex.c -Ltstprefix/lib -lrpathx -o a.out
+if test $? = 0; then
+ echo "ok, running created a.out." 1>&2
+ if ./a.out; then
+ hardcode_minus_L=yes
+ fi
+fi
+rm -f a.out
+
+# Clean up.
+rm -rf tstprefix
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+cat <<EOF
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
--- /dev/null
+AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
+mkinstalldirs = $(SHELL) @global_top_srcdir@/mkinstalldirs
+bin_PROGRAMS = usex
+usex_SOURCES = usex.c
+LDADD = @LIBRPATHX@
+
+check: all
+ ./usex
--- /dev/null
+# Configuration of a program that links with librpathx.
+AC_INIT(configure.in)
+AC_CONFIG_AUX_DIRS($global_top_srcdir ../..)
+AM_INIT_AUTOMAKE(gexttext_rpathlx, 0)
+AC_PROG_CC
+AC_LIB_LINKFLAGS([rpathx])
+AC_SUBST(global_top_srcdir)
+AC_OUTPUT([Makefile])
--- /dev/null
+extern int rpathx_value ();
+int main () { return !(rpathx_value () == 5); }
--- /dev/null
+AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
+mkinstalldirs = $(SHELL) @global_top_srcdir@/mkinstalldirs
+bin_PROGRAMS = usey
+usey_SOURCES = usey.c
+LDADD = @LIBRPATHY@
+
+check: all
+ ./usey
--- /dev/null
+# Configuration of a program that links with librpathy.
+AC_INIT(configure.in)
+AC_CONFIG_AUX_DIRS($global_top_srcdir ../..)
+AM_INIT_AUTOMAKE(gexttext_rpathly, 0)
+AC_PROG_CC
+AC_LIB_LINKFLAGS([rpathy])
+AC_SUBST(global_top_srcdir)
+AC_OUTPUT([Makefile])
--- /dev/null
+extern int rpathy_value ();
+int main () { return !(rpathy_value () == 57); }
--- /dev/null
+AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
+mkinstalldirs = $(SHELL) @global_top_srcdir@/mkinstalldirs
+bin_PROGRAMS = usey
+usey_SOURCES = usey.c
+LDADD = @LIBRPATHY@
+
+check: all
+ ./usey
--- /dev/null
+# Configuration of a program that links with librpathy.
+AC_INIT(configure.in)
+AC_CONFIG_AUX_DIRS($global_top_srcdir ../..)
+AM_INIT_AUTOMAKE(gexttext_rpathlyx, 0)
+AC_PROG_CC
+AC_LIB_LINKFLAGS([rpathx])
+AC_LIB_LINKFLAGS([rpathy],[rpathx])
+AC_LIB_APPENDTOVAR([LIBRPATHY], [$LIBRPATHX])
+AC_SUBST(global_top_srcdir)
+AC_OUTPUT([Makefile])
--- /dev/null
+extern int rpathy_value ();
+int main () { return !(rpathy_value () == 57); }
--- /dev/null
+AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
+mkinstalldirs = $(SHELL) @global_top_srcdir@/mkinstalldirs
+lib_LTLIBRARIES = librpathx.la
+librpathx_la_SOURCES = rpathx.c
+librpathx_la_LDFLAGS = -lc -no-undefined
--- /dev/null
+# Configuration of librpathx.
+AC_INIT(configure.in)
+AC_CONFIG_AUX_DIRS($global_top_srcdir ../..)
+AM_INIT_AUTOMAKE(gexttext_rpathx, 0)
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_SUBST(global_top_srcdir)
+AC_OUTPUT([Makefile])
--- /dev/null
+int rpathx_value () { return 5; }
--- /dev/null
+AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
+mkinstalldirs = $(SHELL) @global_top_srcdir@/mkinstalldirs
+lib_LTLIBRARIES = librpathy.la
+librpathy_la_SOURCES = rpathy.c
+librpathy_la_LDFLAGS = @LIBRPATHX@ -lc -no-undefined
--- /dev/null
+# Configuration of librpathy that depends on librpathx.
+AC_INIT(configure.in)
+AC_CONFIG_AUX_DIRS($global_top_srcdir ../..)
+AM_INIT_AUTOMAKE(gexttext_rpathy, 0)
+AC_PROG_CC
+AM_PROG_LIBTOOL
+AC_LIB_LINKFLAGS([rpathx])
+AC_SUBST(global_top_srcdir)
+AC_OUTPUT([Makefile])
--- /dev/null
+extern int rpathx_value ();
+int rpathy_value () { return 10 * rpathx_value () + 7; }