diff --git a/configure.ac b/configure.ac
index 6195d20541ccc82d9c76b3f21db8c52fe3d0d192..dde772705dc6a913524116a4e4399dd044f0b823 100644 (file)
--- a/configure.ac
+++ b/configure.ac
fi
AC_SUBST([STRICT_CFLAGS])
+dnl Testing.
+PKG_CHECK_MODULES([CHECK], [check >= 0.9.4],
+ [build_testing="yes"], [build_testing="no"])
+
AC_CHECK_HEADERS(libgen.h)
dnl Check for dependencies.
fi
AM_CONDITIONAL([BUILD_WITH_LIBDBI], test "x$with_libdbi" = "xyes")
+dnl Required for mocking FILE related functions.
+orig_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+AC_CHECK_FUNCS([fopencookie],
+ [have_fopencookie="yes"],
+ [have_fopencookie="no (fopencookie not available)"])
+CFLAGS="$orig_CFLAGS"
+AM_CONDITIONAL([BUILD_WITH_FOPENCOOKIE], test "x$have_fopencookie" = "xyes")
+if test "x$have_fopencookie" = "xyes"; then
+ AC_DEFINE([HAVE_FOPENCOOKIE], 1)
+fi
+
dnl Feature checks.
build_documentation="yes"
[canonicalize hostnames by querying DNS])
AM_CONDITIONAL([BUILD_DOCUMENTATION], test "x$build_documentation" = "xyes")
+AM_CONDITIONAL([BUILD_TESTING], test "x$build_testing" = "xyes")
AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile
- src/liboconfig/Makefile])
+ src/liboconfig/Makefile t/Makefile])
AC_OUTPUT
BUILD_DATE="`date --utc '+%F %T'` (UTC)"
AC_MSG_RESULT()
AC_MSG_RESULT([ Features:])
AC_MSG_RESULT([ documentation: . . . . . . $build_documentation])
+AC_MSG_RESULT([ unit testing: . . . . . . . $build_testing])
+AC_MSG_RESULT([ stdio mocking: . . . . . $have_fopencookie])
AC_MSG_RESULT()
AC_MSG_RESULT([ Libraries:])
AC_MSG_RESULT([ libdbi: . . . . . . . . . . $with_libdbi])
AC_MSG_RESULT([Please report bugs to $PACKAGE_BUGREPORT.])
AC_MSG_RESULT()
+dnl vim: set tw=78 sw=4 ts=4 noexpandtab :