# HG changeset patch # User Florian Pose # Date 1394455428 -3600 # Node ID fca12d7035d1d408ea8dbbc5200f3e59cf68073a # Parent d2d43d2e7f311bb5927bc1441de3ca68793299e7 Added --enable-kernel switch to disable kernel module building. diff -r d2d43d2e7f31 -r fca12d7035d1 Makefile.am --- a/Makefile.am Wed Feb 19 12:28:15 2014 +0100 +++ b/Makefile.am Mon Mar 10 13:43:48 2014 +0100 @@ -30,11 +30,14 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ - devices \ include \ - master \ script +if ENABLE_KERNEL +SUBDIRS += devices +SUBDIRS += master +endif + if BUILD_TOOL SUBDIRS += tool endif diff -r d2d43d2e7f31 -r fca12d7035d1 configure.ac --- a/configure.ac Wed Feb 19 12:28:15 2014 +0100 +++ b/configure.ac Mon Mar 10 13:43:48 2014 +0100 @@ -57,9 +57,42 @@ AC_PROG_LIBTOOL #------------------------------------------------------------------------------ +# Kernel modules +#------------------------------------------------------------------------------ + +AC_MSG_CHECKING([whether to build kernel modules]) + +AC_ARG_ENABLE([kernel], + AS_HELP_STRING([--enable-kernel], + [Enable building kernel modules]), + [ + case "${enableval}" in + yes) enablekernel=1 + ;; + no) enablekernel=0 + ;; + *) AC_MSG_ERROR([Invalid value for --enable-generic]) + ;; + esac + ], + [enablekernel=1] +) + +if test "x$enablekernel" = "x1"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AM_CONDITIONAL(ENABLE_KERNEL, test "x$enablekernel" = "x1") +AC_SUBST(ENABLE_KERNEL,[$enablekernel]) + +#------------------------------------------------------------------------------ # Linux sources #------------------------------------------------------------------------------ +if test "x$enablekernel" = "x1"; then + AC_ARG_WITH([linux-dir], AC_HELP_STRING( [--with-linux-dir=], @@ -116,6 +149,8 @@ AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir]) AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)]) +fi + #------------------------------------------------------------------------------ # Linux module installation subdirectory #------------------------------------------------------------------------------ @@ -150,7 +185,7 @@ ;; esac ], - [enablegeneric=1] + [enablegeneric=$enablekernel] ) AM_CONDITIONAL(ENABLE_GENERIC, test "x$enablegeneric" = "x1") @@ -173,7 +208,7 @@ ;; esac ], - [enable8139too=1] + [enable8139too=$enablekernel] ) AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1")