Updated for BZIP2 1.0.X. Configure script doesn't enable 64 bit LFS
[idzebra-moved-to-github.git] / configure.in
index 1a38773..b34226d 100644 (file)
@@ -1,5 +1,5 @@
 dnl Zebra, Index Data Aps, 1994-2000
-dnl $Id: configure.in,v 1.26 2001-02-21 09:52:39 adam Exp $
+dnl $Id: configure.in,v 1.27 2001-02-26 22:14:59 adam Exp $
 dnl
 AC_INIT(include/zebraver.h)
 AC_MSG_CHECKING(for package)
@@ -83,6 +83,11 @@ dnl ------- BZIP2
 AC_CHECK_LIB(bz2,bzCompressInit)
 if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
        AC_CHECK_HEADERS(bzlib.h)
+else
+       AC_CHECK_LIB(bz2,BZ2_bzCompressInit)
+       if test "$ac_cv_lib_bz2_BZ2_bzCompressInit" = "yes"; then
+               AC_CHECK_HEADERS(bzlib.h)
+       fi
 fi
 dnl ------- 64 bit files
 AC_MSG_CHECKING(for LFS)
@@ -91,17 +96,31 @@ AC_TRY_RUN([#define _FILE_OFFSET_BITS 64
 #include <unistd.h>
 #include <string.h>
 #include <stdio.h>
+#include <fcntl.h>
+#include <errno.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);
+       int fd;
+       struct flock area;
+       if (sizeof(off_t) != 8) 
+               exit (1);
+       o = 2000000000;
+       sprintf (tmp_str, "%Ld", o+o+o);
+       if (strcmp (tmp_str, "6000000000"))
+               exit (1);
+       fd = creat ("config.tmp", 0644);
+       if (fd < 0)
+               exit (1);
+       area.l_type = F_WRLCK;
+       area.l_whence = SEEK_SET;
+       area.l_len = area.l_start = 0L;
+       if (fcntl(fd, F_SETLKW, &area))
+               exit (1);
+       close (fd);
+       unlink ("config.tmp");
+       exit (0);
 }
 ],bits=64,bits=32,bits=32)
 if test "$bits" = "64"; then