Commit 4825009e authored by Kamil Dudka's avatar Kamil Dudka

tests: fix broken linkage with --disable-static

parent 01c4916a
......@@ -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])
......
......@@ -49,7 +49,15 @@ HFILES = nghttp2_pq_test.h nghttp2_map_test.h nghttp2_queue_test.h \
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
......
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