1 dnl Zebra, Index Data Aps, 1994-2000
2 dnl $Id: configure.in,v 1.23 2000-10-11 12:31:27 adam Exp $
4 AC_INIT(include/zebraver.h)
5 AC_MSG_CHECKING(for package)
6 if test -r ${srcdir}/LICENSE.zmbol; then
7 AC_MSG_RESULT([Z'mbol])
10 AM_INIT_AUTOMAKE(zmbol,1.1)
11 SUBLIBS="../rset/librset.a \
17 ../recctrl/librecctrl.a \
22 AC_MSG_RESULT([Zebra])
25 AM_INIT_AUTOMAKE(zebra,1.1)
26 SUBLIBS="../rset/librset.a ../dict/libdict.a ../isams/libisams.a \
27 ../recctrl/librecctrl.a \
28 ../bfile/libbfile.a ../dfa/libdfa.a \
30 if test ! -r ${srcdir}/isam; then
32 touch ${srcdir}/isam/Makefile.in
34 if test ! -r ${srcdir}/isamc; then
36 touch ${srcdir}/isamc/Makefile.in
38 if test ! -r ${srcdir}/isamb; then
40 touch ${srcdir}/isamb/Makefile.in
43 AM_CONDITIONAL(ISZMBOL,test $PACKAGE = zmbol)
44 dnl ------ Substitutions
51 dnl ------ Checking programs
60 AC_ARG_ENABLE(threads, [ --disable-threads disable threads],[enable_threads=$enableval],[enable_threads=yes])
61 if test "$enable_threads" = "yes"; then
62 AC_CHECK_LIB(pthread,main)
63 AC_MSG_CHECKING(for working POSIX Threads)
64 AC_TRY_LINK([#include <pthread.h>
65 int func(void *p) { return 0; }
68 int r = pthread_create (&pthread_id, 0, func, 0);],
69 thread_ok=yes,thread_ok=no)
70 if test "$thread_ok" = "yes"; then
72 AC_DEFINE(HAVE_PTHREAD_H)
79 dnl ------ Look for Tcl
80 dnl See if user has specified location of tclConfig.sh; otherwise
81 dnl see if tclConfig.sh exists in same prefix lcoation as tclsh; otherwise
86 AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR tclConfig.sh in DIR], [tclconfig=$withval])
87 if test "x$tclconfig" = xNONE; then
89 AC_PREFIX_PROGRAM(tclsh)
90 tclconfig=${prefix}/lib
93 AC_MSG_CHECKING(for Tcl)
94 if test -r ${tclconfig}/tclConfig.sh; then
95 . ${tclconfig}/tclConfig.sh
96 if test -r ${tclconfig}/../generic/tcl.h; then
97 TCL_INCLUDE=-I${tclconfig}/../generic
98 TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS"
100 TCL_INCLUDE=-I${TCL_PREFIX}/include
101 TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS"
103 SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
104 SHLIB_LD=$TCL_SHLIB_LD
105 SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
106 SHLIB_VERSION=$TCL_SHLIB_VERSION
107 AC_MSG_RESULT($TCL_VERSION)
108 AC_DEFINE(HAVE_TCL_H,1)
110 AC_MSG_RESULT(Not found)
111 AC_DEFINE(HAVE_TCL_H,0)
115 AC_CHECK_HEADERS(sys/times.h)
118 AC_CHECK_LIB(bz2,bzCompressInit)
119 if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
120 AC_CHECK_HEADERS(bzlib.h)
122 dnl ------- 64 bit files
123 AC_MSG_CHECKING(for LFS)
124 AC_TRY_RUN([#define _FILE_OFFSET_BITS 64
128 int main(int argc, char **argv)
132 if (sizeof(off_t) == 8) {
134 sprintf (tmp_str, "%Ld", o+o+o);
135 if (!strcmp (tmp_str, "6000000000"))
140 ],bits=64,bits=32,bits=32)
141 if test "$bits" = "64"; then
142 AC_DEFINE(_FILE_OFFSET_BITS,64)
148 dnl ------ ANSI C Header files
150 if test "$ac_cv_header_stdc" = "no"; then
151 AC_MSG_WARN(Your system doesn't seem to support ANSI C)
153 dnl ------ Create Makefiles
170 test/Makefile test/gils/Makefile test/usmarc/Makefile