File: configure.ac

package info (click to toggle)
aircrack-ng 1%3A1.5.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,416 kB
  • sloc: ansic: 67,243; cs: 5,392; python: 2,619; sh: 2,102; makefile: 1,001; asm: 569; cpp: 69
file content (273 lines) | stat: -rw-r--r-- 6,691 bytes parent folder | download
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
# Aircrack-ng
#
# Copyright (C) 2017 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.

# FIXME: MULTIBIN implementation in here and src/Makefile.am

AC_PREREQ(2.52)
AC_INIT([aircrack-ng],
    [m4_translit(m4_esyscmd([./evalrev || cat ./VERSION]),m4_newline)],
    [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])

AM_INIT_AUTOMAKE([1.10 dist-bzip2 dist-zip foreign])
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])])

#
# Find tooling
#
AIRCRACK_NG_PROG_CC
AIRCRACK_NG_PROG_CXX
AC_PROG_INSTALL
AM_PROG_AS
PKG_PROG_PKG_CONFIG

LT_INIT([win32-dll disable-static shared])

#
# Operating Systems
#
AIRCRACK_NG_MAC
AIRCRACK_NG_WINDOWS
AIRCRACK_NG_OS_DETECT

#
# Extra versioning
#
AIRCRACK_NG_REVISION

#
# Required
#
AIRCRACK_NG_CRYPTO
AIRCRACK_NG_ETHTOOL
AIRCRACK_NG_LIBNL

#
# Optional
#
AIRCRACK_NG_AIRPCAP
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
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" ], [:])
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])

#
# 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"
LIBS="$opt_libs $LIBS"

#
# Generate all build files
#
AC_OUTPUT([
Makefile

manpages/Makefile

scripts/Makefile
scripts/airdrop-ng/Makefile
scripts/airdrop-ng/doc/Makefile
scripts/airgraph-ng/Makefile
scripts/airgraph-ng/man/Makefile
scripts/versuck-ng/Makefile

src/Makefile
src/aircrack-crypto/Makefile
src/aircrack-util/Makefile
src/include/Makefile
src/aircrack-osdep/Makefile
src/aircrack-osdep/radiotap/Makefile

test/Makefile
test/test-env.sh
test/cryptounittest/Makefile
test/unit/Makefile
])

#
# 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 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