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