on broken glibc on Redhat 7.0.
#!/bin/sh
-# $Id: buildconf.sh,v 1.3 2001-02-26 21:21:50 adam Exp $
+# $Id: buildconf.sh,v 1.4 2001-02-26 22:14:59 adam Exp $
dir=`aclocal --print-ac-dir`
if [ -f $dir/yaz.m4 ]; then
aclocal || exit 1
fi
automake -a >/dev/null 2>&1 || exit 2
autoconf || exit 3
+if [ -f config.cache ]; then
+ rm config.cache
+fi
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)
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)
#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
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: recindex.c,v $
- * Revision 1.30 2000-07-13 10:14:20 heikki
+ * Revision 1.31 2001-02-26 22:14:59 adam
+ * Updated for BZIP2 1.0.X. Configure script doesn't enable 64 bit LFS
+ * on broken glibc on Redhat 7.0.
+ *
+ * Revision 1.30 2000/07/13 10:14:20 heikki
* Removed compiler warnings when making zebra
*
* Revision 1.29 2000/04/05 09:49:35 adam
#if HAVE_BZLIB_H
csize = out_offset + (out_offset >> 6) + 620;
rec_tmp_expand (p, csize);
- i = bzBuffToBuffCompress (p->tmp_buf+sizeof(int)+sizeof(short)+
+#ifdef BZ_CONFIG_ERROR
+ i = BZ2_bzBuffToBuffCompress
+#else
+ i = bzBuffToBuffCompress
+#endif
+ (p->tmp_buf+sizeof(int)+sizeof(short)+
sizeof(char),
&csize, out_buf, out_offset, 1, 0, 30);
if (i != BZ_OK)
while (1)
{
bz_buf = (char *) xmalloc (bz_size);
- i = bzBuffToBuffDecompress (bz_buf, &bz_size, in_buf, in_size, 0, 0);
+#ifdef BZ_CONFIG_ERROR
+ i = BZ2_bzBuffToBuffDecompress
+#else
+ i = bzBuffToBuffDecompress
+#endif
+ (bz_buf, &bz_size, in_buf, in_size, 0, 0);
logf (LOG_LOG, "decompress %5d %5d", in_size, bz_size);
if (i == BZ_OK)
break;