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 | AC_PROG_LIBTOOL |
---|
22 | |
---|
23 | AC_MSG_CHECKING(location of temporary directory) |
---|
24 | if test -d /var/tmp; then |
---|
25 | found_tmp=/var/tmp/ |
---|
26 | elif test -d /usr/tmp; then |
---|
27 | found_tmp=/usr/tmp/ |
---|
28 | else |
---|
29 | found_tmp=/tmp/ |
---|
30 | fi |
---|
31 | AC_DEFINE_UNQUOTED(FOUND_TMP, "${found_tmp}") |
---|
32 | AC_MSG_RESULT(${found_tmp}) |
---|
33 | |
---|
34 | dnl Checks for header files. |
---|
35 | AC_PATH_XTRA |
---|
36 | AC_HEADER_STDC |
---|
37 | AC_HEADER_SYS_WAIT |
---|
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 krb5_err.h) |
---|
41 | |
---|
42 | if test "$no_x" != "yes"; then |
---|
43 | XCLIENTS=xzwrite |
---|
44 | ZWGC_LIBX11=-lX11 |
---|
45 | fi |
---|
46 | AC_SUBST(XCLIENTS) |
---|
47 | AC_SUBST(ZWGC_LIBX11) |
---|
48 | |
---|
49 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
50 | AC_TYPE_SIGNAL |
---|
51 | AC_TYPE_UID_T |
---|
52 | AC_CHECK_SIZEOF(short) |
---|
53 | AC_CHECK_SIZEOF(int) |
---|
54 | AC_CHECK_SIZEOF(long) |
---|
55 | AC_MSG_CHECKING(for 32-bit integer type) |
---|
56 | if test "$ac_cv_sizeof_long" = 4; then |
---|
57 | int32=long |
---|
58 | elif test "$ac_cv_sizeof_int" = 4; then |
---|
59 | int32=int |
---|
60 | elif test "$ac_cv_sizeof_short" = 4; then |
---|
61 | int32=short |
---|
62 | else |
---|
63 | AC_WARN([Can't find 32-bit type, using long]) |
---|
64 | int32=long |
---|
65 | fi |
---|
66 | AC_DEFINE_UNQUOTED(ZEPHYR_INT32, ${int32}) |
---|
67 | AC_MSG_RESULT(${int32}) |
---|
68 | |
---|
69 | AC_CHECK_LIB(w, wslen) |
---|
70 | AC_CHECK_LIB(dl, dlopen) |
---|
71 | |
---|
72 | AC_SEARCH_LIBS(gethostbyname, nsl) |
---|
73 | AC_SEARCH_LIBS(socket, socket) |
---|
74 | |
---|
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) |
---|
80 | fi |
---|
81 | |
---|
82 | AC_CHECK_LIB(curses, tgetstr, [TLIB=-lcurses], [TLIB=-ltermcap]) |
---|
83 | AC_CHECK_LIB(src, srcsrpy, [SLIB=-lsrc; AC_DEFINE(HAVE_SRC)]) |
---|
84 | AC_SUBST(TLIB) |
---|
85 | AC_SUBST(RLIB) |
---|
86 | AC_SUBST(SLIB) |
---|
87 | |
---|
88 | ATHENA_KRB4 |
---|
89 | ATHENA_KRB5 |
---|
90 | ATHENA_HESIOD |
---|
91 | ATHENA_REGEXP |
---|
92 | ATHENA_ARES |
---|
93 | ATHENA_UTIL_COM_ERR |
---|
94 | ATHENA_UTIL_SS |
---|
95 | LIBS="$KRB5_LIBS $KRB4_LIBS $HESIOD_LIBS $LIBS" |
---|
96 | |
---|
97 | dnl Checks for library functions. |
---|
98 | AC_PROG_GCC_TRADITIONAL |
---|
99 | AC_FUNC_VPRINTF |
---|
100 | AC_FUNC_GETPGRP |
---|
101 | AC_FUNC_SETPGRP |
---|
102 | AC_CHECK_FUNCS(putenv strchr memcpy memmove waitpid getlogin strerror random) |
---|
103 | AC_CHECK_FUNCS(lrand48 gethostid getsid getpgid krb_get_err_text krb_log) |
---|
104 | AC_CHECK_FUNCS(krb5_free_data krb5_c_make_checksum krb5_cc_set_default_name) |
---|
105 | |
---|
106 | AC_MSG_CHECKING(for krb5_auth_con_getauthenticator taking double pointer) |
---|
107 | AC_CACHE_VAL(ac_cv_krb5_auth_con_getauthenticator_takes_double_pointer, [ |
---|
108 | local_save_CPPFLAGS="$CPPFLAGS" |
---|
109 | CPPFLAGS="${CPPFLAGS} ${KRB5_INC_FLAGS}" |
---|
110 | AC_TRY_COMPILE( |
---|
111 | [#define socklen_t int |
---|
112 | #define ssize_t int |
---|
113 | #include <krb5.h> |
---|
114 | krb5_error_code |
---|
115 | krb5_auth_con_getauthenticator(krb5_context context, |
---|
116 | krb5_auth_context auth_context, |
---|
117 | krb5_authenticator *authenticator);], |
---|
118 | [krb5_error_code foo = krb5_auth_con_getauthenticator(0, 0, 0);], |
---|
119 | ac_cv_krb5_auth_con_getauthenticator_takes_double_pointer=no, |
---|
120 | ac_cv_krb5_auth_con_getauthenticator_takes_double_pointer=yes) |
---|
121 | ]) |
---|
122 | CPPFLAGS="${local_save_CPPFLAGS}" |
---|
123 | if test "$ac_cv_krb5_auth_con_getauthenticator_takes_double_pointer" = yes; then |
---|
124 | AC_DEFINE(KRB5_AUTH_CON_GETAUTHENTICATOR_TAKES_DOUBLE_POINTER)dnl |
---|
125 | fi |
---|
126 | AC_MSG_RESULT($ac_cv_krb5_auth_con_getauthenticator_takes_double_pointer) |
---|
127 | |
---|
128 | AC_MSG_CHECKING(for enc_part2 in struct krb5_ticket) |
---|
129 | AC_CACHE_VAL(ac_cv_have_krb5_ticket_enc_part2, [ |
---|
130 | local_save_CPPFLAGS="$CPPFLAGS" |
---|
131 | CPPFLAGS="${CPPFLAGS} ${KRB5_INC_FLAGS}" |
---|
132 | AC_TRY_COMPILE( |
---|
133 | [#include <krb5.h>], [krb5_ticket _tkt; _tkt.enc_part2;], |
---|
134 | ac_cv_have_krb5_ticket_enc_part2=yes, |
---|
135 | ac_cv_have_krb5_ticket_enc_part2=no) |
---|
136 | ]) |
---|
137 | CPPFLAGS="${local_save_CPPFLAGS}" |
---|
138 | if test "$ac_cv_have_krb5_ticket_enc_part2" = yes; then |
---|
139 | AC_DEFINE(HAVE_KRB5_TICKET_ENC_PART2)dnl |
---|
140 | fi |
---|
141 | AC_MSG_RESULT($ac_cv_have_krb5_ticket_enc_part2) |
---|
142 | |
---|
143 | AC_MSG_CHECKING(for enctype in struct krb5_keyblock) |
---|
144 | AC_CACHE_VAL(ac_cv_have_krb5_creds_keyblock_enctype, [ |
---|
145 | local_save_CPPFLAGS="$CPPFLAGS" |
---|
146 | CPPFLAGS="${CPPFLAGS} ${KRB5_INC_FLAGS}" |
---|
147 | AC_TRY_COMPILE( |
---|
148 | [#include <krb5.h>], [krb5_creds _creds; _creds.keyblock.enctype;], |
---|
149 | ac_cv_have_krb5_creds_keyblock_enctype=yes, |
---|
150 | ac_cv_have_krb5_creds_keyblock_enctype=no) |
---|
151 | ]) |
---|
152 | CPPFLAGS="${local_save_CPPFLAGS}" |
---|
153 | if test "$ac_cv_have_krb5_creds_keyblock_enctype" = yes; then |
---|
154 | AC_DEFINE(HAVE_KRB5_CREDS_KEYBLOCK_ENCTYPE)dnl |
---|
155 | fi |
---|
156 | AC_MSG_RESULT($ac_cv_have_krb5_creds_keyblock_enctype) |
---|
157 | |
---|
158 | AC_CONFIG_HEADER(h/config.h) |
---|
159 | AC_OUTPUT(Makefile clients/Makefile clients/xzwrite/Makefile |
---|
160 | clients/zaway/Makefile clients/zctl/Makefile |
---|
161 | clients/zleave/Makefile clients/zlocate/Makefile |
---|
162 | clients/zmailnotify/Makefile clients/znol/Makefile |
---|
163 | clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile |
---|
164 | clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile |
---|
165 | libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile) |
---|