diff options
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/configure.ac b/src/configure.ac index 687bdf95d2..8751b2e63b 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4060,6 +4060,21 @@ AC_TRY_LINK([#include <stdio.h>], [rename("this", "that")], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_RENAME), AC_MSG_RESULT(no)) +dnl check for dirfd() +AC_MSG_CHECKING(for dirfd) +AC_TRY_COMPILE( +[#include <sys/types.h> +#include <dirent.h>], +[DIR * dir=opendir("dirname"); dirfd(dir);], +AC_MSG_RESULT(yes); AC_DEFINE(HAVE_DIRFD), AC_MSG_RESULT(not usable)) + +dnl check for flock() +AC_MSG_CHECKING(for flock) +AC_TRY_COMPILE( +[#include <sys/file.h>], +[flock(10, LOCK_SH);], +AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOCK), AC_MSG_RESULT(not usable)) + dnl sysctl() may exist but not the arguments we use AC_MSG_CHECKING(for sysctl) AC_TRY_COMPILE( |