]> git.ipfire.org Git - thirdparty/kmod.git/blob - configure.ac
beef compile flags.
[thirdparty/kmod.git] / configure.ac
1 AC_PREREQ(2.60)
2 AC_INIT([libkmod],
3 [0.1],
4 [],
5 [libkmod],
6 [http://git.profusion.mobi/cgit.cgi/lucas/libkmod/])
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 AM_SILENT_RULES([yes])
16 LT_INIT([disable-static pic-only])
17 AC_PREFIX_DEFAULT([/usr])
18
19 AC_PROG_CC
20 AC_PROG_CC_C99
21 AC_C_TYPEOF
22 AM_PROG_CC_C_O
23 AC_PROG_GCC_TRADITIONAL
24
25 AC_ARG_ENABLE([logging],
26 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
27 [], enable_logging=yes)
28 AS_IF([test "x$enable_logging" = "xyes"], [
29 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
30 ])
31
32 AC_ARG_ENABLE([debug],
33 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
34 [], [enable_debug=no])
35 AS_IF([test "x$enable_debug" = "xyes"], [
36 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
37 ])
38
39 CC_CHECK_CFLAGS_APPEND([ \
40 -pipe \
41 -Wall \
42 -W \
43 -Wextra \
44 -Wno-inline \
45 -Wvla \
46 -Wundef \
47 -Wformat=2 \
48 -Wlogical-op \
49 -Wsign-compare \
50 -Wformat-security \
51 -Wmissing-include-dirs \
52 -Wformat-nonliteral \
53 -Wold-style-definition \
54 -Wpointer-arith \
55 -Winit-self \
56 -Wdeclaration-after-statement \
57 -Wfloat-equal \
58 -Wmissing-prototypes \
59 -Wstrict-prototypes \
60 -Wredundant-decls \
61 -Wmissing-declarations \
62 -Wmissing-noreturn \
63 -Wshadow \
64 -Wendif-labels \
65 -Wcast-align \
66 -Wstrict-aliasing=2 \
67 -Wwrite-strings \
68 -Wno-long-long \
69 -Wno-overlength-strings \
70 -Wno-unused-parameter \
71 -Wno-missing-field-initializers \
72 -Wno-unused-result \
73 -Wp,-D_FORTIFY_SOURCE=2 \
74 -ffast-math \
75 -fno-common \
76 -fdiagnostics-show-option \
77 -fno-strict-aliasing \
78 -fvisibility=hidden \
79 -ffunction-sections \
80 -fdata-sections \
81 -Wl,--as-needed \
82 -Wl,--gc-sections])
83
84
85 AC_CONFIG_HEADERS(config.h)
86 AC_CONFIG_FILES([
87 Makefile
88 libkmod/libkmod.pc
89 ])
90
91 AC_OUTPUT
92 AC_MSG_RESULT([
93 $PACKAGE $VERSION
94 ========
95
96 prefix: ${prefix}
97 sysconfdir: ${sysconfdir}
98 libdir: ${libdir}
99 includedir: ${includedir}
100
101 compiler: ${CC}
102 cflags: ${CFLAGS}
103 ldflags: ${LDFLAGS}
104
105 logging: ${enable_logging}
106 debug: ${enable_debug}
107 ])