Whamcloud - gitweb
b=11879
authormanoj <manoj>
Mon, 20 Aug 2007 19:40:32 +0000 (19:40 +0000)
committermanoj <manoj>
Mon, 20 Aug 2007 19:40:32 +0000 (19:40 +0000)
r=alex

New switch --with-dmu added to accomodate linking to a zfs dmu

build/autoconf/lustre-build.m4
ldiskfs/configure.ac

index 37634e2..2edc236 100644 (file)
@@ -22,7 +22,9 @@ AC_DEFUN([LB_CANONICAL_SYSTEM],
        darwin*)
                lb_target_os="darwin"
                ;;
-esac
+       solaris2.11*)
+               lb_target_os="SunOS"
+               ;;esac
 AC_SUBST(lb_target_os)
 ])
 
@@ -111,6 +113,26 @@ fi
 ])
 
 #
+# LB_PATH_DMU
+# Support for --with-dmu
+#
+AC_DEFUN([LB_PATH_DMU],
+[AC_ARG_WITH([dmu],
+       AC_HELP_STRING([--with-dmu=path],
+                      [set path to a built dmu]),
+       [
+               DMU_SRC=$with_dmu
+               dmu=true
+       ],
+       [
+               dmu=false
+               DMU_SRC=""
+       ])
+AM_CONDITIONAL([ENABLE_DMU], [test x$dmu = xtrue])
+AC_SUBST(DMU_SRC)
+])
+
+#
 # LB_PATH_LIBSYSIO
 #
 # Handle internal/external libsysio
@@ -254,6 +276,26 @@ if test x$enable_bgl != xno; then
 fi
 ])
 
+
+#
+# LB_CONFIG_UOSS
+#
+#
+AC_DEFUN([LB_CONFIG_UOSS],
+[AC_MSG_CHECKING([whether to build user-level oss])
+AC_ARG_ENABLE([uoss],
+       AC_HELP_STRING([--enable-uoss],
+                       [enable building of user-level oss]),
+       [enable_uoss='yes'],[enable_uoss='no'])
+if test x$enable_uoss != xno; then
+        AC_DEFINE(UOSS_SUPPORT, 1, Enable user-level OSS)
+        AC_DEFINE(LUSTRE_ULEVEL_MT, 1, Multi-threaded user-level lustre port)
+       enable_ulevel_mt='yes'
+        enable_modules='no'
+fi
+])
+
+
 #
 # LB_PATH_SNMP
 #
@@ -512,6 +554,7 @@ AM_CONDITIONAL(INIT_SCRIPTS, test x$ENABLE_INIT_SCRIPTS = "x1")
 AM_CONDITIONAL(LINUX, test x$lb_target_os = "xlinux")
 AM_CONDITIONAL(DARWIN, test x$lb_target_os = "xdarwin")
 AM_CONDITIONAL(CRAY_XT3, test x$enable_cray_xt3 = "xyes")
+AM_CONDITIONAL(SUNOS, test x$lb_target_os = "xSunOS")
 
 # this lets lustre cancel libsysio, per-branch or if liblustre is
 # disabled
@@ -575,6 +618,9 @@ LN_CONFIG_CDEBUG
 
 LB_CONFIG_MODULES
 
+LB_PATH_DMU
+LB_CONFIG_UOSS
+
 LB_PATH_LIBSYSIO
 LB_PATH_SNMP
 LB_PATH_LDISKFS
index 7adc144..b004238 100644 (file)
@@ -16,12 +16,34 @@ LB_CANONICAL_SYSTEM
 LB_INCLUDE_RULES
 LB_PROG_CC
 
+
+#
+# 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]),
        [],[
-               enable_modules='yes'
+               LC_TARGET_SUPPORTED([
+                       enable_modules='yes'
+               ],[
+                       enable_modules='no'
+               ])
        ])
 AC_MSG_RESULT([$enable_modules])