1 dnl YAZ++ Toolkit configure script.
2 dnl (c) Index Data ApS 1999
3 dnl See the file LICENSE for details.
4 dnl $Id: configure.in,v 1.2 1999-03-23 14:17:57 adam Exp $
5 AC_INIT(../include/yaz-socket-manager.h)
7 dnl ------ Checking programs
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)
21 if test "$checkBoth" = "1"; then
23 LIBS="$LIBS -lsocket -lnsl"
24 AC_CHECK_FUNC(accept, , [LIBS=$oldLibs])
26 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
30 if test "$ac_cv_header_stdc" = "no"; then
31 AC_MSG_WARN(Your system doesn't seem to support ANSI C)
35 AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available],
36 [threads_ok=$enableval], [threads_ok=no])
37 if test "$threads_ok" = "yes"; then
38 AC_CHECK_HEADERS(pthread.h threads.h)
39 AC_CHECK_FUNC(pthread_mutex_lock)
40 if test "$ac_cv_func_pthread_mutex_lock" = "no"; then
41 AC_CHECK_LIB(pthread, main)
47 AC_OUTPUT(Makefile ../src/Makefile)