source: configure.in @ 72a53e9

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 72a53e9 was 15bd5ef, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Actually doing the XSUBPP fix.
  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[1aee7d9]1dnl $Id$
[7d4fbcd]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
[e51b410]14
[7d4fbcd]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
[e6449bc]19        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
[7d4fbcd]20        AC_MSG_RESULT(yes)
21else
22        AC_MSG_RESULT(no)
23fi
24AC_MSG_CHECKING(for /usr/athena/lib)
25if test -d /usr/athena/lib; then
[601a9e0]26        LDFLAGS=-L/usr/athena/lib\ ${LDFLAGS}
[7d4fbcd]27        AC_MSG_RESULT(yes)
28else
29        AC_MSG_RESULT(no)
30fi
31
[fe39450]32dnl Check for kerberosIV include
33AC_MSG_CHECKING(for /usr/include/kerberosIV)
34if 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)
38else
39        AC_MSG_RESULT(no)
40fi
41
[7d4fbcd]42AC_CHECK_LIB(ncurses, initscr,,
43   AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.)))
44AC_CHECK_LIB(com_err, com_err)
45AC_CHECK_LIB(nsl, gethostbyname)
46AC_CHECK_LIB(socket, socket)
47AC_CHECK_LIB(k5crypto, krb5_derive_key)
[8298425]48dnl AC_CHECK_LIB(des425, req_act_vno)
49AC_CHECK_LIB(des425, des_cbc_encrypt)
[d09e5a1]50AC_CHECK_LIB(resolv, res_search)
[7d4fbcd]51AC_CHECK_LIB(krb5, krb5_get_credentials)
[d09e5a1]52AC_CHECK_LIB(krb4, krb_sendauth,,
53   AC_CHECK_LIB(krb, krb_sendauth))
[09489b89]54dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
55AC_CHECK_LIB(zephyr, ZGetSender)
[ac70242]56AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
57
[c269e22]58AC_CHECK_FUNCS(use_default_colors des_string_to_key des_key_sched des_ecb_encrypt)
[e51b410]59
[ac70242]60AC_MSG_CHECKING(for des_ecb_encrypt prototype)
61AC_TRY_COMPILE([#include <des.h>
62int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
63[int foo = des_ecb_encrypt(0,0,0,0);],
64ac_cv_des_ecb_encrypt_proto=no,
65ac_cv_des_ecb_encrypt_proto=yes)
66AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
67if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
68        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
69fi
[7d4fbcd]70
71dnl Checks for header files.
72AC_HEADER_STDC
73AC_HEADER_SYS_WAIT
[e8b95f8]74AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
[7d4fbcd]75
76dnl Add CFLAGS for embeded perl
77FOO=`perl -MExtUtils::Embed -e ccopts`
78echo Adding perl CFLAGS ${FOO}
79CFLAGS=${CFLAGS}\ ${FOO}
80
[e51b410]81dnl Find the location of perl XSUBPP
[8ee73f8d]82AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]83XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]84if test -n "${XSUBPPDIR}"; then
85   AC_MSG_RESULT(${XSUBPPDIR})
86else
87   AC_MSG_ERROR(not found)
88fi
89
[4ad3480]90if test -f "${XSUBPPDIR}/typemap"; then
91   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
92else
93   XSUBPPFLAGS=""
94fi
95
[7d4fbcd]96dnl Add LDFLAGS for embeded perl
[884c272]97FOO=`perl -MExtUtils::Embed -e ldopts | sed 's/,-E//' | sed 's/-liconv//'`
[7d4fbcd]98echo Adding perl LDFLAGS ${FOO}
99LDFLAGS=${LDFLAGS}\ ${FOO}
100
101dnl Checks for typedefs, structures, and compiler characteristics.
[ac70242]102AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo", [Have terminfo]),
103  AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo", [Have terminfo]),
[7d4fbcd]104  AC_MSG_ERROR(No terminfo found for this system)))
105
[15bd5ef]106AC_SUBST(XSUBPPDIR)
[4ad3480]107AC_SUBST(XSUBPPFLAGS)
[8ee73f8d]108
[ac70242]109AC_PROG_INSTALL
110
[d09e5a1]111AC_CONFIG_SUBDIRS(libfaim)
112
[7d4fbcd]113AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.