source: configure.ac @ ed62482

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since ed62482 was 0ce0535, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Remove --with-athstatic --with-athstatic has no purpose any more, and I haven't been using it for locker builds for some time now, without problems.
  • Property mode set to 100644
File size: 4.1 KB
Line 
1dnl $Id$
2dnl Process this file with autoconf to produce a configure script.
3AC_INIT([BarnOwl],[1.1.2],[bug-barnowl@mit.edu])
4AM_INIT_AUTOMAKE([-Wall foreign])
5
6AC_CONFIG_HEADER([config.h])
7
8AC_PROG_CC
9
10dnl Check for Athena
11AC_MSG_CHECKING(for /usr/athena/include)
12if test -d /usr/athena/include; then
13        CFLAGS=${CFLAGS}\ -I/usr/athena/include
14        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
15        AC_MSG_RESULT(yes)
16else
17        AC_MSG_RESULT(no)
18fi
19AC_MSG_CHECKING(for /usr/athena/lib)
20if test -d /usr/athena/lib; then
21        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
22        AC_MSG_RESULT(yes)
23else
24        AC_MSG_RESULT(no)
25fi
26
27dnl Check for kerberosIV include
28AC_MSG_CHECKING(for kerberosIV)
29if test -d /usr/include/kerberosIV; then
30        CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
31        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
32        AC_MSG_RESULT(yes)
33elif test -d /usr/local/include/kerberosIV; then
34        CFLAGS=${CFLAGS}\ -I/usr/local/include/kerberosIV
35        CPPFLAGS=${CPPFLAGS}\ -I/usr/local/include/kerberosIV
36        AC_MSG_RESULT(yes)
37elif test -d /usr/include/openssl; then
38        CFLAGS=${CFLAGS}\ -I/usr/include/openssl
39        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/openssl
40        AC_MSG_RESULT(OpenSSL DES found instead)
41else
42        AC_MSG_RESULT(no)
43fi
44PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"}
45SAVE_CFLAGS=$CFLAGS
46CFLAGS="$CFLAGS $PROTECT_CFLAGS"
47AC_MSG_CHECKING(whether protection cflags work)
48AC_COMPILE_IFELSE(int i;,
49    [AC_MSG_RESULT(yes)],
50    [AC_MSG_RESULT(no)
51    CFLAGS=$SAVE_CFLAGS])
52
53
54AC_CHECK_LIB(ssp, __stack_chk_guard)
55AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
56AC_CHECK_LIB(com_err, com_err)
57AC_CHECK_LIB(nsl, gethostbyname)
58AC_CHECK_LIB(socket, socket)
59dnl AC_CHECK_LIB(des425, req_act_vno)
60AC_CHECK_LIB(des425, des_cbc_encrypt,,AC_CHECK_LIB(crypto,DES_cbc_encrypt))
61AC_CHECK_LIB(resolv, res_search)
62dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
63AC_CHECK_LIB(zephyr, ZGetSender)
64AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
65
66AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
67AC_CHECK_FUNCS(                            DES_string_to_key  DES_ecb_encrypt DES_key_sched)
68
69AC_MSG_CHECKING(for des_ecb_encrypt prototype)
70AC_TRY_COMPILE([#include <des.h>
71int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
72[int foo = des_ecb_encrypt(0,0,0,0);],
73ac_cv_des_ecb_encrypt_proto=no,
74ac_cv_des_ecb_encrypt_proto=yes)
75AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
76if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
77        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
78fi
79
80dnl Checks for header files.
81AC_HEADER_STDC
82AC_HEADER_SYS_WAIT
83AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
84
85dnl Add CFLAGS for embeded perl
86FOO=`perl -MExtUtils::Embed -e ccopts`
87AC_MSG_NOTICE([Adding perl CFLAGS ${FOO}])
88CFLAGS=${CFLAGS}\ ${FOO}
89
90dnl Find the location of perl XSUBPP
91AC_MSG_CHECKING(for the perl xsubpp precompiler)
92XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
93if test -n "${XSUBPPDIR}"; then
94   AC_MSG_RESULT(${XSUBPPDIR})
95else
96   AC_MSG_ERROR(not found)
97fi
98
99if test -f "${XSUBPPDIR}/typemap"; then
100   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
101else
102   XSUBPPFLAGS=""
103fi
104
105dnl Add LDFLAGS for embedded perl
106FOO=`perl -MExtUtils::Embed -e ldopts`
107AC_MSG_NOTICE([Adding perl LDFLAGS ${FOO}])
108LDFLAGS=${LDFLAGS}\ ${FOO}
109
110dnl Add CFLAGS and LDFLAGS for glib-2.0
111PKG_CHECK_MODULES(GLIB,glib-2.0)
112
113AC_MSG_NOTICE([Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}])
114CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
115AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
116LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
117
118if test "x${prefix}" = "xNONE"; then
119   prefix="${ac_default_prefix}"
120fi
121
122AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
123                   [Package data directory])
124
125dnl Checks for typedefs, structures, and compiler characteristics.
126
127AC_SUBST(XSUBPPDIR)
128AC_SUBST(XSUBPPFLAGS)
129
130AC_PROG_INSTALL
131AC_PROG_RANLIB
132
133AC_CONFIG_FILES([Makefile libfaim/Makefile])
134AC_OUTPUT([perl/modules/Makefile])
Note: See TracBrowser for help on using the repository browser.