source: configure.ac @ 5043e2e

debian
Last change on this file since 5043e2e was 5043e2e, checked in by Sam Hartman <hartmans@debian.org>, 15 years ago
Remove unneeded dependency on krb5 and krb4 Barnowl links against libkrb4, libk5crypto and libkrb5 and uses symbols from none of the above. Remove these link-time dependencies. This might break static builds but Kerberos no longer provides static libraries. The dependency on libkrb4 is problematic for Debian as libkrb4.so is being removed.
  • Property mode set to 100644
File size: 4.0 KB
Line 
1dnl $Id$
2dnl Process this file with autoconf to produce a configure script.
3AC_INIT(owl.c)
4
5AC_CONFIG_HEADER(config.h)
6
7AC_PROG_CC
8
9dnl If we're using GCC, enable all warnings
10if test "$GCC" = yes; then
11     CFLAGS="$CFLAGS -Wall -g";
12fi
13
14m4_include(/usr/share/aclocal/pkg.m4)
15dnl m4_include(pkg.m4)
16
17dnl Check for Athena
18AC_MSG_CHECKING(for /usr/athena/include)
19if test -d /usr/athena/include; then
20        CFLAGS=${CFLAGS}\ -I/usr/athena/include
21        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
22        AC_MSG_RESULT(yes)
23else
24        AC_MSG_RESULT(no)
25fi
26AC_MSG_CHECKING(for /usr/athena/lib)
27if test -d /usr/athena/lib; then
28        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
29        AC_MSG_RESULT(yes)
30else
31        AC_MSG_RESULT(no)
32fi
33
34dnl Check for kerberosIV include
35AC_MSG_CHECKING(for kerberosIV)
36if test -d /usr/include/kerberosIV; then
37        CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
38        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
39        AC_MSG_RESULT(yes)
40elif test -d /usr/local/include/kerberosIV; then
41        CFLAGS=${CFLAGS}\ -I/usr/local/include/kerberosIV
42        CPPFLAGS=${CPPFLAGS}\ -I/usr/local/include/kerberosIV
43        AC_MSG_RESULT(yes)
44else
45        AC_MSG_RESULT(no)
46fi
47PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"}
48SAVE_CFLAGS=$CFLAGS
49CFLAGS="$CFLAGS $PROTECT_CFLAGS"
50AC_MSG_CHECKING(whether protection cflags work)
51AC_COMPILE_IFELSE(int i;,
52    [AC_MSG_RESULT(yes)],
53    [AC_MSG_RESULT(no)
54    CFLAGS=$SAVE_CFLAGS])
55
56
57AC_CHECK_LIB(ssp, __stack_chk_guard)
58AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
59AC_CHECK_LIB(com_err, com_err)
60AC_CHECK_LIB(nsl, gethostbyname)
61AC_CHECK_LIB(socket, socket)
62dnl AC_CHECK_LIB(des425, req_act_vno)
63AC_CHECK_LIB(des425, des_cbc_encrypt)
64AC_CHECK_LIB(resolv, res_search)
65dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
66AC_CHECK_LIB(zephyr, ZGetSender)
67AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
68
69AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
70                                          [Statically link libraries in /usr/athena/lib]),
71                                          [ATHSTATIC=./athstatic],
72                                          [ATHSTATIC=])
73
74AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
75
76AC_MSG_CHECKING(for des_ecb_encrypt prototype)
77AC_TRY_COMPILE([#include <des.h>
78int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
79[int foo = des_ecb_encrypt(0,0,0,0);],
80ac_cv_des_ecb_encrypt_proto=no,
81ac_cv_des_ecb_encrypt_proto=yes)
82AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
83if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
84        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
85fi
86
87dnl Checks for header files.
88AC_HEADER_STDC
89AC_HEADER_SYS_WAIT
90AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
91
92dnl Add CFLAGS for embeded perl
93FOO=`perl -MExtUtils::Embed -e ccopts`
94echo Adding perl CFLAGS ${FOO}
95CFLAGS=${CFLAGS}\ ${FOO}
96
97dnl Find the location of perl XSUBPP
98AC_MSG_CHECKING(for the perl xsubpp precompiler)
99XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
100if test -n "${XSUBPPDIR}"; then
101   AC_MSG_RESULT(${XSUBPPDIR})
102else
103   AC_MSG_ERROR(not found)
104fi
105
106if test -f "${XSUBPPDIR}/typemap"; then
107   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
108else
109   XSUBPPFLAGS=""
110fi
111
112dnl Add LDFLAGS for embedded perl
113FOO=`perl -MExtUtils::Embed -e ldopts`
114echo Adding perl LDFLAGS ${FOO}
115LDFLAGS=${LDFLAGS}\ ${FOO}
116
117dnl Add CFLAGS and LDFLAGS for glib-2.0
118PKG_CHECK_MODULES(GLIB,glib-2.0)
119
120echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}
121CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
122echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
123LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
124
125
126dnl Checks for typedefs, structures, and compiler characteristics.
127
128AC_SUBST(XSUBPPDIR)
129AC_SUBST(XSUBPPFLAGS)
130AC_SUBST(ATHSTATIC)
131
132AC_PROG_INSTALL
133
134AC_CONFIG_SUBDIRS(libfaim)
135
136AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.