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