diff --git a/configure.ac b/configure.ac index 4a3eb921..f9875457 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,17 @@ if test "x${have_cunit}" = "xno"; then AC_SUBST([CUNIT_CFLAGS]) fi fi +if test "x${have_cunit}" = "xyes"; then + # Check whether the installed cunit requires ncurses. This is + # needed because cunit in Mac OS X requires it. + LIBS_TEMP=${LIBS} + LIBS=${CUNIT_LIBS} + AC_SEARCH_LIBS([CU_initialize_registry], [ncurses]) + CUNIT_LIBS=${LIBS} + AC_SUBST([CUNIT_LIBS]) + LIBS=${LIBS_TEMP} +fi + AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ]) AX_HAVE_EPOLL([have_epoll=yes], [have_epoll=no]) AM_CONDITIONAL([HAVE_EPOLL], [ test "x${have_epoll}" = "xyes" ]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 0e247b9b..ea397f89 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -36,7 +36,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@ -lncurses +main_LDFLAGS = -static @CUNIT_LIBS@ AM_CFLAGS = -Wall -g -O2 -I${top_srcdir}/lib -I${top_srcdir}/lib/includes \ @CUNIT_CFLAGS@