~ubuntu-branches/ubuntu/vivid/kmod/vivid

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-09-21 16:05:32 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120921160532-bdsxhmpj5og2ru5h
Tags: 9-2ubuntu1
* Sync with Debian unstable; remaining Ubuntu changes:
  - Ubuntu-specific depmod.d and modprobe.d contents.
  - Mark module-init-tools Multi-Arch: foreign.
  - Don't install Debian's extra/aliases.conf file.
  - Install upstart job instead of the sysvinit script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
AC_PREREQ(2.60)
2
2
AC_INIT([kmod],
3
 
        [5],
 
3
        [9],
4
4
        [linux-modules@vger.kernel.org],
5
5
        [kmod],
6
 
        [http://git.profusion.mobi/cgit.cgi/kmod.git/])
 
6
        [http://git.kernel.org/?p=utils/kernel/kmod/kmod.git])
7
7
 
8
8
AC_CONFIG_SRCDIR([libkmod/libkmod.c])
9
9
AC_CONFIG_AUX_DIR([build-aux])
18
18
LT_INIT([disable-static pic-only])
19
19
AC_PREFIX_DEFAULT([/usr])
20
20
 
 
21
#####################################################################
 
22
# Program checks and configurations
 
23
#####################################################################
 
24
 
21
25
AC_PROG_CC
22
26
AC_PROG_CC_C99
23
27
AC_C_TYPEOF
30
34
AC_PATH_PROG([XSLTPROC], [xsltproc])
31
35
PKG_PROG_PKG_CONFIG
32
36
 
 
37
 
 
38
#####################################################################
 
39
# Function and structure checks
 
40
#####################################################################
 
41
 
 
42
AC_CHECK_FUNCS_ONCE(__xstat)
 
43
 
 
44
# dietlibc doesn't have st.st_mtim struct member
 
45
AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
 
46
 
 
47
 
 
48
#####################################################################
 
49
# --with-
 
50
#####################################################################
 
51
 
33
52
AC_ARG_WITH([rootprefix],
34
53
        AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
35
54
        [], [with_rootprefix=""])
40
59
        [], [with_rootlibdir=$libdir])
41
60
AC_SUBST([rootlibdir], [$with_rootlibdir])
42
61
 
43
 
AC_ARG_ENABLE([tools],
44
 
        AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
45
 
        [], enable_tools=yes)
46
 
AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
47
 
 
48
 
AC_ARG_ENABLE([logging],
49
 
        AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
50
 
        [], enable_logging=yes)
51
 
AS_IF([test "x$enable_logging" = "xyes"], [
52
 
        AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
53
 
])
54
 
 
55
62
AC_ARG_WITH([xz],
56
63
        AS_HELP_STRING([--with-xz], [handle Xz-compressed modules @<:@default=disabled@:>@]),
57
64
        [], [with_xz=no])
72
79
        AC_MSG_NOTICE([zlib support not requested])
73
80
])
74
81
 
 
82
 
 
83
#####################################################################
 
84
# --enable-
 
85
#####################################################################
 
86
 
 
87
AC_ARG_ENABLE([tools],
 
88
        AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
 
89
        [], enable_tools=yes)
 
90
AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
 
91
 
 
92
AC_ARG_ENABLE([logging],
 
93
        AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
 
94
        [], enable_logging=yes)
 
95
AS_IF([test "x$enable_logging" = "xyes"], [
 
96
        AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
 
97
])
 
98
 
75
99
AC_ARG_ENABLE([debug],
76
100
        AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
77
101
        [], [enable_debug=no])
79
103
        AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
80
104
])
81
105
 
82
 
# dietlibc doesn't have st.st_mtim struct member
83
 
AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])
84
 
 
85
 
