[1aee7d9] | 1 | dnl $Id$ |
---|
[7d4fbcd] | 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 |
---|
[601a9e0] | 24 | LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS} |
---|
[7d4fbcd] | 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) |
---|
[ac70242] | 37 | AC_CHECK_LIB(des, des_quad_cksum) |
---|
[7d4fbcd] | 38 | AC_CHECK_LIB(krb5, krb5_get_credentials) |
---|
| 39 | AC_CHECK_LIB(krb4, krb_sendauth) |
---|
[ac70242] | 40 | AC_CHECK_LIB(krb, krb_sendauth) |
---|
[7d4fbcd] | 41 | AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) |
---|
[ac70242] | 42 | AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),) |
---|
| 43 | |
---|
| 44 | AC_MSG_CHECKING(for des_ecb_encrypt prototype) |
---|
| 45 | AC_TRY_COMPILE([#include <des.h> |
---|
| 46 | int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);], |
---|
| 47 | [int foo = des_ecb_encrypt(0,0,0,0);], |
---|
| 48 | ac_cv_des_ecb_encrypt_proto=no, |
---|
| 49 | ac_cv_des_ecb_encrypt_proto=yes) |
---|
| 50 | AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto) |
---|
| 51 | if test "$ac_cv_des_ecb_encrypt_proto" = yes; then |
---|
| 52 | AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt]) |
---|
| 53 | fi |
---|
[7d4fbcd] | 54 | |
---|
| 55 | dnl Checks for header files. |
---|
| 56 | AC_HEADER_STDC |
---|
| 57 | AC_HEADER_SYS_WAIT |
---|
| 58 | AC_CHECK_HEADERS(strings.h sys/ioctl.h unistd.h) |
---|
| 59 | |
---|
| 60 | dnl Add CFLAGS for embeded perl |
---|
| 61 | FOO=`perl -MExtUtils::Embed -e ccopts` |
---|
| 62 | echo Adding perl CFLAGS ${FOO} |
---|
| 63 | CFLAGS=${CFLAGS}\ ${FOO} |
---|
| 64 | |
---|
[8ee73f8d] | 65 | dnl Find the location of XSUBPP |
---|
| 66 | AC_MSG_CHECKING(for the perl xsubpp precompiler) |
---|
[6794f72] | 67 | XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" |
---|
[8ee73f8d] | 68 | if test -n "${XSUBPPDIR}"; then |
---|
| 69 | AC_MSG_RESULT(${XSUBPPDIR}) |
---|
| 70 | else |
---|
| 71 | AC_MSG_ERROR(not found) |
---|
| 72 | fi |
---|
| 73 | |
---|
[7d4fbcd] | 74 | dnl Add LDFLAGS for embeded perl |
---|
[316962a] | 75 | FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//'` |
---|
[7d4fbcd] | 76 | echo Adding perl LDFLAGS ${FOO} |
---|
| 77 | LDFLAGS=${LDFLAGS}\ ${FOO} |
---|
| 78 | |
---|
| 79 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
[ac70242] | 80 | AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo", [Have terminfo]), |
---|
| 81 | AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo", [Have terminfo]), |
---|
[7d4fbcd] | 82 | AC_MSG_ERROR(No terminfo found for this system))) |
---|
| 83 | |
---|
| 84 | dnl Checks for library functions. |
---|
| 85 | dnl AC_PROG_GCC_TRADITIONAL |
---|
[ac70242] | 86 | dnl AC_CHECK_FUNCS(gethostname strdup use_default_colors) |
---|
[7d4fbcd] | 87 | |
---|
[8ee73f8d] | 88 | AC_SUBST(XSUBPPDIR) |
---|
| 89 | |
---|
[ac70242] | 90 | AC_PROG_INSTALL |
---|
| 91 | |
---|
[7d4fbcd] | 92 | AC_OUTPUT(Makefile) |
---|