configure.ac revision bb05bc8ac139449c3fda63e16ba8e3f45d5f290e
1ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_PREREQ(2.60) 2cb48c9b2e611251c68bd0b8f349312330310f644Lucas De MarchiAC_INIT([kmod], 3e479598b7d19ae7be45bf5329d6e4df32d646c16Lucas De Marchi [5], 4e17cc3afccc46bf89a3a6f2568f9d630fd91e366Lucas De Marchi [linux-modules@vger.kernel.org], 5cb48c9b2e611251c68bd0b8f349312330310f644Lucas De Marchi [kmod], 6bb05bc8ac139449c3fda63e16ba8e3f45d5f290eLucas De Marchi [http://git.kernel.org/?p=utils/kernel/kmod/kmod.git]) 7586fc304d85b2a31ae764377b4ddfb64cc9f221cLucas De Marchi 8586fc304d85b2a31ae764377b4ddfb64cc9f221cLucas De MarchiAC_CONFIG_SRCDIR([libkmod/libkmod.c]) 9ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_CONFIG_AUX_DIR([build-aux]) 10a597c8bbf5dcd490fb0ba701d6e0fb1e66cd91f5Jan EngelhardtAM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules 1180f9e02382fa9e65ec903dd53d62f949078205eeLucas De Marchi tar-pax no-dist-gzip dist-xz subdir-objects color-tests]) 12ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_PROG_CC_STDC 13ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_USE_SYSTEM_EXTENSIONS 14ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_SYS_LARGEFILE 15ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_CONFIG_MACRO_DIR([m4]) 16fe8bf3b0092b6cf86081be57e2b2a74d3ea3b0eaLuis Felipe Strano Moraesm4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) 17ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAM_SILENT_RULES([yes]) 18ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiLT_INIT([disable-static pic-only]) 19ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_PREFIX_DEFAULT([/usr]) 20ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 21648a842bfdb8b3b37122581aebdc9328d2fdfc60Lucas De MarchiAC_PROG_CC 22648a842bfdb8b3b37122581aebdc9328d2fdfc60Lucas De MarchiAC_PROG_CC_C99 23648a842bfdb8b3b37122581aebdc9328d2fdfc60Lucas De MarchiAC_C_TYPEOF 24648a842bfdb8b3b37122581aebdc9328d2fdfc60Lucas De MarchiAM_PROG_CC_C_O 25648a842bfdb8b3b37122581aebdc9328d2fdfc60Lucas De MarchiAC_PROG_GCC_TRADITIONAL 26708624a4ebffc515da2f9e2fdbdce79fc9c0aaafGustavo Sverzut BarbieriAC_C_BIGENDIAN 27648a842bfdb8b3b37122581aebdc9328d2fdfc60Lucas De Marchi 289faa7b376c1e1a48d8763829bab0ac4f0b924b01Kay SieversAC_PROG_SED 299faa7b376c1e1a48d8763829bab0ac4f0b924b01Kay SieversAC_PROG_MKDIR_P 30904b57d022b0187bc5c6eeeacf2d5bf566ca8881Lucas De MarchiAC_PATH_PROG([XSLTPROC], [xsltproc]) 317b3a74fc67993e6fb85918ec8c2f71c90903a4d4Jan EngelhardtPKG_PROG_PKG_CONFIG 323d8226edfea12b951f6e257b087ec7453135ed10Gustavo Sverzut Barbieri 33d005aeb7529ab690c7b7119f0ef545e2c07a1ceaLucas De MarchiAC_CHECK_FUNCS_ONCE(__xstat) 34d005aeb7529ab690c7b7119f0ef545e2c07a1ceaLucas De Marchi 35a308abec371364eec8344681cfe1fb50d624e43eKay SieversAC_ARG_WITH([rootprefix], 36a308abec371364eec8344681cfe1fb50d624e43eKay Sievers AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), 370c5fad937a9ed4166238fa20de6896fe7a04a26cLucas De Marchi [], [with_rootprefix=""]) 38a308abec371364eec8344681cfe1fb50d624e43eKay SieversAC_SUBST([rootprefix], [$with_rootprefix]) 39a308abec371364eec8344681cfe1fb50d624e43eKay Sievers 40e79bf83b0648a44585dc5960f7022a9a8f4ab40cKay SieversAC_ARG_WITH([rootlibdir], 41e79bf83b0648a44585dc5960f7022a9a8f4ab40cKay Sievers AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), 42e79bf83b0648a44585dc5960f7022a9a8f4ab40cKay Sievers [], [with_rootlibdir=$libdir]) 43e79bf83b0648a44585dc5960f7022a9a8f4ab40cKay SieversAC_SUBST([rootlibdir], [$with_rootlibdir]) 44e79bf83b0648a44585dc5960f7022a9a8f4ab40cKay Sievers 4572c51a9e4d6b56f5454e53a6fc9b5c1bd923f227Gustavo Sverzut BarbieriAC_ARG_ENABLE([tools], 4672c51a9e4d6b56f5454e53a6fc9b5c1bd923f227Gustavo Sverzut Barbieri AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]), 4772c51a9e4d6b56f5454e53a6fc9b5c1bd923f227Gustavo Sverzut Barbieri [], enable_tools=yes) 4872c51a9e4d6b56f5454e53a6fc9b5c1bd923f227Gustavo Sverzut BarbieriAM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"]) 4972c51a9e4d6b56f5454e53a6fc9b5c1bd923f227Gustavo Sverzut Barbieri 50ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_ARG_ENABLE([logging], 51ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]), 52ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi [], enable_logging=yes) 53ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAS_IF([test "x$enable_logging" = "xyes"], [ 54ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi AC_DEFINE(ENABLE_LOGGING, [1], [System logging.]) 55ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi]) 56ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 57b182f8fb5e5765dd5c935aa7b3775e382662b318Jan EngelhardtAC_ARG_WITH([xz], 58b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]), 59b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt [], [with_xz=no]) 60b182f8fb5e5765dd5c935aa7b3775e382662b318Jan EngelhardtAS_IF([test "x$with_xz" != "xno"], [ 61b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt PKG_CHECK_MODULES([liblzma], [liblzma >= 4.99]) 62b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt AC_DEFINE([ENABLE_XZ], [1], [Enable Xz for modules.]) 63b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt], [ 64b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt AC_MSG_NOTICE([Xz support not requested]) 65b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt]) 66b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt 675a51a357a8fad00582631592969f6d410228b8a7Jan EngelhardtAC_ARG_WITH([zlib], 685a51a357a8fad00582631592969f6d410228b8a7Jan Engelhardt AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]), 695a51a357a8fad00582631592969f6d410228b8a7Jan Engelhardt [], [with_zlib=no]) 705a51a357a8fad00582631592969f6d410228b8a7Jan EngelhardtAS_IF([test "x$with_zlib" != "xno"], [ 717b3a74fc67993e6fb85918ec8c2f71c90903a4d4Jan Engelhardt PKG_CHECK_MODULES([zlib], [zlib]) 727b3a74fc67993e6fb85918ec8c2f71c90903a4d4Jan Engelhardt AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.]) 73cfb908bf660871f9475b485806e004ddcc5ced18Lucas De Marchi], [ 74cfb908bf660871f9475b485806e004ddcc5ced18Lucas De Marchi AC_MSG_NOTICE([zlib support not requested]) 75cfb908bf660871f9475b485806e004ddcc5ced18Lucas De Marchi]) 763d8226edfea12b951f6e257b087ec7453135ed10Gustavo Sverzut Barbieri 77ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_ARG_ENABLE([debug], 78ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]), 79ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi [], [enable_debug=no]) 80ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAS_IF([test "x$enable_debug" = "xyes"], [ 81ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.]) 82ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi]) 83ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 846068aaaea8e7cdc6039e6fd7a1aeab9db9d0225bLucas De Marchi# dietlibc doesn't have st.st_mtim struct member 856068aaaea8e7cdc6039e6fd7a1aeab9db9d0225bLucas De MarchiAC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>]) 866068aaaea8e7cdc6039e6fd7a1aeab9db9d0225bLucas De Marchi 87822ce2344d6ad36ce0f186e48c120f939a7915b6Gustavo Sverzut BarbieriCC_CHECK_CFLAGS_APPEND([ \ 887c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -pipe \ 89769becb5dbfb673900c6813d02ae3737d87035efLucas De Marchi -DANOTHER_BRICK_IN_THE \ 907c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wall \ 917c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -W \ 927c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wextra \ 937c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wno-inline \ 947c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wvla \ 957c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wundef \ 967c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wformat=2 \ 977c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wlogical-op \ 987c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wsign-compare \ 997c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wformat-security \ 1007c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wmissing-include-dirs \ 1017c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wformat-nonliteral \ 1027c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wold-style-definition \ 1037c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wpointer-arith \ 1047c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Winit-self \ 1057c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wdeclaration-after-statement \ 1067c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wfloat-equal \ 1077c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wmissing-prototypes \ 1087c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wstrict-prototypes \ 1097c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wredundant-decls \ 1107c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wmissing-declarations \ 1117c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wmissing-noreturn \ 1127c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wshadow \ 1137c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wendif-labels \ 1147c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wstrict-aliasing=2 \ 1157c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wwrite-strings \ 1167c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wno-long-long \ 1177c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wno-overlength-strings \ 1187c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wno-unused-parameter \ 1197c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wno-missing-field-initializers \ 1207c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wno-unused-result \ 1217c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wnested-externs \ 1227c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wchar-subscripts \ 1237c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wtype-limits \ 1247c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wuninitialized \ 1257c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -fno-common \ 1267c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -fdiagnostics-show-option \ 1277c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -fvisibility=hidden \ 1287c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -ffunction-sections \ 1297c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -fdata-sections \ 1307c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wl,--as-needed \ 1317c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi -Wl,--gc-sections]) 132822ce2344d6ad36ce0f186e48c120f939a7915b6Gustavo Sverzut Barbieri 133ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_CONFIG_HEADERS(config.h) 134ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_CONFIG_FILES([ 135ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi Makefile 136904b57d022b0187bc5c6eeeacf2d5bf566ca8881Lucas De Marchi man/Makefile 137646b83b841a4591d00223cda14ce1530ec4dbd39Lucas De Marchi libkmod/docs/Makefile 138646b83b841a4591d00223cda14ce1530ec4dbd39Lucas De Marchi libkmod/docs/version.xml 139ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi]) 140ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 1414fb900c09e511cfcb652900deb40f0592a2c8aaaLucas De Marchim4_ifdef([GTK_DOC_CHECK], [ 142646b83b841a4591d00223cda14ce1530ec4dbd39Lucas De MarchiGTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) 1434fb900c09e511cfcb652900deb40f0592a2c8aaaLucas De Marchi], [ 1444fb900c09e511cfcb652900deb40f0592a2c8aaaLucas De MarchiAM_CONDITIONAL([ENABLE_GTK_DOC], false)]) 145646b83b841a4591d00223cda14ce1530ec4dbd39Lucas De Marchi 146ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_OUTPUT 147ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De MarchiAC_MSG_RESULT([ 148ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi $PACKAGE $VERSION 14963dc83291ce40db54dc3f1f2c9ee11d51b3af514Lucas De Marchi ====== 150ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 151ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi prefix: ${prefix} 152a308abec371364eec8344681cfe1fb50d624e43eKay Sievers rootprefix: ${rootprefix} 153ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi sysconfdir: ${sysconfdir} 154ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi libdir: ${libdir} 155e79bf83b0648a44585dc5960f7022a9a8f4ab40cKay Sievers rootlibdir: ${rootlibdir} 156ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi includedir: ${includedir} 1577c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi bindir: ${bindir} 158ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 159ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi compiler: ${CC} 160ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi cflags: ${CFLAGS} 161ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi ldflags: ${LDFLAGS} 162ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi 1637c41c2dd8c1357d10cdee912c43614fa47c8d4ecLucas De Marchi tools: ${enable_tools} 164ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi logging: ${enable_logging} 165b182f8fb5e5765dd5c935aa7b3775e382662b318Jan Engelhardt compression: xz=${with_xz} zlib=${with_zlib} 166ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi debug: ${enable_debug} 167646b83b841a4591d00223cda14ce1530ec4dbd39Lucas De Marchi doc: ${enable_gtk_doc} 168ecd40ee4992009e8b49f2f8088dd9ab896802ecLucas De Marchi]) 169