diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ad52306..8599feb 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,17 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_LIBTOOL -AM_CONDITIONAL([FOPENCOOKIE], false) +AC_MSG_CHECKING([for fopencookie()]) +AC_LINK_IFELSE(AC_LANG_PROGRAM( + [[ #define _GNU_SOURCE + #include <stdio.h> ]], + [[ cookie_io_functions_t io_funcs; + FILE* file = fopencookie(NULL, "r", io_funcs); ]]), + [fopencookie=yes + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +AM_CONDITIONAL([FOPENCOOKIE], [test "$fopencookie" = "yes"]) dnl Generate Makefiles AC_CONFIG_MACRO_DIR([m4]) |