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.
23 AC_MSG_CHECKING(location of temporary directory)
24 if test -d /var/tmp; then
26 elif test -d /usr/tmp; then
31 AC_DEFINE_UNQUOTED(FOUND_TMP, "${found_tmp}")
32 AC_MSG_RESULT(${found_tmp})
34 dnl Checks for header files.
38 AC_CHECK_HEADERS(fcntl.h paths.h termios.h sgtty.h unistd.h malloc.h)
39 AC_CHECK_HEADERS(sys/filio.h sys/ioctl.h sys/time.h sys/file.h sys/utsname.h)
40 AC_CHECK_HEADERS(sys/select.h sys/msgbuf.h sys/cdefs.h)
42 if test "$no_x" != "yes"; then
49 dnl Checks for typedefs, structures, and compiler characteristics.
52 AC_CHECK_SIZEOF(short)
55 AC_MSG_CHECKING(for 32-bit integer type)
56 if test "$ac_cv_sizeof_long" = 4; then
58 elif test "$ac_cv_sizeof_int" = 4; then
60 elif test "$ac_cv_sizeof_short" = 4; then
63 AC_WARN([Can't find 32-bit type, using long])
66 AC_DEFINE_UNQUOTED(ZEPHYR_INT32, ${int32})
67 AC_MSG_RESULT(${int32})
69 AC_CHECK_LIB(w, wslen)
70 AC_CHECK_LIB(dl, dlopen)
72 AC_SEARCH_LIBS(gethostbyname, nsl)
73 AC_SEARCH_LIBS(socket, socket)
75 # Hesiod needs -lresolv on Sun systems for res_send.
76 if test "$hesiod" != "no"; then
77 AC_CHECK_LIB(44bsd, strerror)
78 AC_CHECK_LIB(resolv, res_send)
79 AC_CHECK_LIB(resolv, __res_send)
82 AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap])
83 AC_CHECK_LIB(src, srcsrpy, [SLIB=-lsrc; AC_DEFINE(HAVE_SRC)])
94 LIBS="$KRB4_LIBS $HESIOD_LIBS $LIBS"
96 dnl Checks for library functions.
97 AC_PROG_GCC_TRADITIONAL
101 AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random)
102 AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid krb_get_err_text krb_log)
104 AC_CONFIG_HEADER(h/config.h)
105 AC_OUTPUT(Makefile clients/Makefile clients/xzwrite/Makefile
106 clients/zaway/Makefile clients/zctl/Makefile
107 clients/zleave/Makefile clients/zlocate/Makefile
108 clients/zmailnotify/Makefile clients/znol/Makefile
109 clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
110 clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
111 libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile)