source: configure.ac @ 806f769

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 806f769 was 806f769, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
configure.ac: Clean up checks for Kerberos IV. Instead of searching a fixed list of patches, try 'krb5-config krb4', and if that fails, use pkg-config to find openssl. In addition, define HAVE_KERBEROS_IV if we are using Kerberos IV's des.h, and make zcrypt.c act accordingly. Signed-off-by: Nelson Elhage <nelhage@mit.edu>
  • Property mode set to 100644
File size: 3.7 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
[4097723]10AC_ARG_WITH([stack-protector],
11  [AS_HELP_STRING([--with-stack-protector],
12    [Enable gcc -fstack-protector])],
13  [],
14  [with_stack_protector=check])
15
16AS_IF([test "x$with_stack_protector" != xno],
[ce27cc1]17  [AX_C_CHECK_FLAG([-fstack-protector],[],[],
18    [CFLAGS="$CFLAGS -fstack-protector"],
19    [if test "x$with_stack_protector" != xcheck; then
20       AC_MSG_FAILURE([--with-stack-protector selected, but gcc does support it.])
21     fi
22    ])])
[87afe92]23
[d54035d]24AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
[7d4fbcd]25AC_CHECK_LIB(com_err, com_err)
26AC_CHECK_LIB(nsl, gethostbyname)
27AC_CHECK_LIB(socket, socket)
[d09e5a1]28AC_CHECK_LIB(resolv, res_search)
[2c270e6]29
30AC_ARG_WITH([zephyr],
31  [AS_HELP_STRING([--with-libzephyr],
[ec21c62]32    [Enable Zephyr support])],
[2c270e6]33  [],
34  [with_zephyr=check])
35
36AS_IF([test "x$with_zephyr" != xno],
[806f769]37  [AC_MSG_CHECKING([for Kerberos IV])
38   AS_IF([krb5-config krb4 --libs >/dev/null 2>&1],
39     [AC_MSG_RESULT([yes])
40      AC_DEFINE([HAVE_KERBEROS_IV], [1], [Define if you have kerberos IV])
41      CFLAGS="${CFLAGS} `krb5-config krb4 --cflags`"
42      LIBS="${LIBS} `krb5-config krb4 --libs`"
43     ],
44     [AC_MSG_RESULT([no])
45      PKG_CHECK_MODULES([LIBCRYPTO], [libcrypto])
46      CFLAGS="${CFLAGS} ${LIBCRYPTO_CFLAGS}"
47      LIBS="${LIBS} ${LIBCRYPTO_LIBS}"
48     ])
49   AC_CHECK_LIB([zephyr], [ZGetSender],
[16c0416]50   [LIBS="$LIBS -lzephyr"
51    AC_DEFINE([HAVE_LIBZEPHYR], [1],
[2c270e6]52                [Define if you have libzephyr])
53    AC_CHECK_LIB([zephyr], [ZInitLocationInfo],
54      AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [1],
55                [Have ZInitLocationInfo]),)
56   ],
57   [if test "x$with_zephyr" != xcheck; then
58      AC_MSG_FAILURE(
59        [--with-libzephyr was given, but libzephyr does not seem to be available.])
60    fi
61   ])])
[ac70242]62
[dc2ad79]63AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
[b5fe6d2]64AC_CHECK_FUNCS(                            DES_string_to_key  DES_ecb_encrypt DES_key_sched)
[e51b410]65
[7d4fbcd]66dnl Checks for header files.
67AC_HEADER_STDC
68AC_HEADER_SYS_WAIT
[e8b95f8]69AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
[7d4fbcd]70
71dnl Add CFLAGS for embeded perl
72FOO=`perl -MExtUtils::Embed -e ccopts`
[7c09b21]73AC_MSG_NOTICE([Adding perl CFLAGS ${FOO}])
[7d4fbcd]74CFLAGS=${CFLAGS}\ ${FOO}
75
[e51b410]76dnl Find the location of perl XSUBPP
[8ee73f8d]77AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]78XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]79if test -n "${XSUBPPDIR}"; then
80   AC_MSG_RESULT(${XSUBPPDIR})
81else
82   AC_MSG_ERROR(not found)
83fi
84
[4ad3480]85if test -f "${XSUBPPDIR}/typemap"; then
86   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
87else
88   XSUBPPFLAGS=""
89fi
90
[18e28a4]91dnl Add LDFLAGS for embedded perl
[3f21b8e]92FOO=`perl -MExtUtils::Embed -e ldopts`
[c08a725]93AC_MSG_NOTICE([Adding perl LIBS ${FOO}])
94LIBS=${LIBS}\ ${FOO}
[7d4fbcd]95
[34509d5]96dnl Add CFLAGS and LDFLAGS for glib-2.0
97PKG_CHECK_MODULES(GLIB,glib-2.0)
98
[7c09b21]99AC_MSG_NOTICE([Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}])
[d9337637]100CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
[7c09b21]101AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
[d9337637]102LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
[34509d5]103
[37f27bc]104if test "x${prefix}" = "xNONE"; then
105   prefix="${ac_default_prefix}"
106fi
[7d4fbcd]107
[37f27bc]108AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
109                   [Package data directory])
[7d4fbcd]110
[37f27bc]111dnl Checks for typedefs, structures, and compiler characteristics.
[c50f589]112
[79245bc]113AX_CFLAGS_WARN_ALL
114
[215c119]115AX_C_CHECK_FLAG([-Wno-pointer-sign],[],[],
116  [LIBFAIM_CFLAGS="$LIBFAIM_CFLAGS -Wno-pointer-sign"])
117
118AC_SUBST([LIBFAIM_CFLAGS])
119
[15bd5ef]120AC_SUBST(XSUBPPDIR)
[4ad3480]121AC_SUBST(XSUBPPFLAGS)
[8ee73f8d]122
[ac70242]123AC_PROG_INSTALL
[37f27bc]124AC_PROG_RANLIB
[ac70242]125
[b9c8d28]126AC_CONFIG_FILES([Makefile libfaim/Makefile perl/modules/Makefile])
127AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.