Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / ldiskfs / configure.ac
index 6ccf1c8..fa3d02d 100644 (file)
@@ -1,8 +1,11 @@
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([Lustre ldiskfs], 3.0.0, [https://bugzilla.lustre.org/])
+AC_INIT([Lustre ldiskfs], 3.0.4, [https://bugzilla.lustre.org/])
 AC_CONFIG_SRCDIR([lustre-ldiskfs.spec.in])
 
+# Don't look for install-sh, etc. in ..
+AC_CONFIG_AUX_DIR([.])
+
 AC_CANONICAL_SYSTEM
 
 AM_INIT_AUTOMAKE
@@ -12,7 +15,43 @@ AC_PROG_CC
 LB_CANONICAL_SYSTEM
 LB_INCLUDE_RULES
 LB_PROG_CC
-LB_PROG_LINUX
+
+
+#
+# LC_TARGET_SUPPORTED
+#
+# is the target os supported?
+#
+AC_DEFUN([LC_TARGET_SUPPORTED],
+[case $target_os in
+       linux* | darwin*)
+$1
+               ;;
+       *)
+$2
+               ;;
+esac
+])
+
+
+AC_MSG_CHECKING([whether to build kernel modules])
+AC_ARG_ENABLE([modules],
+       AC_HELP_STRING([--disable-modules],
+                       [disable building of Lustre kernel modules]),
+       [],[
+               LC_TARGET_SUPPORTED([
+                       enable_modules='yes'
+               ],[
+                       enable_modules='no'
+               ])
+       ])
+AC_MSG_RESULT([$enable_modules])
+
+if test x$enable_modules = xyes ; then
+       LB_PROG_LINUX
+       LB_LINUX_MODPOST
+fi
+
 LB_CONFIG_HEADERS
 
 # These allow Lustre Makefiles and autoMakefiles to be used unchanged.
@@ -55,6 +94,8 @@ case $LINUXRELEASE in
 2.6.12*) LDISKFS_SERIES="2.6.12-vanilla.series" ;;
 2.6.15*) LDISKFS_SERIES="2.6-fc5.series";;
 2.6.16*) LDISKFS_SERIES="2.6-sles10.series";;
+2.6.18-*el5*) LDISKFS_SERIES="2.6-rhel5.series";;
+2.6.18-*prep*) LDISKFS_SERIES="2.6-rhel5.series";;
 2.6.18*) LDISKFS_SERIES="2.6.18-vanilla.series";;
 *) AC_MSG_WARN([Unknown kernel version $LINUXRELEASE, fix ldiskfs/configure.ac])
 esac