]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - configure.ac
libkmod: keep KMOD_FILE_COMPRESSION_NONE/load_reg in comp_types
[thirdparty/kmod.git] / configure.ac
index d6da5ee9ae9ae2b624c4c29b4125d6966bb773eb..a80780e370f9a67f418adaa8496d9c7fd563461d 100644 (file)
@@ -1,6 +1,6 @@
 AC_PREREQ(2.64)
 AC_INIT([kmod],
-       [31],
+       [32],
        [linux-modules@vger.kernel.org],
        [kmod],
        [http://git.kernel.org/?p=utils/kernel/kmod/kmod.git])
@@ -33,7 +33,6 @@ AC_PROG_MKDIR_P
 AC_PROG_LN_S
 PKG_PROG_PKG_CONFIG
 AC_PATH_PROG([XSLTPROC], [xsltproc])
-AC_PATH_PROG([MKOSI], [mkosi])
 
 AC_PROG_CC_C99
 
@@ -93,10 +92,27 @@ AC_SUBST([rootlibdir], [$with_rootlibdir])
 
 # Ideally this would be $prefix/lib/modules but default to /lib/modules for compatibility with earlier versions
 AC_ARG_WITH([module_directory],
-        AS_HELP_STRING([--with-module-directory=DIR], [directory in which to look for kernel modules - typically '/lib/modules' or '${prefix}/lib/modules']),
+        AS_HELP_STRING([--with-module-directory=DIR], [directory in which to look for kernel modules @<:@default=/lib/modules@:>@]),
         [], [with_module_directory=/lib/modules])
 AC_SUBST([module_directory], [$with_module_directory])
 
+# Check all directory arguments for consistency.
+for ac_var in  distconfdir rootlibdir module_directory
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*@<:@^/@:>@\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    @<:@\\/$@:>@* | ?:@<:@\\/@:>@* )  continue;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
 AC_ARG_WITH([zstd],
        AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]),
        [], [with_zstd=no])
@@ -159,15 +175,6 @@ AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
 # --enable-
 #####################################################################
 
-AC_ARG_ENABLE([experimental],
-        AS_HELP_STRING([--enable-experimental], [enable experimental tools and features. Do not enable it unless you know what you are doing. @<:@default=disabled@:>@]),
-        [], enable_experimental=no)
-AM_CONDITIONAL([BUILD_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
-AS_IF([test "x$enable_experimental" = "xyes"], [
-       AC_DEFINE(ENABLE_EXPERIMENTAL, [1], [Experimental features.])
-])
-CC_FEATURE_APPEND([with_features], [enable_experimental], [EXPERIMENTAL])
-
 AC_ARG_ENABLE([tools],
         AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
        [], enable_tools=yes)
@@ -197,24 +204,6 @@ AS_IF([test "x$enable_debug" = "xyes"], [
        AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
 ])
 
-AC_ARG_ENABLE([python],
-       AS_HELP_STRING([--enable-python], [enable Python libkmod bindings @<:@default=disabled@:>@]),
-       [], [enable_python=no])
-AS_IF([test "x$enable_python" = "xyes"], [
-       AM_PATH_PYTHON(,,[:])
-       AC_PATH_PROG([CYTHON], [cython], [:])
-
-       PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}],
-                         [have_python=yes],
-                         [PKG_CHECK_MODULES([PYTHON], [python],
-                                            [have_python=yes],
-                                            [have_python=no])])
-
-       AS_IF([test "x$have_python" = xno],
-             [AC_MSG_ERROR([*** python support requested but libraries not found])])
-])
-AM_CONDITIONAL([BUILD_PYTHON], [test "x$enable_python" = "xyes"])
-
 AC_ARG_ENABLE([coverage],
        AS_HELP_STRING([--enable-coverage], [enable test coverage @<:@default=disabled@:>@]),
        [], [enable_coverage=no])
@@ -242,6 +231,9 @@ GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
 ], [
 AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
 
+PKG_INSTALLDIR
+PKG_NOARCH_INSTALLDIR
+
 #####################################################################
 # Default CFLAGS and LDFLAGS
 #####################################################################
@@ -313,7 +305,6 @@ AC_CONFIG_FILES([
        libkmod/docs/Makefile
        libkmod/docs/version.xml
        libkmod/libkmod.pc
-       libkmod/python/kmod/version.py
        tools/kmod.pc
 ])
 
@@ -339,9 +330,7 @@ AC_MSG_RESULT([
        cflags:                 ${with_cflags} ${CFLAGS}
        ldflags:                ${with_ldflags} ${LDFLAGS}
 
-       experimental features:  ${enable_experimental}
        tools:                  ${enable_tools}
-       python bindings:        ${enable_python}
        logging:                ${enable_logging}
        compression:            zstd=${with_zstd}  xz=${with_xz}  zlib=${with_zlib}
        debug:                  ${enable_debug}