source: trunk/athena/lib/zephyr/configure.in @ 12163

Revision 12163, 3.1 KB checked in by ghudson, 26 years ago (diff)
Add ares support in build system.
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(server/server.c)
3
4test -d h || mkdir h
5test -d h/zephyr || mkdir h/zephyr
6
7test -z "$lbindir" && lbindir='${bindir}'
8test -z "$lsbindir" && lsbindir='${sbindir}'
9AC_SUBST(lbindir)
10AC_SUBST(lsbindir)
11
12AC_CANONICAL_SYSTEM
13AC_DEFINE_UNQUOTED(MACHINE_TYPE, "$host")
14
15dnl Checks for programs.
16AC_PROG_CC
17AC_PROG_YACC
18AC_PROG_LEX
19AC_PROG_INSTALL
20AC_PROG_RANLIB
21
22AC_MSG_CHECKING(location of temporary directory)
23if test -d /var/tmp; then
24        found_tmp=/var/tmp/
25elif test -d /usr/tmp; then
26        found_tmp=/usr/tmp/
27else
28        found_tmp=/tmp/
29fi
30AC_DEFINE_UNQUOTED(FOUND_TMP, "${found_tmp}")
31AC_MSG_RESULT(${found_tmp})
32
33dnl Checks for header files.
34AC_PATH_XTRA
35AC_HEADER_STDC
36AC_HEADER_SYS_WAIT
37AC_CHECK_HEADERS(fcntl.h paths.h termios.h sgtty.h unistd.h malloc.h)
38AC_CHECK_HEADERS(sys/filio.h sys/ioctl.h sys/time.h sys/file.h sys/utsname.h)
39AC_CHECK_HEADERS(sys/select.h sys/msgbuf.h sys/cdefs.h)
40
41if test "$no_x" != "yes"; then
42        XCLIENTS=xzwrite
43        ZWGC_LIBX11=-lX11
44fi
45AC_SUBST(XCLIENTS)
46AC_SUBST(ZWGC_LIBX11)
47
48dnl Checks for typedefs, structures, and compiler characteristics.
49AC_TYPE_SIGNAL
50AC_TYPE_UID_T
51AC_CHECK_SIZEOF(short)
52AC_CHECK_SIZEOF(int)
53AC_CHECK_SIZEOF(long)
54AC_MSG_CHECKING(for 32-bit integer type)
55if test "$ac_cv_sizeof_long" = 4; then
56        int32=long
57elif test "$ac_cv_sizeof_int" = 4; then
58        int32=int
59elif test "$ac_cv_sizeof_short" = 4; then
60        int32=short
61else
62        AC_WARN([Can't find 32-bit type, using long])
63        int32=long
64fi
65AC_DEFINE_UNQUOTED(ZEPHYR_INT32, ${int32})
66AC_MSG_RESULT(${int32})
67
68AC_CHECK_LIB(w, wslen)
69AC_CHECK_LIB(dl, dlopen)
70
71# If we can't find connect, try looking in -lsocket and -lnsl.  The
72# Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
73# libsocket.so which has a bad implementation of gethostbyname (it
74# only looks in /etc/hosts), so we only look for -lsocket if we need
75# it.
76AC_CHECK_FUNC(connect, :, [AC_CHECK_LIB(socket, socket)
77                           AC_CHECK_LIB(nsl, gethostbyname)])
78
79# Hesiod needs -lresolv on Sun systems for res_send.
80if test "$hesiod" != "no"; then
81        AC_CHECK_LIB(44bsd, strerror)
82        AC_CHECK_LIB(resolv, res_send)
83fi
84
85AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap])
86AC_CHECK_LIB(src, srcsrpy, [SLIB=-lsrc; AC_DEFINE(HAVE_SRC)])
87AC_SUBST(TLIB)
88AC_SUBST(RLIB)
89AC_SUBST(SLIB)
90
91ATHENA_KRB4
92ATHENA_HESIOD
93ATHENA_REGEXP
94ATHENA_ARES
95ATHENA_UTIL_COM_ERR
96ATHENA_UTIL_SS
97LIBS="$KRB4_LIBS $HESIOD_LIBS $LIBS"
98
99dnl Checks for library functions.
100AC_PROG_GCC_TRADITIONAL
101AC_FUNC_VPRINTF
102AC_FUNC_GETPGRP
103AC_FUNC_SETPGRP
104AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random)
105AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid krb_get_err_text krb_log)
106
107AC_CONFIG_HEADER(h/config.h)
108AC_OUTPUT(Makefile clients/Makefile clients/syslogd/Makefile
109          clients/xzwrite/Makefile clients/zaway/Makefile clients/zctl/Makefile
110          clients/zleave/Makefile clients/zlocate/Makefile
111          clients/zmailnotify/Makefile clients/znol/Makefile
112          clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
113          clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
114          libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile)
Note: See TracBrowser for help on using the repository browser.