]> git.ipfire.org Git - thirdparty/kmod.git/blame - configure.ac
Lookup for commands in kmod_module_new_from_lookup()
[thirdparty/kmod.git] / configure.ac
CommitLineData
ecd40ee4 1AC_PREREQ(2.60)
cb48c9b2
LDM
2AC_INIT([kmod],
3 [1],
e17cc3af 4 [linux-modules@vger.kernel.org],
cb48c9b2
LDM
5 [kmod],
6 [http://git.profusion.mobi/cgit.cgi/kmod.git/])
586fc304
LDM
7
8AC_CONFIG_SRCDIR([libkmod/libkmod.c])
ecd40ee4 9AC_CONFIG_AUX_DIR([build-aux])
822ce234 10AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax dist-bzip2 subdir-objects])
ecd40ee4
LDM
11AC_PROG_CC_STDC
12AC_USE_SYSTEM_EXTENSIONS
13AC_SYS_LARGEFILE
14AC_CONFIG_MACRO_DIR([m4])
fe8bf3b0 15m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
ecd40ee4
LDM
16AM_SILENT_RULES([yes])
17LT_INIT([disable-static pic-only])
18AC_PREFIX_DEFAULT([/usr])
19
648a842b
LDM
20AC_PROG_CC
21AC_PROG_CC_C99
22AC_C_TYPEOF
23AM_PROG_CC_C_O
24AC_PROG_GCC_TRADITIONAL
25
72c51a9e
GSB
26AC_ARG_ENABLE([tools],
27 AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
28 [], enable_tools=yes)
29AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
30
ecd40ee4
LDM
31AC_ARG_ENABLE([logging],
32 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
33 [], enable_logging=yes)
34AS_IF([test "x$enable_logging" = "xyes"], [
35 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
36])
37
38AC_ARG_ENABLE([debug],
39 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
40 [], [enable_debug=no])
41AS_IF([test "x$enable_debug" = "xyes"], [
42 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
43])
44
822ce234 45CC_CHECK_CFLAGS_APPEND([ \
7c41c2dd
LDM
46 -pipe \
47 -Wall \
48 -W \
49 -Wextra \
50 -Wno-inline \
51 -Wvla \
52 -Wundef \
53 -Wformat=2 \
54 -Wlogical-op \
55 -Wsign-compare \
56 -Wformat-security \
57 -Wmissing-include-dirs \
58 -Wformat-nonliteral \
59 -Wold-style-definition \
60 -Wpointer-arith \
61 -Winit-self \
62 -Wdeclaration-after-statement \
63 -Wfloat-equal \
64 -Wmissing-prototypes \
65 -Wstrict-prototypes \
66 -Wredundant-decls \
67 -Wmissing-declarations \
68 -Wmissing-noreturn \
69 -Wshadow \
70 -Wendif-labels \
71 -Wcast-align \
72 -Wstrict-aliasing=2 \
73 -Wwrite-strings \
74 -Wno-long-long \
75 -Wno-overlength-strings \
76 -Wno-unused-parameter \
77 -Wno-missing-field-initializers \
78 -Wno-unused-result \
79 -Wnested-externs \
80 -Wchar-subscripts \
81 -Wtype-limits \
82 -Wuninitialized \
83 -Wp,-D_FORTIFY_SOURCE=2 \
84 -ffast-math \
85 -fno-common \
86 -fdiagnostics-show-option \
87 -fno-strict-aliasing \
88 -fvisibility=hidden \
89 -ffunction-sections \
90 -fdata-sections \
91 -Wl,--as-needed \
92 -Wl,--gc-sections])
822ce234
GSB
93
94
ecd40ee4
LDM
95AC_CONFIG_HEADERS(config.h)
96AC_CONFIG_FILES([
97 Makefile
586fc304 98 libkmod/libkmod.pc
ecd40ee4
LDM
99])
100
101AC_OUTPUT
102AC_MSG_RESULT([
103 $PACKAGE $VERSION
104 ========
105
106 prefix: ${prefix}
107 sysconfdir: ${sysconfdir}
108 libdir: ${libdir}
109 includedir: ${includedir}
7c41c2dd 110 bindir: ${bindir}
ecd40ee4
LDM
111
112 compiler: ${CC}
113 cflags: ${CFLAGS}
114 ldflags: ${LDFLAGS}
115
7c41c2dd 116 tools: ${enable_tools}
ecd40ee4
LDM
117 logging: ${enable_logging}
118 debug: ${enable_debug}
119])