+
+AC_ARG_ENABLE([dist],
+ AC_HELP_STRING([--enable-dist],
+ [only configure enough for make dist]),
+ [enable_dist='yes'],[enable_dist='no'])
+AC_MSG_RESULT([$enable_dist])
+if test x$enable_dist != xno; then
+ enable_modules='no'
+fi
+
+#
+# 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
+if test x$linux25 = xyes ; then
+ LB_LINUX_MODPOST
+fi
+fi
+
+LB_LDISKFS_SERIES([test x$enable_dist = xno])
+
+AC_MSG_CHECKING([whether to build Lustre server support])
+AC_ARG_ENABLE([server],
+ AC_HELP_STRING([--disable-server],
+ [disable Lustre server support]),
+ [],[
+ if test -n "$LDISKFS_SERIES"; then
+ enable_server='yes'
+ else
+ enable_server='no'
+ fi
+ ])
+AC_MSG_RESULT([$enable_server])
+