source: configure.in @ 09489b89

barnowl_perlaimdebianowlrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 09489b89 was 09489b89, checked in by James M. Kretchmar <kretch@mit.edu>, 17 years ago
First pass at making owl build without zephyr
  • Property mode set to 100644
File size: 3.0 KB
Line 
1dnl $Id$
2dnl Process this file with autoconf to produce a configure script.
3AC_INIT(owl.c)
4
5AC_CONFIG_HEADER(config.h)
6
7AC_PROG_CC
8
9dnl If we're using GCC, enable all warnings
10if test "$GCC" = yes; then
11     CFLAGS="$CFLAGS -Wall -g";
12fi
13
14
15dnl Check for Athena
16AC_MSG_CHECKING(for /usr/athena/include)
17if test -d /usr/athena/include; then
18        CFLAGS=${CFLAGS}\ -I/usr/athena/include
19        AC_MSG_RESULT(yes)
20else
21        AC_MSG_RESULT(no)
22fi
23AC_MSG_CHECKING(for /usr/athena/lib)
24if test -d /usr/athena/lib; then
25        LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS}
26        AC_MSG_RESULT(yes)
27else
28        AC_MSG_RESULT(no)
29fi
30
31AC_CHECK_LIB(ncurses, initscr,,
32   AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.)))
33AC_CHECK_LIB(com_err, com_err)
34AC_CHECK_LIB(nsl, gethostbyname)
35AC_CHECK_LIB(socket, socket)
36AC_CHECK_LIB(k5crypto, krb5_derive_key)
37AC_CHECK_LIB(des425, req_act_vno)
38AC_CHECK_LIB(des, des_quad_cksum)
39AC_CHECK_LIB(resolv, res_search)
40AC_CHECK_LIB(krb5, krb5_get_credentials)
41AC_CHECK_LIB(krb4, krb_sendauth,,
42   AC_CHECK_LIB(krb, krb_sendauth))
43dnl These are both off right now to simluate zephyr not being present
44dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
45AC_CHECK_LIB(zephyr, ZGetSender)
46AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
47
48AC_CHECK_FUNCS(use_default_colors des_string_to_key des_key_sched des_ecb_encrypt)
49
50AC_MSG_CHECKING(for des_ecb_encrypt prototype)
51AC_TRY_COMPILE([#include <des.h>
52int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
53[int foo = des_ecb_encrypt(0,0,0,0);],
54ac_cv_des_ecb_encrypt_proto=no,
55ac_cv_des_ecb_encrypt_proto=yes)
56AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
57if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
58        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
59fi
60
61dnl Checks for header files.
62AC_HEADER_STDC
63AC_HEADER_SYS_WAIT
64AC_CHECK_HEADERS(strings.h sys/ioctl.h unistd.h)
65
66dnl Add CFLAGS for embeded perl
67FOO=`perl -MExtUtils::Embed -e ccopts`
68echo Adding perl CFLAGS ${FOO}
69CFLAGS=${CFLAGS}\ ${FOO}
70
71dnl Find the location of perl XSUBPP
72AC_MSG_CHECKING(for the perl xsubpp precompiler)
73XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
74if test -n "${XSUBPPDIR}"; then
75   AC_MSG_RESULT(${XSUBPPDIR})
76else
77   AC_MSG_ERROR(not found)
78fi
79
80dnl Add LDFLAGS for embeded perl
81FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'`
82echo Adding perl LDFLAGS ${FOO}
83LDFLAGS=${LDFLAGS}\ ${FOO}
84
85dnl Checks for typedefs, structures, and compiler characteristics.
86AC_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]),
88  AC_MSG_ERROR(No terminfo found for this system)))
89
90AC_SUBST(XSUBPPDIR)
91
92AC_PROG_INSTALL
93
94AC_CONFIG_SUBDIRS(libfaim)
95
96AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.