Whamcloud - gitweb
- remove obdfs/Makefile
[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 AC_PATH_PROG([XML2_CONFIG], [xml2-config], [],)
19 if test -z "$XML2_CONFIG"; then
20         AC_MSG_ERROR([xml2-config not found; libxml2-dev libraries must be installed.])
21 fi
22 XML2_CFLAGS=$($XML2_CONFIG --cflags)
23 XML2_LIBS=$($XML2_CONFIG --libs)
24 AC_SUBST(XML2_CFLAGS)
25 AC_SUBST(XML2_LIBS)
26
27 # Kernel build environment.
28 ac_default_prefix=
29 bindir='${exec_prefix}/usr/bin'
30 sbindir='${exec_prefix}/usr/sbin'
31
32 linuxdir_def=/usr/src/linux
33 AC_ARG_ENABLE(linuxdir, [  --enable-linuxdir=[path] set path to Linux source (default=/usr/src/linux)],, enable_linuxdir=$linuxdir_def)
34
35 LINUX=$enable_linuxdir
36 AC_SUBST(LINUX)
37
38 sinclude(archdep.m4)
39
40 KINCFLAGS='-I. -I$(top_srcdir)/include -I$(PORTALS)/include -I$(LINUX)/include'
41 CPPFLAGS="$KINCFLAGS $ARCHCPPFLAGS"
42
43 portalsdir_def='$(top_srcdir)/../portals'
44 AC_ARG_ENABLE(portalsdir, [  --enable-portalsdir=[path] set path to Portals source (default=../portals)],, enable_portalsdir=$portalsdir_def)
45 PORTALS=$enable_portalsdir
46 AC_SUBST(PORTALS)
47
48 AC_MSG_CHECKING(if make dep has been run in kernel source)
49 if test -f $LINUX/include/linux/config.h ; then
50         AC_MSG_RESULT(yes)
51 else
52         AC_MSG_ERROR(** cannot find $LINUX/include/linux/config.h. Run make dep in $LINUX.)
53 fi
54
55 AC_MSG_CHECKING(if autoconf.h is in kernel source)
56 if test -f $LINUX/include/linux/autoconf.h ; then
57         AC_MSG_RESULT(yes)
58 else
59         AC_MSG_ERROR(** cannot find $LINUX/include/linux/autoconf.h. Run make config in $LINUX.)
60 fi
61
62
63 AC_MSG_CHECKING(for Linux release)
64
65 dnl We need to rid ourselves of the nasty [ ] quotes.
66 changequote(, )
67 dnl LVERSION="`sed -ne 's/^VERSION[     ]*=[    ]*//gp' $LINUX/Makefile`"
68 dnl PATCHLEVEL="`sed -ne 's/^PATCHLEVEL[        ]*=[    ]*//gp' $LINUX/Makefile`"
69 dnl SUBLEVEL="`sed -ne 's/^SUBLEVEL[    ]*=[    ]*//gp' $LINUX/Makefile`"
70 dnl EXTRAVERSION="`sed -ne 's/^EXTRAVERSION[    ]*=[    ]*//gp' $LINUX/Makefile`"
71 dnl Get release from version.h
72 RELEASE="`sed -ne 's/.*UTS_RELEASE[ "]*\([0-9.a-zA-Z-]*\).*/\1/p' $LINUX/include/linux/version.h`"
73 changequote([, ])
74
75 dnl RELEASE="$LVERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
76 moduledir='$(libdir)/modules/'$RELEASE/kernel
77 AC_SUBST(moduledir)
78 AC_SUBST(EXTRAVERSION)
79
80 modulefsdir='$(moduledir)/fs'
81 AC_SUBST(modulefsdir)
82
83 AC_MSG_RESULT($RELEASE)
84 AC_SUBST(RELEASE)
85
86 # Directories for documentation and demos.
87 docdir='${prefix}/usr/share/doc/$(PACKAGE)'
88 AC_SUBST(docdir)
89
90 demodir='$(docdir)/demo'
91 AC_SUBST(demodir)
92
93 AC_OUTPUT(Makefile lov/Makefile lib/Makefile ldlm/Makefile \
94          obdecho/Makefile ptlrpc/Makefile \
95         osc/Makefile mdc/Makefile mds/Makefile ost/Makefile utils/Makefile \
96         tests/Makefile obdfilter/Makefile obdclass/Makefile \
97         llite/Makefile demos/Makefile \
98         doc/Makefile scripts/Makefile scripts/lustre.spec \
99         extN/Makefile)
100 # obdfs/Makefile