mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-23 16:00:07 +00:00
Link -ldl with tests only
This commit is contained in:
parent
09154c61f6
commit
c235800a1a
@ -69,9 +69,15 @@ AM_CONDITIONAL([HAVE_STDCXX_11],
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Additional libraries required for tests.
|
||||
TESTS_LIBS=
|
||||
|
||||
LIBS_OLD=$LIBS
|
||||
# Search for dlsym function, which is used in tests. Linux needs -ldl,
|
||||
# but netbsd does not need it.
|
||||
AC_SEARCH_LIBS([dlsym], [dl])
|
||||
TESTS_LIBS=$LIBS $TESTS_LIBS
|
||||
LIBS=$LIBS_OLD
|
||||
|
||||
# zlib
|
||||
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3])
|
||||
@ -235,6 +241,8 @@ if test "x$maintainer_mode" != "xno"; then
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
fi
|
||||
|
||||
AC_SUBST([TESTS_LIBS])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
lib/Makefile
|
||||
|
@ -41,7 +41,7 @@ HFILES = spdylay_pq_test.h spdylay_map_test.h spdylay_queue_test.h \
|
||||
main_SOURCES = $(HFILES) $(OBJECTS)
|
||||
|
||||
main_LDADD = ${top_builddir}/lib/libspdylay.la
|
||||
main_LDFLAGS = -static @CUNIT_LIBS@
|
||||
main_LDFLAGS = -static @CUNIT_LIBS@ @TESTS_LIBS@
|
||||
|
||||
failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \
|
||||
malloc_wrapper.c malloc_wrapper.h \
|
||||
|
Loading…
Reference in New Issue
Block a user