source: configure.in @ 34509d5

barnowl_perlaimdebianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 34509d5 was 34509d5, checked in by Alejandro R. Sedeño <asedeno@mit.edu>, 16 years ago
GLib/Unicode branch - adding glib dependency. Linking BarnOwl to GLib. Cleaning up some malloc/realloc/strdup/free code, moving to owl_* functions for each. Changing to GLib memory allocation functions.
  • Property mode set to 100644
File size: 4.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
14dnl m4_include(/usr/share/aclocal/pkg.m4)
15m4_include(pkg.m4)
16
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
21        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
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
28        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
29        AC_MSG_RESULT(yes)
30else
31        AC_MSG_RESULT(no)
32fi
33
34dnl Check for kerberosIV include
35AC_MSG_CHECKING(for /usr/include/kerberosIV)
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)
40else
41        AC_MSG_RESULT(no)
42fi
43
44AC_CHECK_LIB(ncursesw, initscr,,
45  AC_CHECK_LIB(ncurses, initscr,,
46    AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(No curses library found.))))
47AC_CHECK_LIB(com_err, com_err)
48AC_CHECK_LIB(nsl, gethostbyname)
49AC_CHECK_LIB(socket, socket)
50AC_CHECK_LIB(k5crypto, krb5_derive_key)
51dnl AC_CHECK_LIB(des425, req_act_vno)
52AC_CHECK_LIB(des425, des_cbc_encrypt)
53AC_CHECK_LIB(resolv, res_search)
54AC_CHECK_LIB(krb5, krb5_get_credentials)
55AC_CHECK_LIB(krb4, krb_sendauth,,
56   AC_CHECK_LIB(krb, krb_sendauth))
57dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
58AC_CHECK_LIB(zephyr, ZGetSender)
59AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
60
61AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
62                                          [Statically link libraries in /usr/athena/lib]),
63                                          [ATHSTATIC=./athstatic],
64                                          [ATHSTATIC=])
65
66AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
67
68AC_MSG_CHECKING(for des_ecb_encrypt prototype)
69AC_TRY_COMPILE([#include <des.h>
70int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
71[int foo = des_ecb_encrypt(0,0,0,0);],
72ac_cv_des_ecb_encrypt_proto=no,
73ac_cv_des_ecb_encrypt_proto=yes)
74AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
75if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
76        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
77fi
78
79dnl Checks for header files.
80AC_HEADER_STDC
81AC_HEADER_SYS_WAIT
82AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
83
84dnl Add CFLAGS for embeded perl
85FOO=`perl -MExtUtils::Embed -e ccopts`
86echo Adding perl CFLAGS ${FOO}
87CFLAGS=${CFLAGS}\ ${FOO}
88
89dnl Find the location of perl XSUBPP
90AC_MSG_CHECKING(for the perl xsubpp precompiler)
91XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
92if test -n "${XSUBPPDIR}"; then
93   AC_MSG_RESULT(${XSUBPPDIR})
94else
95   AC_MSG_ERROR(not found)
96fi
97
98if test -f "${XSUBPPDIR}/typemap"; then
99   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
100else
101   XSUBPPFLAGS=""
102fi
103
104dnl Add LDFLAGS for embeded perl
105FOO=`perl -MExtUtils::Embed -e ldopts`
106echo Adding perl LDFLAGS ${FOO}
107LDFLAGS=${LDFLAGS}\ ${FOO}
108
109dnl Add CFLAGS and LDFLAGS for glib-2.0
110PKG_CHECK_MODULES(GLIB,glib-2.0)
111
112echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}
113CFLAGS=${CFLAGS}\ ${GLIB_CFLAGS}
114echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
115LDFLAGS=${LDFLAGS}\ ${GLIB_LIBS}
116
117
118dnl Checks for typedefs, structures, and compiler characteristics.
119AC_CHECK_FILE(/usr/share/terminfo, AC_DEFINE(TERMINFO, "/usr/share/terminfo", [Have terminfo]),
120  AC_CHECK_FILE(/usr/share/lib/terminfo, AC_DEFINE(TERMINFO, "/usr/share/lib/terminfo", [Have terminfo]),
121  AC_MSG_ERROR(No terminfo found for this system)))
122
123AC_SUBST(XSUBPPDIR)
124AC_SUBST(XSUBPPFLAGS)
125AC_SUBST(ATHSTATIC)
126
127AC_PROG_INSTALL
128
129AC_CONFIG_SUBDIRS(libfaim)
130
131AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.