source: configure.ac @ 53d4634

debianrelease-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 53d4634 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
RevLine 
[1aee7d9]1dnl $Id$
[7d4fbcd]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
[e6449bc]18        CPPFLAGS=${CPPFLAGS}\ -I/usr/athena/include
[7d4fbcd]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
[1d7e094]25        LDFLAGS=${LDFLAGS}\ -L/usr/athena/lib
[7d4fbcd]26        AC_MSG_RESULT(yes)
27else
28        AC_MSG_RESULT(no)
29fi
30
[fe39450]31dnl Check for kerberosIV include
[18e28a4]32AC_MSG_CHECKING(for kerberosIV)
[fe39450]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)
[18e28a4]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)
[fe39450]41else
42        AC_MSG_RESULT(no)
43fi
[87afe92]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])
[fe39450]52
[87afe92]53
54AC_CHECK_LIB(ssp, __stack_chk_guard)
[d54035d]55AC_CHECK_LIB(ncursesw, initscr,, AC_MSG_ERROR(No libncursesw found.))
[7d4fbcd]56AC_CHECK_LIB(com_err, com_err)
57AC_CHECK_LIB(nsl, gethostbyname)
58AC_CHECK_LIB(socket, socket)
59AC_CHECK_LIB(k5crypto, krb5_derive_key)
[8298425]60dnl AC_CHECK_LIB(des425, req_act_vno)
61AC_CHECK_LIB(des425, des_cbc_encrypt)
[d09e5a1]62AC_CHECK_LIB(resolv, res_search)
[7d4fbcd]63AC_CHECK_LIB(krb5, krb5_get_credentials)
[d09e5a1]64AC_CHECK_LIB(krb4, krb_sendauth,,
65   AC_CHECK_LIB(krb, krb_sendauth))
[09489b89]66dnl AC_CHECK_LIB(zephyr, ZGetSender,, AC_MSG_ERROR(No zephyr library found.))
67AC_CHECK_LIB(zephyr, ZGetSender)
[ac70242]68AC_CHECK_LIB(zephyr, ZInitLocationInfo, AC_DEFINE([HAVE_LIBZEPHYR_ZINITLOCATIONINFO], [], [Have ZInitLocationInfo]),)
69
[7ccc780]70AC_ARG_ENABLE([athstatic], AS_HELP_STRING([--enable-athstatic],
71                                          [Statically link libraries in /usr/athena/lib]),
72                                          [ATHSTATIC=./athstatic],
73                                          [ATHSTATIC=])
74
[dc2ad79]75AC_CHECK_FUNCS(use_default_colors resizeterm des_string_to_key des_key_sched des_ecb_encrypt)
[e51b410]76
[ac70242]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
[7d4fbcd]87
88dnl Checks for header files.
89AC_HEADER_STDC
90AC_HEADER_SYS_WAIT
[e8b95f8]91AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h com_err.h)
[7d4fbcd]92
93dnl Add CFLAGS for embeded perl
94FOO=`perl -MExtUtils::Embed -e ccopts`
95echo Adding perl CFLAGS ${FOO}
96CFLAGS=${CFLAGS}\ ${FOO}
97
[e51b410]98dnl Find the location of perl XSUBPP
[8ee73f8d]99AC_MSG_CHECKING(for the perl xsubpp precompiler)
[6794f72]100XSUBPPDIR="`(perl -MExtUtils::MakeMaker -e 'print ExtUtils::MakeMaker->new({NAME => qw(owl)})->tool_xsubpp;') | grep \^XSUBPPDIR | sed -e 's/XSUBPPDIR = //g;'`"
[8ee73f8d]101if test -n "${XSUBPPDIR}"; then
102   AC_MSG_RESULT(${XSUBPPDIR})
103else
104   AC_MSG_ERROR(not found)
105fi
106
[4ad3480]107if test -f "${XSUBPPDIR}/typemap"; then
108   XSUBPPFLAGS="-typemap ${XSUBPPDIR}/typemap"
109else
110   XSUBPPFLAGS=""
111fi
112
[18e28a4]113dnl Add LDFLAGS for embedded perl
[3f21b8e]114FOO=`perl -MExtUtils::Embed -e ldopts`
[7d4fbcd]115echo Adding perl LDFLAGS ${FOO}
116LDFLAGS=${LDFLAGS}\ ${FOO}
117
[34509d5]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}
[d9337637]122CFLAGS="${GLIB_CFLAGS} ${CFLAGS}"
[34509d5]123echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS}
[d9337637]124LDFLAGS="${GLIB_LIBS} ${LDFLAGS}"
[34509d5]125
126
[7d4fbcd]127dnl Checks for typedefs, structures, and compiler characteristics.
128
[15bd5ef]129AC_SUBST(XSUBPPDIR)
[4ad3480]130AC_SUBST(XSUBPPFLAGS)
[7ccc780]131AC_SUBST(ATHSTATIC)
[8ee73f8d]132
[ac70242]133AC_PROG_INSTALL
134
[d09e5a1]135AC_CONFIG_SUBDIRS(libfaim)
136
[7d4fbcd]137AC_OUTPUT(Makefile)
Note: See TracBrowser for help on using the repository browser.