]> git.ipfire.org Git - thirdparty/kmod.git/blob - configure.ac
Add address of mailing list
[thirdparty/kmod.git] / configure.ac
1 AC_PREREQ(2.60)
2 AC_INIT([kmod],
3 [1],
4 [linux-modules@vger.kernel.org],
5 [kmod],
6 [http://git.profusion.mobi/cgit.cgi/kmod.git/])
7
8 AC_CONFIG_SRCDIR([libkmod/libkmod.c])
9 AC_CONFIG_AUX_DIR([build-aux])
10 AM_INIT_AUTOMAKE([check-news foreign 1.11 silent-rules tar-pax dist-bzip2 subdir-objects])
11 AC_PROG_CC_STDC
12 AC_USE_SYSTEM_EXTENSIONS
13 AC_SYS_LARGEFILE
14 AC_CONFIG_MACRO_DIR([m4])
15 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
16 AM_SILENT_RULES([yes])
17 LT_INIT([disable-static pic-only])
18 AC_PREFIX_DEFAULT([/usr])
19
20 AC_PROG_CC
21 AC_PROG_CC_C99
22 AC_C_TYPEOF
23 AM_PROG_CC_C_O
24 AC_PROG_GCC_TRADITIONAL
25
26 AC_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)
29 AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
30
31 AC_ARG_ENABLE([logging],
32 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
33 [], enable_logging=yes)
34 AS_IF([test "x$enable_logging" = "xyes"], [
35 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
36 ])
37
38 AC_ARG_ENABLE([debug],
39 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
40 [], [enable_debug=no])
41 AS_IF([test "x$enable_debug" = "xyes"], [
42 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
43 ])
44
45 CC_CHECK_CFLAGS_APPEND([ \
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])
93
94
95 AC_CONFIG_HEADERS(config.h)
96 AC_CONFIG_FILES([
97 Makefile
98 libkmod/libkmod.pc
99 ])
100
101 AC_OUTPUT
102 AC_MSG_RESULT([
103 $PACKAGE $VERSION
104 ========
105
106 prefix: ${prefix}
107 sysconfdir: ${sysconfdir}
108 libdir: ${libdir}
109 includedir: ${includedir}
110 bindir: ${bindir}
111
112 compiler: ${CC}
113 cflags: ${CFLAGS}
114 ldflags: ${LDFLAGS}
115
116 tools: ${enable_tools}
117 logging: ${enable_logging}
118 debug: ${enable_debug}
119 ])