source: configure.ac @ 57609b3

debianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 57609b3 was d54035d, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
clarify error message when curses is missing The lack of 'w' confused me for a bit after I installed 'a curses library' -- libncurses5-dev -- and it still didn't work. Signed-off-by: Greg Price <price@mit.edu>
  • Property mode set to 100644
File size: 3.8 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
[762512d]14m4_include(/usr/share/aclocal/pkg.m4)
15dnl m4_include(pkg.m4)
[e51b410]16
[7d4fbcd]17dnl Check for Athena
18AC_MSG_CHECKING(for /usr/athena/include)
19if 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)
23else
24        AC_MSG_RESULT(no)
25fi
26AC_MSG_CHECKING(for /usr/athena/lib)
27if test -d /usr/athena/lib; then
[1d7e094]28        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
[7d4fbcd]29        AC_MSG_RESULT(yes)
30else
31        AC_MSG_RESULT(no)
32fi
33
[fe39450]34dnl Check for kerberosIV include
[18e28a4]35AC_MSG_CHECKING(for kerberosIV)
[fe39450]36if 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]40elif 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]44else
45        AC_MSG_RESULT(no)
46fi
47
[d54035d]48AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
[7d4fbcd]49AC_CHECK_LIB(com_err, com_err)
50AC_CHECK_LIB(nsl, gethostbyname)
51AC_CHECK_LIB(socket, socket)
52AC_CHECK_LIB(k5crypto, krb5_derive_key)
[8298425]53dnl AC_CHECK_LIB(des425, req_act_vno)
54AC_CHECK_LIB(des425, des_cbc_encrypt)
[d09e5a1]55AC_CHECK_LIB(resolv, res_search)
[7d4fbcd]56AC_CHECK_LIB(krb5, krb5_get_credentials)
[d09e5a1]57AC_CHECK_LIB(krb4, krb_sendauth,,
58   AC_CHECK_LIB(krb, krb_sendauth))
[09489b89]59dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
60AC_CHECK_LIB(zephyr, ZGetSender)
[ac70242]61AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
62
[7ccc780]63AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
64                                          [Statically link libraries in /usr/athena/lib]),
65                                          [ATHSTATIC=./athstatic],
66                                          [ATHSTATIC=])
67
[dc2ad79]68AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
[e51b410]69
[ac70242]70AC_MSG_CHECKING(for des_ecb_encrypt prototype)
71AC_TRY_COMPILE([#include <des.h>
72int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
73[int foo = des_ecb_encrypt(0,0,0,0);],
74ac_cv_des_ecb_encrypt_proto=no,
75ac_cv_des_ecb_encrypt_proto=yes)
76AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
77if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
78        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
79fi
[7d4fbcd]80
81dnl Checks for header files.
82AC_HEADER_STDC
83AC_HEADER_SYS_WAIT
[e8b95f8]84AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
[7d4fbcd]85
86dnl Add CFLAGS for embeded perl
87FOO=`perl -MExtUtils::Embed -e ccopts`
88echo Adding perl CFLAGS ${FOO}
89CFLAGS=${CFLAGS}\ ${FOO}
90
[e51b410]91dnl Find the location of perl XSUBPP
[8ee73f8d]92AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]93XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]94if test -n "${XSUBPPDIR}"; then
95   AC_MSG_RESULT(${XSUBPPDIR})
96else
97   AC_MSG_ERROR(not found)
98fi
99
[4ad3480]100if test -f "${XSUBPPDIR}/typemap"; then
101   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
102else
103   XSUBPPFLAGS=""
104fi
105
[18e28a4]106dnl Add LDFLAGS for embedded perl
[3f21b8e]107FOO=`perl -MExtUtils::Embed -e ldopts`
[7d4fbcd]108echo Adding perl LDFLAGS ${FOO}
109LDFLAGS=${LDFLAGS}\ ${FOO}
110
[34509d5]111dnl Add CFLAGS and LDFLAGS for glib-2.0
112PKG_CHECK_MODULES(GLIB,glib-2.0)
113
114echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}
[d9337637]115CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
[34509d5]116echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
[d9337637]117LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
[34509d5]118
119
[7d4fbcd]120dnl Checks for typedefs, structures, and compiler characteristics.
121
[15bd5ef]122AC_SUBST(XSUBPPDIR)
[4ad3480]123AC_SUBST(XSUBPPFLAGS)
[7ccc780]124AC_SUBST(ATHSTATIC)
[8ee73f8d]125
[ac70242]126AC_PROG_INSTALL
127
[d09e5a1]128AC_CONFIG_SUBDIRS(libfaim)
129
[7d4fbcd]130AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.