1 | AC_INIT(patchlevel.h) |
---|
2 | |
---|
3 | dnl On Athena at least, many of the packages (krb, zephyr, hesiod, etc) |
---|
4 | dnl will all be in /usr/athena... this hack lets us not end up with 10 |
---|
5 | dnl copies of -I/usr/athena/include -L/usr/athena/lib in our command lines |
---|
6 | AC_DEFUN(MR_EXTEND, [ |
---|
7 | case $$1 in |
---|
8 | *$2*) ;; |
---|
9 | *) $1=$2\ $$1 ;; |
---|
10 | esac |
---|
11 | ]) |
---|
12 | |
---|
13 | AC_CANONICAL_HOST |
---|
14 | # SO_LDFLAGS setting below is a great big ick. |
---|
15 | # But it beats sucking in libtool for one small part of the source tree. |
---|
16 | case $host_os in |
---|
17 | solaris*) |
---|
18 | short_os=solaris |
---|
19 | SO_LDFLAGS="-G" |
---|
20 | ;; |
---|
21 | irix*) |
---|
22 | short_os=irix |
---|
23 | SO_LDFLAGS="-shared" |
---|
24 | ;; |
---|
25 | linux*) |
---|
26 | short_os=linux |
---|
27 | SO_LDFLAGS="-shared" |
---|
28 | ;; |
---|
29 | esac |
---|
30 | AC_SUBST(SO_LDFLAGS) |
---|
31 | |
---|
32 | dnl Define for both C and Pro*C |
---|
33 | AC_DEFUN(MR_DEFINE, [ |
---|
34 | AC_DEFINE($1) |
---|
35 | MR_EXTEND(PRO_C_DEFS, DEFINE=$1) |
---|
36 | ]) |
---|
37 | |
---|
38 | dnl Add to include path for both C and Pro*C |
---|
39 | AC_DEFUN(MR_INCLUDE, [ |
---|
40 | MR_EXTEND(CPPFLAGS, -I$1) |
---|
41 | MR_EXTEND(PRO_C_INCLUDES, INCLUDE=$1) |
---|
42 | ]) |
---|
43 | |
---|
44 | dnl Add to lib path |
---|
45 | AC_DEFUN(MR_LIBS, [MR_EXTEND(LIBPATH, -L$1)]) |
---|
46 | |
---|
47 | AC_PROG_CC |
---|
48 | AC_PROG_INSTALL |
---|
49 | AC_PROG_RANLIB |
---|
50 | AC_PROG_LIBTOOL |
---|
51 | AC_PROG_MAKE_SET |
---|
52 | |
---|
53 | if test "$athena" = true; then |
---|
54 | enable_athena=yes |
---|
55 | prefix=/afs/.athena.mit.edu/system/moira |
---|
56 | bindir=$prefix/arch/$ATHENA_SYS/bin |
---|
57 | libdir=$prefix/arch/$ATHENA_SYS/lib |
---|
58 | sbindir=$bindir |
---|
59 | MR_INCLUDE(/usr/athena/include) |
---|
60 | MR_LIBS(/usr/athena/lib) |
---|
61 | fi |
---|
62 | |
---|
63 | # We currently just don't support changing this |
---|
64 | mrbindir=/moira/bin |
---|
65 | AC_SUBST(mrbindir) |
---|
66 | |
---|
67 | # Athena-local policy decisions |
---|
68 | AC_MSG_CHECKING(for Athena) |
---|
69 | AC_ARG_ENABLE(athena, |
---|
70 | [ --enable-athena Enable Athena-specific policy decisions], |
---|
71 | , [if test "$athena" = true; then |
---|
72 | enableval=yes |
---|
73 | else |
---|
74 | enableval=no |
---|
75 | fi]) |
---|
76 | AC_MSG_RESULT($enableval) |
---|
77 | if test "$enableval" = yes; then |
---|
78 | MR_DEFINE(ATHENA) |
---|
79 | fi |
---|
80 | |
---|
81 | # Networking libraries |
---|
82 | AC_CHECKING(network libraries...) |
---|
83 | AC_CHECK_FUNC(gethostbyname, :, |
---|
84 | AC_CHECK_LIB(nsl, gethostbyname, , |
---|
85 | AC_CHECK_LIB(resolv, gethostbyname))) |
---|
86 | AC_CHECK_FUNC(socket, :, |
---|
87 | AC_CHECK_LIB(socket, socket, , |
---|
88 | AC_CHECK_LIB(socket, socket, |
---|
89 | LIBS="-lsocket -lnsl $LIBS", :, |
---|
90 | -lnsl))) |
---|
91 | |
---|
92 | # com_err (required, but can be built) |
---|
93 | AC_MSG_CHECKING(for com_err) |
---|
94 | AC_ARG_WITH(com_err, |
---|
95 | [ --with-com_err=PREFIX Specify location of com_err], |
---|
96 | [AC_MSG_RESULT($withval) |
---|
97 | if test $withval = "no"; then |
---|
98 | AC_MSG_ERROR(com_err is required for Moira) |
---|
99 | fi |
---|
100 | if test $withval != "yes"; then |
---|
101 | MR_INCLUDE($withval/include) |
---|
102 | MR_LIBS($withval/lib) |
---|
103 | fi |
---|
104 | COMPILE_ET=compile_et], |
---|
105 | [AC_MSG_RESULT(util/et) |
---|
106 | MR_INCLUDE(`pwd`/util/et) |
---|
107 | MR_LIBS(`pwd`/util/et) |
---|
108 | COMPILE_ET=`pwd`/util/et/compile_et |
---|
109 | AC_CONFIG_SUBDIRS(util/et)]) |
---|
110 | AC_SUBST(COM_ERR_SUBDIR) |
---|
111 | AC_SUBST(COMPILE_ET) |
---|
112 | |
---|
113 | AC_CHECK_LIB(k5crypto, main, crypto="k5crypto", |
---|
114 | [AC_CHECK_LIB(crypto, main, crypto="crypto")]) |
---|
115 | |
---|
116 | # Kerberos (Kerberos 4 optional, Kerberos 5 required) |
---|
117 | AC_MSG_CHECKING(for Kerberos 4) |
---|
118 | AC_ARG_WITH(krb4, |
---|
119 | [ --with-krb4=PREFIX Specify location of krb4], |
---|
120 | [krb4="$withval"], [krb4=no]) |
---|
121 | AC_MSG_RESULT($krb4) |
---|
122 | if test "$krb4" != no; then |
---|
123 | if test "$krb4" != yes; then |
---|
124 | MR_INCLUDE($krb4/include) |
---|
125 | if test -d "$krb4/include/kerberosIV"; then |
---|
126 | MR_INCLUDE($krb4/include/kerberosIV) |
---|
127 | fi |
---|
128 | MR_LIBS($krb4/lib) |
---|
129 | elif test -d /usr/include/kerberosIV; then |
---|
130 | MR_INCLUDE(/usr/include/kerberosIV) |
---|
131 | fi |
---|
132 | MR_DEFINE(HAVE_KRB4) |
---|
133 | AC_CHECK_LIB(krb4, krb_rd_req, |
---|
134 | [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -l${crypto} -lresolv"], |
---|
135 | [AC_CHECK_LIB(krb, krb_rd_req, |
---|
136 | [KRB4_LIBS="-lkrb -ldes"], |
---|
137 | [AC_MSG_ERROR(Kerberos 4 libraries not found)], |
---|
138 | $LIBPATH -ldes)], |
---|
139 | $LIBPATH -ldes425 -lkrb5 -l${crypto} -lcom_err -lresolv) |
---|
140 | fi |
---|
141 | |
---|
142 | AC_MSG_CHECKING(for Kerberos 5) |
---|
143 | AC_ARG_WITH(krb5, |
---|
144 | [ --with-krb5=PREFIX Specify location of krb5], |
---|
145 | [krb5="$withval"], [krb5=no]) |
---|
146 | AC_MSG_RESULT($krb5) |
---|
147 | if test "$krb5" != no; then |
---|
148 | REG_SVR_DEFS=-DKRB5 |
---|
149 | if test "$krb5" != yes; then |
---|
150 | REG_SVR_INCLUDES=-I$krb5/include |
---|
151 | REG_SVR_LIBS=-L$krb5/lib |
---|
152 | MR_INCLUDE($krb5/include) |
---|
153 | MR_LIBS($krb5/lib) |
---|
154 | fi |
---|
155 | MR_DEFINE(HAVE_KRB5) |
---|
156 | KRB5_LIBS="-lkrb5 -l${crypto} -lcom_err -lresolv" |
---|
157 | REG_SVR_LIBS="$REG_SVR_LIBS -lkadm5clnt -lgssapi_krb5 -lgssrpc -lkrb5 -l${crypto} -lresolv" |
---|
158 | else |
---|
159 | REG_SVR_DEFS=-DKRB4 |
---|
160 | REG_SVR_LIBS=-lkadm |
---|
161 | fi |
---|
162 | AC_SUBST(REG_SVR_DEFS) |
---|
163 | AC_SUBST(REG_SVR_INCLUDES) |
---|
164 | AC_SUBST(REG_SVR_LIBS) |
---|
165 | |
---|
166 | # Hesiod support |
---|
167 | AC_MSG_CHECKING(for Hesiod) |
---|
168 | AC_ARG_WITH(hesiod, |
---|
169 | [ --with-hesiod=PREFIX Specify location of Hesiod], |
---|
170 | [hesiod="$withval"], [hesiod=no]) |
---|
171 | AC_MSG_RESULT($hesiod) |
---|
172 | if test "$hesiod" != no; then |
---|
173 | if test "$hesiod" != yes; then |
---|
174 | MR_INCLUDE($hesiod/include) |
---|
175 | MR_LIBS($hesiod/lib) |
---|
176 | fi |
---|
177 | AC_CHECK_FUNC(res_send, :, |
---|
178 | AC_CHECK_LIB(resolv, res_send)) |
---|
179 | AC_CHECK_LIB(hesiod, hes_resolve, :, |
---|
180 | [AC_MSG_ERROR(Hesiod library not found)], |
---|
181 | $LIBPATH $LIBS) |
---|
182 | MR_DEFINE(HAVE_HESIOD) |
---|
183 | fi |
---|
184 | |
---|
185 | # Zephyr support |
---|
186 | AC_MSG_CHECKING(for Zephyr) |
---|
187 | AC_ARG_WITH(zephyr, |
---|
188 | [ --with-zephyr=PREFIX Specify location of Zephyr], |
---|
189 | [zephyr="$withval"], [zephyr=no]) |
---|
190 | AC_MSG_RESULT($zephyr) |
---|
191 | if test "$zephyr" != no; then |
---|
192 | if test "$zephyr" != yes; then |
---|
193 | MR_INCLUDE($zephyr/include) |
---|
194 | MR_LIBS($zephyr/lib) |
---|
195 | fi |
---|
196 | AC_CHECK_LIB(zephyr, ZInitialize, :, |
---|
197 | [AC_MSG_ERROR(Zephyr library not found)], |
---|
198 | $LIBPATH $KRB4_LIBS $KRB5_LIBS -lcom_err) |
---|
199 | MR_DEFINE(HAVE_ZEPHYR) |
---|
200 | fi |
---|
201 | |
---|
202 | # RSAREF support (default: build util/rsaref if present) |
---|
203 | AC_MSG_CHECKING(for RSAREF) |
---|
204 | AC_ARG_WITH(rsaref, |
---|
205 | [ --with-rsaref=PREFIX Specify location of RSAREF], |
---|
206 | [rsaref="$withval" |
---|
207 | RSAREF_CPPFLAGS="-I$rsaref/include" |
---|
208 | RSAREF_LIBS="$rsaref/lib/rsaref.a"], |
---|
209 | RSAREF_SUBDIRS=reg_svr |
---|
210 | [if test -d $srcdir/util/rsaref; then |
---|
211 | rsaref=$srcdir/util/rsaref |
---|
212 | RSAREF_SUBDIRS="util/rsaref reg_svr" |
---|
213 | RSAREF_OUTPUT_FILES="util/rsaref/Makefile" |
---|
214 | # autoconf can't deal with creating util/rsaref if util doesn't exist |
---|
215 | if test ! -d util; then |
---|
216 | mkdir util |
---|
217 | fi |
---|
218 | RSAREF_CPPFLAGS='-I$(SRCTOP)/util/rsaref' |
---|
219 | RSAREF_LIBS='$(BUILDTOP)/util/rsaref/rsaref.a' |
---|
220 | RSAREF_LIBDEP='$(BUILDTOP)/util/rsaref/rsaref.a' |
---|
221 | else |
---|
222 | rsaref=no |
---|
223 | fi]) |
---|
224 | AC_MSG_RESULT($rsaref) |
---|
225 | if test "$rsaref" != no; then |
---|
226 | MR_DEFINE(HAVE_RSAREF) |
---|
227 | fi |
---|
228 | AC_SUBST(RSAREF_CPPFLAGS) |
---|
229 | AC_SUBST(RSAREF_LIBS) |
---|
230 | AC_SUBST(RSAREF_SUBDIRS) |
---|
231 | AC_SUBST(RSAREF_LIBDEP) |
---|
232 | |
---|
233 | # Oracle (default: yes, if $ORACLE_HOME is set) |
---|
234 | AC_MSG_CHECKING(for Oracle) |
---|
235 | AC_ARG_WITH(oracle, |
---|
236 | [ --with-oracle=PREFIX Specify location of Oracle (for server)], |
---|
237 | [oracle="$withval"], |
---|
238 | [if test -n "$ORACLE_HOME" -a -d "$ORACLE_HOME"; then |
---|
239 | oracle=$ORACLE_HOME |
---|
240 | else |
---|
241 | oracle=no |
---|
242 | fi]) |
---|
243 | AC_MSG_RESULT($oracle) |
---|
244 | if test "$oracle" != no; then |
---|
245 | AC_MSG_CHECKING(Pro*C version) |
---|
246 | ORACLE_HOME=$oracle release=`$ORACLE_HOME/bin/proc | awk '/Release/ {print $3;}'` |
---|
247 | AC_MSG_RESULT($release) |
---|
248 | case $release in |
---|
249 | 2.0.6.0.0) |
---|
250 | SQL_LIBS="-L$oracle/lib -lsql $oracle/lib/osntab.o -lsqlnet -lora -lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcore -lm" |
---|
251 | ;; |
---|
252 | 2.2.4.0.0) |
---|
253 | SQL_LIBS="-L$oracle/lib -lclntsh -lxa -lsql -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3 `cat $oracle/rdbms/lib/sysliblist` -lm -lthread" |
---|
254 | ;; |
---|
255 | 8.1.7.4.0) |
---|
256 | SQL_LIBS="-L$oracle/lib -lclntsh `cat $oracle/lib/sysliblist` -R$oracle/lib -laio -lm -lthread" |
---|
257 | ;; |
---|
258 | 10.2.0.2.0) |
---|
259 | SQL_LIBS="-L$oracle/lib32 -lclntsh `cat $oracle/lib32/ldflags` `cat $oracle/lib32/sysliblist` -R$oracle/lib32 -laio -lposix4 -lm -lthread" |
---|
260 | ;; |
---|
261 | *) |
---|
262 | AC_MSG_ERROR(Unsupported Oracle release) |
---|
263 | ;; |
---|
264 | esac |
---|
265 | SVRSUBDIRS='$(SVRDIRS)' |
---|
266 | SERVER_OUTPUT_FILES="db/Makefile server/Makefile backup/Makefile dbck/Makefile dcm/Makefile gen/Makefile incremental/Makefile incremental/mailman/Makefile reg_svr/Makefile regtape/Makefile" |
---|
267 | PRO_C=$oracle/bin/proc |
---|
268 | PRO_C_OPTS=CODE=ANSI_C |
---|
269 | PRO_C_DEFS="DEFINE=_PROC_ DEFINE=__sparc $PRO_C_DEFS" |
---|
270 | fi |
---|
271 | AC_SUBST(PRO_C) |
---|
272 | AC_SUBST(PRO_C_DEFS) |
---|
273 | AC_SUBST(PRO_C_INCLUDES) |
---|
274 | AC_SUBST(PRO_C_OPTS) |
---|
275 | AC_SUBST(SQL_LIBS) |
---|
276 | AC_SUBST(SVRSUBDIRS) |
---|
277 | |
---|
278 | # Java support, for webmoira |
---|
279 | AC_MSG_CHECKING(for Java) |
---|
280 | AC_ARG_WITH(java, |
---|
281 | [ --with-java=PREFIX Specify location of Java libs and headers], |
---|
282 | [ java="$withval"], |
---|
283 | [if test -n "$JAVA_HOME" -a -d "$JAVA_HOME"; then |
---|
284 | java=$JAVA_HOME |
---|
285 | else |
---|
286 | java=no |
---|
287 | fi]) |
---|
288 | AC_MSG_RESULT($java) |
---|
289 | if test "$java" != no; then |
---|
290 | if test "$java" != yes; then |
---|
291 | JAVA_CPPFLAGS="-I$java/include -I$java/include/$short_os" |
---|
292 | fi |
---|
293 | MR_DEFINE(HAVE_JAVA) |
---|
294 | |
---|
295 | WEBMOIRA_SUBDIRS="webmoira" |
---|
296 | WEBMOIRA_OUTPUT_FILES="webmoira/Makefile" |
---|
297 | fi |
---|
298 | AC_SUBST(JAVA_CPPFLAGS) |
---|
299 | AC_SUBST(WEBMOIRA_SUBDIRS) |
---|
300 | |
---|
301 | # LDAP support |
---|
302 | AC_MSG_CHECKING(for LDAP) |
---|
303 | AC_ARG_WITH(ldap, |
---|
304 | [ --with-ldap=PREFIX Specify location of LDAP libs (for server)], |
---|
305 | [ ldap="$withval"], |
---|
306 | [if test -n "$LDAP_HOME" -a -d "$LDAP_HOME"; then |
---|
307 | ldap=$LDAP_HOME |
---|
308 | else |
---|
309 | ldap=no |
---|
310 | fi]) |
---|
311 | AC_MSG_RESULT($ldap) |
---|
312 | if test "$ldap" != no -a "$oracle" != no; then |
---|
313 | if test "$ldap" != yes; then |
---|
314 | LDAP_CPPFLAGS="-I$ldap/include" |
---|
315 | LDAP_LIBS="-L$ldap/lib" |
---|
316 | fi |
---|
317 | MR_DEFINE(HAVE_LDAP) |
---|
318 | |
---|
319 | WINAD_SUBDIRS="winad ldap" |
---|
320 | WINAD_OUTPUT_FILES="incremental/winad/Makefile incremental/ldap/Makefile" |
---|
321 | fi |
---|
322 | AC_SUBST(LDAP_CPPFLAGS) |
---|
323 | AC_SUBST(LDAP_LIBS) |
---|
324 | AC_SUBST(WINAD_SUBDIRS) |
---|
325 | |
---|
326 | # AFS support |
---|
327 | AC_MSG_CHECKING(for AFS) |
---|
328 | AC_ARG_WITH(afs, |
---|
329 | [ --with-afs=PREFIX Specify location of AFS libs (for server)], |
---|
330 | [afs="$withval"], [afs=no]) |
---|
331 | AC_MSG_RESULT($afs) |
---|
332 | if test "$afs" != no -a "$oracle" != no; then |
---|
333 | if test "$afs" != yes; then |
---|
334 | AFS_CPPFLAGS="-I$afs/include -I$afs/include/afs -I$afs/include/rx" |
---|
335 | AFS_PRO_C_INCLUDES="INCLUDE=$afs/include INCLUDE=$afs/include/afs INCLUDE=$afs/include/rx" |
---|
336 | AFS_LIBS="-L$afs/lib -L$afs/lib/afs" |
---|
337 | AFS_DIR=$afs |
---|
338 | fi |
---|
339 | AC_CHECK_LIB(sys, pioctl, :, |
---|
340 | [AC_MSG_ERROR(AFS libraries not found)], |
---|
341 | $AFS_LIBS -lrx -llwp -lsys -lafsutil) |
---|
342 | MR_DEFINE(HAVE_AFS) |
---|
343 | |
---|
344 | AFS_SUBDIRS="afs" |
---|
345 | AFS_OUTPUT_FILES="incremental/afs/Makefile" |
---|
346 | if test -d $srcdir/afssync; then |
---|
347 | AFS_SYNCDIR="afssync" |
---|
348 | AFS_OUTPUT_FILES="$AFS_OUTPUT_FILES afssync/Makefile" |
---|
349 | fi |
---|
350 | fi |
---|
351 | AC_SUBST(AFS_CPPFLAGS) |
---|
352 | AC_SUBST(AFS_PRO_C_INCLUDES) |
---|
353 | AC_SUBST(AFS_LIBS) |
---|
354 | AC_SUBST(AFS_DIR) |
---|
355 | AC_SUBST(AFS_SUBDIRS) |
---|
356 | AC_SUBST(AFS_SYNCDIR) |
---|
357 | |
---|
358 | # GNU readline |
---|
359 | AC_CHECKING(for GNU readline...) |
---|
360 | AC_ARG_WITH(readline, |
---|
361 | [ --with-readline=PREFIX Specify location of GNU readline], |
---|
362 | [readline="$withval"; AC_MSG_RESULT($withval)], |
---|
363 | [AC_CHECK_LIB(readline, readline, [readline=yes], |
---|
364 | [if test "$athena" = true; then |
---|
365 | unset ac_cv_lib_readline_readline |
---|
366 | AC_CHECK_LIB(readline, readline, [readline=/mit/gnu], :, |
---|
367 | -L/mit/gnu/lib -ltermcap) |
---|
368 | fi], |
---|
369 | -ltermcap)]) |
---|
370 | if test "$readline" != no; then |
---|
371 | if test "$readline" != yes; then |
---|
372 | READLINE_CPPFLAGS="-I$readline/include" |
---|
373 | READLINE_LIBS="-L$readline/lib" |
---|
374 | fi |
---|
375 | READLINE_CPPFLAGS="$READLINE_CPPFLAGS -DHAVE_READLINE" |
---|
376 | READLINE_LIBS="$READLINE_LIBS -lreadline -ltermcap" |
---|
377 | fi |
---|
378 | AC_SUBST(READLINE_CPPFLAGS) |
---|
379 | AC_SUBST(READLINE_LIBS) |
---|
380 | |
---|
381 | # Curses |
---|
382 | curses=curses |
---|
383 | AC_CHECKING(for curses) |
---|
384 | AC_CHECK_LIB(curses, main, :, AC_CHECK_LIB(ncurses, main, curses=ncurses)) |
---|
385 | if test -n "$curses"; then |
---|
386 | OLDLIBS=$LIBS |
---|
387 | LIBS=-l$curses |
---|
388 | AC_CHECKING(if curses needs termcap) |
---|
389 | dnl we need to use AC_TRY_RUN because under NetBSD, the program will |
---|
390 | dnl link with just -lcurses, but then fail with a runtime linker error |
---|
391 | dnl because you didn't use -ltermcap |
---|
392 | AC_TRY_RUN([#include <curses.h> |
---|
393 | main(int argc, char **argv) |
---|
394 | { |
---|
395 | initscr(); |
---|
396 | endwin(); |
---|
397 | return 0; |
---|
398 | }], [CURSES_LIBS="-l$curses"], |
---|
399 | LIBS="-l$curses -ltermcap" |
---|
400 | AC_TRY_RUN([#include <curses.h> |
---|
401 | main(int argc, char **argv) |
---|
402 | { |
---|
403 | initscr(); |
---|
404 | endwin(); |
---|
405 | return 0; |
---|
406 | }], [CURSES_LIBS="-l$curses -ltermcap"], |
---|
407 | :, :), |
---|
408 | :) |
---|
409 | LIBS=$OLDLIBS |
---|
410 | fi |
---|
411 | if test -n "$CURSES_LIBS"; then |
---|
412 | OLDLIBS=$LIBS |
---|
413 | LIBS=$CURSES_LIBS |
---|
414 | AC_TRY_LINK([#include <curses.h>],[WINDOW *w; getmaxx(w);], |
---|
415 | :, |
---|
416 | AC_TRY_COMPILE([#include <curses.h>],[WINDOW *w; w->_maxx;], |
---|
417 | [CURSES_CPPFLAGS="-D'getmaxx(w)=w->_maxx'"], |
---|
418 | [CURSES_CPPFLAGS="-D'getmaxx(w)=w->maxx'"])) |
---|
419 | AC_TRY_LINK([#include <curses.h>],[newterm(NULL, NULL, NULL);], |
---|
420 | [CURSES_CPPFLAGS="$CURSES_CPPFLAGS -DCURSES_HAS_NEWTERM"]) |
---|
421 | LIBS=$OLDLIBS |
---|
422 | CURSES_CPPFLAGS="-DHAVE_CURSES $CURSES_CPPFLAGS" |
---|
423 | CURSES_SUBDIRS='$(CURSES_SUBDIRS)' |
---|
424 | else |
---|
425 | AC_MSG_WARN(Couldn't find -lcurses) |
---|
426 | fi |
---|
427 | AC_SUBST(CURSES_CPPFLAGS) |
---|
428 | AC_SUBST(CURSES_LIBS) |
---|
429 | AC_SUBST(CURSES_SUBDIRS) |
---|
430 | |
---|
431 | |
---|
432 | AC_CHECK_FUNCS(getusershell strlcpy strlcat uname strvis) |
---|
433 | |
---|
434 | AC_CHECK_FUNC(sigaction, AC_DEFINE(HAVE_POSIX_SIGNALS)) |
---|
435 | |
---|
436 | AC_CHECK_HEADERS(unistd.h getopt.h) |
---|
437 | |
---|
438 | AC_CHECK_HEADER(netinet/in.h, AC_DEFINE(HAVE_NETINET_IN_H), no_netinet_in=yes) |
---|
439 | |
---|
440 | if test "$no_netinet_in" != "yes"; then |
---|
441 | AC_MSG_CHECKING(for in_addr_t defined in netinet/in.h) |
---|
442 | AC_EGREP_HEADER(in_addr_t, netinet/in.h, |
---|
443 | ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no) |
---|
444 | AC_MSG_RESULT($ac_cv_type_in_addr_t) |
---|
445 | fi |
---|
446 | |
---|
447 | if test "$ac_cv_type_in_addr_t" != "yes"; then |
---|
448 | AC_DEFINE(in_addr_t, uint32_t) |
---|
449 | fi |
---|
450 | |
---|
451 | MR_EXTEND(PRO_C_INCLUDES, INCLUDE='$(srcdir)') |
---|
452 | MR_INCLUDE('$(SRCTOP)/include') |
---|
453 | MR_INCLUDE('$(SRCTOP)/lib') |
---|
454 | MR_INCLUDE('$(BUILDTOP)/lib') |
---|
455 | MR_INCLUDE('$(BUILDTOP)/db') |
---|
456 | MR_INCLUDE('$(srcdir)') |
---|
457 | LDFLAGS="$LDFLAGS -L\$(BUILDTOP)/lib $LIBPATH" |
---|
458 | KLIBS="$KRB4_LIBS $KRB5_LIBS -lcom_err $LIBS" |
---|
459 | KLIBS="$LIBS" |
---|
460 | if test "$hesiod" != no; then |
---|
461 | KLIBS="-lhesiod $KLIBS" |
---|
462 | fi |
---|
463 | KLIBS="$KRB4_LIBS $KRB5_LIBS -lcom_err $KLIBS" |
---|
464 | if test "$zephyr" != no; then |
---|
465 | KLIBS="-lzephyr $KLIBS" |
---|
466 | fi |
---|
467 | LIBS="-lmoira $KLIBS" |
---|
468 | AC_SUBST(KLIBS) |
---|
469 | |
---|
470 | MR_LIBDEP='$(BUILDTOP)/lib/libmoira.la' |
---|
471 | AC_SUBST(MR_LIBDEP) |
---|
472 | |
---|
473 | AC_OUTPUT(Makefile lib/Makefile include/Makefile clients/Makefile \ |
---|
474 | clients/lib/Makefile clients/addusr/Makefile \ |
---|
475 | clients/blanche/Makefile clients/chfn/Makefile \ |
---|
476 | clients/chpobox/Makefile clients/chsh/Makefile \ |
---|
477 | clients/mailmaint/Makefile clients/mitch/Makefile \ |
---|
478 | clients/moira/Makefile clients/mrcheck/Makefile \ |
---|
479 | clients/mrtest/Makefile clients/stanley/Makefile \ |
---|
480 | clients/stella/Makefile update/Makefile man/Makefile \ |
---|
481 | $WEBMOIRA_OUTPUT_FILES $SERVER_OUTPUT_FILES $WINAD_OUTPUT_FILES \ |
---|
482 | $AFS_OUTPUT_FILES $RSAREF_OUTPUT_FILES) |
---|