[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 | |
---|
[e51b410] | 14 | |
---|
[7d4fbcd] | 15 | dnl Check for Athena |
---|
| 16 | AC_MSG_CHECKING(for /usr/athena/include) |
---|
| 17 | if test -d /usr/athena/include; then |
---|
| 18 | CFLAGS=${CFLAGS}\ -I/usr/athena/include |
---|
| 19 | AC_MSG_RESULT(yes) |
---|
| 20 | else |
---|
| 21 | AC_MSG_RESULT(no) |
---|
| 22 | fi |
---|
| 23 | AC_MSG_CHECKING(for /usr/athena/lib) |
---|
| 24 | if test -d /usr/athena/lib; then |
---|
[601a9e0] | 25 | LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS} |
---|
[7d4fbcd] | 26 | AC_MSG_RESULT(yes) |
---|
| 27 | else |
---|
| 28 | AC_MSG_RESULT(no) |
---|
| 29 | fi |
---|
| 30 | |
---|
| 31 | AC_CHECK_LIB(ncurses, initscr,, |
---|
| 32 | AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.))) |
---|
| 33 | AC_CHECK_LIB(com_err, com_err) |
---|
| 34 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
| 35 | AC_CHECK_LIB(socket, socket) |
---|
| 36 | AC_CHECK_LIB(k5crypto, krb5_derive_key) |
---|
| 37 | AC_CHECK_LIB(des425, des425_req_act_vno) |
---|
[ac70242] | 38 | AC_CHECK_LIB(des, des_quad_cksum) |
---|
[d09e5a1] | 39 | AC_CHECK_LIB(resolv, res_search) |
---|
[7d4fbcd] | 40 | AC_CHECK_LIB(krb5, krb5_get_credentials) |
---|
[d09e5a1] | 41 | AC_CHECK_LIB(krb4, krb_sendauth,, |
---|
| 42 | AC_CHECK_LIB(krb, krb_sendauth)) |
---|
[aef17f2] | 43 | AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) |
---|
| 44 | dnl AC_CHECK_LIB(zephyr, ZGetSender) |
---|
[ac70242] | 45 | AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),) |
---|
| 46 | |
---|
[c269e22] | 47 | AC_CHECK_FUNCS(use_default_colors des_string_to_key des_key_sched des_ecb_encrypt) |
---|
[e51b410] | 48 | |
---|
[ac70242] | 49 | AC_MSG_CHECKING(for des_ecb_encrypt prototype) |
---|
| 50 | AC_TRY_COMPILE([#include <des.h> |
---|
| 51 | int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);], |
---|
| 52 | [int foo = des_ecb_encrypt(0,0,0,0);], |
---|
| 53 | ac_cv_des_ecb_encrypt_proto=no, |
---|
| 54 | ac_cv_des_ecb_encrypt_proto=yes) |
---|
| 55 | AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto) |
---|
| 56 | if test "$ac_cv_des_ecb_encrypt_proto" = yes; then |
---|
| 57 | AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt]) |
---|
| 58 | fi |
---|
[7d4fbcd] | 59 | |
---|
[c269e22] | 60 | |
---|
[7d4fbcd] | 61 | dnl Checks for header files. |
---|
| 62 | AC_HEADER_STDC |
---|
| 63 | AC_HEADER_SYS_WAIT |
---|
| 64 | AC_CHECK_HEADERS(strings.h sys/ioctl.h unistd.h) |
---|
| 65 | |
---|
| 66 | dnl Add CFLAGS for embeded perl |
---|
| 67 | FOO=`perl -MExtUtils::Embed -e ccopts` |
---|
| 68 | echo Adding perl CFLAGS ${FOO} |
---|
| 69 | CFLAGS=${CFLAGS}\ ${FOO} |
---|
| 70 | |
---|
[e51b410] | 71 | dnl Find the location of perl XSUBPP |
---|
[8ee73f8d] | 72 | AC_MSG_CHECKING(for the perl xsubpp precompiler) |
---|
[6794f72] | 73 | XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" |
---|
[8ee73f8d] | 74 | if test -n "${XSUBPPDIR}"; then |
---|
| 75 | AC_MSG_RESULT(${XSUBPPDIR}) |
---|
| 76 | else |
---|
| 77 | AC_MSG_ERROR(not found) |
---|
| 78 | fi |
---|
| 79 | |
---|
[7d4fbcd] | 80 | dnl Add LDFLAGS for embeded perl |
---|
[884c272] | 81 | FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'` |
---|
[7d4fbcd] | 82 | echo Adding perl LDFLAGS ${FOO} |
---|
| 83 | LDFLAGS=${LDFLAGS}\ ${FOO} |
---|
| 84 | |
---|
| 85 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
[ac70242] | 86 | AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo", [Have terminfo]), |
---|
| 87 | AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo", [Have terminfo]), |
---|
[7d4fbcd] | 88 | AC_MSG_ERROR(No terminfo found for this system))) |
---|
| 89 | |
---|
[8ee73f8d] | 90 | AC_SUBST(XSUBPPDIR) |
---|
| 91 | |
---|
[ac70242] | 92 | AC_PROG_INSTALL |
---|
| 93 | |
---|
[d09e5a1] | 94 | AC_CONFIG_SUBDIRS(libfaim) |
---|
| 95 | |
---|
[7d4fbcd] | 96 | AC_OUTPUT(Makefile) |
---|