forked from aircrack-ng/aircrack-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
328 lines (288 loc) · 8.33 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
# Aircrack-ng
#
# Copyright (C) 2017-2020 Joseph Benden <joe@benden.us>
#
# Autotool support was written by: Joseph Benden <joe@benden.us>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the
# OpenSSL library under certain conditions as described in each
# individual source file, and distribute linked combinations
# including the two.
#
# You must obey the GNU General Public License in all respects
# for all of the code used other than OpenSSL.
#
# If you modify file(s) with this exception, you may extend this
# exception to your # version of the file(s), but you are not obligated
# to do so.
#
# If you # do not wish to do so, delete this exception statement from your
# version.
#
# If you delete this exception statement from all source files in the
# program, then also delete it here.
m4_define([version_date], "January 2020")
m4_define([version_major], 1)
m4_define([version_minor], 6)
m4_define([version_micro], 0)
m4_define([version_beta], 0)
m4_define([version_rc], 0)
m4_define([version_scm],[m4_translit(m4_esyscmd([$(pwd)/evalrev . scm || echo]),m4_newline)])
m4_define([version_triplet],version_major.version_minor.version_micro)
m4_append([version_triplet],version_scm)
AC_PREREQ([2.52])
AC_INIT([aircrack-ng],
[version_triplet],
[https://forum.aircrack-ng.org])
#
# Cross-Compilation
#
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
#
# Initialize Automake
#
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([build/m4/stubs])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.14 dist-bzip2 dist-zip foreign subdir-objects])
AM_MAINTAINER_MODE([enable])
AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/stubs -I build/m4 \${ACLOCAL_FLAGS}"])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
#
# Ensure MAKE is GNU compatible
#
if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
AC_MSG_ERROR([you don't seem to have GNU make; it is required])
fi
#
# Find tooling
#
AIRCRACK_NG_PROG_CC
AIRCRACK_NG_PROG_CXX
AC_PROG_INSTALL
AM_PROG_AS
PKG_PROG_PKG_CONFIG
AM_PROG_CC_C_O
AC_C_CONST
AC_HEADER_STDC
AC_CHECK_HEADERS([locale.h stdio.h stdarg.h fcntl.h malloc.h stdlib.h string.h strings.h unistd.h sys/stat.h getopt.h sys/time.h sys/types.h dirent.h])
#
# Set versioning detail
#
AC_SUBST([_MAJ], [version_major])
AC_SUBST([_MIN], [version_minor])
AC_SUBST([_SUB_MIN], [version_micro])
AC_SUBST([_BETA], [version_beta])
AC_SUBST([_RC], [version_rc])
AC_SUBST([_SCM], [version_scm])
AC_SUBST([LT_VER], [version_major.version_minor.version_micro])
AC_SUBST([MAN_RELEASE_DATE], [version_date])
AC_SUBST([MAN_RELEASE_VERSION], ["Version version_triplet"])
AC_DEFINE([_REVISION], ["version_triplet"], [The version information of the project])
AC_DEFINE([LT_CYGWIN_VER], ["-version_major-version_minor-version_micro.dll"], [The Cygwin DLL version string suffix])
#
# Initialize libtool
#
LT_INIT([win32-dll disable-static shared])
#
# Operating Systems
#
AIRCRACK_NG_MAC
AIRCRACK_NG_WINDOWS
AIRCRACK_NG_OS_DETECT
#
# Required
#
AIRCRACK_NG_CRYPTO
AIRCRACK_NG_ETHTOOL
AIRCRACK_NG_LIBNL
#
# Optional
#
AIRCRACK_NG_AIRPCAP
AIRCRACK_NG_EXPECT
AIRCRACK_NG_EXPERIMENTAL
AIRCRACK_NG_EXT_SCRIPTS
AIRCRACK_NG_HWLOC
AIRCRACK_NG_PCAP
AIRCRACK_NG_PCRE
AIRCRACK_NG_RFKILL
AIRCRACK_NG_SQLITE
AIRCRACK_NG_ZLIB
PKG_CHECK_MODULES([CMOCKA], [cmocka], [
CMOCKA_FOUND=yes
AC_SUBST([CMOCKA_CFLAGS])
AC_SUBST([CMOCKA_LIBS])
], [CMOCKA_FOUND=no])
#
# Extras, but needed
#
AIRCRACK_NG_LARGEFILE
dnl AX_ADD_FORTIFY_SOURCE
AIRCRACK_NG_PTHREAD
AX_LIB_SOCKET_NSL
AC_CHECK_LIB([dl], [dlopen], [ LIBS="$LIBS -ldl" ], [:])
AC_CHECK_LIB([m], [sin], [ LIBS="$LIBS -lm" ], [:])
AIRCRACK_NG_COMPAT
saved_cflags="$CFLAGS"
CFLAGS=""
AC_CHECK_FUNCS([posix_memalign aligned_alloc memalign __mingw_aligned_malloc _aligned_malloc], break)
CFLAGS="$saved_cflags"
#
# Code Coverage Support
#
AIRCRACK_NG_CODE_COVERAGE
#
# Valgrind Support
#
AX_VALGRIND_CHECK
#
# Compiler set-up
#
AIRCRACK_NG_COMPILER_C
AIRCRACK_NG_COMPILER_CXX
#
# Processor feature selection/detection
#
AIRCRACK_NG_SIMD_C
AIRCRACK_NG_SIMD_CXX
#
# Optional analyzers
#
AIRCRACK_NG_ASAN
AIRCRACK_NG_DUMA
AIRCRACK_NG_JEMALLOC
AIRCRACK_NG_TCMALLOC
AIRCRACK_NG_TSAN
#
# Automake
#
AM_CONDITIONAL([HAVE_AIRPCAP_OR_PCAP], [test "$AIRPCAP" = yes -o "$PCAP_FOUND" = yes])
AM_CONDITIONAL([MULTIBIN], [test "$with_multibin" = yes])
AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], [test "nope" = yes]) # for glib tests
AM_CONDITIONAL([CMOCKA], [test "$CMOCKA_FOUND" = yes])
AM_CONDITIONAL([STATIC_BUILD], [test "$enable_static" = yes])
AM_CONDITIONAL([EXPECT], [test "$EXPECT_FOUND" = yes])
#
# Save flags for build summary
#
summary_cflags="$CFLAGS"
summary_cxxflags="$CXXFLAGS"
summary_cppflags="$CPPFLAGS"
summary_libs="$LIBS"
#
# Set final flags for build
#
CFLAGS="$opt_cflags $CFLAGS"
CPPFLAGS="$opt_cppflags $CPPFLAGS"
CXXFLAGS="$opt_cxxflags $CXXFLAGS"
LDFLAGS="$opt_ldflags $LDFLAGS"
LIBS="$opt_libs $LIBS"
#
# Generate all build files
#
AC_CONFIG_FILES([
Makefile
VERSION
include/aircrack-ng/version.h
manpages/airbase-ng.8
manpages/aircrack-ng.1
manpages/airdecap-ng.1
manpages/airdecloak-ng.1
manpages/aireplay-ng.8
manpages/airmon-ng.8
manpages/airodump-ng.8
manpages/airodump-ng-oui-update.8
manpages/airolib-ng.1
manpages/airserv-ng.8
manpages/airtun-ng.8
manpages/airventriloquist-ng.8
manpages/besside-ng.8
manpages/besside-ng-crawler.1
manpages/buddy-ng.1
manpages/easside-ng.8
manpages/ivstools.1
manpages/kstats.1
manpages/Makefile
manpages/makeivs-ng.1
manpages/packetforge-ng.1
manpages/tkiptun-ng.8
manpages/wesside-ng.8
manpages/wpaclean.1
scripts/Makefile
scripts/airdrop-ng/Makefile
scripts/airdrop-ng/doc/Makefile
scripts/airgraph-ng/Makefile
scripts/airgraph-ng/man/Makefile
scripts/versuck-ng/Makefile
test/test-env.sh
])
AC_OUTPUT
#
# Output a summary of the build to be performed
#
cat <<EOF
${PACKAGE} ${VERSION}
Build Environment:
Build Machine: ${build}
Host Machine: ${host}
Target Machine: ${target}
Install Prefix: ${prefix}
Compiler Environment:
C Compiler: ${CC}
C++ Compiler: ${CXX}
Python: ${PYTHON}
CFLAGS: ${summary_cflags}
CXXFLAGS: ${summary_cxxflags}
CPPFLAGS: ${summary_cppflags}
LDFLAGS: ${LDFLAGS}
LIBS: ${summary_libs}
Optimized CFLAGS: ${opt_cflags}
Optimized CXXFLAGS: ${opt_cxxflags}
Optimized CPPFLAGS: ${opt_cppflags}
Optimized LDFLAGS: ${opt_ldflags}
Optimized LIBS: ${opt_libs}
Target Environment:
OS: ${OS}
ASAN: ${asan}
CPU L1 cache-line size: ${CACHELINE_SIZE}
Crypto Libraries:
Crypto Engine: ${CRYPTO_TYPE}
Gcrypt: ${GCRYPT_LIBS}
OpenSSL: ${OPENSSL_LIBS}
Required Libraries:
Ethtool: ${ETHTOOL_FOUND}
Libnl: ${NLLIBNAME_FOUND}
Optional Libraries:
Airpcap: ${AIRPCAP}
Cmocka: ${CMOCKA_FOUND}
DUMA: ${DUMA}
Hwloc: ${HAVE_HWLOC}
Jemalloc: ${JEMALLOC}
Pcap: ${PCAP_FOUND}
Pcre: ${HAVE_PCRE}
Sqlite: ${HAVE_SQLITE3}
Tcmalloc: ${TCMALLOC}
Zlib: ${HAVE_ZLIB}
Features:
CMAC Support: ${HAVE_CMAC}
Experimental Extra Scripts: ${EXT_SCRIPTS}
Experimental Features: ${EXPERIMENTAL}
EOF