Commit 1a9f89e1 authored by Philip Carns's avatar Philip Carns
Browse files

Merge branch 'carns/dev-libtool-mercury' into 'master'

work around margo/mercury rpath problem

See merge request !28
parents 08aeedba 6b97aa03
......@@ -50,3 +50,10 @@ include $(top_srcdir)/examples/multiplex/Makefile.subdir
include $(top_srcdir)/examples/composition/Makefile.subdir
include $(top_srcdir)/tests/Makefile.subdir
# Modify the .la file once installed to indicate that codes linking against
# the Margo library should also set rpath to the specific Mercury library
# that we compiled against to make sure that Mercury function calls from
# margo.h are resolved correctly. This is only relevant for other packages
# that use libtool.
install-exec-hook:
sed -i -e "s+inherited_linker_flags=''+inherited_linker_flags='-Wl,-rpath=@MERCURY_LIB_PATH@'+" $(DESTDIR)$(libdir)/libmargo.la
......@@ -66,6 +66,9 @@ PKG_CHECK_MODULES([MERCURY],[mercury],[],
LIBS="$MERCURY_LIBS $LIBS"
CPPFLAGS="$MERCURY_CFLAGS $CPPFLAGS"
CFLAGS="$MERCURY_CFLAGS $CFLAGS"
# find the path containing the Mercury libraries
MERCURY_LIB_PATH=`pkg-config --libs-only-L mercury | sed -e 's/-L//g'`
AC_SUBST([MERCURY_LIB_PATH], ["$MERCURY_LIB_PATH"])
PKG_CHECK_MODULES([ARGOBOTS],[argobots],[],
[AC_MSG_ERROR([Could not find working argobots installation!])])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment