X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=configure.in;h=29b3cc4310c484cae2fcf88f73970217e2f73a0a;hb=69da23537c6bb71ab948e079708bf8ea090de73f;hp=a5aa9315662131b2c81295d154b4ec9d01f4b0c1;hpb=2ad55b3f17e054d19923e92adcb994854f41d9d8;p=idzebra-moved-to-github.git diff --git a/configure.in b/configure.in index a5aa931..29b3cc4 100644 --- a/configure.in +++ b/configure.in @@ -1,17 +1,49 @@ -dnl Zebra, Index Data Aps, 1994-1999 -dnl $Id: configure.in,v 1.15 2000-02-04 08:49:26 adam Exp $ -dnl See the file LICENSE.2 for details. +dnl Zebra, Index Data Aps, 1994-2000 +dnl $Id: configure.in,v 1.18 2000-04-05 09:49:35 adam Exp $ dnl AC_INIT(include/zebraver.h) +AC_MSG_CHECKING(for package) +if test -r ${srcdir}/LICENSE.zmbol; then + AC_MSG_RESULT([Z'mbol]) + PROGPREFIX=zmbol + AC_DEFINE(ZMBOL,1) + AM_INIT_AUTOMAKE(zmbol,1.1) + SUBLIBS="../rset/librset.a \ + ../dict/libdict.a \ + ../isams/libisams.a \ + ../isam/libisam.a \ + ../isamc/libisamc.a \ + ../recctrl/librecctrl.a \ + ../bfile/libbfile.a \ + ../dfa/libdfa.a \ + ../util/libutil.a" +else + AC_MSG_RESULT([Zebra]) + PROGPREFIX=zebra + AC_DEFINE(ZMBOL,0) + AM_INIT_AUTOMAKE(zebra,1.1) + SUBLIBS="../rset/librset.a ../dict/libdict.a ../isams/libisams.a \ + ../recctrl/librecctrl.a \ + ../bfile/libbfile.a ../dfa/libdfa.a \ + ../util/libutil.a" + if test ! -r ${srcdir}/isam; then + mkdir ${srcdir}/isam + touch ${srcdir}/isam/Makefile.in + fi + if test ! -r ${srcdir}/isamc; then + mkdir ${srcdir}/isamc + touch ${srcdir}/isamc/Makefile.in + fi +fi +AM_CONDITIONAL(ISZMBOL,test $PACKAGE = zmbol) dnl ------ Substitutions +AC_SUBST(SUBLIBS) AC_SUBST(ODEFS) AC_SUBST(DEFS) AC_SUBST(TCL_INCLUDE) AC_SUBST(TCL_LIB) AC_SUBST(YAZLIB) AC_SUBST(YAZINC) -AC_SUBST(SUBDIR) -AC_SUBST(SUBLIBS) AC_SUBST(PROGPREFIX) dnl dnl ------ Checking programs @@ -20,17 +52,6 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_RANLIB dnl -dnl ------ Create sub directory lib/bin -if test ! -d lib; then - mkdir lib -fi -if test ! -d bin; then - mkdir bin -fi -dnl ------ Build root -AC_SUBST(build_root) -AC_ARG_WITH(build-root, [ --with-buildroot RPM Build root],[build_root=$withval],[build_root=""]) -dnl dnl ------ Look for Yaz dnl See if user specified location of yaz-config; otherwise dnl use ../yaz if is a directory (internal development); otherwise @@ -43,7 +64,7 @@ if test "x$yazpath" != "xNONE"; then else for i in ../yaz* ../yaz; do if test -d $i; then - if test -r $i/include/yaz/yaz-version.h; then + if test -r $i/yaz-config; then yazconfig=$i/yaz-config fi fi @@ -60,6 +81,26 @@ else AC_MSG_RESULT(Not found) fi dnl +dnl ------ Threads +AC_ARG_ENABLE(threads, [ --disable-threads disable threads],[enable_threads=$enableval],[enable_threads=yes]) +if test "$enable_threads" = "yes"; then + AC_CHECK_LIB(pthread,main) + AC_MSG_CHECKING(for working POSIX Threads) + AC_TRY_LINK([#include + int func(void *p) { return 0; } + ],[ + pthread_t pthread_id; + int r = pthread_create (&pthread_id, 0, func, 0);], + thread_ok=yes,thread_ok=no) + if test "$thread_ok" = "yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PTHREAD_H) + AC_DEFINE(_REENTRANT) + else + AC_MSG_RESULT(no) + fi +fi +dnl dnl ------ Look for Tcl dnl See if user has specified location of tclConfig.sh; otherwise dnl see if tclConfig.sh exists in same prefix lcoation as tclsh; otherwise @@ -109,35 +150,20 @@ AC_STDC_HEADERS if test "$ac_cv_header_stdc" = "no"; then AC_MSG_WARN(Your system doesn't seem to support ANSI C) fi -dnl -dnl ------ Is it Zebra or Z'mbol -if test -r LICENSE.zmbol; then - AC_DEFINE(ZMBOL,1) - PROGPREFIX=zmbol - SUBDIR="util bfile dfa dict isams isamc isam rset recctrl index" - SUBLIBS="../lib/rset.a ../lib/dict.a ../lib/isams.a ../lib/isam.a\ - ../lib/recctrl.a ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a\ - ../lib/zebrautl.a" -else - PROGPREFIX=zebra - SUBDIR="util bfile dfa dict isams rset recctrl index" - SUBLIBS="../lib/rset.a ../lib/dict.a ../lib/isams.a\ - ../lib/recctrl.a ../lib/bfile.a ../lib/dfa.a\ - ../lib/zebrautl.a" - AC_DEFINE(ZMBOL,0) - if test ! -d isamc; then - mkdir isamc - fi - if test ! -r isamc/Makefile.in; then - touch isamc/Makefile.in - fi - if test ! -d isam; then - mkdir isam - fi - if test ! -r isam/Makefile.in; then - touch isam/Makefile.in - fi -fi -dnl dnl ------ Create Makefiles -AC_OUTPUT(Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isams/Makefile isam/Makefile isamc/Makefile recctrl/Makefile rset/Makefile index/Makefile) +AC_OUTPUT([ + Makefile + util/Makefile + bfile/Makefile + dfa/Makefile + dict/Makefile + isams/Makefile + isamc/Makefile + isam/Makefile + rset/Makefile + recctrl/Makefile + index/Makefile + include/Makefile + tab/Makefile + test/Makefile test/gils/Makefile test/usmarc/Makefile +])