2 dnl (c) Index Data 1994-1998
3 dnl See the file LICENSE for details.
4 dnl $Id: configure.in,v 1.2 1998-09-02 12:41:50 adam Exp $
5 AC_INIT(include/yaz-version.h)
6 dnl ------ Substitutions
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
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)
28 if test "$checkBoth" = "1"; then
30 LIBS="$LIBS -lsocket -lnsl"
31 AC_CHECK_FUNC(accept, , [LIBS=$oldLibs])
33 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
36 AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available],
37 [threads_ok=$enableval], [threads_ok=no])
38 if test "$threads_ok" = "yes"; then
39 AC_CHECK_HEADERS(pthread.h threads.h)
40 AC_CHECK_FUNC(pthread_mutex_lock)
41 if test "$ac_cv_func_pthread_mutex_lock" = "no"; then
42 AC_CHECK_LIB(pthread, main)
44 ODEFS="$ODEFS -D_REENTRANT"
49 if test "$ac_cv_header_stdc" = "no"; then
50 AC_MSG_WARN(Your system doesn't seem to support ANSI C)
54 AC_OUTPUT(Makefile util/Makefile asn/Makefile odr/Makefile comstack/Makefile client/Makefile server/Makefile ztest/Makefile retrieval/Makefile ccl/Makefile lib/Makefile rfc1006/Makefile)