1 # ---------- other tests and settings ---------
3 AC_CHECK_TYPE([spinlock_t],
4 [AC_DEFINE(HAVE_SPINLOCK_T, 1, [spinlock_t is defined])],
6 [#include <linux/spinlock.h>])
8 # --------- unsigned long long sane? -------
10 AC_CHECK_SIZEOF(unsigned long long, 0)
11 echo "---> size SIZEOF $SIZEOF_unsigned_long_long"
12 echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long"
13 if test $ac_cv_sizeof_unsigned_long_long != 8 ; then
14 AC_MSG_ERROR([** we assume that sizeof(long long) == 8. Tell phil@clusterfs.com])
17 # directories for binaries
18 ac_default_prefix=/usr
25 # Directories for documentation and demos.
26 docdir='${datadir}/doc/$(PACKAGE)'
28 demodir='$(docdir)/demo'
30 pkgexampledir='${pkgdatadir}/examples'
31 AC_SUBST(pkgexampledir)
32 pymoddir='${pkglibdir}/python/Lustre'
35 # ---------- BAD gcc? ------------
38 AC_MSG_CHECKING([for buggy compiler])
39 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
41 AC_MSG_RESULT([buggy compiler found!])
44 echo " has been known to generate bad code, "
45 echo " please get an updated compiler."
48 TMP_VERSION=`echo $CC_VERSION | cut -c 1-16`
49 if test "$TMP_VERSION" = "gcc version 2.95"; then
53 # ost_pack_niobuf putting 64bit NTOH temporaries on the stack
54 # without "sub $0xc,%esp" to protect the stack from being
55 # stomped on by interrupts (bug 606)
56 "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)")
59 # mandrake's similar sub 0xc compiler bug
60 # http://marc.theaimsgroup.com/?l=linux-kernel&m=104748366226348&w=2
61 "gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)")
64 # unpatched 'gcc' on rh9. miscompiles a
65 # struct = (type) { .member = value, };
66 # asignment in the iibnal where the struct is a mix
67 # of u64 and u32 bit-fields.
68 "gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)")
72 AC_MSG_RESULT([no known problems])
75 # end ------ BAD gcc? ------------
77 # -------- Check for required packages --------------
79 # this doesn't seem to work on older autoconf
80 # AC_CHECK_LIB(readline, readline,,)
81 AC_MSG_CHECKING([for readline support])
82 AC_ARG_ENABLE(readline,
83 AC_HELP_STRING([--disable-readline],
84 [do not use readline library]),
85 [],[enable_readline='yes'])
86 AC_MSG_RESULT([$enable_readline])
87 if test x$enable_readline = xyes ; then
88 LIBREADLINE="-lreadline -lncurses"
89 AC_DEFINE(HAVE_LIBREADLINE, 1, [readline library is available])
95 AC_MSG_CHECKING([if efence debugging support is requested])
97 AC_HELP_STRING([--enable-efence],
98 [use efence library]),
99 [],[enable_efence='no'])
100 AC_MSG_RESULT([$enable_efence])
101 if test "$enable_efence" = "yes" ; then
103 AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
109 # -------- enable acceptor libwrap (TCP wrappers) support? -------
110 AC_MSG_CHECKING([if libwrap support is requested])
111 AC_ARG_ENABLE([libwrap],
112 AC_HELP_STRING([--enable-libwrap], [use TCP wrappers]),
113 [case "${enableval}" in
114 yes) enable_libwrap=yes ;;
115 no) enable_libwrap=no ;;
116 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
117 esac],[enable_libwrap=no])
118 AC_MSG_RESULT([$enable_libwrap])
119 if test x$enable_libwrap = xyes ; then
121 AC_DEFINE(HAVE_LIBWRAP, 1, [libwrap support is requested])