X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=configure.ac;h=dde772705dc6a913524116a4e4399dd044f0b823;hp=0e4305505a3739d09a628024e509a9935204da7f;hb=6e7b1987b6a571c0f2815b8507ec9373981f058e;hpb=22c21e436dc4e9818cbdb9fac3b03ac727533623 diff --git a/configure.ac b/configure.ac index 0e43055..dde7727 100644 --- a/configure.ac +++ b/configure.ac @@ -185,8 +185,8 @@ fi AC_SUBST([STRICT_CFLAGS]) dnl Testing. -build_testing="no" -PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [build_testing="yes"]) +PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], + [build_testing="yes"], [build_testing="no"]) AC_CHECK_HEADERS(libgen.h) @@ -207,6 +207,18 @@ if test "x$with_libdbi" = "xyes"; then 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" @@ -280,6 +292,7 @@ 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]) @@ -296,3 +309,4 @@ AC_MSG_RESULT([This package is maintained by $PACKAGE_MAINTAINER.]) AC_MSG_RESULT([Please report bugs to $PACKAGE_BUGREPORT.]) AC_MSG_RESULT() +dnl vim: set tw=78 sw=4 ts=4 noexpandtab :