Add configure option --disable-userspace for building kernel modules only.
authorBen Pfaff <blp@nicira.com>
Thu, 14 May 2009 19:53:10 +0000 (12:53 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 14 May 2009 19:53:10 +0000 (12:53 -0700)
Makefile.am
acinclude.m4
configure.ac

index b6dc87c70bb7ac35121b30368efcd30ff346700d..95d67ff2e8b042058804a38e8ddd07aef95bdd1d 100644 (file)
@@ -4,6 +4,7 @@ AUTOMAKE_OPTIONS = foreign -Wno-syntax subdir-objects
 ACLOCAL_AMFLAGS = -I m4
 SUBDIRS = datapath
 
+if ENABLE_USERSPACE
 if HAVE_DPKG_BUILDPACKAGE
 distcheck-hook: 
        cd $(srcdir) && dpkg-buildpackage -rfakeroot -us -uc
@@ -77,3 +78,4 @@ include extras/ezio/automake.mk
 endif
 endif
 include ext.mk
+endif # ENABLE_USERSPACE
index a1bd67ef9044095f3d79aafd7200b9d102d94bad..3c58780578544a8a31a4c497918c0f34c16b686b 100644 (file)
 # advertising or publicity pertaining to the Software or any
 # derivatives without specific, written prior permission.
 
+dnl Checks for --disable-userspace.
+AC_DEFUN([OVS_CHECK_USERSPACE],
+  [AC_ARG_ENABLE(
+     [userspace],
+     [AC_HELP_STRING([--disable-userspace], 
+                     [Disable building userspace components.])],
+     [case "${enableval}" in
+        (yes) build_userspace=true ;;
+        (no)  build_userspace=false ;;
+        (*) AC_MSG_ERROR([bad value ${enableval} for --enable-userspace]) ;;
+      esac],
+     [build_userspace=true])
+   AM_CONDITIONAL([ENABLE_USERSPACE], [$build_userspace])])
+
 dnl OVS_CHECK_LINUX(OPTION, VERSION, VARIABLE, CONDITIONAL)
 dnl
 dnl Configure linux kernel source tree 
index e1ec0b7f0d9e691fc36e70b0a40913018ae27131..d5cb0ad8c648b8a73c27bbdf3e1fa2ae33681798 100644 (file)
@@ -55,49 +55,52 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_C_BIGENDIAN
 AC_SYS_LARGEFILE
 
+OVS_CHECK_USERSPACE
 OVS_CHECK_NDEBUG
 OVS_CHECK_NETLINK
 OVS_CHECK_OPENSSL
 OVS_CHECK_SNAT
-OVS_CHECK_FAULT_LIBS
-OVS_CHECK_SOCKET_LIBS
-OVS_CHECK_PKIDIR
-OVS_CHECK_RUNDIR
 OVS_CHECK_LOGDIR
-OVS_CHECK_MALLOC_HOOKS
-OVS_CHECK_VALGRIND
-OVS_CHECK_TTY_LOCK_DIR
 OVS_CHECK_CURSES
 OVS_CHECK_LINUX_VT_H
 OVS_CHECK_PCRE
 OVS_CHECK_IF_PACKET
+OVS_CHECK_DPKG_BUILDPACKAGE
 
-AC_CHECK_FUNCS([strsignal])
-
-AC_ARG_VAR(KARCH, [Kernel Architecture String])
-AC_SUBST(KARCH)
-OVS_CHECK_LINUX(l26, 2.6, KSRC26, L26_ENABLED)
+if $build_userspace; then
+    OVS_CHECK_PKIDIR
+    OVS_CHECK_RUNDIR
+    OVS_CHECK_MALLOC_HOOKS
+    OVS_CHECK_VALGRIND
+    OVS_CHECK_TTY_LOCK_DIR
+    OVS_CHECK_SOCKET_LIBS
+    OVS_CHECK_FAULT_LIBS
 
-OVS_CHECK_DPKG_BUILDPACKAGE
+    AC_CHECK_FUNCS([strsignal])
 
-OVS_ENABLE_OPTION([-Wall])
-OVS_ENABLE_OPTION([-Wno-sign-compare])
-OVS_ENABLE_OPTION([-Wpointer-arith])
-OVS_ENABLE_OPTION([-Wdeclaration-after-statement])
-OVS_ENABLE_OPTION([-Wformat-security])
-OVS_ENABLE_OPTION([-Wswitch-enum])
-OVS_ENABLE_OPTION([-Wunused-parameter])
-OVS_ENABLE_OPTION([-Wstrict-aliasing])
-OVS_ENABLE_OPTION([-Wbad-function-cast])
-OVS_ENABLE_OPTION([-Wcast-align])
-OVS_ENABLE_OPTION([-Wstrict-prototypes])
-OVS_ENABLE_OPTION([-Wold-style-definition])
-OVS_ENABLE_OPTION([-Wmissing-prototypes])
-OVS_ENABLE_OPTION([-Wmissing-field-initializers])
-OVS_ENABLE_OPTION([-Wno-override-init])
+    OVS_ENABLE_OPTION([-Wall])
+    OVS_ENABLE_OPTION([-Wno-sign-compare])
+    OVS_ENABLE_OPTION([-Wpointer-arith])
+    OVS_ENABLE_OPTION([-Wdeclaration-after-statement])
+    OVS_ENABLE_OPTION([-Wformat-security])
+    OVS_ENABLE_OPTION([-Wswitch-enum])
+    OVS_ENABLE_OPTION([-Wunused-parameter])
+    OVS_ENABLE_OPTION([-Wstrict-aliasing])
+    OVS_ENABLE_OPTION([-Wbad-function-cast])
+    OVS_ENABLE_OPTION([-Wcast-align])
+    OVS_ENABLE_OPTION([-Wstrict-prototypes])
+    OVS_ENABLE_OPTION([-Wold-style-definition])
+    OVS_ENABLE_OPTION([-Wmissing-prototypes])
+    OVS_ENABLE_OPTION([-Wmissing-field-initializers])
+    OVS_ENABLE_OPTION([-Wno-override-init])
+fi
 
 OVS_ENABLE_EXT
 
+AC_ARG_VAR(KARCH, [Kernel Architecture String])
+AC_SUBST(KARCH)
+OVS_CHECK_LINUX(l26, 2.6, KSRC26, L26_ENABLED)
+
 AC_CONFIG_FILES([Makefile 
 datapath/Makefile 
 datapath/linux-2.6/Kbuild