]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
New tests for config.rpath and lib-link.m4.
authorBruno Haible <bruno@clisp.org>
Mon, 21 Jan 2002 13:33:42 +0000 (13:33 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:05:29 +0000 (01:05 +0200)
43 files changed:
ChangeLog
Makefile.am
configure.in
tests/ChangeLog
tests/Makefile.am
tests/rpath-1 [new file with mode: 0644]
tests/rpath-1a [new file with mode: 0755]
tests/rpath-1b [new file with mode: 0755]
tests/rpath-2.README [new file with mode: 0644]
tests/rpath-2_a [new file with mode: 0644]
tests/rpath-2_b [new file with mode: 0644]
tests/rpath-2aaa [new file with mode: 0755]
tests/rpath-2aab [new file with mode: 0755]
tests/rpath-2aac [new file with mode: 0755]
tests/rpath-2aad [new file with mode: 0755]
tests/rpath-2aba [new file with mode: 0755]
tests/rpath-2abb [new file with mode: 0755]
tests/rpath-2abc [new file with mode: 0755]
tests/rpath-2abd [new file with mode: 0755]
tests/rpath-2baa [new file with mode: 0755]
tests/rpath-2bab [new file with mode: 0755]
tests/rpath-2bac [new file with mode: 0755]
tests/rpath-2bad [new file with mode: 0755]
tests/rpath-2bba [new file with mode: 0755]
tests/rpath-2bbb [new file with mode: 0755]
tests/rpath-2bbc [new file with mode: 0755]
tests/rpath-2bbd [new file with mode: 0755]
tests/rpathcfg.sh [new file with mode: 0755]
tests/rpathlx/Makefile.am [new file with mode: 0644]
tests/rpathlx/configure.in [new file with mode: 0644]
tests/rpathlx/usex.c [new file with mode: 0644]
tests/rpathly/Makefile.am [new file with mode: 0644]
tests/rpathly/configure.in [new file with mode: 0644]
tests/rpathly/usey.c [new file with mode: 0644]
tests/rpathlyx/Makefile.am [new file with mode: 0644]
tests/rpathlyx/configure.in [new file with mode: 0644]
tests/rpathlyx/usey.c [new file with mode: 0644]
tests/rpathx/Makefile.am [new file with mode: 0644]
tests/rpathx/configure.in [new file with mode: 0644]
tests/rpathx/rpathx.c [new file with mode: 0644]
tests/rpathy/Makefile.am [new file with mode: 0644]
tests/rpathy/configure.in [new file with mode: 0644]
tests/rpathy/rpathy.c [new file with mode: 0644]

index 22599b67eab3337292585bb6210d8b1a863e4f97..b73c7663b690b35721d188456ae92b4fc0d8686c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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.
index 60695e7d823bc469310afd158e119aa4f96566bd..f3ce1952c15fe5a22d8a78ccbb75f1bd5cb64e45 100644 (file)
@@ -50,3 +50,54 @@ pdf:
 
 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
+
index 1ae4dd0b8b8a1cebfce77064b78801c27661fa4e..dd533dd90e6ed2bd3c5ca7ec77b78305593bf37f 100644 (file)
@@ -1,7 +1,7 @@
 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)
 
@@ -127,6 +127,11 @@ if test "$CXX" != ":"; then
   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
