[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 |
---|
[e6449bc] | 19 | CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include |
---|
[7d4fbcd] | 20 | AC_MSG_RESULT(yes) |
---|
| 21 | else |
---|
| 22 | AC_MSG_RESULT(no) |
---|
| 23 | fi |
---|
| 24 | AC_MSG_CHECKING(for /usr/athena/lib) |
---|
| 25 | if test -d /usr/athena/lib; then |
---|
[601a9e0] | 26 | LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS} |
---|
[7d4fbcd] | 27 | AC_MSG_RESULT(yes) |
---|
| 28 | else |
---|
| 29 | AC_MSG_RESULT(no) |
---|
| 30 | fi |
---|
| 31 | |
---|
[fe39450] | 32 | dnl Check for kerberosIV include |
---|
| 33 | AC_MSG_CHECKING(for /usr/include/kerberosIV) |
---|
| 34 | if test -d /usr/include/kerberosIV; then |
---|
| 35 | CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV |
---|
| 36 | CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV |
---|
| 37 | AC_MSG_RESULT(yes) |
---|
| 38 | else |
---|
| 39 | AC_MSG_RESULT(no) |
---|
| 40 | fi |
---|
| 41 | |
---|
[e0410eb] | 42 | AC_CHECK_LIB(ncursesw, initscr,, |
---|
| 43 | AC_CHECK_LIB(ncurses, initscr,, |
---|
| 44 | AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.)))) |
---|
[7d4fbcd] | 45 | AC_CHECK_LIB(com_err, com_err) |
---|
| 46 | AC_CHECK_LIB(nsl, gethostbyname) |
---|
| 47 | AC_CHECK_LIB(socket, socket) |
---|
| 48 | AC_CHECK_LIB(k5crypto, krb5_derive_key) |
---|
[8298425] | 49 | dnl AC_CHECK_LIB(des425, req_act_vno) |
---|
| 50 | AC_CHECK_LIB(des425, des_cbc_encrypt) |
---|
[d09e5a1] | 51 | AC_CHECK_LIB(resolv, res_search) |
---|
[7d4fbcd] | 52 | AC_CHECK_LIB(krb5, krb5_get_credentials) |
---|
[d09e5a1] | 53 | AC_CHECK_LIB(krb4, krb_sendauth,, |
---|
| 54 | AC_CHECK_LIB(krb, krb_sendauth)) |
---|
[09489b89] | 55 | dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.)) |
---|
| 56 | AC_CHECK_LIB(zephyr, ZGetSender) |
---|
[ac70242] | 57 | AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),) |
---|
| 58 | |
---|
[7ccc780] | 59 | AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic], |
---|
| 60 | [Statically link libraries in /usr/athena/lib]), |
---|
| 61 | [ATHSTATIC=./athstatic], |
---|
| 62 | [ATHSTATIC=]) |
---|
| 63 | |
---|
[dc2ad79] | 64 | AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt) |
---|
[e51b410] | 65 | |
---|
[ac70242] | 66 | AC_MSG_CHECKING(for des_ecb_encrypt prototype) |
---|
| 67 | AC_TRY_COMPILE([#include <des.h> |
---|
| 68 | int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);], |
---|
| 69 | [int foo = des_ecb_encrypt(0,0,0,0);], |
---|
| 70 | ac_cv_des_ecb_encrypt_proto=no, |
---|
| 71 | ac_cv_des_ecb_encrypt_proto=yes) |
---|
| 72 | AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto) |
---|
| 73 | if test "$ac_cv_des_ecb_encrypt_proto" = yes; then |
---|
| 74 | AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt]) |
---|
| 75 | fi |
---|
[7d4fbcd] | 76 | |
---|
| 77 | dnl Checks for header files. |
---|
| 78 | AC_HEADER_STDC |
---|
| 79 | AC_HEADER_SYS_WAIT |
---|
[e8b95f8] | 80 | AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h) |
---|
[7d4fbcd] | 81 | |
---|
| 82 | dnl Add CFLAGS for embeded perl |
---|
| 83 | FOO=`perl -MExtUtils::Embed -e ccopts` |
---|
| 84 | echo Adding perl CFLAGS ${FOO} |
---|
| 85 | CFLAGS=${CFLAGS}\ ${FOO} |
---|
| 86 | |
---|
[e51b410] | 87 | dnl Find the location of perl XSUBPP |
---|
[8ee73f8d] | 88 | AC_MSG_CHECKING(for the perl xsubpp precompiler) |
---|
[6794f72] | 89 | XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`" |
---|
[8ee73f8d] | 90 | if test -n "${XSUBPPDIR}"; then |
---|
| 91 | AC_MSG_RESULT(${XSUBPPDIR}) |
---|
| 92 | else |
---|
| 93 | AC_MSG_ERROR(not found) |
---|
| 94 | fi |
---|
| 95 | |
---|
[4ad3480] | 96 | if test -f "${XSUBPPDIR}/typemap"; then |
---|
| 97 | XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap" |
---|
| 98 | else |
---|
| 99 | XSUBPPFLAGS="" |
---|
| 100 | fi |
---|
| 101 | |
---|
[7d4fbcd] | 102 | dnl Add LDFLAGS for embeded perl |
---|
[3f21b8e] | 103 | FOO=`perl -MExtUtils::Embed -e ldopts` |
---|
[7d4fbcd] | 104 | echo Adding perl LDFLAGS ${FOO} |
---|
| 105 | LDFLAGS=${LDFLAGS}\ ${FOO} |
---|
| 106 | |
---|
| 107 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
[ac70242] | 108 | AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo", [Have terminfo]), |
---|
| 109 | AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo", [Have terminfo]), |
---|
[7d4fbcd] | 110 | AC_MSG_ERROR(No terminfo found for this system))) |
---|
| 111 | |
---|
[15bd5ef] | 112 | AC_SUBST(XSUBPPDIR) |
---|
[4ad3480] | 113 | AC_SUBST(XSUBPPFLAGS) |
---|
[7ccc780] | 114 | AC_SUBST(ATHSTATIC) |
---|
[8ee73f8d] | 115 | |
---|
[ac70242] | 116 | AC_PROG_INSTALL |
---|
| 117 | |
---|
[d09e5a1] | 118 | AC_CONFIG_SUBDIRS(libfaim) |
---|
| 119 | |
---|
[7d4fbcd] | 120 | AC_OUTPUT(Makefile) |
---|