source: configure.ac @ b3a77b1

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since b3a77b1 was b3a77b1, checked in by Anders Kaseorg <andersk@mit.edu>, 15 years ago
Assume des_ecb_encrypt is prototyped. I can’t find a system that has des_ecb_encrypt without a prototype, so this cleans up configure.ac a little. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 4.3 KB
RevLine 
[7d4fbcd]1dnl Process this file with autoconf to produce a configure script.
[ecc958e]2AC_INIT([BarnOwl],[1.4pre1],[bug-barnowl@mit.edu])
[37f27bc]3AM_INIT_AUTOMAKE([-Wall foreign])
[636de2a]4m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
[7d4fbcd]5
[37f27bc]6AC_CONFIG_HEADER([config.h])
[7d4fbcd]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
[e6449bc]14        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
[7d4fbcd]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
[1d7e094]21        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
[7d4fbcd]22        AC_MSG_RESULT(yes)
23else
24        AC_MSG_RESULT(no)
25fi
26
[fe39450]27dnl Check for kerberosIV include
[18e28a4]28AC_MSG_CHECKING(for kerberosIV)
[fe39450]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)
[18e28a4]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)
[b5fe6d2]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)
[fe39450]41else
42        AC_MSG_RESULT(no)
43fi
44
[4097723]45AC_ARG_WITH([stack-protector],
46  [AS_HELP_STRING([--with-stack-protector],
47    [Enable gcc -fstack-protector])],
48  [],
49  [with_stack_protector=check])
50
51AS_IF([test "x$with_stack_protector" != xno],
[ce27cc1]52  [AX_C_CHECK_FLAG([-fstack-protector],[],[],
53    [CFLAGS="$CFLAGS -fstack-protector"],
54    [if test "x$with_stack_protector" != xcheck; then
55       AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
56     fi
57    ])])
[87afe92]58
[d54035d]59AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
[7d4fbcd]60AC_CHECK_LIB(com_err, com_err)
61AC_CHECK_LIB(nsl, gethostbyname)
62AC_CHECK_LIB(socket, socket)
[8298425]63dnl AC_CHECK_LIB(des425, req_act_vno)
[b5fe6d2]64AC_CHECK_LIB(des425, des_cbc_encrypt,,AC_CHECK_LIB(crypto,DES_cbc_encrypt))
[d09e5a1]65AC_CHECK_LIB(resolv, res_search)
[2c270e6]66
67AC_ARG_WITH([zephyr],
68  [AS_HELP_STRING([--with-libzephyr],
[ec21c62]69    [Enable Zephyr support])],
[2c270e6]70  [],
71  [with_zephyr=check])
72
73AS_IF([test "x$with_zephyr" != xno],
74  [AC_CHECK_LIB([zephyr], [ZGetSender],
[16c0416]75   [LIBS="$LIBS -lzephyr"
76    AC_DEFINE([HAVE_LIBZEPHYR], [1],
[2c270e6]77                [Define if you have libzephyr])
78    AC_CHECK_LIB([zephyr], [ZInitLocationInfo],
79      AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [1],
80                [Have ZInitLocationInfo]),)
81   ],
82   [if test "x$with_zephyr" != xcheck; then
83      AC_MSG_FAILURE(
84        [--with-libzephyr was given, but libzephyr does not seem to be available.])
85    fi
86   ])])
[ac70242]87
[dc2ad79]88AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
[b5fe6d2]89AC_CHECK_FUNCS(                            DES_string_to_key  DES_ecb_encrypt DES_key_sched)
[e51b410]90
[7d4fbcd]91dnl Checks for header files.
92AC_HEADER_STDC
93AC_HEADER_SYS_WAIT
[e8b95f8]94AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
[7d4fbcd]95
96dnl Add CFLAGS for embeded perl
97FOO=`perl -MExtUtils::Embed -e ccopts`
[7c09b21]98AC_MSG_NOTICE([Adding perl CFLAGS ${FOO}])
[7d4fbcd]99CFLAGS=${CFLAGS}\ ${FOO}
100
[e51b410]101dnl Find the location of perl XSUBPP
[8ee73f8d]102AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]103XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]104if test -n "${XSUBPPDIR}"; then
105   AC_MSG_RESULT(${XSUBPPDIR})
106else
107   AC_MSG_ERROR(not found)
108fi
109
[4ad3480]110if test -f "${XSUBPPDIR}/typemap"; then
111   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
112else
113   XSUBPPFLAGS=""
114fi
115
[18e28a4]116dnl Add LDFLAGS for embedded perl
[3f21b8e]117FOO=`perl -MExtUtils::Embed -e ldopts`
[c08a725]118AC_MSG_NOTICE([Adding perl LIBS ${FOO}])
119LIBS=${LIBS}\ ${FOO}
[7d4fbcd]120
[34509d5]121dnl Add CFLAGS and LDFLAGS for glib-2.0
122PKG_CHECK_MODULES(GLIB,glib-2.0)
123
[7c09b21]124AC_MSG_NOTICE([Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}])
[d9337637]125CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
[7c09b21]126AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
[d9337637]127LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
[34509d5]128
[37f27bc]129if test "x${prefix}" = "xNONE"; then
130   prefix="${ac_default_prefix}"
131fi
[7d4fbcd]132
[37f27bc]133AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
134                   [Package data directory])
[7d4fbcd]135
[37f27bc]136dnl Checks for typedefs, structures, and compiler characteristics.
[c50f589]137
[15bd5ef]138AC_SUBST(XSUBPPDIR)
[4ad3480]139AC_SUBST(XSUBPPFLAGS)
[8ee73f8d]140
[ac70242]141AC_PROG_INSTALL
[37f27bc]142AC_PROG_RANLIB
[ac70242]143
[b9c8d28]144AC_CONFIG_FILES([Makefile libfaim/Makefile perl/modules/Makefile])
145AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.