X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=unix%2Fconfigure.in;h=6398e2c1a09b32671b3a7150893e4ae1fc9d8af1;hp=4a0d7e3cd7d64627c19b3874f53585c75453c188;hb=b35b70078e2c4fb3af710cfc5b9319bfcc7073dd;hpb=bf377ba45c8c1cbcf843fdecc6d5c68fda6bad18 diff --git a/unix/configure.in b/unix/configure.in index 4a0d7e3..6398e2c 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -1,7 +1,7 @@ -dnl YAZ Toolkit -dnl (c) Index Data 1994-1999 +dnl YAZ++ Toolkit configure script. +dnl (c) Index Data ApS 1999 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.1 1999-01-28 09:41:07 adam Exp $ +dnl $Id: configure.in,v 1.4 2000-07-04 13:48:49 adam Exp $ AC_INIT(../include/yaz-socket-manager.h) dnl dnl ------ Checking programs @@ -12,35 +12,35 @@ AC_PROG_CXXCPP AC_PROG_INSTALL AC_PROG_RANLIB dnl -dnl ----- Sockets -checkBoth=0 -AC_CHECK_FUNC(connect) -if test "$ac_cv_func_connect" = "no"; then - AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1) +dnl ------ Look for Yaz +dnl See if user specified location of yaz-config; otherwise +dnl use ../yaz if is a directory (internal development); otherwise +dnl use yaz-config found in PATH. +AC_SUBST(YAZINC) +AC_SUBST(YAZLIB) +yazconfig=NONE +yazpath=NONE +AC_ARG_WITH(yazconfig, [ --with-yazconfig=DIR yaz-config in DIR (example /home/yaz-1.6)], [yazpath=$withval]) +if test "x$yazpath" != "xNONE"; then + yazconfig=$yazpath/yaz-config +else + for i in ../../yaz* ../../yaz; do + if test -d $i; then + if test -r $i/yaz-config; then + yazconfig=$i/yaz-config + fi + fi + done + if test "x$yazconfig" = "xNONE"; then + AC_PATH_PROG(yazconfig, yaz-config, NONE) + fi fi -if test "$checkBoth" = "1"; then - oldLibs=$LIBS - LIBS="$LIBS -lsocket -lnsl" - AC_CHECK_FUNC(accept, , [LIBS=$oldLibs]) -fi -AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) -dnl -dnl ------ Headers -AC_STDC_HEADERS -if test "$ac_cv_header_stdc" = "no"; then - AC_MSG_WARN(Your system doesn't seem to support ANSI C) -fi -dnl -dnl ------ Threads -AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available], - [threads_ok=$enableval], [threads_ok=no]) -if test "$threads_ok" = "yes"; then - AC_CHECK_HEADERS(pthread.h threads.h) - AC_CHECK_FUNC(pthread_mutex_lock) - if test "$ac_cv_func_pthread_mutex_lock" = "no"; then - AC_CHECK_LIB(pthread, main) - fi - AC_DEFINE(_REENTRANT) +AC_MSG_CHECKING(for YAZ) +if test -r $yazconfig; then + . $yazconfig + AC_MSG_RESULT($yazconfig) +else + AC_MSG_RESULT(Not found) fi dnl dnl ------ Makefiles