1 dnl Zebra, Index Data Aps, 1994-1999
2 dnl $Id: configure.in,v 1.8 1999-05-26 07:49:12 adam Exp $
3 dnl See the file LICENSE.2 for details.
5 AC_INIT(include/zebraver.h)
6 dnl ------ Substitutions
12 dnl ------ Checking programs
18 dnl ------ Look for Tcl
22 AC_ARG_WITH(tclconfig, [ --with-tclconfig Path for tclConfig.sh], [tclconfig=$withval])
23 if test "x$tclconfig" = xNONE; then
25 AC_PREFIX_PROGRAM(tclsh)
26 tclconfig=${prefix}/lib
29 if test -r ${tclconfig}/tclConfig.sh; then
30 AC_MSG_CHECKING(for Tcl)
31 . ${tclconfig}/tclConfig.sh
32 if test -r ${tclconfig}/../generic/tcl.h; then
33 TCL_INCLUDE=-I${tclconfig}/../generic
34 TCL_LIB="$TCL_BUILD_LIB_SPEC $TCL_LIBS"
36 TCL_INCLUDE=-I${TCL_PREFIX}/include
37 TCL_LIB="$TCL_LIB_SPEC $TCL_LIBS"
39 SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
40 SHLIB_LD=$TCL_SHLIB_LD
41 SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
42 SHLIB_VERSION=$TCL_SHLIB_VERSION
43 AC_MSG_RESULT($TCL_VERSION)
44 ODEFS="-DHAVE_TCL_H=1"
46 ODEFS="-DHAVE_TCL_H=0"
49 dnl ------ Socket libraries
51 AC_CHECK_FUNC(connect)
52 if test "$ac_cv_func_connect" = "no"; then
53 AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1)
55 if test "$checkBoth" = "1"; then
57 LIBS="$LIBS -lsocket -lnsl"
58 AC_CHECK_FUNC(accept, , [LIBS=$oldLibs])
60 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
62 dnl ------ TCP wrapper (for Linux)
63 AC_CHECK_LIB(wrap, main, [LIBS="$LIBS -lwrap"])
65 dnl ------ ANSI C Header files
67 if test "$ac_cv_header_stdc" = "no"; then
68 AC_MSG_WARN(Your system doesn't seem to support ANSI C)
71 dnl ------ Create Makefiles
72 AC_OUTPUT(Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isam/Makefile isamc/Makefile recctrl/Makefile rset/Makefile index/Makefile)