On Sat, Oct 21, 2006 at 01:31:53PM +0200, Ralf Wildenhues wrote:
> Hello Patrick,
> 
> * Patrick Welche wrote on Mon, Oct 16, 2006 at 01:17:42PM CEST:
> > 
> > /usr/X11R6/lib doesn't need to be in the default set of paths searched
> > by the loader. As I mentioned, with a different compile line to the one
> > generated by libtool, I have a working hello. The problem is that the
> > binary created by libtool contains the dependencies of the shared the
> > library rather than just depending on the shared library.
> 
> No.  The bug is that the -R information isn't also transferred to the
> program.  The (known) Libtool limitation is that it does not implement
> a consistent set of semantics for indirect library dependencies.
> (Note there are systems which don't have such.)
> 
> I'm not sure why -R isn't transferred, but somebody may have had some
> good reason for it.  Who knows.

Does the following (my first(!)) autotest pass for you? [Could be improved
with a if x_no=yes exit 77, but I don't see yet how to get x_no out]

Cheers,

Patrick

Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.202
diff -u -r1.202 Makefile.am
--- Makefile.am 24 Oct 2006 20:30:05 -0000      1.202
+++ Makefile.am 9 Nov 2006 11:58:37 -0000
@@ -406,6 +406,7 @@
                  tests/link-order2.at \
                  tests/fail.at \
                  tests/shlibpath.at \
+                 tests/depshlib.at \
                  tests/static.at \
                  tests/destdir.at \
                  tests/search-path.at \
AT_SETUP([Shared library dependencies])

AT_DATA([Makefile.am],
[lib_LTLIBRARIES                = libhello.la
libhello_la_SOURCES     = hello.c
libhello_la_LDFLAGS     = -version-info 0:0:0 $(X_PRE_LIBS) $(X_LIBS) 
$(X_EXTRA_LIBS)
libhello_la_CFLAGS      = $(X_CFLAGS)
libhello_la_LIBADD      = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS)

bin_PROGRAMS            = hello
hello_SOURCES           = main.c
hello_LDADD             = libhello.la
])

AT_DATA([configure.ac],
[AC_PREREQ([2.60])

AC_INIT([hello], [1.0])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([1.9 foreign])

AC_PATH_XTRA
LT_INIT

AC_CONFIG_FILES([Makefile])
AC_OUTPUT
])

AT_DATA([main.c],
[void hello ();

int
main (int argc, char *argv[])
{
  hello ("World");
  return 0;
}
])

AT_DATA([hello.c],
[#include <stdio.h>
#include <X11/ICE/ICEutil.h>

void
hello (char *who)
{
  printf ("Hello, %s! (%s)\n", who, IceAuthFileName());
}
])

LT_AT_BOOTSTRAP([--copy], [-I m4], [ignore], [--add-missing])

LT_AT_EXEC_CHECK([hello], 0)

AT_CLEANUP
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to