@@ -164,7 +169,7 @@ AC_OUTPUT([Makefile \
     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
index 1f6ec64fdb4b6962aad944d94bd15bed50b47856..3e4bff3c4315fa5e3f28bd1d302d75f89bd67216 100644 (file)
@@ -1,3 +1,20 @@
+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.
index 3f9457f446b94f7ccac11357cdc7bbf58d2a5a57..6a13fe18fbd23c0f10d70f16a4b80d51332808af 100644 (file)
@@ -54,9 +54,26 @@ TESTS = gettext-1 gettext-2 \
        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
 
@@ -84,6 +101,7 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=.:../src:$$PATH \
                    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 \
@@ -93,7 +111,7 @@ 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@)
@@ -106,3 +124,14 @@ tstngettext_SOURCES = tstngettext.c setlocale.c
 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
diff --git a/tests/rpath-1 b/tests/rpath-1
new file mode 100644 (file)
index 0000000..bf186be
--- /dev/null
@@ -0,0 +1,37 @@
+# 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
diff --git a/tests/rpath-1a b/tests/rpath-1a
new file mode 100755 (executable)
index 0000000..413a48c
--- /dev/null
@@ -0,0 +1,9 @@
+#!/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
diff --git a/tests/rpath-1b b/tests/rpath-1b
new file mode 100755 (executable)
index 0000000..3170d81
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Test config.rpath and AC_LIB_LINKFLAGS macro.
+# Simple case: a shared library.
+
+rp=rp1b
+build1_configure_flags=
+
+. $srcdir/rpath-1
diff --git a/tests/rpath-2.README b/tests/rpath-2.README
new file mode 100644 (file)
index 0000000..d8abc05
--- /dev/null
@@ -0,0 +1,32 @@
+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).
+
diff --git a/tests/rpath-2_a b/tests/rpath-2_a
new file mode 100644 (file)
index 0000000..cbe0e7e
--- /dev/null
@@ -0,0 +1,53 @@
+# 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
diff --git a/tests/rpath-2_b b/tests/rpath-2_b
new file mode 100644 (file)
index 0000000..da6a3c4
--- /dev/null
@@ -0,0 +1,66 @@
+# 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
diff --git a/tests/rpath-2aaa b/tests/rpath-2aaa
new file mode 100755 (executable)
index 0000000..1c69777
--- /dev/null
@@ -0,0 +1,12 @@
+#!/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
diff --git a/tests/rpath-2aab b/tests/rpath-2aab
new file mode 100755 (executable)
index 0000000..c06cff1
--- /dev/null
@@ -0,0 +1,12 @@
+#!/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
diff --git a/tests/rpath-2aac b/tests/rpath-2aac
new file mode 100755 (executable)
index 0000000..08779b6
--- /dev/null
@@ -0,0 +1,12 @@
+#!/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
diff --git a/tests/rpath-2aad b/tests/rpath-2aad
new file mode 100755 (executable)
index 0000000..749a243
--- /dev/null
@@ -0,0 +1,12 @@
+#!/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
diff --git a/tests/rpath-2aba b/tests/rpath-2aba
new file mode 100755 (executable)
index 0000000..dd39860
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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
diff --git a/tests/rpath-2abb b/tests/rpath-2abb
new file mode 100755 (executable)
index 0000000..86b37b2
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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
diff --git a/tests/rpath-2abc b/tests/rpath-2abc
new file mode 100755 (executable)
index 0000000..b38d21d
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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
diff --git a/tests/rpath-2abd b/tests/rpath-2abd
new file mode 100755 (executable)
index 0000000..3c54053
--- /dev/null
@@ -0,0 +1,13 @@
+#!/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
diff --git a/tests/rpath-2baa b/tests/rpath-2baa
new file mode 100755 (executable)
index 0000000..b056e7f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/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
diff --git a/tests/rpath-2bab b/tests/rpath-2bab
new file mode 100755 (executable)
index 0000000..57bdd25
--- /dev/null
@@ -0,0 +1,14 @@
+#!/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
diff --git a/tests/rpath-2bac b/tests/rpath-2bac
new file mode 100755 (executable)
index 0000000..a4d9f5c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/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
diff --git a/tests/rpath-2bad b/tests/rpath-2bad
new file mode 100755 (executable)
index 0000000..8768b9c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/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
diff --git a/tests/rpath-2bba b/tests/rpath-2bba
new file mode 100755 (executable)
index 0000000..13069ee
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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
diff --git a/tests/rpath-2bbb b/tests/rpath-2bbb
new file mode 100755 (executable)
index 0000000..09a5442
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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
diff --git a/tests/rpath-2bbc b/tests/rpath-2bbc
new file mode 100755 (executable)
index 0000000..e62a9ef
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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
diff --git a/tests/rpath-2bbd b/tests/rpath-2bbd
new file mode 100755 (executable)
index 0000000..9f97ec1
--- /dev/null
@@ -0,0 +1,15 @@
+#!/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
diff --git a/tests/rpathcfg.sh b/tests/rpathcfg.sh
new file mode 100755 (executable)
index 0000000..11f241e
--- /dev/null
@@ -0,0 +1,223 @@
+#!/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
diff --git a/tests/rpathlx/Makefile.am b/tests/rpathlx/Makefile.am
new file mode 100644 (file)
index 0000000..a104bf5
--- /dev/null
@@ -0,0 +1,8 @@
+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
diff --git a/tests/rpathlx/configure.in b/tests/rpathlx/configure.in
new file mode 100644 (file)
index 0000000..8d506a9
--- /dev/null
@@ -0,0 +1,8 @@
+# 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])
diff --git a/tests/rpathlx/usex.c b/tests/rpathlx/usex.c
new file mode 100644 (file)
index 0000000..674e70f
--- /dev/null
@@ -0,0 +1,2 @@
+extern int rpathx_value ();
+int main () { return !(rpathx_value () == 5); }
diff --git a/tests/rpathly/Makefile.am b/tests/rpathly/Makefile.am
new file mode 100644 (file)
index 0000000..46be50d
--- /dev/null
@@ -0,0 +1,8 @@
+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
diff --git a/tests/rpathly/configure.in b/tests/rpathly/configure.in
new file mode 100644 (file)
index 0000000..72b2297
--- /dev/null
@@ -0,0 +1,8 @@
+# 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])
diff --git a/tests/rpathly/usey.c b/tests/rpathly/usey.c
new file mode 100644 (file)
index 0000000..d3fe71d
--- /dev/null
@@ -0,0 +1,2 @@
+extern int rpathy_value ();
+int main () { return !(rpathy_value () == 57); }
diff --git a/tests/rpathlyx/Makefile.am b/tests/rpathlyx/Makefile.am
new file mode 100644 (file)
index 0000000..46be50d
--- /dev/null
@@ -0,0 +1,8 @@
+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
diff --git a/tests/rpathlyx/configure.in b/tests/rpathlyx/configure.in
new file mode 100644 (file)
index 0000000..1a14690
--- /dev/null
@@ -0,0 +1,10 @@
+# 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])
diff --git a/tests/rpathlyx/usey.c b/tests/rpathlyx/usey.c
new file mode 100644 (file)
index 0000000..d3fe71d
--- /dev/null
@@ -0,0 +1,2 @@
+extern int rpathy_value ();
+int main () { return !(rpathy_value () == 57); }
diff --git a/tests/rpathx/Makefile.am b/tests/rpathx/Makefile.am
new file mode 100644 (file)
index 0000000..378fda3
--- /dev/null
@@ -0,0 +1,5 @@
+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
diff --git a/tests/rpathx/configure.in b/tests/rpathx/configure.in
new file mode 100644 (file)
index 0000000..094d2e1
--- /dev/null
@@ -0,0 +1,8 @@
+# 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])
diff --git a/tests/rpathx/rpathx.c b/tests/rpathx/rpathx.c
new file mode 100644 (file)
index 0000000..fd1a377
--- /dev/null
@@ -0,0 +1 @@
+int rpathx_value () { return 5; }
diff --git a/tests/rpathy/Makefile.am b/tests/rpathy/Makefile.am
new file mode 100644 (file)
index 0000000..8211094
--- /dev/null
@@ -0,0 +1,5 @@
+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
diff --git a/tests/rpathy/configure.in b/tests/rpathy/configure.in
new file mode 100644 (file)
index 0000000..7018656
--- /dev/null
@@ -0,0 +1,9 @@
+# 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])
diff --git a/tests/rpathy/rpathy.c b/tests/rpathy/rpathy.c
new file mode 100644 (file)
index 0000000..7369d80
--- /dev/null
@@ -0,0 +1,2 @@
+extern int rpathx_value ();
+int rpathy_value () { return 10 * rpathx_value () + 7; }