Make the ncurses check a runtime check

This commit is contained in:
Jim Morrison 2012-02-09 10:54:47 -08:00
parent fee4a205a6
commit 553410c350
1 changed files with 5 additions and 3 deletions

View File

@ -70,10 +70,12 @@ if test "x${have_cunit}" = "xyes"; then
# 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])
CFLAGS_TEMP=${CFLAGS}
CFLAGS=${CUNIT_CFLAGS}
AC_RUN_IFELSE(AC_LANG_PROGRAM([[#include "CUnit/Basic.h"]], [CU_initialize_registry()]), [],
[CUNIT_LIBS="${LIBS} -lncurses"])
LIBS=${LIBS_TEMP}
CFLAGS=${CFLAGS_TEMP}
fi
AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])