Whamcloud - gitweb
Removed unused include path
[fs/lustre-release.git] / lustre / configure.in
1 AC_INIT
2 AC_CANONICAL_SYSTEM
3
4 # Copyright (C) 2001  Cluster File Systems, Inc.
5 #
6 # This code is issued under the GNU General Public License.
7 # See the file COPYING in this distribution
8
9 # Automake variables.  Steal the version number from lustre.spec.in.
10 AM_INIT_AUTOMAKE(lustre, builtin([esyscmd], [sed -ne '/^%define version /{ s/.*version //; p; q; }' scripts/lustre.spec.in]))
11 #AM_MAINTAINER_MODE
12 AC_PROG_CC
13 AC_PROG_RANLIB
14
15
16 # Check for required packages
17
18 # this doesn't seem to work on older autoconf
19 # AC_CHECK_LIB(readline, readline,,)
20
21 AC_ARG_ENABLE(readline, [  --enable-readline  use readline library],,
22                         enable_readline="yes")
23  
24 if test "$enable_readline" = "yes" ; then
25    LIBREADLINE="-lreadline -lncurses"
26    HAVE_LIBREADLINE="-DHAVE_LIBREADLINE=1"
27 else 
28    LIBREADLINE=""
29    HAVE_LIBREADLINE=""
30 fi
31 AC_SUBST(LIBREADLINE)
32 AC_SUBST(HAVE_LIBREADLINE)
33
34 # Kernel build environment.
35 ac_default_prefix=
36 bindir='${exec_prefix}/usr/bin'
37 sbindir='${exec_prefix}/usr/sbin'
38
39 linuxdir_def=/usr/src/linux
40 AC_ARG_WITH(linux, [  --with-linux=[path] set path to Linux source (default=/usr/src/linux)], enable_linuxdir=$withval)
41 AC_ARG_ENABLE(linuxdir, [  --enable-linuxdir=[path] (deprecated) set path to Linux source (default=/usr/src/linux)],, enable_linuxdir=$linuxdir_def)
42
43 LINUX=$enable_linuxdir
44 AC_SUBST(LINUX)
45
46 sinclude(archdep.m4)
47
48 AC_MSG_CHECKING(if you are running linux 2.5...)
49 if test -e $LINUX/include/linux/namei.h ; then
50         linux25=yes
51         AC_MSG_RESULT(yes)
52 else
53         linux25=no
54         AC_MSG_RESULT(no)
55 fi
56 AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
57
58 # Changed by Amrut Joshi on 01/13/2003
59 #KINCFLAGS='-I. -I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include'
60 KINCFLAGS='-I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include'
61 CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
62
63 portalsdir_def='$(top_srcdir)/../portals'
64 AC_ARG_WITH(portals, [  --with-portals=[path] set path to Portals source (default=../portals)], enable_portalsdir=$withval)
65 AC_ARG_ENABLE(portalsdir, [  --enable-portalsdir=[path] (deprecated) set path to Portals source (default=$portalsdir_def],, enable_portalsdir=$portalsdir_def)
66 PORTALS=$enable_portalsdir
67
68 if test $PORTALS = $portalsdir_def; then
69         PORTALSLOC='../portals'
70 else
71         PORTALSLOC=$PORTALS
72 fi
73
74 AC_SUBST(PORTALS)
75 AC_SUBST(PORTALSLOC)
76
77 portalslib_def=$enable_portalsdir/linux/utils
78 AC_ARG_WITH(portalslib, [  --with-portalslib=[path] set path to Portals library (default=../portals/linux/utils)], enable_portalslib=$withval)
79 AC_ARG_ENABLE(portalslib, [  --enable-portalslib=[path] (deprecated) set path to Portals lib (default=../portals/linux/utils)],, enable_portalslib=$portalslib_def)
80
81
82 if ! test -z "$enable_portalslib"; then
83         PORTALSLIB=${enable_portalslib}
84 fi
85
86
87 AC_SUBST(PORTALSLIB)
88
89 AC_MSG_CHECKING(if make dep has been run in kernel source)
90 if test -f $LINUX/include/linux/config.h ; then
91         AC_MSG_RESULT(yes)
92 else
93         AC_MSG_ERROR(** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.)
94 fi
95
96 AC_MSG_CHECKING(if autoconf.h is in kernel source)
97 if test -f $LINUX/include/linux/autoconf.h ; then
98         AC_MSG_RESULT(yes)
99 else
100         AC_MSG_ERROR(** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.)
101 fi
102
103
104 AC_MSG_CHECKING(for Linux release)
105
106 dnl We need to rid ourselves of the nasty [ ] quotes.
107 changequote(, )
108 dnl Get release from version.h
109 RELEASE="`sed -ne 's/.*UTS_RELEASE[ \"]*\([0-9.a-zA-Z-]*\).*/\1/p' $LINUX/include/linux/version.h`"
110 changequote([, ])
111
112 moduledir='$(libdir)/modules/'$RELEASE/kernel
113 AC_SUBST(moduledir)
114
115 modulefsdir='$(moduledir)/fs/$(PACKAGE)'
116 AC_SUBST(modulefsdir)
117
118 AC_MSG_RESULT($RELEASE)
119 AC_SUBST(RELEASE)
120
121 # Directories for documentation and demos.
122 docdir='${prefix}/usr/share/doc/$(PACKAGE)'
123 AC_SUBST(docdir)
124
125 demodir='$(docdir)/demo'
126 AC_SUBST(demodir)
127
128 # not needed until the AC_CHECK_LIB(readline) above works
129 # AM_CONFIG_HEADER(include/config.h)
130
131 AC_OUTPUT(Makefile lib/Makefile ldlm/Makefile obdecho/Makefile ptlrpc/Makefile \
132         lov/Makefile osc/Makefile mdc/Makefile mds/Makefile ost/Makefile \
133         cobd/Makefile ptlbd/Makefile conf/Makefile \
134         utils/Makefile utils/lconf tests/Makefile obdfilter/Makefile \
135         obdclass/Makefile llite/Makefile doc/Makefile scripts/Makefile \
136         scripts/lustre.spec extN/Makefile, chmod +x utils/lconf)