-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from pbauman/cpp-unit
Add CPPUnit Testing Framework
- Loading branch information
Showing
27 changed files
with
2,323 additions
and
720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
dnl | ||
dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
dnl | ||
AC_DEFUN([AM_PATH_CPPUNIT], | ||
[ | ||
AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)], | ||
cppunit_config_prefix="$withval", cppunit_config_prefix="") | ||
AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)], | ||
cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="") | ||
if test x$cppunit_config_exec_prefix != x ; then | ||
cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix" | ||
if test x${CPPUNIT_CONFIG+set} != xset ; then | ||
CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config | ||
fi | ||
fi | ||
if test x$cppunit_config_prefix != x ; then | ||
cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix" | ||
if test x${CPPUNIT_CONFIG+set} != xset ; then | ||
CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config | ||
fi | ||
fi | ||
AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no) | ||
cppunit_version_min=$1 | ||
AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min) | ||
no_cppunit="" | ||
if test "$CPPUNIT_CONFIG" = "no" ; then | ||
AC_MSG_RESULT(no) | ||
no_cppunit=yes | ||
else | ||
CPPUNIT_CPPFLAGS=`$CPPUNIT_CONFIG --cflags` | ||
CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs` | ||
CPPUNIT_VERSION=`$CPPUNIT_CONFIG --version` | ||
CPPUNIT_PREFIX=`$CPPUNIT_CONFIG --prefix` | ||
cppunit_version=`$CPPUNIT_CONFIG --version` | ||
cppunit_major_version=`echo $cppunit_version | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
cppunit_minor_version=`echo $cppunit_version | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
cppunit_micro_version=`echo $cppunit_version | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
cppunit_major_min=`echo $cppunit_version_min | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
if test "x${cppunit_major_min}" = "x" ; then | ||
cppunit_major_min=0 | ||
fi | ||
cppunit_minor_min=`echo $cppunit_version_min | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
if test "x${cppunit_minor_min}" = "x" ; then | ||
cppunit_minor_min=0 | ||
fi | ||
cppunit_micro_min=`echo $cppunit_version_min | \ | ||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
if test "x${cppunit_micro_min}" = "x" ; then | ||
cppunit_micro_min=0 | ||
fi | ||
cppunit_version_proper=`expr \ | ||
$cppunit_major_version \> $cppunit_major_min \| \ | ||
$cppunit_major_version \= $cppunit_major_min \& \ | ||
$cppunit_minor_version \> $cppunit_minor_min \| \ | ||
$cppunit_major_version \= $cppunit_major_min \& \ | ||
$cppunit_minor_version \= $cppunit_minor_min \& \ | ||
$cppunit_micro_version \>= $cppunit_micro_min ` | ||
if test "$cppunit_version_proper" = "1" ; then | ||
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version]) | ||
else | ||
AC_MSG_RESULT(no) | ||
no_cppunit=yes | ||
fi | ||
fi | ||
if test "x$no_cppunit" = x ; then | ||
ifelse([$2], , :, [$2]) | ||
AC_SUBST(HAVE_CPPUNIT,[1]) | ||
AC_DEFINE([HAVE_CPPUNIT], [1], [Enable CPPUnit Tests]) | ||
else | ||
CPPUNIT_CPPFLAGS="" | ||
CPPUNIT_LIBS="" | ||
ifelse([$3], , :, [$3]) | ||
fi | ||
AC_SUBST(CPPUNIT_VERSION) | ||
AC_SUBST(CPPUNIT_PREFIX) | ||
AC_SUBST(CPPUNIT_CPPFLAGS) | ||
AC_SUBST(CPPUNIT_LIBS) | ||
]) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.