Whamcloud - gitweb
b=6334
[fs/lustre-release.git] / ldiskfs / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 AC_INIT([Lustre ldiskfs], 3.0.0, [https://bugzilla.lustre.org/])
4 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
5
6 # Don't look for install-sh, etc. in ..
7 AC_CONFIG_AUX_DIR([.])
8
9 AC_CANONICAL_SYSTEM
10
11 AM_INIT_AUTOMAKE
12
13 AC_PROG_CC
14
15 LB_CANONICAL_SYSTEM
16 LB_INCLUDE_RULES
17 LB_PROG_CC
18
19 AC_MSG_CHECKING([whether to build kernel modules])
20 AC_ARG_ENABLE([modules],
21         AC_HELP_STRING([--disable-modules],
22                         [disable building of Lustre kernel modules]),
23         [],[
24                 enable_modules='yes'
25         ])
26 AC_MSG_RESULT([$enable_modules])
27
28 if test x$enable_modules = xyes ; then
29         LB_PROG_LINUX
30         LB_LINUX_MODPOST
31 fi
32
33 LB_CONFIG_HEADERS
34
35 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
36 AM_CONDITIONAL(MODULES, true)
37 AM_CONDITIONAL(LINUX, true)
38 AM_CONDITIONAL(DARWIN, true)
39 AM_CONDITIONAL(LINUX25, true)
40
41 LDISKFSDIR="$PWD/ldiskfs"
42 AC_SUBST(LDISKFSDIR)
43
44 AC_MSG_CHECKING([whether to enable quilt for making ldiskfs])
45 AC_ARG_ENABLE([quilt],
46                 AC_HELP_STRING([--disable-quilt],[disable use of quilt for ldiskfs]),
47                 [],[enable_quilt='yes'])
48 AC_MSG_RESULT([$enable_quilt])
49
50 AC_PATH_PROG(PATCH, patch, [no])
51
52 if test x$enable_quilt = xno ; then
53     QUILT="no"
54 else
55     AC_PATH_PROG(QUILT, quilt, [no])
56 fi
57
58 if test x$enable_ldiskfs$PATCH$QUILT = xyesnono ; then
59         AC_MSG_ERROR([Quilt or patch are needed to build the ldiskfs module])
60 fi
61
62 AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
63
64 LB_DEFINE_LDISKFS_OPTIONS
65
66 AC_MSG_CHECKING([which ldiskfs series to use])
67 case $LINUXRELEASE in
68 2.6.5*) LDISKFS_SERIES="2.6-suse.series" ;;
69 2.6.9*) LDISKFS_SERIES="2.6-rhel4.series" ;;
70 2.6.10-ac*) LDISKFS_SERIES="2.6-fc3.series" ;;
71 2.6.10*) LDISKFS_SERIES="2.6-rhel4.series" ;;
72 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
73 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
74 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
75 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";;
76 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix ldiskfs/configure.ac])
77 esac
78 AC_MSG_RESULT([$LDISKFS_SERIES])
79 AC_SUBST(LDISKFS_SERIES)
80
81 AC_SUBST(ac_configure_args)
82
83 LB_CONFIG_FILES
84 AC_CONFIG_FILES([ldiskfs/autoMakefile ldiskfs/Makefile])
85
86 MOSTLYCLEANFILES='.*.cmd .*.flags *.o *.ko *.mod.c .depend .*.1.*'
87 AC_SUBST(MOSTLYCLEANFILES)
88
89 AC_OUTPUT