Commit c235800a authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Link -ldl with tests only

parent 09154c61
......@@ -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 \
......
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