CC_CHECK_CFLAGS_APPEND([ \
86
 
                        -pipe \
87
 
                        -DANOTHER_BRICK_IN_THE \
88
 
                        -Wall \
89
 
                        -W \
90
 
                        -Wextra \
91
 
                        -Wno-inline \
92
 
                        -Wvla \
93
 
                        -Wundef \
94
 
                        -Wformat=2 \
95
 
                        -Wlogical-op \
96
 
                        -Wsign-compare \
97
 
                        -Wformat-security \
98
 
                        -Wmissing-include-dirs \
99
 
                        -Wformat-nonliteral \
100
 
                        -Wold-style-definition \
101
 
                        -Wpointer-arith \
102
 
                        -Winit-self \
103
 
                        -Wdeclaration-after-statement \
104
 
                        -Wfloat-equal \
105
 
                        -Wmissing-prototypes \
106
 
                        -Wstrict-prototypes \
107
 
                        -Wredundant-decls \
108
 
                        -Wmissing-declarations \
109
 
                        -Wmissing-noreturn \
110
 
                        -Wshadow \
111
 
                        -Wendif-labels \
112
 
                        -Wstrict-aliasing=2 \
113
 
                        -Wwrite-strings \
114
 
                        -Wno-long-long \
115
 
                        -Wno-overlength-strings \
116
 
                        -Wno-unused-parameter \
117
 
                        -Wno-missing-field-initializers \
118
 
                        -Wno-unused-result \
119
 
                        -Wnested-externs \
120
 
                        -Wchar-subscripts \
121
 
                        -Wtype-limits \
122
 
                        -Wuninitialized \
123
 
                        -fno-common \
124
 
                        -fdiagnostics-show-option \
125
 
                        -fvisibility=hidden \
126
 
                        -ffunction-sections \
127
 
                        -fdata-sections \
128
 
                        -Wl,--as-needed \
129
 
                        -Wl,--gc-sections])
 
106
m4_ifdef([GTK_DOC_CHECK], [
 
107
GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
 
108
], [
 
109
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
 
110
 
 
111
 
 
112
#####################################################################
 
113
# Default CFLAGS and LDFLAGS
 
114
#####################################################################
 
115
 
 
116
CC_CHECK_FLAGS_APPEND(with_cflags, [CFLAGS], [\
 
117
                       -pipe \
 
118
                       -DANOTHER_BRICK_IN_THE \
 
119
                       -Wall \
 
120
                       -W \
 
121
                       -Wextra \
 
122
                       -Wno-inline \
 
123
                       -Wvla \
 
124
                       -Wundef \
 
125
                       -Wformat=2 \
 
126
                       -Wlogical-op \
 
127
                       -Wsign-compare \
 
128
                       -Wformat-security \
 
129
                       -Wmissing-include-dirs \
 
130
                       -Wformat-nonliteral \
 
131
                       -Wold-style-definition \
 
132
                       -Wpointer-arith \
 
133
                       -Winit-self \
 
134
                       -Wdeclaration-after-statement \
 
135
                       -Wfloat-equal \
 
136
                       -Wmissing-prototypes \
 
137
                       -Wstrict-prototypes \
 
138
                       -Wredundant-decls \
 
139
                       -Wmissing-declarations \
 
140
                       -Wmissing-noreturn \
 
141
                       -Wshadow \
 
142
                       -Wendif-labels \
 
143
                       -Wstrict-aliasing=2 \
 
144
                       -Wwrite-strings \
 
145
                       -Wno-long-long \
 
146
                       -Wno-overlength-strings \
 
147
                       -Wno-unused-parameter \
 
148
                       -Wno-missing-field-initializers \
 
149
                       -Wno-unused-result \
 
150
                       -Wnested-externs \
 
151
                       -Wchar-subscripts \
 
152
                       -Wtype-limits \
 
153
                       -Wuninitialized \
 
154
                       -fno-common \
 
155
                       -fdiagnostics-show-option \
 
156
                       -fvisibility=hidden \
 
157
                       -ffunction-sections \
 
158
                       -fdata-sections])
 
159
AC_SUBST([WARNINGFLAGS], $with_cflags)
 
160
 
 
161
 
 
162
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [ \
 
163
                       -Wl,--as-needed \
 
164
                       -Wl,--gc-sections])
 
165
AC_SUBST([GCLDFLAGS], $with_ldflags)
 
166
 
 
167
#####################################################################
 
168
# Generate files from *.in
 
169
#####################################################################
130
170
 
131
171
AC_CONFIG_HEADERS(config.h)
132
172
AC_CONFIG_FILES([
136
176
        libkmod/docs/version.xml
137
177
])
138
178
 
139
 
m4_ifdef([GTK_DOC_CHECK], [
140
 
GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
141
 
], [
142
 
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
 
179
 
 
180
#####################################################################
143
181
 
144
182
AC_OUTPUT
145
183
AC_MSG_RESULT([
155
193
        bindir:                 ${bindir}
156
194
 
157
195
        compiler:               ${CC}
158
 
        cflags:                 ${CFLAGS}
159
 
        ldflags:                ${LDFLAGS}
 
196
        cflags:                 ${with_cflags} ${CFLAGS}
 
197
        ldflags:                ${with_ldflags} ${LDFLAGS}
160
198
 
161
199
        tools:                  ${enable_tools}
162
200
        logging:                ${enable_logging}