aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-01-20 09:47:11 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-27 11:33:47 +0100
commit5d95bbcbd7cc9d61798da6a5968242ea108b1d46 (patch)
treecc8bf86cf54af6f659d9ca17e3ae8a52db405167 /configure.ac
parent896b394dcabd3896643577dcc7bb2642dc198e02 (diff)
downloadpacrunner-5d95bbcbd7cc9d61798da6a5968242ea108b1d46.tar.gz
unit: introducing cunit usage into test-pacrunner
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 73b5f8e..6dd40ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,15 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
])
AC_ARG_ENABLE(unit, AC_HELP_STRING([--enable-unit],
- [enable compiling unit test binaries]))
+ [enable compiling unit test binaries]), [
+ if (test "${enable_unit}" = "yes"); then
+ AC_CHECK_LIB([cunit], [CU_initialize_registry], [], [
+ AC_MSG_ERROR([CUnit is required to get the unit tests])
+ ])
+ LDFLAGS="$LDFLAGS -lcunit"
+ fi
+])
+
AM_CONDITIONAL(UNIT, test "${enable_unit}" = "yes")
AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],