1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(server/server.c)
6 dnl KRB5_SOCKADDR_SA_LEN: define HAVE_SA_LEN if sockaddr contains the sa_len
9 AC_DEFUN([KRB5_SOCKADDR_SA_LEN],[ dnl
10 AC_MSG_CHECKING(Whether struct sockaddr contains sa_len)
11 AC_CACHE_VAL(krb5_cv_sockaddr_sa_len,
12 [AC_TRY_COMPILE([#include <sys/types.h>
13 #include <sys/socket.h>
17 krb5_cv_sockaddr_sa_len=yes,krb5_cv_sockaddr_sa_len=no)])
18 AC_MSG_RESULT([$]krb5_cv_sockaddr_sa_len)
19 if test $krb5_cv_sockaddr_sa_len = yes; then
20 AC_DEFINE_UNQUOTED(HAVE_SA_LEN)
27 test -d h/zephyr || mkdir h/zephyr
29 test -z "$lbindir" && lbindir='${bindir}'
30 test -z "$lsbindir" && lsbindir='${sbindir}'
35 AC_DEFINE_UNQUOTED(MACHINE_TYPE, "$host")
37 dnl Checks for programs.
43 AC_MSG_CHECKING(location of temporary directory)
44 if test -d /var/tmp; then
46 elif test -d /usr/tmp; then
51 AC_DEFINE_UNQUOTED(FOUND_TMP, "${found_tmp}")
52 AC_MSG_RESULT(${found_tmp})
54 dnl Checks for header files.
58 AC_CHECK_HEADERS(fcntl.h paths.h termios.h sgtty.h unistd.h malloc.h ifaddrs.h)
59 AC_CHECK_HEADERS(sys/filio.h sys/ioctl.h sys/time.h sys/file.h sys/utsname.h)
60 AC_CHECK_HEADERS(sys/select.h sys/msgbuf.h sys/cdefs.h X11/Xaw/Label.h)
62 if test "$no_x" != "yes"; then
63 if test "$ac_cv_header_X11_Xaw_Label_h" = yes ; then
71 dnl Checks for typedefs, structures, and compiler characteristics.
74 AC_CHECK_SIZEOF(short)
77 AC_MSG_CHECKING(for 32-bit integer type)
78 if test "$ac_cv_sizeof_long" = 4; then
80 elif test "$ac_cv_sizeof_int" = 4; then
82 elif test "$ac_cv_sizeof_short" = 4; then
85 AC_WARN([Can't find 32-bit type, using long])
88 AC_DEFINE_UNQUOTED(ZEPHYR_INT32, ${int32})
89 AC_MSG_RESULT(${int32})
91 AC_CHECK_LIB(w, wslen)
92 AC_CHECK_LIB(dl, dlopen)
94 AC_SEARCH_LIBS(gethostbyname, nsl)
95 AC_SEARCH_LIBS(socket, socket)
98 # Hesiod needs -lresolv on Sun systems for res_send.
99 if test "$hesiod" != "no"; then
100 AC_CHECK_LIB(44bsd, strerror)
101 AC_CHECK_LIB(resolv, res_send)
104 AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap])
105 AC_CHECK_LIB(src, srcsrpy, [SLIB=-lsrc; AC_DEFINE(HAVE_SRC)])
115 dnl this is before ATHENA_UTIL_SS because on NetBSD, -lss depends on
116 dnl a plethora of libraries, which require crypt(), which is dragged
118 LIBS="$KRB4_LIBS $HESIOD_LIBS $LIBS"
121 dnl Checks for library functions.
122 AC_PROG_GCC_TRADITIONAL
126 AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random)
127 AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid krb_get_err_text krb_log)
130 AC_SUBST(LIBTOOL_DEPS)
132 AC_CONFIG_HEADER(h/config.h)
133 AC_OUTPUT(Makefile clients/Makefile clients/xzwrite/Makefile
134 clients/zaway/Makefile clients/zctl/Makefile
135 clients/zleave/Makefile clients/zlocate/Makefile
136 clients/zmailnotify/Makefile clients/znol/Makefile
137 clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
138 clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
139 libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile)