source: configure.ac @ 7967433

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 7967433 was 636de2a, checked in by Anders Kaseorg <andersk@mit.edu>, 15 years ago
Use automake’s silent-rules mode if available, for quieter build output. With automake 1.11, this gives us Linux kernel–style silent output that makes warnings more obvious: GEN perlglue.c CC perlglue.o CCLD barnowl.bin (Use ‘make V=1’ for the traditional verbose output.) Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 4.9 KB
RevLine 
[1aee7d9]1dnl $Id$
[7d4fbcd]2dnl Process this file with autoconf to produce a configure script.
[ecc958e]3AC_INIT([BarnOwl],[1.4pre1],[bug-barnowl@mit.edu])
[37f27bc]4AM_INIT_AUTOMAKE([-Wall foreign])
[636de2a]5m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
[7d4fbcd]6
[37f27bc]7AC_CONFIG_HEADER([config.h])
[7d4fbcd]8
9AC_PROG_CC
10
11dnl Check for Athena
12AC_MSG_CHECKING(for /usr/athena/include)
13if test -d /usr/athena/include; then
14        CFLAGS=${CFLAGS}\ -I/usr/athena/include
[e6449bc]15        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
[7d4fbcd]16        AC_MSG_RESULT(yes)
17else
18        AC_MSG_RESULT(no)
19fi
20AC_MSG_CHECKING(for /usr/athena/lib)
21if test -d /usr/athena/lib; then
[1d7e094]22        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
[7d4fbcd]23        AC_MSG_RESULT(yes)
24else
25        AC_MSG_RESULT(no)
26fi
27
[fe39450]28dnl Check for kerberosIV include
[18e28a4]29AC_MSG_CHECKING(for kerberosIV)
[fe39450]30if test -d /usr/include/kerberosIV; then
31        CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
32        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
33        AC_MSG_RESULT(yes)
[18e28a4]34elif test -d /usr/local/include/kerberosIV; then
35        CFLAGS=${CFLAGS}\ -I/usr/local/include/kerberosIV
36        CPPFLAGS=${CPPFLAGS}\ -I/usr/local/include/kerberosIV
37        AC_MSG_RESULT(yes)
[b5fe6d2]38elif test -d /usr/include/openssl; then
39        CFLAGS=${CFLAGS}\ -I/usr/include/openssl
40        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/openssl
41        AC_MSG_RESULT(OpenSSL DES found instead)
[fe39450]42else
43        AC_MSG_RESULT(no)
44fi
45
[4097723]46AC_ARG_WITH([stack-protector],
47  [AS_HELP_STRING([--with-stack-protector],
48    [Enable gcc -fstack-protector])],
49  [],
50  [with_stack_protector=check])
51
52AS_IF([test "x$with_stack_protector" != xno],
53  [
54    SAVE_CFLAGS=$CFLAGS
55    CFLAGS="$CFLAGS -fstack-protector"
56    AC_MSG_CHECKING(whether protection cflags work)
57    AC_COMPILE_IFELSE(int i;,
58        [AC_MSG_RESULT(yes)],
59        [AC_MSG_RESULT(no)
60        CFLAGS=$SAVE_CFLAGS
61        if test "x$with_stack_protector" != xcheck; then
62          AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
63        fi])
64    AC_CHECK_LIB(ssp, __stack_chk_guard)
65  ])
[87afe92]66
[d54035d]67AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
[7d4fbcd]68AC_CHECK_LIB(com_err, com_err)
69AC_CHECK_LIB(nsl, gethostbyname)
70AC_CHECK_LIB(socket, socket)
[8298425]71dnl AC_CHECK_LIB(des425, req_act_vno)
[b5fe6d2]72AC_CHECK_LIB(des425, des_cbc_encrypt,,AC_CHECK_LIB(crypto,DES_cbc_encrypt))
[d09e5a1]73AC_CHECK_LIB(resolv, res_search)
[2c270e6]74
75AC_ARG_WITH([zephyr],
76  [AS_HELP_STRING([--with-libzephyr],
[ec21c62]77    [Enable Zephyr support])],
[2c270e6]78  [],
79  [with_zephyr=check])
80
81AS_IF([test "x$with_zephyr" != xno],
82  [AC_CHECK_LIB([zephyr], [ZGetSender],
[16c0416]83   [LIBS="$LIBS -lzephyr"
84    AC_DEFINE([HAVE_LIBZEPHYR], [1],
[2c270e6]85                [Define if you have libzephyr])
86    AC_CHECK_LIB([zephyr], [ZInitLocationInfo],
87      AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [1],
88                [Have ZInitLocationInfo]),)
89   ],
90   [if test "x$with_zephyr" != xcheck; then
91      AC_MSG_FAILURE(
92        [--with-libzephyr was given, but libzephyr does not seem to be available.])
93    fi
94   ])])
[ac70242]95
[dc2ad79]96AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
[b5fe6d2]97AC_CHECK_FUNCS(                            DES_string_to_key  DES_ecb_encrypt DES_key_sched)
[e51b410]98
[ac70242]99AC_MSG_CHECKING(for des_ecb_encrypt prototype)
100AC_TRY_COMPILE([#include <des.h>
101int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
102[int foo = des_ecb_encrypt(0,0,0,0);],
103ac_cv_des_ecb_encrypt_proto=no,
104ac_cv_des_ecb_encrypt_proto=yes)
105AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
106if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
107        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
108fi
[7d4fbcd]109
110dnl Checks for header files.
111AC_HEADER_STDC
112AC_HEADER_SYS_WAIT
[e8b95f8]113AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
[7d4fbcd]114
115dnl Add CFLAGS for embeded perl
116FOO=`perl -MExtUtils::Embed -e ccopts`
[7c09b21]117AC_MSG_NOTICE([Adding perl CFLAGS ${FOO}])
[7d4fbcd]118CFLAGS=${CFLAGS}\ ${FOO}
119
[e51b410]120dnl Find the location of perl XSUBPP
[8ee73f8d]121AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]122XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]123if test -n "${XSUBPPDIR}"; then
124   AC_MSG_RESULT(${XSUBPPDIR})
125else
126   AC_MSG_ERROR(not found)
127fi
128
[4ad3480]129if test -f "${XSUBPPDIR}/typemap"; then
130   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
131else
132   XSUBPPFLAGS=""
133fi
134
[18e28a4]135dnl Add LDFLAGS for embedded perl
[3f21b8e]136FOO=`perl -MExtUtils::Embed -e ldopts`
[c08a725]137AC_MSG_NOTICE([Adding perl LIBS ${FOO}])
138LIBS=${LIBS}\ ${FOO}
[7d4fbcd]139
[34509d5]140dnl Add CFLAGS and LDFLAGS for glib-2.0
141PKG_CHECK_MODULES(GLIB,glib-2.0)
142
[7c09b21]143AC_MSG_NOTICE([Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}])
[d9337637]144CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
[7c09b21]145AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
[d9337637]146LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
[34509d5]147
[37f27bc]148if test "x${prefix}" = "xNONE"; then
149   prefix="${ac_default_prefix}"
150fi
[7d4fbcd]151
[37f27bc]152AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
153                   [Package data directory])
[7d4fbcd]154
[37f27bc]155dnl Checks for typedefs, structures, and compiler characteristics.
[c50f589]156
[15bd5ef]157AC_SUBST(XSUBPPDIR)
[4ad3480]158AC_SUBST(XSUBPPFLAGS)
[8ee73f8d]159
[ac70242]160AC_PROG_INSTALL
[37f27bc]161AC_PROG_RANLIB
[ac70242]162
[b9c8d28]163AC_CONFIG_FILES([Makefile libfaim/Makefile perl/modules/Makefile])
164AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.