@@ -140,28 +140,29 @@
fi
dnl Check for stat64 (dietlibc/klibc).
-AC_CHECK_DECL(stat64, AC_CHECK_FUNC(stat64))
-if test "$ac_cv_func_stat64" != yes; then
+AC_CHECK_DECL(stat64,, [
AC_DEFINE(fstat64, fstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(lstat64, lstat, [64-bit operations are the same as 32-bit])
AC_DEFINE(stat64, stat, [64-bit operations are the same as 32-bit])
-fi
+])
-AC_CHECK_FUNC(glob64,, [
+AC_CHECK_DECL(glob64,, [
AC_DEFINE(glob64_t, glob_t, [64-bit operations are the same as 32-bit])
AC_DEFINE(glob64, glob, [64-bit operations are the same as 32-bit])
AC_DEFINE(globfree64, globfree,
[64-bit operations are the same as 32-bit])
-])
+],[#ifdef HAVE_GLOB
+#include <glob.h>
+#endif])
dnl OS X apparently has stat64 but not open64.
-AC_CHECK_FUNC(open64,, [
+AC_CHECK_DECL(open64,, [
AC_DEFINE(open64, open, [64-bit operations are the same as 32-bit])
AC_DEFINE(readdir64, readdir,
[64-bit operations are the same as 32-bit])
AC_DEFINE(dirent64, dirent,
[64-bit operations are the same as 32-bit])
-])
+],[#include <fcntl.h>])
dnl Check if struct stat has st_mtim.
AC_MSG_CHECKING(for stat::st_mtim)