source: configure.in @ 9866c3a

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