wireless-ap: Allow to disable DFS in configuration
[people/ms/network.git] / configure.ac
CommitLineData
5ca9dc30
MT
1###############################################################################
2# #
3# Pakfire - The IPFire package management system #
4# Copyright (C) 2013 IPFire Network Development Team #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21AC_PREREQ([2.64])
22
23AC_INIT([network],
af91a344 24 [011],
5ca9dc30
MT
25 [info@ipfire.org],
26 [network],
27 [http://www.ipfire.org/])
28
29AC_CONFIG_AUX_DIR([build-aux])
30
31AC_PREFIX_DEFAULT([/usr])
32
33AM_INIT_AUTOMAKE([
34 foreign
35 1.11
36 -Wall
37 -Wno-portability
38 silent-rules
39 tar-pax
40 subdir-objects
41])
42AM_SILENT_RULES([yes])
43
01f2b2e4
MT
44LT_INIT([
45 disable-static
46 pic-only
47])
48
5ca9dc30
MT
49AC_PROG_LN_S
50AC_PROG_MKDIR_P
51AC_PROG_SED
52
1908d2b3 53AC_PATH_PROG([NITSI], [nitsi])
c4966dd6 54AC_PATH_PROG([WGET], [wget])
5ca9dc30
MT
55AC_PATH_PROG([XSLTPROC], [xsltproc])
56
57# pkg-config
58PKG_PROG_PKG_CONFIG
59# This makes sure pkg.m4 is available.
60m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
61
e708653f
SS
62# C Compiler
63AC_PROG_CC
64AC_PROG_CC_C99
65AC_PROG_CC_C_O
66AC_PROG_GCC_TRADITIONAL
67
68CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
69 -pipe \
70 -Wall \
71 -Wextra \
72 -Wno-inline \
73 -Wundef \
74 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
75 -Wno-unused-parameter \
76 -Wno-unused-result \
77 -fno-strict-aliasing \
78 -ffunction-sections \
79 -fdata-sections \
80 -fstack-protector-all \
81 --param=ssp-buffer-size=4])
82AC_SUBST([OUR_CFLAGS], $with_cflags)
83
84AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
85 [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
86 -Wp,-D_FORTIFY_SOURCE=2])],
87 [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
88AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
89
90CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
91 -Wl,--as-needed \
92 -Wl,--no-undefined \
93 -Wl,--gc-sections \
94 -Wl,-z,relro \
95 -Wl,-z,now])
96AC_SUBST([OUR_LDFLAGS], $with_ldflags)
97
0e880048
MT
98# ------------------------------------------------------------------------------
99
100AC_CHECK_HEADERS_ONCE([
6f4814db 101 ctype.h
0e880048 102 errno.h
c07b958a 103 linux/netlink.h
d1f1b577 104 net/if.h
6f4814db
MT
105 stdarg.h
106 stdio.h
0e880048 107 stdlib.h
6f4814db
MT
108 string.h
109 syslog.h
110])
111
112AC_CHECK_FUNCS([ \
113 __secure_getenv \
114 secure_getenv \
0e880048
MT
115])
116
e145b2f3
MT
117# ------------------------------------------------------------------------------
118
119AC_ARG_ENABLE([debug],
120 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
121 [], [enable_debug=no])
122AS_IF([test "x$enable_debug" = "xyes"], [
123 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
124])
125
5ca9dc30
MT
126# ------------------------------------------------------------------------------
127AC_ARG_WITH([systemdsystemunitdir],
128 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
129 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
130AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
131AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
132
133# ------------------------------------------------------------------------------
134AC_ARG_WITH([udevdir],
135 AS_HELP_STRING([--with-udevdir=DIR], [Directory for udev files]),
136 [], [with_udevdir=$($PKG_CONFIG --variable=udevdir udev)])
137AC_SUBST([udevdir], [$with_udevdir])
138AM_CONDITIONAL(HAVE_UDEV, [test -n "$with_udevdir"])
139
140# ------------------------------------------------------------------------------
db0a2d76
MT
141
142PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0])
143
144# ------------------------------------------------------------------------------
145
01f2b2e4 146AC_CONFIG_HEADERS(config.h)
5ca9dc30
MT
147AC_CONFIG_FILES([
148 Makefile
149])
150
151AC_OUTPUT
152AC_MSG_RESULT([
153 $PACKAGE_NAME $VERSION
154
e708653f
SS
155 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
156 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
157 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
158
5ca9dc30
MT
159 prefix: $prefix
160
161 systemdsystemunitdir: $systemdsystemunitdir
162 udevdir: $udevdir
163])