1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(server/server.c)
5 test -d h/zephyr || mkdir h/zephyr
7 test -z "$lbindir" && lbindir='${bindir}'
8 test -z "$lsbindir" && lsbindir='${sbindir}'
13 AC_DEFINE_UNQUOTED(MACHINE_TYPE, "$host")
15 dnl Checks for programs.
22 AC_MSG_CHECKING(location of temporary directory)
23 if test -d /var/tmp; then
25 elif test -d /usr/tmp; then
30 AC_DEFINE_UNQUOTED(FOUND_TMP, "${found_tmp}")
31 AC_MSG_RESULT(${found_tmp})
33 dnl Checks for header files.
37 AC_CHECK_HEADERS(fcntl.h paths.h termios.h sgtty.h unistd.h malloc.h)
38 AC_CHECK_HEADERS(sys/filio.h sys/ioctl.h sys/time.h sys/file.h sys/utsname.h)
39 AC_CHECK_HEADERS(sys/select.h sys/msgbuf.h sys/cdefs.h)
41 if test "$no_x" != "yes"; then
48 dnl Checks for typedefs, structures, and compiler characteristics.
51 AC_CHECK_SIZEOF(short)
54 AC_MSG_CHECKING(for 32-bit integer type)
55 if test "$ac_cv_sizeof_long" = 4; then
57 elif test "$ac_cv_sizeof_int" = 4; then
59 elif test "$ac_cv_sizeof_short" = 4; then
62 AC_WARN([Can't find 32-bit type, using long])
65 AC_DEFINE_UNQUOTED(ZEPHYR_INT32, ${int32})
66 AC_MSG_RESULT(${int32})
68 AC_CHECK_LIB(w, wslen)
69 AC_CHECK_LIB(dl, dlopen)
71 AC_SEARCH_LIBS(gethostbyname, nsl)
72 AC_SEARCH_LIBS(socket, socket)
74 # Hesiod needs -lresolv on Sun systems for res_send.
75 if test "$hesiod" != "no"; then
76 AC_CHECK_LIB(44bsd, strerror)
77 AC_CHECK_LIB(resolv, res_send)
80 AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap])
81 AC_CHECK_LIB(src, srcsrpy, [SLIB=-lsrc; AC_DEFINE(HAVE_SRC)])
92 LIBS="$KRB4_LIBS $HESIOD_LIBS $LIBS"
94 dnl Checks for library functions.
95 AC_PROG_GCC_TRADITIONAL
99 AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random)
100 AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid krb_get_err_text krb_log)
102 AC_CONFIG_HEADER(h/config.h)
103 AC_OUTPUT(Makefile clients/Makefile clients/xzwrite/Makefile
104 clients/zaway/Makefile clients/zctl/Makefile
105 clients/zleave/Makefile clients/zlocate/Makefile
106 clients/zmailnotify/Makefile clients/znol/Makefile
107 clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
108 clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
109 libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile)