Dear all, I want to build a program that depends on a libtool library that depends on a non-libtool library that needs rpath information to be found a runtime.
My Makefile.am looks like this: lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = libfoo.c libfoo.h libfoo_la_CPPFLAGS = -I/opt/packages/papi/4.1.2.1/include libfoo_la_LDFLAGS = -L/opt/packages/papi/4.1.2.1/lib libfoo_la_LIBADD = -lpapi bin_PROGRAMS = foo foo_SOURCES = foo.c foo_LDADD = libfoo.la Here is my configure.ac: AC_INIT([foo],[42]) AM_INIT_AUTOMAKE([foreign]) LT_INIT([disable-shared]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_CC AC_CONFIG_FILES([Makefile]) AC_OUTPUT Building and linking succeeds, but trying to run ./foo leads to ./foo: error while loading shared libraries: libpapi.so: cannot open shared object file: No such file or directory The library is in the location specified by libfoo_la_LDFLAGS (.a and .so). But the rpath /opt/packages/papi/4.1.2.1/lib is not available. How do I get it into foo without specifying it as foo_LDFLAGS = -Wl,-rpath /opt/packages/papi/4.1.2.1/lib? Thanks, Christian -- Christian Rössel Jülich Supercomputing Centre Telefon +49 2461 61-1773 ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool