source: configure.ac @ 3da3afe

debianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 3da3afe was 3da3afe, checked in by Sam Hartman <hartmans@debian.org>, 16 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: 3.9 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
14dnl Check for Athena
15AC_MSG_CHECKING(for /usr/athena/include)
16if test -d /usr/athena/include; then
17        CFLAGS=${CFLAGS}\ -I/usr/athena/include
18        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
19        AC_MSG_RESULT(yes)
20else
21        AC_MSG_RESULT(no)
22fi
23AC_MSG_CHECKING(for /usr/athena/lib)
24if test -d /usr/athena/lib; then
25        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
26        AC_MSG_RESULT(yes)
27else
28        AC_MSG_RESULT(no)
29fi
30
31dnl Check for kerberosIV include
32AC_MSG_CHECKING(for kerberosIV)
33if test -d /usr/include/kerberosIV; then
34        CFLAGS=${CFLAGS}\ -I/usr/include/kerberosIV
35        CPPFLAGS=${CPPFLAGS}\ -I/usr/include/kerberosIV
36        AC_MSG_RESULT(yes)
37elif test -d /usr/local/include/kerberosIV; then
38        CFLAGS=${CFLAGS}\ -I/usr/local/include/kerberosIV
39        CPPFLAGS=${CPPFLAGS}\ -I/usr/local/include/kerberosIV
40        AC_MSG_RESULT(yes)
41else
42        AC_MSG_RESULT(no)
43fi
44PROTECT_CFLAGS=${PROTECT_CFLAGS-"-fstack-protector"}
45SAVE_CFLAGS=$CFLAGS
46CFLAGS="$CFLAGS $PROTECT_CFLAGS"
47AC_MSG_CHECKING(whether protection cflags work)
48AC_COMPILE_IFELSE(int i;,
49    [AC_MSG_RESULT(yes)],
50    [AC_MSG_RESULT(no)
51    CFLAGS=$SAVE_CFLAGS])
52
53
54AC_CHECK_LIB(ssp, __stack_chk_guard)
55AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
56AC_CHECK_LIB(com_err, com_err)
57AC_CHECK_LIB(nsl, gethostbyname)
58AC_CHECK_LIB(socket, socket)
59dnl AC_CHECK_LIB(des425, req_act_vno)
60AC_CHECK_LIB(des425, des_cbc_encrypt)
61AC_CHECK_LIB(resolv, res_search)
62dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
63AC_CHECK_LIB(zephyr, ZGetSender)
64AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
65
66AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
67                                          [Statically link libraries in /usr/athena/lib]),
68                                          [ATHSTATIC=./athstatic],
69                                          [ATHSTATIC=])
70
71AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
72
73AC_MSG_CHECKING(for des_ecb_encrypt prototype)
74AC_TRY_COMPILE([#include <des.h>
75int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
76[int foo = des_ecb_encrypt(0,0,0,0);],
77ac_cv_des_ecb_encrypt_proto=no,
78ac_cv_des_ecb_encrypt_proto=yes)
79AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
80if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
81        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
82fi
83
84dnl Checks for header files.
85AC_HEADER_STDC
86AC_HEADER_SYS_WAIT
87AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
88
89dnl Add CFLAGS for embeded perl
90FOO=`perl -MExtUtils::Embed -e ccopts`
91echo Adding perl CFLAGS ${FOO}
92CFLAGS=${CFLAGS}\ ${FOO}
93
94dnl Find the location of perl XSUBPP
95AC_MSG_CHECKING(for the perl xsubpp precompiler)
96XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
97if test -n "${XSUBPPDIR}"; then
98   AC_MSG_RESULT(${XSUBPPDIR})
99else
100   AC_MSG_ERROR(not found)
101fi
102
103if test -f "${XSUBPPDIR}/typemap"; then
104   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
105else
106   XSUBPPFLAGS=""
107fi
108
109dnl Add LDFLAGS for embedded perl
110FOO=`perl -MExtUtils::Embed -e ldopts`
111echo Adding perl LDFLAGS ${FOO}
112LDFLAGS=${LDFLAGS}\ ${FOO}
113
114dnl Add CFLAGS and LDFLAGS for glib-2.0
115PKG_CHECK_MODULES(GLIB,glib-2.0)
116
117echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}
118CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
119echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
120LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
121
122
123dnl Checks for typedefs, structures, and compiler characteristics.
124
125AC_SUBST(XSUBPPDIR)
126AC_SUBST(XSUBPPFLAGS)
127AC_SUBST(ATHSTATIC)
128
129AC_PROG_INSTALL
130
131AC_CONFIG_SUBDIRS(libfaim)
132
133AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.