|
@@ -21,6 +21,15 @@ AC_ARG_ENABLE([debug],[ --enable-debug turn on debugging],
|
21
|
21
|
esac],[debug=false])
|
22
|
22
|
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
|
23
|
23
|
|
|
24
|
+AC_ARG_ENABLE([check],[ --disable-check disable unit test support],
|
|
25
|
+[case "${enableval}" in
|
|
26
|
+ yes) check=true ;;
|
|
27
|
+ no) check=false ;;
|
|
28
|
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-check]) ;;
|
|
29
|
+esac],[check=true])
|
|
30
|
+AM_CONDITIONAL([CHECK], [test x$check = xtrue])
|
|
31
|
+
|
|
32
|
+
|
24
|
33
|
AC_CONFIG_HEADERS([src/include/config.h])
|
25
|
34
|
AC_CONFIG_SRCDIR([src/main.c])
|
26
|
35
|
AC_CONFIG_MACRO_DIR([m4])
|
|
@@ -51,11 +60,14 @@ else
|
51
|
60
|
fi
|
52
|
61
|
|
53
|
62
|
# Checks for libraries.
|
54
|
|
-AC_SEARCH_LIBS([dlopen], [dl dld], [], [
|
55
|
|
- AC_MSG_ERROR([unable to find the dlopen() function])
|
56
|
|
-])
|
57
|
|
-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
|
58
|
|
-AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
|
|
63
|
+if test x$check = xtrue
|
|
64
|
+then
|
|
65
|
+ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [],
|
|
66
|
+ AC_MSG_FAILURE([Unable to locate (check unit test c framework).
|
|
67
|
+You can run ./configure --disable-check if you do not need unit tests.
|
|
68
|
+]))
|
|
69
|
+ AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
|
|
70
|
+fi
|
59
|
71
|
|
60
|
72
|
# Checks for header files.
|
61
|
73
|
AC_CHECK_HEADERS([stdlib.h string.h])
|