ARG_ENABL_SET([vstr], [enforce using the Vstr string library to replace glibc-like printf hooks.])
ARG_ENABL_SET([monolithic], [build monolithic version of libstrongswan that includes all enabled plugins. Similarly, the plugins of charon are assembled in libcharon.])
ARG_ENABL_SET([bfd-backtraces], [use binutils libbfd to resolve backtraces for memory leaks and segfaults.])
+ARG_ENABL_SET([unit-tests], [enable unit tests using the check test framework.])
# ===================================
# option to disable default options
CFLAGS="-g -O2 -Wall -Wno-format -Wno-pointer-sign"
fi
AC_PROG_CC
+AM_PROG_CC_C_O
+
AC_LIB_PREFIX
AC_C_BIGENDIAN
CFLAGS="$CFLAGS -include `pwd`/config.h"
+if test x$unit_tests = xtrue; then
+ PKG_CHECK_MODULES(CHECK, [check >= 0.9.4])
+ AC_SUBST(CHECK_CFLAGS)
+ AC_SUBST(CHECK_LIBS)
+fi
+
# ===============================================
# collect plugin list for strongSwan components
# ===============================================
AM_CONDITIONAL(USE_PTS, test x$pts = xtrue)
AM_CONDITIONAL(USE_TROUSERS, test x$tss = xtrousers)
AM_CONDITIONAL(MONOLITHIC, test x$monolithic = xtrue)
+AM_CONDITIONAL(UNITTESTS, test x$unit_tests = xtrue)
# ========================
# set global definitions