autotools: use bctoolbox-tester instead of cunit

parent b7e6de69
......@@ -1000,25 +1000,12 @@ AM_CONDITIONAL(ENABLE_TESTS, test x$tests = xyes)
dnl ##################################################
dnl # Check for CUnit
dnl # Check for bctoolbox-tester
dnl ##################################################
PKG_CHECK_MODULES(CUNIT, cunit, [found_cunit=yes],[found_cunit=no])
PKG_CHECK_MODULES(BCTOOLBOXTESTER, bctoolbox-tester, [found_pkg_config_bctoolboxtester=yes],[found_pkg_config_bctoolboxtester=no])
if test "$found_cunit" = "no" ; then
AC_CHECK_HEADERS(CUnit/CUnit.h,
[
AC_CHECK_LIB(cunit,CU_add_suite,[
found_cunit=yes
CUNIT_LIBS+=" -lcunit"
])
])
fi
case "$target_os" in
*darwin*)
#hack for macport
CUNIT_LIBS+=" -lncurses"
;;
*mingw*)
CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0501"
LIBS="$LIBS -lws2_32 -liphlpapi"
......@@ -1026,18 +1013,11 @@ case "$target_os" in
;;
esac
if test "$found_cunit" = "no" ; then
AC_MSG_WARN([Could not find cunit framework, tests are not compiled.])
else
AC_CHECK_LIB(cunit,CU_get_suite,[
AC_DEFINE(HAVE_CU_GET_SUITE,1,[defined when CU_get_suite is available])
],[foo=bar],[$CUNIT_LIBS])
AC_CHECK_LIB(cunit,CU_curses_run_tests,[
AC_DEFINE(HAVE_CU_CURSES,1,[defined when CU_curses_run_tests is available])
],[foo=bar],[$CUNIT_LIBS])
if test "$found_pkg_config_bctoolboxtester" = "no" ; then
AC_MSG_WARN([Could not find bctoolbox-tester wrapper, tests are not compiled.])
fi
AM_CONDITIONAL(BUILD_TESTS,test x$found_cunit = xyes)
AM_CONDITIONAL(BUILD_TESTS,test x$found_pkg_config_bctoolboxtester = xyes)
dnl check for libsrtp support (secure rtp)
......
......@@ -18,7 +18,7 @@ mediastreamer2_tester_SOURCES= \
mediastreamer2_text_stream_tester.c \
mediastreamer2_framework_tester.c \
mediastreamer2_player_tester.c \
mediastreamer2_neon_tester.c
mediastreamer2_neon_tester.c
AM_CPPFLAGS=\
-DBC_CONFIG_FILE=\"mediastreamer-config.h\" \
......@@ -40,7 +40,7 @@ AM_CPPFLAGS=\
LDADD=$(top_builddir)/src/libmediastreamer_base.la \
$(top_builddir)/src/libmediastreamer_voip.la \
$(ORTP_LIBS) \
$(CUNIT_LIBS) \
$(BCTOOLBOXTESTER_LIBS) \
$(SPEEX_LIBS)
if BUILD_MACOSX
......@@ -60,7 +60,7 @@ if BUILD_MACOSX
AM_LDFLAGS+=-Wl,-rpath -Wl,$(libdir)
endif
AM_CFLAGS=$(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) $(ORTP_CFLAGS) $(CUNIT_CFLAGS)
AM_CFLAGS=$(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) $(ORTP_CFLAGS) $(BCTOOLBOXTESTER_CFLAGS)
if BUILD_VIDEO
AM_CFLAGS+=$(VIDEO_CFLAGS) $(GLEW_CFLAGS)
......@@ -88,6 +88,6 @@ test: mediastreamer2_tester
else
test:
@echo "CUnit must be installed to be able to run the tests!"
@echo "bctoolbox-tester must be installed to be able to run the tests!"
endif
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