From: Niels Möller Date: Wed, 27 Aug 2008 08:42:31 +0000 (+0200) Subject: Check for fcntl file locking. X-Git-Tag: nettle_2.0_release_20090608~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5224e6008f80cc9cb21ed5265e00eff60128dd2a;p=thirdparty%2Fnettle.git Check for fcntl file locking. Rev: nettle/configure.ac:1.7 --- diff --git a/configure.ac b/configure.ac index 92d69f55..c47a81fc 100644 --- a/configure.ac +++ b/configure.ac @@ -364,6 +364,30 @@ LSH_GCC_ATTRIBUTES # sys/types.h is needed on some systems, in particular cygwin. AX_CREATE_STDINT_H([nettle-stdint.h], [sys/types.h]) +# Check for file locking. We (AC_PROG_CC?) have already checked for +# sys/types.h and unistd.h. +AC_CACHE_CHECK([for fcntl file locking], + nettle_cv_fcntl_locking, +[AC_TRY_COMPILE([ +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_UNISTD_H +# include +#endif +#include +],[ +int op = F_SETLKW; +struct flock fl; +], +nettle_cv_fcntl_locking=yes, +nettle_cv_fcntl_locking=no)]) + +AH_TEMPLATE([HAVE_FCNTL_LOCKING], [Define if fcntl file locking is available]) +if test "x$nettle_cv_fcntl_locking" = "xyes" ; then + AC_DEFINE(HAVE_FCNTL_LOCKING) +fi + # Checks for libraries AC_CHECK_LIB(gmp, __gmpz_getlimbn,, [AC_MSG_WARN(