Port to CUnit version 2

Linux distributions like openSUSE 12.3 include CUnit version 2.
Apparently libiscsi uses some CUnit version 1 data structures that
have been modified in CUnit version 2. This causes the libiscsi
build to fail against CUnit version 2. Fix this by detecting the
CUnit version during the configure step.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
This commit is contained in:
Bart Van Assche
2013-09-28 21:04:51 +02:00
committed by Ronnie Sahlberg
parent 766d92221c
commit bd948c959e
3 changed files with 197 additions and 171 deletions

View File

@@ -111,5 +111,14 @@ fi
AM_CONDITIONAL(ISCSITEST, [test "$ac_cv_have_cunit" = yes])
AC_CHECK_MEMBER([struct CU_SuiteInfo.pSetUpFunc],
[AC_DEFINE([HAVE_CU_SUITEINFO_PSETUPFUNC], 1,
[Define to 1 if struct CU_SuiteInfo has a member called pSetUpFunc])],
[], [[
#include <CUnit/CUnit.h>
#include <CUnit/TestDB.h>
]])
AC_CONFIG_FILES(Makefile libiscsi.pc)
AC_OUTPUT