Added support for 64 bit input file support.
[idzebra-moved-to-github.git] / configure.in
index 8405b9e..62cd8ec 100644 (file)
@@ -1,5 +1,5 @@
 dnl Zebra, Index Data Aps, 1994-2000
-dnl $Id: configure.in,v 1.20 2000-05-02 11:26:13 adam Exp $
+dnl $Id: configure.in,v 1.21 2000-05-15 15:32:50 adam Exp $
 dnl
 AC_INIT(include/zebraver.h)
 AC_MSG_CHECKING(for package)
@@ -143,6 +143,31 @@ AC_CHECK_LIB(bz2,bzCompressInit)
 if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
        AC_CHECK_HEADERS(bzlib.h)
 fi
+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
 dnl
 dnl ------ ANSI C Header files
 AC_STDC_HEADERS