source: configure.in @ 6b580b0

barnowl_perlaimdebianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 6b580b0 was 18e28a4, checked in by Eric C. Price <ecprice@mit.edu>, 14 years ago
Fixes for FreeBSD.
  • Property mode set to 100644
File size: 3.6 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 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)
38elif test -d /usr/local/include/kerberosIV; then
39        CFLAGS=${CFLAGS}\ -I/usr/local/include/kerberosIV
40        CPPFLAGS=${CPPFLAGS}\ -I/usr/local/include/kerberosIV
41        AC_MSG_RESULT(yes)
42else
43        AC_MSG_RESULT(no)
44fi
45
46AC_CHECK_LIB(ncursesw, initscr,,
47  AC_CHECK_LIB(ncurses, initscr,,
48    AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.))))
49AC_CHECK_LIB(com_err, com_err)
50AC_CHECK_LIB(nsl, gethostbyname)
51AC_CHECK_LIB(socket, socket)
52AC_CHECK_LIB(k5crypto, krb5_derive_key)
53dnl AC_CHECK_LIB(des425, req_act_vno)
54AC_CHECK_LIB(des425, des_cbc_encrypt)
55AC_CHECK_LIB(resolv, res_search)
56AC_CHECK_LIB(krb5, krb5_get_credentials)
57AC_CHECK_LIB(krb4, krb_sendauth,,
58   AC_CHECK_LIB(krb, krb_sendauth))
59dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
60AC_CHECK_LIB(zephyr, ZGetSender)
61AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
62
63AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
64                                          [Statically link libraries in /usr/athena/lib]),
65                                          [ATHSTATIC=./athstatic],
66                                          [ATHSTATIC=])
67
68AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
69
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
80
81dnl Checks for header files.
82AC_HEADER_STDC
83AC_HEADER_SYS_WAIT
84AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
85
86dnl Add CFLAGS for embeded perl
87FOO=`perl -MExtUtils::Embed -e ccopts`
88echo Adding perl CFLAGS ${FOO}
89CFLAGS=${CFLAGS}\ ${FOO}
90
91dnl Find the location of perl XSUBPP
92AC_MSG_CHECKING(for the perl xsubpp precompiler)
93XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
94if test -n "${XSUBPPDIR}"; then
95   AC_MSG_RESULT(${XSUBPPDIR})
96else
97   AC_MSG_ERROR(not found)
98fi
99
100if test -f "${XSUBPPDIR}/typemap"; then
101   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
102else
103   XSUBPPFLAGS=""
104fi
105
106dnl Add LDFLAGS for embedded perl
107FOO=`perl -MExtUtils::Embed -e ldopts`
108echo Adding perl LDFLAGS ${FOO}
109LDFLAGS=${LDFLAGS}\ ${FOO}
110
111dnl Checks for typedefs, structures, and compiler characteristics.
112
113AC_SUBST(XSUBPPDIR)
114AC_SUBST(XSUBPPFLAGS)
115AC_SUBST(ATHSTATIC)
116
117AC_PROG_INSTALL
118
119AC_CONFIG_SUBDIRS(libfaim)
120
121AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.