source: configure.in @ 535d68b

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 535d68b was 1d7e094, checked in by Nelson Elhage <nelhage@mit.edu>, 18 years ago
Add /usr/athena/lib to the *end* of LDFLAGS so directories listed on the command-line take precedence
  • Property mode set to 100644
File size: 3.7 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        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
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
26        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
27        AC_MSG_RESULT(yes)
28else
29        AC_MSG_RESULT(no)
30fi
31
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
42AC_CHECK_LIB(ncursesw, initscr,,
43  AC_CHECK_LIB(ncurses, initscr,,
44    AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.))))
45AC_CHECK_LIB(com_err, com_err)
46AC_CHECK_LIB(nsl, gethostbyname)
47AC_CHECK_LIB(socket, socket)
48AC_CHECK_LIB(k5crypto, krb5_derive_key)
49dnl AC_CHECK_LIB(des425, req_act_vno)
50AC_CHECK_LIB(des425, des_cbc_encrypt)
51AC_CHECK_LIB(resolv, res_search)
52AC_CHECK_LIB(krb5, krb5_get_credentials)
53AC_CHECK_LIB(krb4, krb_sendauth,,
54   AC_CHECK_LIB(krb, krb_sendauth))
55dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
56AC_CHECK_LIB(zephyr, ZGetSender)
57AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
58
59AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
60                                          [Statically link libraries in /usr/athena/lib]),
61                                          [ATHSTATIC=./athstatic],
62                                          [ATHSTATIC=])
63
64AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
65
66AC_MSG_CHECKING(for des_ecb_encrypt prototype)
67AC_TRY_COMPILE([#include <des.h>
68int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
69[int foo = des_ecb_encrypt(0,0,0,0);],
70ac_cv_des_ecb_encrypt_proto=no,
71ac_cv_des_ecb_encrypt_proto=yes)
72AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
73if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
74        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
75fi
76
77dnl Checks for header files.
78AC_HEADER_STDC
79AC_HEADER_SYS_WAIT
80AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
81
82dnl Add CFLAGS for embeded perl
83FOO=`perl -MExtUtils::Embed -e ccopts`
84echo Adding perl CFLAGS ${FOO}
85CFLAGS=${CFLAGS}\ ${FOO}
86
87dnl Find the location of perl XSUBPP
88AC_MSG_CHECKING(for the perl xsubpp precompiler)
89XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
90if test -n "${XSUBPPDIR}"; then
91   AC_MSG_RESULT(${XSUBPPDIR})
92else
93   AC_MSG_ERROR(not found)
94fi
95
96if test -f "${XSUBPPDIR}/typemap"; then
97   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
98else
99   XSUBPPFLAGS=""
100fi
101
102dnl Add LDFLAGS for embeded perl
103FOO=`perl -MExtUtils::Embed -e ldopts`
104echo Adding perl LDFLAGS ${FOO}
105LDFLAGS=${LDFLAGS}\ ${FOO}
106
107dnl Checks for typedefs, structures, and compiler characteristics.
108AC_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]),
110  AC_MSG_ERROR(No terminfo found for this system)))
111
112AC_SUBST(XSUBPPDIR)
113AC_SUBST(XSUBPPFLAGS)
114AC_SUBST(ATHSTATIC)
115
116AC_PROG_INSTALL
117
118AC_CONFIG_SUBDIRS(libfaim)
119
120AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.