4923260b133af1d07a96e3f64f7c6cdcf41734fa
[idzebra-moved-to-github.git] / configure.in
1 dnl Zebra Toolkit
2 dnl (c) Index Data 1994-1999
3 dnl See the file LICENSE for details.
4 dnl $Id: configure.in,v 1.4 1999-04-22 14:26:38 adam Exp $
5 AC_INIT(include/zebraver.h)
6 dnl ------ Substitutions
7 AC_SUBST(ODEFS)
8 dnl
9 dnl ------ Checking programs
10 AC_PROG_CC
11 AC_PROG_CPP
12 AC_PROG_INSTALL
13 AC_PROG_RANLIB
14 dnl
15 dnl ----- Sockets
16 checkBoth=0
17 AC_CHECK_FUNC(connect)
18 if test "$ac_cv_func_connect" = "no"; then
19         AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1)
20 fi
21 if test "$checkBoth" = "1"; then
22         oldLibs=$LIBS
23         LIBS="$LIBS -lsocket -lnsl"
24         AC_CHECK_FUNC(accept, , [LIBS=$oldLibs])
25 fi
26 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
27 dnl
28 dnl ------ tcpd
29 AC_CHECK_LIB(wrap, main, [LIBS="$LIBS -lwrap"])
30 dnl
31 dnl ------ Headers
32 AC_STDC_HEADERS
33 if test "$ac_cv_header_stdc" = "no"; then
34         AC_MSG_WARN(Your system doesn't seem to support ANSI C)
35 fi
36 dnl
37 dnl ------ Makefiles
38 AC_OUTPUT(Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isam/Makefile isamc/Makefile recctrl/Makefile rset/Makefile index/Makefile)