X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=configure.in;h=c2a5bbf8478fbd7046bff5234c92fce650a618ca;hp=747e03235d6d9b5e6188a8c3d441d1dfb551a240;hb=bf7ee634e855d15e955d06e7b225d2045abd518a;hpb=1fbf9907e66c5697b9537a1a4849295c05b12b6b diff --git a/configure.in b/configure.in index 747e032..c2a5bbf 100644 --- a/configure.in +++ b/configure.in @@ -1,24 +1,35 @@ dnl YAZ Toolkit -dnl (c) Index Data 1994-1998 +dnl (c) Index Data 1994-1999 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.1 1998-08-21 14:13:24 adam Exp $ +dnl $Id: configure.in,v 1.7 1999-04-16 14:45:55 adam Exp $ AC_INIT(include/yaz-version.h) -dnl ------ Substitutions -AC_SUBST(ODEFS) dnl dnl ------ Checking programs -AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available], - [gcc_ok=$enableval], [gcc_ok=no]) -if test "$gcc_ok" = "yes"; then - AC_PROG_CC -else - CC=${CC-cc} -AC_SUBST(CC) -fi +AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_RANLIB dnl +dnl ----- YC: The Yaz Compiler +AC_SUBST(ASNMODULE) +AC_ARG_WITH(yc,[ --with-yc compile using YC: The Yaz Compiler], [YCDIR=$withval],[YCDIR=""]) + +if test "$YCDIR" = "yes"; then + YCDIR="../yc" +fi +if test -d z39.50; then + rm z39.50 +fi +if test "$YCDIR" = ""; then + ASNMODULE=asn +else + if test ! -d "$YCDIR"; then + AC_MSG_WARN(YC directory ${YCDIR} doesn't exist) + fi + ln -s ${YCDIR}/z39.50 z39.50 + ASNMODULE=z39.50 +fi +dnl dnl ----- Sockets checkBoth=0 AC_CHECK_FUNC(connect) @@ -32,6 +43,23 @@ if test "$checkBoth" = "1"; then fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) dnl +dnl ------ GNU Readline +AC_CHECK_LIB(readline, readline, [LIBS="$LIBS -lreadline"]) +AC_CHECK_LIB(history, add_history, [LIBS="$LIBS -lhistory"]) +if test "$ac_cv_lib_readline_readline" = "yes"; then + AC_CHECK_HEADERS(readline/readline.h readline/history.h) +fi +dnl +dnl ------ tcpd +AC_CHECK_LIB(wrap, main, [LIBS="$LIBS -lwrap"]) +AC_CHECK_HEADERS(tcpd.h) +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]) @@ -41,14 +69,8 @@ if test "$threads_ok" = "yes"; then if test "$ac_cv_func_pthread_mutex_lock" = "no"; then AC_CHECK_LIB(pthread, main) fi - ODEFS="$ODEFS -D_REENTRANT" -fi -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) + AC_DEFINE(_REENTRANT) fi dnl dnl ------ Makefiles -AC_OUTPUT(Makefile util/Makefile asn/Makefile odr/Makefile comstack/Makefile client/Makefile server/Makefile ztest/Makefile retrieval/Makefile ccl/Makefile makelib/Makefile rfc1006/Makefile) +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)