Lucas De Marchi | 481ad14 | 2015-02-26 02:56:04 -0300 | [diff] [blame] | 1 | AC_PREREQ(2.64) |
Lucas De Marchi | cb48c9b | 2011-12-12 16:41:38 -0200 | [diff] [blame] | 2 | AC_INIT([kmod], |
Lucas De Marchi | 5d46434 | 2022-06-30 08:19:17 -0700 | [diff] [blame] | 3 | [30], |
Lucas De Marchi | e17cc3a | 2011-12-16 04:11:25 -0200 | [diff] [blame] | 4 | [linux-modules@vger.kernel.org], |
Lucas De Marchi | cb48c9b | 2011-12-12 16:41:38 -0200 | [diff] [blame] | 5 | [kmod], |
Lucas De Marchi | bb05bc8 | 2012-02-24 01:58:20 -0200 | [diff] [blame] | 6 | [http://git.kernel.org/?p=utils/kernel/kmod/kmod.git]) |
Lucas De Marchi | 586fc30 | 2011-11-21 14:35:35 -0200 | [diff] [blame] | 7 | |
| 8 | AC_CONFIG_SRCDIR([libkmod/libkmod.c]) |
Lucas De Marchi | 481ad14 | 2015-02-26 02:56:04 -0300 | [diff] [blame] | 9 | AC_CONFIG_MACRO_DIR([m4]) |
| 10 | AC_CONFIG_HEADERS(config.h) |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 11 | AC_CONFIG_AUX_DIR([build-aux]) |
Lucas De Marchi | 481ad14 | 2015-02-26 02:56:04 -0300 | [diff] [blame] | 12 | |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 13 | AC_USE_SYSTEM_EXTENSIONS |
| 14 | AC_SYS_LARGEFILE |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 15 | AC_PREFIX_DEFAULT([/usr]) |
Anders Olofsson | f5cc26c | 2013-11-10 23:41:25 -0200 | [diff] [blame] | 16 | AM_MAINTAINER_MODE([enable]) |
Lucas De Marchi | 481ad14 | 2015-02-26 02:56:04 -0300 | [diff] [blame] | 17 | AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax no-dist-gzip dist-xz subdir-objects color-tests parallel-tests]) |
| 18 | AM_SILENT_RULES([yes]) |
| 19 | LT_INIT([disable-static pic-only]) |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 20 | |
Lucas De Marchi | fae7751 | 2015-02-27 16:19:44 -0300 | [diff] [blame] | 21 | AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by kmod])]) |
| 22 | AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by kmod])]) |
Lucas De Marchi | b701615 | 2013-06-06 11:43:19 -0300 | [diff] [blame] | 23 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 24 | ##################################################################### |
| 25 | # Program checks and configurations |
| 26 | ##################################################################### |
| 27 | |
Kay Sievers | 9faa7b3 | 2011-12-21 11:48:07 -0200 | [diff] [blame] | 28 | AC_PROG_SED |
| 29 | AC_PROG_MKDIR_P |
Lucas De Marchi | 481ad14 | 2015-02-26 02:56:04 -0300 | [diff] [blame] | 30 | AC_PROG_LN_S |
Jan Engelhardt | 7b3a74f | 2011-12-24 04:45:22 +0100 | [diff] [blame] | 31 | PKG_PROG_PKG_CONFIG |
Lucas De Marchi | bccb4b2 | 2014-02-24 10:52:58 -0300 | [diff] [blame] | 32 | AC_PATH_PROG([XSLTPROC], [xsltproc]) |
Lucas De Marchi | 8d9c7e3 | 2018-01-02 18:17:51 -0800 | [diff] [blame] | 33 | AC_PATH_PROG([MKOSI], [mkosi]) |
Gustavo Sverzut Barbieri | 3d8226e | 2011-12-16 16:08:53 -0200 | [diff] [blame] | 34 | |
Lucas De Marchi | 481ad14 | 2015-02-26 02:56:04 -0300 | [diff] [blame] | 35 | AC_PROG_CC_C99 |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 36 | |
| 37 | ##################################################################### |
| 38 | # Function and structure checks |
| 39 | ##################################################################### |
| 40 | |
Lucas De Marchi | d005aeb | 2012-02-08 20:29:52 -0200 | [diff] [blame] | 41 | AC_CHECK_FUNCS_ONCE(__xstat) |
Cristian RodrÃguez | 41a51c2 | 2013-02-11 15:07:52 -0300 | [diff] [blame] | 42 | AC_CHECK_FUNCS_ONCE([__secure_getenv secure_getenv]) |
Lucas De Marchi | 55112d1 | 2013-04-09 04:16:57 -0300 | [diff] [blame] | 43 | AC_CHECK_FUNCS_ONCE([finit_module]) |
Lucas De Marchi | d005aeb | 2012-02-08 20:29:52 -0200 | [diff] [blame] | 44 | |
Lucas De Marchi | e630720 | 2015-02-10 00:45:11 -0200 | [diff] [blame] | 45 | CC_CHECK_FUNC_BUILTIN([__builtin_clz]) |
| 46 | CC_CHECK_FUNC_BUILTIN([__builtin_types_compatible_p]) |
Lucas De Marchi | aac5f45 | 2015-02-10 10:41:47 -0200 | [diff] [blame] | 47 | CC_CHECK_FUNC_BUILTIN([__builtin_uaddl_overflow], [ ], [ ]) |
| 48 | CC_CHECK_FUNC_BUILTIN([__builtin_uaddll_overflow], [ ], [ ]) |
Lucas De Marchi | e630720 | 2015-02-10 00:45:11 -0200 | [diff] [blame] | 49 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 50 | # dietlibc doesn't have st.st_mtim struct member |
| 51 | AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>]) |
| 52 | |
Lucas De Marchi | 04c0956 | 2014-04-04 08:19:00 -0300 | [diff] [blame] | 53 | # musl 1.0 and bionic 4.4 don't have strndupa |
| 54 | AC_CHECK_DECLS_ONCE([strndupa]) |
| 55 | |
Randy MacLeod | 9b34db1 | 2014-09-29 21:18:04 +0200 | [diff] [blame] | 56 | # RHEL 5 and older do not have be32toh |
| 57 | AC_CHECK_DECLS_ONCE([be32toh]) |
| 58 | |
Kees Cook | 144d182 | 2013-02-18 12:02:32 -0800 | [diff] [blame] | 59 | # Check kernel headers |
| 60 | AC_CHECK_HEADERS_ONCE([linux/module.h]) |
| 61 | |
Thomas Petazzoni | dc8ed09 | 2013-09-06 15:27:04 +0200 | [diff] [blame] | 62 | AC_MSG_CHECKING([whether _Static_assert() is supported]) |
| 63 | AC_COMPILE_IFELSE( |
| 64 | [AC_LANG_SOURCE([[_Static_assert(1, "Test");]])], |
| 65 | [AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define if _Static_assert() is available]) |
| 66 | AC_MSG_RESULT([yes])], |
| 67 | [AC_MSG_RESULT([no])]) |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 68 | |
Lucas De Marchi | 16a62c7 | 2015-02-26 13:02:04 -0300 | [diff] [blame] | 69 | AC_MSG_CHECKING([whether _Noreturn is supported]) |
| 70 | AC_COMPILE_IFELSE( |
| 71 | [AC_LANG_SOURCE([[_Noreturn int foo(void) { exit(0); }]])], |
| 72 | [AC_DEFINE([HAVE_NORETURN], [1], [Define if _Noreturn is available]) |
| 73 | AC_MSG_RESULT([yes])], |
| 74 | [AC_MSG_RESULT([no])]) |
| 75 | |
| 76 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 77 | ##################################################################### |
| 78 | # --with- |
| 79 | ##################################################################### |
| 80 | |
Kay Sievers | e79bf83 | 2011-12-22 15:40:24 +0100 | [diff] [blame] | 81 | AC_ARG_WITH([rootlibdir], |
| 82 | AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), |
| 83 | [], [with_rootlibdir=$libdir]) |
| 84 | AC_SUBST([rootlibdir], [$with_rootlibdir]) |
| 85 | |
Torge Matthies | 3821e19 | 2020-09-08 21:59:20 +0200 | [diff] [blame] | 86 | AC_ARG_WITH([zstd], |
| 87 | AS_HELP_STRING([--with-zstd], [handle Zstandard-compressed modules @<:@default=disabled@:>@]), |
| 88 | [], [with_zstd=no]) |
| 89 | AS_IF([test "x$with_zstd" != "xno"], [ |
| 90 | PKG_CHECK_MODULES([libzstd], [libzstd >= 1.4.4]) |
| 91 | AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard for modules.]) |
| 92 | ], [ |
| 93 | AC_MSG_NOTICE([Zstandard support not requested]) |
| 94 | ]) |
| 95 | CC_FEATURE_APPEND([with_features], [with_zstd], [ZSTD]) |
| 96 | |
Jan Engelhardt | b182f8f | 2011-12-24 14:58:30 +0100 | [diff] [blame] | 97 | AC_ARG_WITH([xz], |
| 98 | AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]), |
| 99 | [], [with_xz=no]) |
| 100 | AS_IF([test "x$with_xz" != "xno"], [ |
| 101 | PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99]) |
| 102 | AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.]) |
| 103 | ], [ |
| 104 | AC_MSG_NOTICE([Xz support not requested]) |
| 105 | ]) |
Lucas De Marchi | 4671e03 | 2015-06-07 02:44:02 -0300 | [diff] [blame] | 106 | CC_FEATURE_APPEND([with_features], [with_xz], [XZ]) |
Jan Engelhardt | b182f8f | 2011-12-24 14:58:30 +0100 | [diff] [blame] | 107 | |
Jan Engelhardt | 5a51a35 | 2011-12-24 04:45:42 +0100 | [diff] [blame] | 108 | AC_ARG_WITH([zlib], |
| 109 | AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]), |
| 110 | [], [with_zlib=no]) |
| 111 | AS_IF([test "x$with_zlib" != "xno"], [ |
Jan Engelhardt | 7b3a74f | 2011-12-24 04:45:22 +0100 | [diff] [blame] | 112 | PKG_CHECK_MODULES([zlib], [zlib]) |
| 113 | AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.]) |
Lucas De Marchi | cfb908b | 2011-12-23 12:03:19 -0200 | [diff] [blame] | 114 | ], [ |
| 115 | AC_MSG_NOTICE([zlib support not requested]) |
Lucas De Marchi | cfb908b | 2011-12-23 12:03:19 -0200 | [diff] [blame] | 116 | ]) |
Lucas De Marchi | 4671e03 | 2015-06-07 02:44:02 -0300 | [diff] [blame] | 117 | CC_FEATURE_APPEND([with_features], [with_zlib], [ZLIB]) |
Gustavo Sverzut Barbieri | 3d8226e | 2011-12-16 16:08:53 -0200 | [diff] [blame] | 118 | |
Yauheni Kaliuta | 391b471 | 2019-02-01 22:20:02 +0200 | [diff] [blame] | 119 | AC_ARG_WITH([openssl], |
| 120 | AS_HELP_STRING([--with-openssl], [handle PKCS7 signatures @<:@default=disabled@:>@]), |
| 121 | [], [with_openssl=no]) |
| 122 | AS_IF([test "x$with_openssl" != "xno"], [ |
Dave Reisner | 8e266b9 | 2019-02-13 10:27:51 -0500 | [diff] [blame] | 123 | PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.1.0]) |
Yauheni Kaliuta | 391b471 | 2019-02-01 22:20:02 +0200 | [diff] [blame] | 124 | AC_DEFINE([ENABLE_OPENSSL], [1], [Enable openssl for modinfo.]) |
| 125 | ], [ |
| 126 | AC_MSG_NOTICE([openssl support not requested]) |
| 127 | ]) |
Dave Reisner | 8e266b9 | 2019-02-13 10:27:51 -0500 | [diff] [blame] | 128 | CC_FEATURE_APPEND([with_features], [with_openssl], [LIBCRYPTO]) |
Yauheni Kaliuta | 391b471 | 2019-02-01 22:20:02 +0200 | [diff] [blame] | 129 | |
Lucas De Marchi | 80cf2c8 | 2013-07-30 03:47:19 -0300 | [diff] [blame] | 130 | AC_ARG_WITH([bashcompletiondir], |
| 131 | AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), |
| 132 | [], |
| 133 | [AS_IF([$($PKG_CONFIG --exists bash-completion)], [ |
| 134 | with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion) |
| 135 | ] , [ |
| 136 | with_bashcompletiondir=${datadir}/bash-completion/completions |
| 137 | ])]) |
| 138 | AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 139 | |
| 140 | ##################################################################### |
| 141 | # --enable- |
| 142 | ##################################################################### |
| 143 | |
Lucas De Marchi | 013e855 | 2015-06-06 23:26:31 -0300 | [diff] [blame] | 144 | AC_ARG_ENABLE([experimental], |
| 145 | AS_HELP_STRING([--enable-experimental], [enable experimental tools and features. Do not enable it unless you know what you are doing. @<:@default=disabled@:>@]), |
| 146 | [], enable_experimental=no) |
| 147 | AM_CONDITIONAL([BUILD_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"]) |
| 148 | AS_IF([test "x$enable_experimental" = "xyes"], [ |
| 149 | AC_DEFINE(ENABLE_EXPERIMENTAL, [1], [Experimental features.]) |
| 150 | ]) |
Lucas De Marchi | 4671e03 | 2015-06-07 02:44:02 -0300 | [diff] [blame] | 151 | CC_FEATURE_APPEND([with_features], [enable_experimental], [EXPERIMENTAL]) |
Lucas De Marchi | 013e855 | 2015-06-06 23:26:31 -0300 | [diff] [blame] | 152 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 153 | AC_ARG_ENABLE([tools], |
| 154 | AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]), |
| 155 | [], enable_tools=yes) |
| 156 | AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"]) |
| 157 | |
Colin Walters | 8631552 | 2012-07-30 12:27:10 -0400 | [diff] [blame] | 158 | AC_ARG_ENABLE([manpages], |
| 159 | AS_HELP_STRING([--disable-manpages], [disable manpages @<:@default=enabled@:>@]), |
| 160 | [], enable_manpages=yes) |
| 161 | AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" = "xyes"]) |
| 162 | |
Lucas De Marchi | 23603f1 | 2015-05-31 15:38:47 -0300 | [diff] [blame] | 163 | AC_ARG_ENABLE([test-modules], |
| 164 | AS_HELP_STRING([--disable-test-modules], [disable building test modules during make check: cached modules will be used @<:@default=enabled@:>@]), |
| 165 | [], enable_test_modules=yes) |
| 166 | AM_CONDITIONAL([BUILD_MODULES], [test "x$enable_test_modules" = "xyes"]) |
| 167 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 168 | AC_ARG_ENABLE([logging], |
| 169 | AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]), |
| 170 | [], enable_logging=yes) |
| 171 | AS_IF([test "x$enable_logging" = "xyes"], [ |
| 172 | AC_DEFINE(ENABLE_LOGGING, [1], [System logging.]) |
| 173 | ]) |
| 174 | |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 175 | AC_ARG_ENABLE([debug], |
| 176 | AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]), |
| 177 | [], [enable_debug=no]) |
| 178 | AS_IF([test "x$enable_debug" = "xyes"], [ |
| 179 | AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) |
| 180 | ]) |
| 181 | |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 182 | AC_ARG_ENABLE([python], |
| 183 | AS_HELP_STRING([--enable-python], [enable Python libkmod bindings @<:@default=disabled@:>@]), |
| 184 | [], [enable_python=no]) |
| 185 | AS_IF([test "x$enable_python" = "xyes"], [ |
| 186 | AM_PATH_PYTHON(,,[:]) |
| 187 | AC_PATH_PROG([CYTHON], [cython], [:]) |
| 188 | |
| 189 | PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}], |
| 190 | [have_python=yes], |
| 191 | [PKG_CHECK_MODULES([PYTHON], [python], |
| 192 | [have_python=yes], |
| 193 | [have_python=no])]) |
| 194 | |
| 195 | AS_IF([test "x$have_python" = xno], |
| 196 | [AC_MSG_ERROR([*** python support requested but libraries not found])]) |
| 197 | ]) |
| 198 | AM_CONDITIONAL([BUILD_PYTHON], [test "x$enable_python" = "xyes"]) |
| 199 | |
Lucas De Marchi | e9b0d1b | 2015-01-07 19:17:15 -0200 | [diff] [blame] | 200 | AC_ARG_ENABLE([coverage], |
| 201 | AS_HELP_STRING([--enable-coverage], [enable test coverage @<:@default=disabled@:>@]), |
| 202 | [], [enable_coverage=no]) |
| 203 | AS_IF([test "x$enable_coverage" = "xyes"], [ |
| 204 | AC_CHECK_PROG(have_coverage, [lcov], [yes], [no]) |
| 205 | AS_IF([test "x$have_coverage" = xno],[ |
| 206 | AC_MSG_ERROR([*** lcov support requested but the program was not found]) |
| 207 | ], [ |
| 208 | lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`" |
| 209 | lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`" |
| 210 | AS_IF([test "$lcov_version_major" -lt 1 -o "$lcov_version_minor" -lt 10], [ |
| 211 | AC_MSG_ERROR([*** lcov version is too old. 1.10 required]) |
| 212 | ], [ |
| 213 | have_coverage=yes |
| 214 | CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\ |
| 215 | -fprofile-arcs \ |
| 216 | -ftest-coverage]) |
| 217 | ]) |
| 218 | ]) |
| 219 | ]) |
| 220 | AM_CONDITIONAL([ENABLE_COVERAGE], [test "x$enable_coverage" = "xyes"]) |
| 221 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 222 | m4_ifdef([GTK_DOC_CHECK], [ |
| 223 | GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) |
| 224 | ], [ |
| 225 | AM_CONDITIONAL([ENABLE_GTK_DOC], false)]) |
| 226 | |
Marius Bakke | 847247a | 2020-08-01 18:02:22 +0200 | [diff] [blame] | 227 | # Some tests are skipped when sysconfdir != /etc. |
| 228 | AM_CONDITIONAL([KMOD_SYSCONFDIR_NOT_ETC], [test "x$sysconfdir" != "x/etc"]) |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 229 | |
| 230 | ##################################################################### |
| 231 | # Default CFLAGS and LDFLAGS |
| 232 | ##################################################################### |
Lucas De Marchi | 6068aaa | 2012-01-17 12:10:42 -0200 | [diff] [blame] | 233 | |
Lucas De Marchi | e48f376 | 2012-03-17 15:12:44 -0300 | [diff] [blame] | 234 | CC_CHECK_FLAGS_APPEND(with_cflags, [CFLAGS], [\ |
| 235 | -pipe \ |
| 236 | -DANOTHER_BRICK_IN_THE \ |
| 237 | -Wall \ |
| 238 | -W \ |
| 239 | -Wextra \ |
| 240 | -Wno-inline \ |
| 241 | -Wvla \ |
| 242 | -Wundef \ |
| 243 | -Wformat=2 \ |
| 244 | -Wlogical-op \ |
| 245 | -Wsign-compare \ |
| 246 | -Wformat-security \ |
| 247 | -Wmissing-include-dirs \ |
| 248 | -Wformat-nonliteral \ |
| 249 | -Wold-style-definition \ |
| 250 | -Wpointer-arith \ |
| 251 | -Winit-self \ |
| 252 | -Wdeclaration-after-statement \ |
| 253 | -Wfloat-equal \ |
| 254 | -Wmissing-prototypes \ |
| 255 | -Wstrict-prototypes \ |
| 256 | -Wredundant-decls \ |
| 257 | -Wmissing-declarations \ |
| 258 | -Wmissing-noreturn \ |
| 259 | -Wshadow \ |
| 260 | -Wendif-labels \ |
Lucas De Marchi | db62153 | 2014-03-24 23:50:24 -0300 | [diff] [blame] | 261 | -Wstrict-aliasing=3 \ |
Lucas De Marchi | e48f376 | 2012-03-17 15:12:44 -0300 | [diff] [blame] | 262 | -Wwrite-strings \ |
| 263 | -Wno-long-long \ |
| 264 | -Wno-overlength-strings \ |
| 265 | -Wno-unused-parameter \ |
| 266 | -Wno-missing-field-initializers \ |
| 267 | -Wno-unused-result \ |
| 268 | -Wnested-externs \ |
| 269 | -Wchar-subscripts \ |
| 270 | -Wtype-limits \ |
| 271 | -Wuninitialized \ |
| 272 | -fno-common \ |
| 273 | -fdiagnostics-show-option \ |
| 274 | -fvisibility=hidden \ |
| 275 | -ffunction-sections \ |
| 276 | -fdata-sections]) |
Lucas De Marchi | 27bcc91 | 2015-01-25 23:28:46 -0200 | [diff] [blame] | 277 | AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags") |
Gustavo Sverzut Barbieri | 822ce23 | 2011-12-10 22:26:40 -0200 | [diff] [blame] | 278 | |
Lucas De Marchi | c677bf2 | 2015-01-26 19:07:12 -0200 | [diff] [blame] | 279 | |
Lucas De Marchi | e48f376 | 2012-03-17 15:12:44 -0300 | [diff] [blame] | 280 | CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [ \ |
| 281 | -Wl,--as-needed \ |
Lucas De Marchi | a5f799a | 2015-01-25 23:29:50 -0200 | [diff] [blame] | 282 | -Wl,--no-undefined \ |
Lucas De Marchi | e48f376 | 2012-03-17 15:12:44 -0300 | [diff] [blame] | 283 | -Wl,--gc-sections]) |
Lucas De Marchi | 84aaaed | 2015-01-02 16:32:03 -0200 | [diff] [blame] | 284 | AC_SUBST([OUR_LDFLAGS], $with_ldflags) |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 285 | |
Lucas De Marchi | 4671e03 | 2015-06-07 02:44:02 -0300 | [diff] [blame] | 286 | AC_DEFINE_UNQUOTED(KMOD_FEATURES, ["$with_features"], [Features in this build]) |
| 287 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 288 | ##################################################################### |
| 289 | # Generate files from *.in |
| 290 | ##################################################################### |
| 291 | |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 292 | AC_CONFIG_FILES([ |
| 293 | Makefile |
Lucas De Marchi | 904b57d | 2012-01-12 11:48:21 -0200 | [diff] [blame] | 294 | man/Makefile |
Lucas De Marchi | 646b83b | 2012-01-09 04:20:55 -0200 | [diff] [blame] | 295 | libkmod/docs/Makefile |
| 296 | libkmod/docs/version.xml |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 297 | ]) |
| 298 | |
Lucas De Marchi | 3ef7208 | 2012-03-17 10:26:32 -0300 | [diff] [blame] | 299 | |
| 300 | ##################################################################### |
Lucas De Marchi | 646b83b | 2012-01-09 04:20:55 -0200 | [diff] [blame] | 301 | |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 302 | AC_OUTPUT |
| 303 | AC_MSG_RESULT([ |
| 304 | $PACKAGE $VERSION |
Lucas De Marchi | 80cf2c8 | 2013-07-30 03:47:19 -0300 | [diff] [blame] | 305 | ======= |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 306 | |
| 307 | prefix: ${prefix} |
| 308 | sysconfdir: ${sysconfdir} |
| 309 | libdir: ${libdir} |
Kay Sievers | e79bf83 | 2011-12-22 15:40:24 +0100 | [diff] [blame] | 310 | rootlibdir: ${rootlibdir} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 311 | includedir: ${includedir} |
Lucas De Marchi | 7c41c2d | 2011-12-12 13:39:07 -0200 | [diff] [blame] | 312 | bindir: ${bindir} |
Lucas De Marchi | 80cf2c8 | 2013-07-30 03:47:19 -0300 | [diff] [blame] | 313 | Bash completions dir: ${with_bashcompletiondir} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 314 | |
| 315 | compiler: ${CC} |
Lucas De Marchi | e48f376 | 2012-03-17 15:12:44 -0300 | [diff] [blame] | 316 | cflags: ${with_cflags} ${CFLAGS} |
| 317 | ldflags: ${with_ldflags} ${LDFLAGS} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 318 | |
Lucas De Marchi | 013e855 | 2015-06-06 23:26:31 -0300 | [diff] [blame] | 319 | experimental features: ${enable_experimental} |
Lucas De Marchi | 7c41c2d | 2011-12-12 13:39:07 -0200 | [diff] [blame] | 320 | tools: ${enable_tools} |
Lucas De Marchi | 3a33a7a | 2014-03-24 08:27:19 -0300 | [diff] [blame] | 321 | python bindings: ${enable_python} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 322 | logging: ${enable_logging} |
Torge Matthies | 3821e19 | 2020-09-08 21:59:20 +0200 | [diff] [blame] | 323 | compression: zstd=${with_zstd} xz=${with_xz} zlib=${with_zlib} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 324 | debug: ${enable_debug} |
Lucas De Marchi | e9b0d1b | 2015-01-07 19:17:15 -0200 | [diff] [blame] | 325 | coverage: ${enable_coverage} |
Lucas De Marchi | 646b83b | 2012-01-09 04:20:55 -0200 | [diff] [blame] | 326 | doc: ${enable_gtk_doc} |
Lucas De Marchi | 382de85 | 2012-07-31 09:51:48 -0300 | [diff] [blame] | 327 | man: ${enable_manpages} |
Lucas De Marchi | 23603f1 | 2015-05-31 15:38:47 -0300 | [diff] [blame] | 328 | test-modules: ${enable_test_modules} |
Lucas De Marchi | 4671e03 | 2015-06-07 02:44:02 -0300 | [diff] [blame] | 329 | |
| 330 | features: ${with_features} |
Lucas De Marchi | ecd40ee | 2011-11-21 12:35:15 -0200 | [diff] [blame] | 331 | ]) |