From: Erwin Janssen Date: Mon, 8 Aug 2016 09:21:55 +0000 (+0200) Subject: Check for unit test framework in configure.ac X-Git-Tag: untagged-27ff95768eb6958bcef7^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=950c71e6879827aad70ddaae67d69b6643b0785d;p=graphviz 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. --- 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"