]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
build: simplify and organize configure
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 26 Feb 2015 05:56:04 +0000 (02:56 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 26 Feb 2015 15:21:08 +0000 (12:21 -0300)
 - There's no need for the various AC_PROG_CC* macros
 - No need for AC_C_BIGENDIAN: the only place we care about endianness,
   we use __BYTE_ORDER
 - Organize calls to be in similar order as systemd
 - Disable --disable-largefile. We already had possible bugs in the
   index implementation if this were passed. It's now fixed, but it's
   never tested. Disable it.
 - Bump autoconf requirement to 2.64

configure.ac

index 30eb37f7f2146c9d9eace17b15ad0f47fbdd1b9e..3ba65ccaf01d3a6f877dcb10d53b947a00a3f6af 100644 (file)
@@ -1,4 +1,4 @@
-AC_PREREQ(2.60)
+AC_PREREQ(2.64)
 AC_INIT([kmod],
        [19],
        [linux-modules@vger.kernel.org],
@@ -6,38 +6,32 @@ AC_INIT([kmod],
        [http://git.kernel.org/?p=utils/kernel/kmod/kmod.git])
 
 AC_CONFIG_SRCDIR([libkmod/libkmod.c])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules
-       tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests])
-AC_PROG_CC_STDC
+
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
-AC_CONFIG_MACRO_DIR([m4])
-m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
-AM_SILENT_RULES([yes])
-LT_INIT([disable-static pic-only])
 AC_PREFIX_DEFAULT([/usr])
 AM_MAINTAINER_MODE([enable])
+AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests])
+AM_SILENT_RULES([yes])
+LT_INIT([disable-static pic-only])
 
-AS_IF([test "x$enable_static" = "xyes"],
-      [AC_MSG_ERROR([--enable-static is not supported by kmod])])
-
+AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
+AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
 
 #####################################################################
 # Program checks and configurations
 #####################################################################
 
-AC_PROG_CC
-AC_PROG_CC_C99
-AM_PROG_CC_C_O
-AC_PROG_GCC_TRADITIONAL
-AC_C_BIGENDIAN
-
 AC_PROG_SED
 AC_PROG_MKDIR_P
+AC_PROG_LN_S
 PKG_PROG_PKG_CONFIG
 AC_PATH_PROG([XSLTPROC], [xsltproc])
 
+AC_PROG_CC_C99
 
 #####################################################################
 # Function and structure checks
@@ -244,7 +238,6 @@ AC_SUBST([OUR_LDFLAGS], $with_ldflags)
 # Generate files from *.in
 #####################################################################
 
-AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([
        Makefile
        man/Makefile