From 950c71e6879827aad70ddaae67d69b6643b0785d Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Mon, 8 Aug 2016 11:21:55 +0200 Subject: [PATCH] Check for unit test framework in configure.ac Criterion is a unit testing framework for C and C++ and it's C99 compatible. It allows for fast test writing because, unlike a lot of other C unit test frameworks, it doesn't require a lot of boilerplate code. This check in configure.ac checks if Criterion is installed on the system. --- configure.ac | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f7a730562..33f418dbb 100644 --- a/configure.ac +++ b/configure.ac @@ -3151,6 +3151,25 @@ AM_CONDITIONAL(WITH_CGRAPH, [true]) # ----------------------------------------------------------------------- +# Checking for unit testing framework Criterion +# This framework is used for the unit tests +AC_CHECK_LIB( + criterion, + main, + [ + use_criterion="Yes" + AC_DEFINE_UNQUOTED(HAVE_CRITERION,1,[Criterion unit testing framework is installed and available for use.]) + ], + [ + use_criterion="No (Criterion unit testing framework not installed)" + AC_MSG_WARN(Criterion unit testing framework not installed) + ], + [] +) +AM_CONDITIONAL(HAVE_CRITERION, test $use_criterion = "Yes") + +# ----------------------------------------------------------------------- + # Generate Makefiles AC_CONFIG_FILES(Makefile debian/changelog @@ -3384,4 +3403,6 @@ echo "" echo " tcldot: $use_tcldot" echo " tclpathplan: $use_tclpathplan" echo " gdtclft: $use_gdtclft" - +echo "" +echo "Testing utilities:" +echo " criterion: $use_criterion" -- 2.50.1