source: configure.ac @ cebac35

debianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since cebac35 was 53d4634, checked in by Anders Kaseorg <andersk@mit.edu>, 13 years ago
Remove m4_include(/usr/share/aclocal/pkg.m4) and let aclocal deal. Also remove dnl m4_include(pkg.m4) which confuses old aclocal even though it is a comment.
  • 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
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)
59AC_CHECK_LIB(k5crypto, krb5_derive_key)
60dnl AC_CHECK_LIB(des425, req_act_vno)
61AC_CHECK_LIB(des425, des_cbc_encrypt)
62AC_CHECK_LIB(resolv, res_search)
63AC_CHECK_LIB(krb5, krb5_get_credentials)
64AC_CHECK_LIB(krb4, krb_sendauth,,
65   AC_CHECK_LIB(krb, krb_sendauth))
66dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
67AC_CHECK_LIB(zephyr, ZGetSender)
68AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
69
70AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
71                                          [Statically link libraries in /usr/athena/lib]),
72                                          [ATHSTATIC=./athstatic],
73                                          [ATHSTATIC=])
74
75AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
76
77AC_MSG_CHECKING(for des_ecb_encrypt prototype)
78AC_TRY_COMPILE([#include <des.h>
79int des_ecb_encrypt(char foo[], char bar[], des_key_schedule baz, int qux);],
80[int foo = des_ecb_encrypt(0,0,0,0);],
81ac_cv_des_ecb_encrypt_proto=no,
82ac_cv_des_ecb_encrypt_proto=yes)
83AC_MSG_RESULT($ac_cv_des_ecb_encrypt_proto)
84if test "$ac_cv_des_ecb_encrypt_proto" = yes; then
85        AC_DEFINE([HAVE_DES_ECB_ENCRYPT_PROTO], [], [have proto for des_ecb_encrypt])
86fi
87
88dnl Checks for header files.
89AC_HEADER_STDC
90AC_HEADER_SYS_WAIT
91AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
92
93dnl Add CFLAGS for embeded perl
94FOO=`perl -MExtUtils::Embed -e ccopts`
95echo Adding perl CFLAGS ${FOO}
96CFLAGS=${CFLAGS}\ ${FOO}
97
98dnl Find the location of perl XSUBPP
99AC_MSG_CHECKING(for the perl xsubpp precompiler)
100XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
101if test -n "${XSUBPPDIR}"; then
102   AC_MSG_RESULT(${XSUBPPDIR})
103else
104   AC_MSG_ERROR(not found)
105fi
106
107if test -f "${XSUBPPDIR}/typemap"; then
108   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
109else
110   XSUBPPFLAGS=""
111fi
112
113dnl Add LDFLAGS for embedded perl
114FOO=`perl -MExtUtils::Embed -e ldopts`
115echo Adding perl LDFLAGS ${FOO}
116LDFLAGS=${LDFLAGS}\ ${FOO}
117
118dnl Add CFLAGS and LDFLAGS for glib-2.0
119PKG_CHECK_MODULES(GLIB,glib-2.0)
120
121echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS}
122CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
123echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
124LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
125
126
127dnl Checks for typedefs, structures, and compiler characteristics.
128
129AC_SUBST(XSUBPPDIR)
130AC_SUBST(XSUBPPFLAGS)
131AC_SUBST(ATHSTATIC)
132
133AC_PROG_INSTALL
134
135AC_CONFIG_SUBDIRS(libfaim)
136
137AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.