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