check_LTLIBRARIES = libdummyrpz.la
libdummyrpz_la_SOURCES= dummylib.c test-data.c trpz.h test-data.h
libdummyrpz_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath $(abs_builddir)
-LDADD += -lpthread -ldl
+LDADD += -lpthread $(DLOPEN_LIBS)
# Initialize libtool
LT_INIT([disable-static dlopen pic-only])
+DLOPEN_LIBS="$lt_cv_dlopen_libs"
+AC_SUBST(DLOPEN_LIBS)
+
AS_IF([test "$enable_static" != "no" && test "$enable_developer" != "yes"],
[AC_MSG_ERROR([Static linking is not supported as it disables dlopen() and certain security features (e.g. RELRO, ASLR)])])
+
#
# Set the default CFLAGS, CPPFLAGS, and LDFLAGS
#