source: trunk/gsdl/packages/yaz/configure.in@ 1343

Last change on this file since 1343 was 1343, checked in by johnmcp, 24 years ago

Added the YAZ toolkit source to the packages directory (for z39.50 stuff)

  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1dnl YAZ Toolkit
2dnl (c) Index Data 1994-2000
3dnl See the file LICENSE for details.
4dnl $Id: configure.in 1343 2000-08-03 03:12:39Z johnmcp $
5AC_INIT(include/yaz/yaz-version.h)
6AM_INIT_AUTOMAKE(yaz, 1.6)
7dnl
8dnl ------ Checking programs
9AC_PROG_CC
10AC_PROG_CPP
11AC_PROG_INSTALL
12AC_PROG_RANLIB
13AC_CHECK_PROGS(have_sgml2txt,sgml2txt,no)
14AC_CHECK_PROGS(have_sgml2latex,sgml2latex,no)
15AC_CHECK_PROGS(have_sgml2html,sgml2html,no)
16if test "$have_sgml2txt" = "no" -o "$have_sgml2latex" = "no" -o "$have_sgml2html" = "no"; then
17 DOCMODULE=""
18else
19 DOCMODULE="doc"
20fi
21dnl
22dnl ----- yaz-comp: The Yaz Compiler
23AC_SUBST(ASNMODULE)
24AC_SUBST(ILLMODULE)
25AC_SUBST(ILLLIB)
26AC_ARG_ENABLE(comp,[ --disable-comp use old encoders, i.e. disable the YAZ ASN.1 Compiler], , enable_comp=yes)
27if test "$enable_comp" = "yes"; then
28 ASNMODULE="z39.50"
29 ILLMODULE="ill"
30 ILLLIB=../ill/libill.a
31 ASN_MAKEFILES="z39.50/Makefile ill/Makefile"
32 cp -f include/yaz/z-proto.h include/yaz/proto.h
33else
34 ILLMODULE=""
35 ASNMODULE=asn
36 ILLLIB=""
37 ASN_MAKEFILES="asn/Makefile"
38 cp -f include/yaz/prt-proto.h include/yaz/proto.h
39fi
40dnl
41dnl ----- Sockets
42checkBoth=0
43AC_CHECK_FUNC(connect)
44if test "$ac_cv_func_connect" = "no"; then
45 AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1)
46fi
47if test "$checkBoth" = "1"; then
48 oldLibs=$LIBS
49 LIBS="$LIBS -lsocket -lnsl"
50 AC_CHECK_FUNC(accept, , [LIBS=$oldLibs])
51fi
52AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
53dnl
54dnl ------ GNU Readline
55AC_CHECK_LIB(readline, readline, [LIBS="$LIBS -lreadline"])
56if test "$ac_cv_lib_readline_readline" = "no"; then
57 AC_CHECK_LIB(readline, readline, [LIBS="$LIBS -lreadline -ltermcap"])
58fi
59AC_CHECK_LIB(history, add_history, [LIBS="$LIBS -lhistory"])
60if test "$ac_cv_lib_readline_readline" = "yes"; then
61 AC_CHECK_HEADERS(readline/readline.h readline/history.h)
62fi
63dnl
64dnl ------ tcpd
65AC_ARG_ENABLE(tcpd,[ --enable-tcpd enable TCP wrapper for server if available])
66if test "$enable_tcpd" = "yes"; then
67 AC_MSG_CHECKING(for working tcpd.h)
68 oldLibs=$LIBS
69 LIBS="$LIBS -lwrap -lnsl"
70 AC_TRY_LINK([#include <syslog.h>
71 #include <tcpd.h>
72 int allow_severity = LOG_INFO;
73 int deny_severity = LOG_WARNING;],
74 [struct request_info request_info; int i;
75 i = hosts_access(&request_info);],tcpd_ok=1, tcpd_ok=0)
76 if test "$tcpd_ok" = "0"; then
77 AC_MSG_RESULT(no)
78 LIBS=$oldLibs
79 else
80 AC_MSG_RESULT(yes)
81 AC_DEFINE(HAVE_TCPD_H)
82 fi
83fi
84dnl
85dnl ------ Headers
86AC_STDC_HEADERS
87if test "$ac_cv_header_stdc" = "no"; then
88 AC_MSG_WARN(Your system doesn't seem to support ANSI C)
89fi
90dnl
91dnl ------ Threads
92AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available])
93if test "$enable_threads" = "yes"; then
94 AC_CHECK_HEADERS(pthread.h threads.h)
95 AC_CHECK_FUNC(pthread_mutex_lock)
96 if test "$ac_cv_func_pthread_mutex_lock" = "no"; then
97 AC_CHECK_LIB(pthread, main)
98 fi
99 AC_DEFINE(_REENTRANT)
100fi
101dnl
102SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest $DOCMODULE"
103AC_SUBST(SUBDIRS_VAR)
104dnl
105dnl ------ Makefiles
106dnl
107AC_OUTPUT(Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile)
Note: See TracBrowser for help on using the repository browser.