Whamcloud - gitweb
- bugs in fsfilt_ext3_add_dir_entry() and fsfilt_ext3_del_dir_entryI() fixed:
[fs/lustre-release.git] / lnet / build.m4
1 # ----------  other tests and settings ---------
2
3
4 # ---------  unsigned long long sane? -------
5
6 AC_CHECK_SIZEOF(unsigned long long, 0)
7 echo "---> size SIZEOF $SIZEOF_unsigned_long_long"
8 echo "---> size SIZEOF $ac_cv_sizeof_unsigned_long_long"
9 if test $ac_cv_sizeof_unsigned_long_long != 8 ; then
10         AC_MSG_ERROR([** we assume that sizeof(long long) == 8.  Tell phil@clusterfs.com])
11 fi
12
13 # directories for binaries
14 ac_default_prefix=
15 bindir='${exec_prefix}/usr/bin'
16 sbindir='${exec_prefix}/usr/sbin'
17 includedir='${prefix}/usr/include'
18
19 rootsbindir='${exec_prefix}/sbin'
20 AC_SUBST(rootsbindir)
21
22 # Directories for documentation and demos.
23 docdir='${prefix}/usr/share/doc/$(PACKAGE)'
24 AC_SUBST(docdir)
25 demodir='$(docdir)/demo'
26 AC_SUBST(demodir)
27 pkgexampledir='${prefix}/usr/lib/$(PACKAGE)/examples'
28 AC_SUBST(pkgexampledir)
29 pymoddir='${prefix}/usr/lib/${PACKAGE}/python/Lustre'
30 AC_SUBST(pymoddir)
31 modulenetdir='$(moduledir)/net/$(PACKAGE)'
32 AC_SUBST(modulenetdir)
33
34
35 # ----------  BAD gcc? ------------
36 AC_PROG_RANLIB
37 AC_PROG_CC
38 AC_MSG_CHECKING(for buggy compiler)
39 CC_VERSION=`$CC -v 2>&1 | grep "^gcc version"`
40 bad_cc() {
41         echo
42         echo "   '$CC_VERSION'"
43         echo "  has been known to generate bad code, "
44         echo "  please get an updated compiler."
45         AC_MSG_ERROR(sorry)
46 }
47 TMP_VERSION=`echo $CC_VERSION | cut -c 1-16`
48 if test "$TMP_VERSION" = "gcc version 2.95"; then
49         bad_cc
50 fi
51 case "$CC_VERSION" in 
52         # ost_pack_niobuf putting 64bit NTOH temporaries on the stack
53         # without "sub    $0xc,%esp" to protect the stack from being
54         # stomped on by interrupts (bug 606)
55         "gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)")
56                 bad_cc
57                 ;;
58         # mandrake's similar sub 0xc compiler bug
59         # http://marc.theaimsgroup.com/?l=linux-kernel&m=104748366226348&w=2
60         "gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)")
61                 bad_cc
62                 ;;
63         *)
64                 AC_MSG_RESULT(no known problems)
65                 ;;
66 esac
67 # end ------  BAD gcc? ------------
68
69 # --------  Check for required packages  --------------
70
71 # this doesn't seem to work on older autoconf
72 # AC_CHECK_LIB(readline, readline,,)
73 AC_ARG_ENABLE(readline, [  --enable-readline  use readline library],,
74                         enable_readline="yes")
75  
76 if test "$enable_readline" = "yes" ; then
77    LIBREADLINE="-lreadline -lncurses"
78    HAVE_LIBREADLINE="-DHAVE_LIBREADLINE=1"
79 else 
80    LIBREADLINE=""
81    HAVE_LIBREADLINE=""
82 fi
83 AC_SUBST(LIBREADLINE)
84 AC_SUBST(HAVE_LIBREADLINE)
85
86 AC_ARG_ENABLE(efence,  [  --enable-efence  use efence library],,
87                         enable_efence="no")
88  
89 if test "$enable_efence" = "yes" ; then
90    LIBEFENCE="-lefence"
91    HAVE_LIBEFENCE="-DHAVE_LIBEFENCE=1"
92 else 
93    LIBEFENCE=""
94    HAVE_LIBEFENCE=""
95 fi
96 AC_SUBST(LIBEFENCE)
97 AC_SUBST(HAVE_LIBEFENCE)
98