1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | AC_INIT(server/server.c) |
---|
3 | |
---|
4 | test -d h || mkdir h |
---|
5 | test -d h/zephyr || mkdir h/zephyr |
---|
6 | |
---|
7 | test -z "$lbindir" && lbindir='${bindir}' |
---|
8 | test -z "$lsbindir" && lsbindir='${sbindir}' |
---|
9 | AC_SUBST(lbindir) |
---|
10 | AC_SUBST(lsbindir) |
---|
11 | |
---|
12 | AC_CANONICAL_SYSTEM |
---|
13 | AC_DEFINE_UNQUOTED(MACHINE_TYPE, "$host") |
---|
14 | |
---|
15 | dnl Checks for programs. |
---|
16 | AC_PROG_CC |
---|
17 | AC_PROG_YACC |
---|
18 | AC_PROG_LEX |
---|
19 | AC_PROG_INSTALL |
---|
20 | AC_PROG_RANLIB |
---|
21 | |
---|
22 | AC_MSG_CHECKING(location of temporary directory) |
---|
23 | if test -d /var/tmp; then |
---|
24 | found_tmp=/var/tmp/ |
---|
25 | elif test -d /usr/tmp; then |
---|
26 | found_tmp=/usr/tmp/ |
---|
27 | else |
---|
28 | found_tmp=/tmp/ |
---|
29 | fi |
---|
30 | AC_DEFINE_UNQUOTED(FOUND_TMP, "${found_tmp}") |
---|
31 | AC_MSG_RESULT(${found_tmp}) |
---|
32 | |
---|
33 | dnl Checks for header files. |
---|
34 | AC_PATH_XTRA |
---|
35 | AC_HEADER_STDC |
---|
36 | AC_HEADER_SYS_WAIT |
---|
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) |
---|
40 | |
---|
41 | if test "$no_x" != "yes"; then |
---|
42 | XCLIENTS=xzwrite |
---|
43 | ZWGC_LIBX11=-lX11 |
---|
44 | fi |
---|
45 | AC_SUBST(XCLIENTS) |
---|
46 | AC_SUBST(ZWGC_LIBX11) |
---|
47 | |
---|
48 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
49 | AC_TYPE_SIGNAL |
---|
50 | AC_TYPE_UID_T |
---|
51 | AC_CHECK_SIZEOF(short) |
---|
52 | AC_CHECK_SIZEOF(int) |
---|
53 | AC_CHECK_SIZEOF(long) |
---|
54 | AC_MSG_CHECKING(for 32-bit integer type) |
---|
55 | if test "$ac_cv_sizeof_long" = 4; then |
---|
56 | int32=long |
---|
57 | elif test "$ac_cv_sizeof_int" = 4; then |
---|
58 | int32=int |
---|
59 | elif test "$ac_cv_sizeof_short" = 4; then |
---|
60 | int32=short |
---|
61 | else |
---|
62 | AC_WARN([Can't find 32-bit type, using long]) |
---|
63 | int32=long |
---|
64 | fi |
---|
65 | AC_DEFINE_UNQUOTED(ZEPHYR_INT32, ${int32}) |
---|
66 | AC_MSG_RESULT(${int32}) |
---|
67 | |
---|
68 | AC_CHECK_LIB(w, wslen) |
---|
69 | AC_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. |
---|
76 | AC_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. |
---|
80 | if test "$hesiod" != "no"; then |
---|
81 | AC_CHECK_LIB(44bsd, strerror) |
---|
82 | AC_CHECK_LIB(resolv, res_send) |
---|
83 | fi |
---|
84 | |
---|
85 | AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap]) |
---|
86 | AC_CHECK_LIB(src, srcsrpy, [SLIB=-lsrc; AC_DEFINE(HAVE_SRC)]) |
---|
87 | AC_SUBST(TLIB) |
---|
88 | AC_SUBST(RLIB) |
---|
89 | AC_SUBST(SLIB) |
---|
90 | |
---|
91 | ATHENA_KRB4 |
---|
92 | ATHENA_HESIOD |
---|
93 | ATHENA_REGEXP |
---|
94 | ATHENA_ARES |
---|
95 | ATHENA_UTIL_COM_ERR |
---|
96 | ATHENA_UTIL_SS |
---|
97 | LIBS="$KRB4_LIBS $HESIOD_LIBS $LIBS" |
---|
98 | |
---|
99 | dnl Checks for library functions. |
---|
100 | AC_PROG_GCC_TRADITIONAL |
---|
101 | AC_FUNC_VPRINTF |
---|
102 | AC_FUNC_GETPGRP |
---|
103 | AC_FUNC_SETPGRP |
---|
104 | AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random) |
---|
105 | AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid krb_get_err_text krb_log) |
---|
106 | |
---|
107 | AC_CONFIG_HEADER(h/config.h) |
---|
108 | AC_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) |
---|