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

Last change on this file since 1650 was 1531, checked in by jrm21, 24 years ago

Modified yaz package so that autoconf and automake are never automatically
run.

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