forked from pool/nghttp2
- Update to 1.4.0. OBS-URL: https://build.opensuse.org/request/show/341961 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nghttp2?expand=0&rev=40
32 lines
934 B
Diff
32 lines
934 B
Diff
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -695,6 +695,9 @@ if test "x$threads" != "xyes" ||
|
|
AC_DEFINE([NOTHREADS], [1], [Define to 1 if you want to disable threads.])
|
|
fi
|
|
|
|
+# propagate $enable_static to tests/Makefile.am
|
|
+AM_CONDITIONAL([ENABLE_STATIC], [test "x$enable_static" = "xyes"])
|
|
+
|
|
AC_SUBST([TESTLDADD])
|
|
AC_SUBST([APPLDFLAGS])
|
|
|
|
--- a/tests/Makefile.am
|
|
+++ b/tests/Makefile.am
|
|
@@ -49,7 +49,15 @@ HFILES = nghttp2_pq_test.h nghttp2_map_t
|
|
|
|
main_SOURCES = $(HFILES) $(OBJECTS)
|
|
|
|
-main_LDADD = ${top_builddir}/lib/libnghttp2.la @CUNIT_LIBS@ @TESTLDADD@
|
|
+if ENABLE_STATIC
|
|
+main_LDADD = ${top_builddir}/lib/libnghttp2.la
|
|
+else
|
|
+# With static lib disabled and symbol hiding enabled, we have to link object
|
|
+# files directly because the tests use symbols not included in public API.
|
|
+main_LDADD = ${top_builddir}/lib/.libs/*.o
|
|
+endif
|
|
+
|
|
+main_LDADD += @CUNIT_LIBS@ @TESTLDADD@
|
|
main_LDFLAGS = -static
|
|
|
|
if ENABLE_FAILMALLOC
|