1 | dnl $Id$ |
---|
2 | dnl Process this file with autoconf to produce a configure script. |
---|
3 | AC_INIT(owl.c) |
---|
4 | |
---|
5 | AC_CONFIG_HEADER(config.h) |
---|
6 | |
---|
7 | AC_PROG_CC |
---|
8 | |
---|
9 | dnl If we're using GCC, enable all warnings |
---|
10 | if test "$GCC" = yes; then |
---|
11 | CFLAGS="$CFLAGS -Wall -g"; |
---|
12 | fi |
---|
13 | |
---|
14 | dnl Check for Athena |
---|
15 | AC_MSG_CHECKING(for /usr/athena/include) |
---|
16 | if test -d /usr/athena/include; then |
---|
17 | CFLAGS=${CFLAGS}\ -I/usr/athena/include |
---|
18 | AC_MSG_RESULT(yes) |
---|
19 | else |
---|
20 | AC_MSG_RESULT(no) |
---|
21 | fi |
---|
22 | AC_MSG_CHECKING(for /usr/athena/lib) |
---|
23 | if test -d /usr/athena/lib; then |
---|
24 | LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS} |
---|
25 | AC_MSG_RESULT(yes) |
---|
26 | else |
---|
27 | AC_MSG_RESULT(no) |
---|
28 | fi |
---|
29 | |
---|
30 | AC_CHECK_LIB(ncurses, initscr,, |
---|
31 | AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.))) |
---|
32 | AC_CHECK_LIB(com_err, com_err) |
---|
33 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
34 | AC_CHECK_LIB(socket, socket) |
---|
35 | AC_CHECK_LIB(k5crypto, krb5_derive_key) |
---|
36 | AC_CHECK_LIB(des425, des425_req_act_vno) |
---|
37 | AC_CHECK_LIB(krb5, krb5_get_credentials) |
---|
38 | AC_CHECK_LIB(krb4, krb_sendauth) |
---|
39 | AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) |
---|
40 | AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE(HAVE_LIBZEPHYR_ZINITLOCATIONINFO),) |
---|
41 | |
---|
42 | dnl Checks for header files. |
---|
43 | AC_HEADER_STDC |
---|
44 | AC_HEADER_SYS_WAIT |
---|
45 | AC_CHECK_HEADERS(strings.h sys/ioctl.h unistd.h) |
---|
46 | |
---|
47 | dnl Add CFLAGS for embeded perl |
---|
48 | FOO=`perl -MExtUtils::Embed -e ccopts` |
---|
49 | echo Adding perl CFLAGS ${FOO} |
---|
50 | CFLAGS=${CFLAGS}\ ${FOO} |
---|
51 | |
---|
52 | dnl Find the location of XSUBPP |
---|
53 | AC_MSG_CHECKING(for the perl xsubpp precompiler) |
---|
54 | XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" |
---|
55 | if test -n "${XSUBPPDIR}"; then |
---|
56 | AC_MSG_RESULT(${XSUBPPDIR}) |
---|
57 | else |
---|
58 | AC_MSG_ERROR(not found) |
---|
59 | fi |
---|
60 | |
---|
61 | dnl Add LDFLAGS for embeded perl |
---|
62 | FOO=`perl -MExtUtils::Embed -e ldopts` |
---|
63 | echo Adding perl LDFLAGS ${FOO} |
---|
64 | LDFLAGS=${LDFLAGS}\ ${FOO} |
---|
65 | |
---|
66 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
67 | AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo"), |
---|
68 | AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo"), |
---|
69 | AC_MSG_ERROR(No terminfo found for this system))) |
---|
70 | |
---|
71 | dnl Checks for library functions. |
---|
72 | dnl AC_PROG_GCC_TRADITIONAL |
---|
73 | dnl AC_CHECK_FUNCS(gethostname strdup) |
---|
74 | |
---|
75 | AC_SUBST(XSUBPPDIR) |
---|
76 | |
---|
77 | AC_OUTPUT(Makefile) |
---|