+dnl ------- 64 bit files
+AC_MSG_CHECKING(for large files)
+AC_TRY_RUN([#define _FILE_OFFSET_BITS 64
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ off_t o;
+ char tmp_str[32];
+ if (sizeof(off_t) == 8) {
+ o = 2000000000;
+ sprintf (tmp_str, "%Ld", o+o+o);
+ if (!strcmp (tmp_str, "6000000000"))
+ exit (0);
+ }
+ exit (1);
+}
+],bits=64,bits=32,bits=32)
+if test "$bits" = "64"; then
+ AC_DEFINE(_FILE_OFFSET_BITS,64)
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi