source: configure.ac @ 806f769

release-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>, 12 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
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([BarnOwl],[1.4pre1],[bug-barnowl@mit.edu])
3AM_INIT_AUTOMAKE([-Wall foreign])
4m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
5
6AC_CONFIG_HEADER([config.h])
7
8AC_PROG_CC
9
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],
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    ])])
23
24AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
25AC_CHECK_LIB(com_err, com_err)
26AC_CHECK_LIB(nsl, gethostbyname)
27AC_CHECK_LIB(socket, socket)
28AC_CHECK_LIB(resolv, res_search)
29
30AC_ARG_WITH([zephyr],
31  [AS_HELP_STRING([--with-libzephyr],
32    [Enable Zephyr support])],
33  [],
34  [with_zephyr=check])
35
36AS_IF([test "x$with_zephyr" != xno],
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],
50   [LIBS="$LIBS -lzephyr"
51    AC_DEFINE([HAVE_LIBZEPHYR], [1],
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   ])])
62
63AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
64AC_CHECK_FUNCS(                            DES_string_to_key  DES_ecb_encrypt DES_key_sched)
65
66dnl Checks for header files.
67AC_HEADER_STDC
68AC_HEADER_SYS_WAIT
69AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
70
71dnl Add CFLAGS for embeded perl
72FOO=`perl -MExtUtils::Embed -e ccopts`
73AC_MSG_NOTICE([Adding perl CFLAGS ${FOO}])
74CFLAGS=${CFLAGS}\ ${FOO}
75
76dnl Find the location of perl XSUBPP
77AC_MSG_CHECKING(for the perl xsubpp precompiler)
78XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
79if test -n "${XSUBPPDIR}"; then
80   AC_MSG_RESULT(${XSUBPPDIR})
81else
82   AC_MSG_ERROR(not found)
83fi
84
85if test -f "${XSUBPPDIR}/typemap"; then
86   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
87else
88   XSUBPPFLAGS=""
89fi
90
91dnl Add LDFLAGS for embedded perl
92FOO=`perl -MExtUtils::Embed -e ldopts`
93AC_MSG_NOTICE([Adding perl LIBS ${FOO}])
94LIBS=${LIBS}\ ${FOO}
95
96dnl Add CFLAGS and LDFLAGS for glib-2.0
97PKG_CHECK_MODULES(GLIB,glib-2.0)
98
99AC_MSG_NOTICE([Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}])
100CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
101AC_MSG_NOTICE([Adding glib-2.0 LDFLAGS ${GLIB_LIBS}])
102LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
103
104if test "x${prefix}" = "xNONE"; then
105   prefix="${ac_default_prefix}"
106fi
107
108AC_DEFINE_UNQUOTED([DATADIR],["${prefix}/share/${PACKAGE}"],
109                   [Package data directory])
110
111dnl Checks for typedefs, structures, and compiler characteristics.
112
113AX_CFLAGS_WARN_ALL
114
115AX_C_CHECK_FLAG([-Wno-pointer-sign],[],[],
116  [LIBFAIM_CFLAGS="$LIBFAIM_CFLAGS -Wno-pointer-sign"])
117
118AC_SUBST([LIBFAIM_CFLAGS])
119
120AC_SUBST(XSUBPPDIR)
121AC_SUBST(XSUBPPFLAGS)
122
123AC_PROG_INSTALL
124AC_PROG_RANLIB
125
126AC_CONFIG_FILES([Makefile libfaim/Makefile perl/modules/Makefile])
127AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.