Add "-rpath /nowhere" to *_la_LDFLAGS for plugin test libraries. This

allows them to be successfully linked but not installed.  The change was
added for the HDF5 1.8.20 release, but is also needed for all other HDF5
branches.
This commit is contained in:
lrknox 2017-10-09 15:33:09 -05:00
parent 59a4ffac40
commit 726d7d3af5
6 changed files with 28 additions and 41 deletions

View File

@ -1062,6 +1062,7 @@ esac
case "`uname`" in
CYGWIN*)
AC_CHECK_HEADERS([io.h sys/timeb.h])
UNAME_CYGWIN="yes"
;;
MINGW*)
AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h])

View File

@ -100,36 +100,34 @@ if BUILD_ALL_CONDITIONAL
noinst_PROGRAMS=$(BUILD_ALL_PROGS)
endif
# The libh5test library provides common support code for the tests.
noinst_LTLIBRARIES=libh5test.la
if HAVE_SHARED_CONDITIONAL
# The libh5test library provides common support code for the tests.
# The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c.
# Build it as shared library if configure is enabled for shared library.
dyn_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la
# Build them as shared libraries if configure is enabled for shared library.
noinst_LTLIBRARIES=libh5test.la libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la
libdynlib1_la_SOURCES=dynlib1.c
libdynlib2_la_SOURCES=dynlib2.c
libdynlib3_la_SOURCES=dynlib3.c
libdynlib4_la_SOURCES=dynlib4.c
libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES)
libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD)
libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES)
libdynlib2.la: $(libdynlib2_la_OBJECTS) $(libdynlib2_la_DEPENDENCIES) $(EXTRA_libdynlib2_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib2_la_LINK) $(am_libdynlib2_la_rpath) $(libdynlib2_la_OBJECTS) $(libdynlib2_la_LIBADD)
libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES)
libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_libdynlib3_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib3_la_LINK) $(am_libdynlib3_la_rpath) $(libdynlib3_la_OBJECTS) $(libdynlib3_la_LIBADD)
libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES)
libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD)
#install-exec-hook:
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
else
# The libh5test library provides common support code for the tests.
noinst_LTLIBRARIES=libh5test.la
endif
libh5test_la_SOURCES=h5test.c testframe.c cache_common.c swmr_common.c

View File

@ -50,15 +50,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library.
dyn_LTLIBRARIES=libdynlibdiff.la
noinst_LTLIBRARIES=libdynlibdiff.la
libdynlibdiff_la_SOURCES=dynlib_diff.c
libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibdiff_la_LINK) $(am_libdynlibdiff_la_rpath) $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_LIBADD)
#install-exec-hook:
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif
# Temporary files. *.h5 are generated by h5diff. They should

View File

@ -39,15 +39,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library.
dyn_LTLIBRARIES=libdynlibdump.la
noinst_LTLIBRARIES=libdynlibdump.la
libdynlibdump_la_SOURCES=dynlib_dump.c
libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES)
libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibdump_la_LINK) $(am_libdynlibdump_la_rpath) $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_LIBADD)
#install-exec-hook:
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif
# Temporary files. *.h5 are generated by h5dumpgentest. They should

View File

@ -36,15 +36,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5)
if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library.
dyn_LTLIBRARIES=libdynlibls.la
noinst_LTLIBRARIES=libdynlibls.la
libdynlibls_la_SOURCES=dynlib_ls.c
libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES)
libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibls_la_LINK) $(am_libdynlibls_la_rpath) $(libdynlibls_la_OBJECTS) $(libdynlibls_la_LIBADD)
#install-exec-hook:
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif

View File

@ -45,19 +45,16 @@ h5repacktst_SOURCES=h5repacktst.c
if HAVE_SHARED_CONDITIONAL
# Build it as shared library if configure is enabled for shared library.
dyn_LTLIBRARIES=libdynlibadd.la libdynlibvers.la
noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la
libdynlibadd_la_SOURCES=dynlib_rpk.c
libdynlibvers_la_SOURCES=dynlib_vrpk.c
libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere
libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES)
libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibadd_la_LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD)
libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES)
libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD)
#install-exec-hook:
# $(RM) $(DESTDIR)$(dyndir)/*dynlib*
endif