nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | # |
2 | # Autoconf script for Wireshark |
||
3 | # |
||
4 | |||
5 | # |
||
6 | # Define variables for the components of the Wireshark version number. |
||
7 | # |
||
8 | m4_define([version_major], [2]) |
||
9 | m4_define([version_minor], [2]) |
||
10 | m4_define([version_micro], [3]) |
||
11 | dnl Updated by make-version.pl |
||
12 | m4_define([version_extra], []) |
||
13 | m4_define([version_micro_extra], m4_join([], version_micro, version_extra)) |
||
14 | |||
15 | AC_INIT(Wireshark, [version_major.version_minor.version_micro_extra], http://bugs.wireshark.org/, , http://www.wireshark.org/) |
||
16 | CONFIG_ARGS="$*" |
||
17 | AC_SUBST(CONFIG_ARGS) |
||
18 | |||
19 | # Minimum autoconf version we require. |
||
20 | AC_PREREQ(2.64) |
||
21 | # Variable expansion doesn't work in AC_PREREQ() |
||
22 | AC_MIN_VERSION=2.64 |
||
23 | AC_SUBST(AC_MIN_VERSION) |
||
24 | |||
25 | dnl Make sure to keep ACLOCAL_AMFLAGS in Makefile.am and AC_CONFIG_MACRO_DIRS |
||
26 | dnl in configure.ac in sync, otherwise there will be an error running autogen.sh. |
||
27 | m4_ifdef([AC_CONFIG_MACRO_DIRS],[AC_CONFIG_MACRO_DIRS([m4])]) |
||
28 | |||
29 | dnl Check for CPU / vendor / OS |
||
30 | dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or |
||
31 | dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the |
||
32 | dnl needs. Using `AC_CANONICAL_TARGET' is enough to run the two other |
||
33 | dnl macros. |
||
34 | dnl |
||
35 | dnl As nothing in the Wireshark is itself a build tool (we are not, |
||
36 | dnl for example, a compiler that generates machine code), we probably |
||
37 | dnl don't need AC_CANONICAL_TARGET, so, in theory, we should be able |
||
38 | dnl to use AC_CANONICAL_BUILD and AC_CANONICAL_HOST - or perhaps just |
||
39 | dnl AC_CANONICAL_HOST - instead. Note that we do have tools, such as |
||
40 | dnl lemon, that need to be built for the build machine, not for the |
||
41 | dnl host machine, so we might need both. |
||
42 | dnl |
||
43 | dnl This has to be done *after* AC_INIT, otherwise autogen.sh fails. |
||
44 | |||
45 | dnl AC_CANONICAL_BUILD |
||
46 | dnl AC_CANONICAL_HOST |
||
47 | AC_CANONICAL_TARGET |
||
48 | |||
49 | AM_INIT_AUTOMAKE([1.11 tar-ustar dist-bzip2 no-dist-gzip subdir-objects]) |
||
50 | |||
51 | # Enable silent builds by default. Verbose builds can be enabled with "./configure |
||
52 | # --enable-silent-rules ..." or "make V=1 ..." |
||
53 | AM_SILENT_RULES([yes]) |
||
54 | |||
55 | # Make Wireshark's version available in config.h |
||
56 | AC_DEFINE(VERSION_MAJOR, version_major, [Wireshark's major version]) |
||
57 | AC_DEFINE(VERSION_MINOR, version_minor, [Wireshark's minor version]) |
||
58 | AC_DEFINE(VERSION_MICRO, version_micro, [Wireshark's micro version]) |
||
59 | |||
60 | dnl AC_DEFINE_UNQUOTED(VERSION_FLAVOR, |
||
61 | dnl ["${WIRESHARK_VERSION_FLAVOR:-"Development Build"}"], [Wireshark's package flavor]) |
||
62 | |||
63 | LT_PREREQ([2.2.2]) |
||
64 | LT_INIT([disable-static dlopen]) |
||
65 | AC_SUBST([LIBTOOL_DEPS]) |
||
66 | |||
67 | AC_CONFIG_LIBOBJ_DIR([wsutil]) |
||
68 | |||
69 | # |
||
70 | # Checks for programs used in the main build process. |
||
71 | # |
||
72 | AC_PROG_CC_STDC |
||
73 | if test "$ac_cv_prog_cc_stdc" = "no" |
||
74 | then |
||
75 | AC_MSG_ERROR([The C compiler does not support standard C]) |
||
76 | fi |
||
77 | AC_PROG_CPP |
||
78 | |||
79 | AC_PROG_CXX |
||
80 | if test ! -z "$CXX"; then |
||
81 | # |
||
82 | # OK, we found something AC_LANG_CXX thinks is a C++ compiler, |
||
83 | # but is it one? |
||
84 | # |
||
85 | # Some UN*Xes have, by default, a case-insensitive file |
||
86 | # system, and AC_PROG_CXX looks for, among other things, |
||
87 | # "CC" as a C++ compiler, and, if you have a case-insensitive |
||
88 | # file system and a C compiler named "cc" (both true, by |
||
89 | # default, on OS X), AC_PROG_CXX may end up thinking it's |
||
90 | # the C++ compiler. |
||
91 | # |
||
92 | # So we check by feeding the purported C++ compiler a |
||
93 | # program using C++ features (iostream). |
||
94 | # |
||
95 | AC_MSG_CHECKING(whether $CXX is a C++ compiler) |
||
96 | AC_LANG_PUSH([C++]) |
||
97 | AC_LINK_IFELSE([AC_LANG_PROGRAM( |
||
98 | [ |
||
99 | #include <iostream> |
||
100 | ], |
||
101 | [ |
||
102 | std::cout << "Hello World! "; |
||
103 | return 0; |
||
104 | ])], |
||
105 | [AC_MSG_RESULT(yes)], |
||
106 | [ |
||
107 | AC_MSG_RESULT(no) |
||
108 | CXX="" |
||
109 | ]) |
||
110 | AC_LANG_POP([C++]) |
||
111 | fi |
||
112 | |||
113 | # Qt 5.7 or later requires C++11 |
||
114 | AS_IF([test -n "$CXX"], |
||
115 | [AX_CXX_COMPILE_STDCXX([11], [noext], [optional])]) |
||
116 | |||
117 | # Set CC_FOR_BUILD (the *local* gcc to use for building e.g. lemon) |
||
118 | if test "x$cross_compiling" = xno -a -z "$CC_FOR_BUILD"; then |
||
119 | CC_FOR_BUILD="$CC" |
||
120 | fi |
||
121 | AX_PROG_CC_FOR_BUILD |
||
122 | |||
123 | # |
||
124 | # Check for versions of "sed" inadequate to handle, in libtool, a list |
||
125 | # of object files as large as the list in Wireshark. |
||
126 | # |
||
127 | AC_PROG_SED |
||
128 | |||
129 | AC_PROG_LN_S |
||
130 | AC_PROG_MKDIR_P |
||
131 | |||
132 | AC_PATH_PROG(PERL, perl) |
||
133 | |||
134 | # Check for Python. |
||
135 | AC_PATH_PROGS(PYTHON, python python3) |
||
136 | if test ! -z "$PYTHON"; then |
||
137 | # |
||
138 | # OK, we found Python; is it Python 2.5 or later? |
||
139 | # Note: we don't use named components for sys.version_info to get |
||
140 | # the major version number, as named components for version_info |
||
141 | # were apparently introduced in Python 2.7. |
||
142 | # |
||
143 | AC_MSG_CHECKING([whether $PYTHON is Python 2.5 or later]) |
||
144 | python_major_version=`$PYTHON -c 'import sys; print (sys.version_info[[0]])'` |
||
145 | python_minor_version=`$PYTHON -c 'import sys; print (sys.version_info[[1]])'` |
||
146 | if test "$python_major_version" -eq 2 -a "$python_minor_version" -lt 5 ; then |
||
147 | AC_MSG_RESULT(no) |
||
148 | AC_MSG_WARN([Building with Python $python_major_version.$python_minor_version may not work]) |
||
149 | else |
||
150 | AC_MSG_RESULT(yes) |
||
151 | fi |
||
152 | else |
||
153 | AC_MSG_ERROR(I couldn't find python; make sure it's installed and in your path) |
||
154 | fi |
||
155 | |||
156 | dnl |
||
157 | dnl Check for yacc/lex. Distribution tarballs include generated source, |
||
158 | dnl in which case these tools are not a mandatory requirement to build. |
||
159 | dnl |
||
160 | AC_PROG_YACC |
||
161 | AS_IF([test "x$YACC" = xyacc], [AS_UNSET(YACC)]) |
||
162 | AS_IF([test -z "$YACC" -a ! -f $srcdir/wiretap/ascend.c], |
||
163 | [AC_MSG_ERROR([I couldn't find bison or byacc; make sure it's installed and in your path])]) |
||
164 | AM_MISSING_PROG(YACC, bison) |
||
165 | AC_PROG_LEX |
||
166 | AS_IF([test "x$LEX" != xflex], [AS_UNSET(LEX)]) |
||
167 | AS_IF([test -z "$LEX" -a ! -f $srcdir/wiretap/ascend_scanner.c], |
||
168 | [AC_MSG_ERROR([I couldn't find flex; make sure it's installed and in your path])]) |
||
169 | AM_MISSING_PROG(LEX, flex) |
||
170 | |||
171 | AC_PATH_PROG(POD2MAN, pod2man) |
||
172 | if test "x$POD2MAN" = x |
||
173 | then |
||
174 | # |
||
175 | # The alternative is not to build the man pages.... |
||
176 | # |
||
177 | AC_MSG_ERROR(I couldn't find pod2man; make sure it's installed and in your path) |
||
178 | fi |
||
179 | AC_PATH_PROG(POD2HTML, pod2html) |
||
180 | if test "x$POD2HTML" = x |
||
181 | then |
||
182 | # |
||
183 | # The alternative is not to build the HTML man pages.... |
||
184 | # |
||
185 | AC_MSG_ERROR(I couldn't find pod2html; make sure it's installed and in your path) |
||
186 | fi |
||
187 | |||
188 | # |
||
189 | # Set "ac_supports_gcc_flags" if the compiler is known to support GCC-style |
||
190 | # flags such as -pedantic, -W warning flags and -f feature flags. Currently, |
||
191 | # we assume GCC and clang do; other compilers should be added here. |
||
192 | # |
||
193 | # This is done to avoid getting tripped up by compilers that support |
||
194 | # those flags but give them a different meaning. |
||
195 | # |
||
196 | if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then |
||
197 | ac_supports_gcc_flags=yes |
||
198 | fi |
||
199 | |||
200 | # Check for doxygen |
||
201 | AC_PATH_PROG(DOXYGEN, doxygen) |
||
202 | AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no") |
||
203 | AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes) |
||
204 | |||
205 | # |
||
206 | # Check for pkg-config and set PKG_CONFIG accordingly. |
||
207 | # |
||
208 | # This is referenced via AC_REQUIRE([PKG_PROG_PKG_CONFIG] in some macros |
||
209 | # like PKG_CHECK_MODULES. If the first call to such a macro is under an |
||
210 | # "if" statement, it's safer to call PKG_PROG_PKG_CONFIG directly, see |
||
211 | # the comments in acolocal.m4 |
||
212 | # |
||
213 | # We want version 0.7 or better. (XXX - explain why. Is that just |
||
214 | # because our Qt tests were originally based on AM_PATH_GTK, and *it* |
||
215 | # requires 0.7 or better?) |
||
216 | # |
||
217 | PKG_PROG_PKG_CONFIG(0.7) |
||
218 | if test -z "$PKG_CONFIG"; then |
||
219 | AC_MSG_ERROR(I couldn't find pkg-config; make sure it's installed and in your path) |
||
220 | fi |
||
221 | |||
222 | # |
||
223 | # Add configure argument to select OSX deployment target. |
||
224 | # |
||
225 | AC_WIRESHARK_OSX_DEPLOY_TARGET |
||
226 | |||
227 | # |
||
228 | # Try to arrange for large file support. |
||
229 | # |
||
230 | AC_SYS_LARGEFILE |
||
231 | |||
232 | # |
||
233 | # Check if we need to link with libm |
||
234 | # |
||
235 | AC_SEARCH_LIBS([cos], [m]) |
||
236 | |||
237 | # |
||
238 | # Check for C99 math functions. |
||
239 | # |
||
240 | AC_CHECK_FUNCS([floorl lrint]) |
||
241 | |||
242 | # |
||
243 | # Check if we need to link with -lnsl and -lsocket |
||
244 | # |
||
245 | AX_LIB_SOCKET_NSL |
||
246 | |||
247 | # |
||
248 | # GUI toolkit options |
||
249 | # |
||
250 | AC_ARG_WITH([qt], |
||
251 | AC_HELP_STRING( [--with-qt=@<:@yes/no/4/5@:>@], |
||
252 | [use Qt @<:@default=yes, if available@:>@]), |
||
253 | with_qt="$withval", with_qt="unspecified") |
||
254 | |||
255 | AC_ARG_WITH([gtk], |
||
256 | AC_HELP_STRING( [--with-gtk=@<:@yes/no/2/3@:>@], |
||
257 | [use GTK+ @<:@default=yes, if available@:>@]), |
||
258 | AS_CASE([$withval], |
||
259 | [yes], [with_gtk="3 2 fail"], |
||
260 | [no], [with_gtk="no"], |
||
261 | [3], [with_gtk="3 fail3"], |
||
262 | [2], [with_gtk="2 fail2"], |
||
263 | [AC_MSG_ERROR([--with-gtk must be one of yes/no/2/3])]), |
||
264 | with_gtk="3 2") |
||
265 | |||
266 | # GnuTLS |
||
267 | # Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to |
||
268 | # LGPLv2.1+ in version 3.1.10. |
||
269 | # GnuTLS depends on GMP which switched from LGPLv2.1+ to LGPLv3+ in |
||
270 | # version 4.2.2, the switched to LGPLv3+ / GPLv2+ in version 6.0.0. |
||
271 | |||
272 | tls_message="no" |
||
273 | want_gnutls="if_available" |
||
274 | AC_ARG_WITH([gnutls], |
||
275 | AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@], |
||
276 | [use GnuTLS library @<:@default=yes, if available@:>@]), |
||
277 | [ with_gnutls="$withval"; want_gnutls="yes" ], with_gnutls="yes") |
||
278 | |||
279 | if test "x$with_gnutls" = "xyes"; then |
||
280 | have_license_compatible_gnutls="no" |
||
281 | PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.10 ], |
||
282 | [ have_license_compatible_gnutls="yes" ], [ echo "GnuTLS >= 3.1.10 not found " ] |
||
283 | ) |
||
284 | |||
285 | if test "x$have_license_compatible_gnutls" != "xyes"; then |
||
286 | PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0 gnutls < 3], |
||
287 | [ have_license_compatible_gnutls="yes" ] , [ echo "GnuTLS >= 2.12.0, < 3.0 not found " ] |
||
288 | ) |
||
289 | fi |
||
290 | |||
291 | if test "x$have_license_compatible_gnutls" != "xyes"; then |
||
292 | if test "x$want_gnutls" = "xyes"; then |
||
293 | AC_MSG_ERROR([GnuTLS crypto library was requested, but is not available]) |
||
294 | else |
||
295 | AS_ECHO(["GnuTLS with compatible license not found, disabling SSL decryption"]) |
||
296 | fi |
||
297 | else |
||
298 | AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use GnuTLS library]) |
||
299 | tls_message="yes" |
||
300 | fi |
||
301 | fi |
||
302 | |||
303 | # libgrypt |
||
304 | gcrypt_message="no" |
||
305 | want_gcrypt="if_available" |
||
306 | AC_ARG_WITH([gcrypt], |
||
307 | AC_HELP_STRING( [--with-gcrypt=@<:@yes/no@:>@], |
||
308 | [use gcrypt library @<:@default=yes, if available@:>@]), |
||
309 | [ with_gcrypt="$withval"; want_gcrypt="yes" ], with_gcrypt="yes") |
||
310 | |||
311 | if test "x$with_gcrypt" = "xyes"; then |
||
312 | AM_PATH_LIBGCRYPT(1.4.2, |
||
313 | [ |
||
314 | AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt]) |
||
315 | gcrypt_message="yes" |
||
316 | ] |
||
317 | , [ |
||
318 | if test x$libgcrypt_config_prefix != x ; then |
||
319 | AC_MSG_ERROR([[libgcrypt not found; install libgcrypt-devel package for your system]]) |
||
320 | else |
||
321 | AS_ECHO(["libgcrypt not found, disabling decryption for ipsec, ssl, etc."]) |
||
322 | gcrypt_message="no" |
||
323 | fi |
||
324 | |||
325 | # Error out if the user explicitly requested gcrypt |
||
326 | if test "x$want_gcrypt" = "xyes"; then |
||
327 | AC_MSG_ERROR([libgcrypt library was requested, but is not available]) |
||
328 | fi |
||
329 | ] |
||
330 | ) |
||
331 | fi |
||
332 | |||
333 | AC_ARG_WITH(libnl, |
||
334 | AC_HELP_STRING([--with-libnl@<:@=VERSION@:>@], |
||
335 | [use libnl (force version VERSION, if supplied) @<:@default: yes, if available@:>@]), |
||
336 | [ |
||
337 | if test "x$withval" = "xno" |
||
338 | then |
||
339 | want_libnl=no |
||
340 | elif test "x$withval" = "xyes" |
||
341 | then |
||
342 | want_libnl=yes |
||
343 | libnl_version=any |
||
344 | elif test "x$withval" = "x1" |
||
345 | then |
||
346 | want_libnl=yes |
||
347 | libnl_version=1 |
||
348 | elif test "x$withval" = "x2" |
||
349 | then |
||
350 | want_libnl=yes |
||
351 | libnl_version=2 |
||
352 | elif test "x$withval" = "x3" |
||
353 | then |
||
354 | want_libnl=yes |
||
355 | libnl_version=3 |
||
356 | else |
||
357 | AC_MSG_ERROR(["$withval" is not a valid argument to --with-libnl]) |
||
358 | fi |
||
359 | ],[ |
||
360 | # |
||
361 | # Use libnl if it's present, otherwise don't. |
||
362 | # |
||
363 | want_libnl=ifavailable |
||
364 | libnl_version=any |
||
365 | ]) |
||
366 | # |
||
367 | # Libnl is Linux-specific. |
||
368 | # |
||
369 | libnl_message="no" |
||
370 | case "$host_os" in |
||
371 | linux*) |
||
372 | AC_MSG_CHECKING(whether to use libnl for various network interface purposes) |
||
373 | |||
374 | if test x$want_libnl = "xno"; then |
||
375 | AC_MSG_RESULT(no) |
||
376 | else |
||
377 | AC_MSG_RESULT(yes) |
||
378 | # |
||
379 | # Test for specific libnl versions only if no version |
||
380 | # was specified by the user or if the version in question |
||
381 | # was requested by the user. |
||
382 | # |
||
383 | if test x$libnl_version = "xany" -o x$libnl_version = "x3"; then |
||
384 | PKG_CHECK_EXISTS([libnl-3.0 libnl-route-3.0 libnl-genl-3.0], [have_libnl3=yes], [have_libnl3=no]) |
||
385 | fi |
||
386 | if test x$libnl_version = "xany" -o x$libnl_version = "x2"; then |
||
387 | PKG_CHECK_EXISTS([libnl-2.0], [have_libnl2=yes], [have_libnl2=no]) |
||
388 | fi |
||
389 | if test x$libnl_version = "xany" -o x$libnl_version = "x1"; then |
||
390 | PKG_CHECK_EXISTS([libnl-1], [have_libnl1=yes], [have_libnl1=no]) |
||
391 | fi |
||
392 | if (test "${have_libnl3}" = "yes"); then |
||
393 | PKG_WIRESHARK_CHECK_SYSTEM_MODULES([LIBNL], [libnl-3.0 libnl-route-3.0 libnl-genl-3.0]) |
||
394 | AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support]) |
||
395 | AC_DEFINE(HAVE_LIBNL3, 1, [libnl version 3]) |
||
396 | libnl_message="yes (v3)" |
||
397 | elif (test "${have_libnl2}" = "yes"); then |
||
398 | PKG_WIRESHARK_CHECK_SYSTEM_MODULES([LIBNL], [libnl-2.0]) |
||
399 | AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support]) |
||
400 | AC_DEFINE(HAVE_LIBNL2, 1, [libnl version 2]) |
||
401 | libnl_message="yes (v2)" |
||
402 | elif (test "${have_libnl1}" = "yes"); then |
||
403 | PKG_WIRESHARK_CHECK_SYSTEM_MODULES([LIBNL], [libnl-1]) |
||
404 | AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support]) |
||
405 | AC_DEFINE(HAVE_LIBNL1, 1, [libnl version 1]) |
||
406 | libnl_message="yes (v1)" |
||
407 | else |
||
408 | if test x$want_libnl = "xyes"; then |
||
409 | case "$libnl_version" in |
||
410 | |||
411 | any) |
||
412 | AC_MSG_ERROR("I couldn't find libnl even though you manually enabled it.") |
||
413 | ;; |
||
414 | |||
415 | *) |
||
416 | AC_MSG_ERROR("I couldn't find libnl version $libnl_version even though you manually enabled it.") |
||
417 | ;; |
||
418 | esac |
||
419 | fi |
||
420 | fi |
||
421 | fi |
||
422 | |||
423 | AC_MSG_CHECKING([if nl80211.h is new enough]) |
||
424 | AC_TRY_COMPILE([#include <linux/nl80211.h>], |
||
425 | [int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER; |
||
426 | x |= NL80211_ATTR_SUPPORTED_IFTYPES; |
||
427 | x |= NL80211_ATTR_SUPPORTED_COMMANDS; |
||
428 | x |= NL80211_ATTR_WIPHY_FREQ; |
||
429 | x |= NL80211_CHAN_NO_HT; |
||
430 | (void)x;], |
||
431 | [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211, 1, [nl80211.h is new enough])], |
||
432 | [AC_MSG_RESULT(no)]) |
||
433 | |||
434 | AC_MSG_CHECKING([for NL80211_SET_CHANNEL]) |
||
435 | AC_TRY_COMPILE([#include <linux/nl80211.h>], |
||
436 | [enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;], |
||
437 | [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_CMD_SET_CHANNEL, 1, [SET_CHANNEL is supported])], |
||
438 | [AC_MSG_RESULT(no)]) |
||
439 | |||
440 | AC_MSG_CHECKING([for NL80211_SPLIT_WIPHY_DUMP]) |
||
441 | AC_TRY_COMPILE([#include <linux/nl80211.h>], |
||
442 | [enum nl80211_protocol_features x = NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP;], |
||
443 | [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_SPLIT_WIPHY_DUMP, 1, [SPLIT_WIPHY_DUMP is supported])], |
||
444 | [AC_MSG_RESULT(no)]) |
||
445 | |||
446 | AC_MSG_CHECKING([for NL80211_VHT_CAPABILITY]) |
||
447 | AC_TRY_COMPILE([#include <linux/nl80211.h>], |
||
448 | [enum nl80211_attrs x = NL80211_ATTR_VHT_CAPABILITY;], |
||
449 | [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_VHT_CAPABILITY, 1, [VHT_CAPABILITY is supported])], |
||
450 | [AC_MSG_RESULT(no)]) |
||
451 | ;; |
||
452 | |||
453 | *) |
||
454 | if test x$want_libnl != "xno" -a x$want_libnl != "xifavailable"; then |
||
455 | AC_MSG_WARN([libnl is Linux-specific, ignoring --with-libnl]) |
||
456 | fi |
||
457 | esac |
||
458 | |||
459 | # libsmi |
||
460 | # FIXME: currently the path argument to with-libsmi is being ignored |
||
461 | AX_LIBSMI |
||
462 | |||
463 | # |
||
464 | # Check for programs used when building DocBook documentation. |
||
465 | # |
||
466 | AC_CHECK_PROGS(XSLTPROC, xsltproc, xsltproc) |
||
467 | AC_CHECK_PROGS(A2X, a2x, a2x) |
||
468 | AC_CHECK_PROGS(FOP, fop, fop) |
||
469 | |||
470 | # HTML to text processor |
||
471 | AC_MSG_CHECKING([for an HTML to text processor]) |
||
472 | AS_IF([w3m -version >&AS_MESSAGE_LOG_FD 2>&1], [have_a2x_text=w3m], |
||
473 | [lynx -version >&AS_MESSAGE_LOG_FD 2>&1], [have_a2x_text=lynx], |
||
474 | [have_a2x_text=no]) |
||
475 | AC_MSG_RESULT([$have_a2x_text]) |
||
476 | AM_CONDITIONAL(HAVE_A2X_TEXT, [test "x$have_a2x_text" != xno]) |
||
477 | AS_IF([test $have_a2x_text = lynx], [A2X_LYNX="--lynx"]) |
||
478 | AC_SUBST(A2X_LYNX) |
||
479 | |||
480 | # Check for packaging utilities |
||
481 | # For now, we check to see if the various packaging utilites are in our |
||
482 | # path. I'm too lazy to write code to go hunt for them. - Gerald |
||
483 | |||
484 | # |
||
485 | # Source packages. |
||
486 | # (Lets you install the desktop files.) |
||
487 | # |
||
488 | AC_PATH_PROG(DESKTOP_FILE_INSTALL, desktop-file-install) |
||
489 | |||
490 | # SVR4/Solaris |
||
491 | AC_CHECK_PROG(HAVE_PKGPROTO, pkgproto, "yes", "no") |
||
492 | AC_CHECK_PROG(HAVE_PKGMK, pkgmk, "yes", "no") |
||
493 | AC_CHECK_PROG(HAVE_PKGTRANS, pkgtrans, "yes", "no") |
||
494 | |||
495 | if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \ |
||
496 | -a x$HAVE_PKGTRANS = xyes ; then |
||
497 | HAVE_SVR4_PACKAGING=yes |
||
498 | else |
||
499 | HAVE_SVR4_PACKAGING=no |
||
500 | fi |
||
501 | AC_SUBST(HAVE_SVR4_PACKAGING) |
||
502 | |||
503 | # RPM |
||
504 | # |
||
505 | # Looks for the rpmbuild program, and checks to see if we can redefine "_topdir". |
||
506 | # |
||
507 | AC_CHECK_PROGS(RPMBUILD, [rpmbuild], [false]) |
||
508 | if test "x$RPMBUILD" != "xfalse" ; then |
||
509 | AC_MSG_CHECKING([to see if we can redefine _topdir]) |
||
510 | rpm --define '_topdir /tmp' > /dev/null 2>&1 |
||
511 | if test $? -eq 0 ; then |
||
512 | AC_MSG_RESULT(yes) |
||
513 | have_rpm=yes |
||
514 | else |
||
515 | AC_MSG_RESULT([no, you'll have to build packages manually]) |
||
516 | have_rpm=no |
||
517 | fi |
||
518 | fi |
||
519 | AM_CONDITIONAL(HAVE_RPM, [test "x$have_rpm" = xyes]) |
||
520 | |||
521 | # Debian |
||
522 | AC_CHECK_PROG(HAVE_DPKG_BUILDPACKAGE, dpkg-buildpackage, "yes", "no") |
||
523 | |||
524 | # OS X |
||
525 | AC_CHECK_PROG(HAVE_XCODEBUILD, xcodebuild, "yes", "no") |
||
526 | AC_CHECK_PROG(HAVE_HDIUTIL, hdiutil, "yes", "no") |
||
527 | AC_CHECK_PROG(HAVE_BLESS, bless, "yes", "no") |
||
528 | |||
529 | if test x$HAVE_XCODEBUILD = xyes -a x$HAVE_HDIUTIL = xyes \ |
||
530 | -a x$HAVE_BLESS = xyes ; then |
||
531 | HAVE_OSX_PACKAGING=yes |
||
532 | else |
||
533 | HAVE_OSX_PACKAGING=no |
||
534 | fi |
||
535 | AC_SUBST(HAVE_OSX_PACKAGING) |
||
536 | |||
537 | # |
||
538 | # Use this as a proxy for "is this OS X" (just in case somebody actually |
||
539 | # built and installed Darwin as an OS, perhaps with some X11-based GUI, |
||
540 | # don't look for Darwin). |
||
541 | # |
||
542 | AC_CHECK_PROG(have_sw_vers, sw_vers, "yes", "no") |
||
543 | AM_CONDITIONAL(NOT_OS_X, test "x$have_sw_vers" = "xno") |
||
544 | |||
545 | # |
||
546 | # Check compiler vendor. For GCC this will be 'gnu' and for Clang 'clang'. |
||
547 | # |
||
548 | AX_COMPILER_VENDOR |
||
549 | if test "x$CXX" != "x" ; then |
||
550 | AC_LANG_PUSH(C++) |
||
551 | AX_COMPILER_VENDOR |
||
552 | AC_LANG_POP |
||
553 | fi |
||
554 | |||
555 | # |
||
556 | # Some compilers have to be told to fail when passed an unknown -W flag; |
||
557 | # make sure we do that. |
||
558 | # |
||
559 | AC_WIRESHARK_CHECK_UNKNOWN_WARNING_OPTION_ERROR |
||
560 | |||
561 | # |
||
562 | # Some C++ compilers have to be told to fail when passed a -W flag that |
||
563 | # they don't think should apply to C++; make sure we do that. |
||
564 | # |
||
565 | AC_WIRESHARK_CHECK_NON_CXX_WARNING_OPTION_ERROR |
||
566 | |||
567 | # |
||
568 | # The following are for C and C++ |
||
569 | # |
||
570 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wall) |
||
571 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wextra) |
||
572 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wendif-labels) |
||
573 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpointer-arith) |
||
574 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wformat-security) |
||
575 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fwrapv) |
||
576 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fno-strict-overflow) |
||
577 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fno-delete-null-pointer-checks) |
||
578 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wvla) |
||
579 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Waddress) |
||
580 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wattributes) |
||
581 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wdiv-by-zero) |
||
582 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wignored-qualifiers) |
||
583 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpragmas) |
||
584 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-overlength-strings) |
||
585 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-long-long) |
||
586 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wheader-guard) |
||
587 | |||
588 | # |
||
589 | # The following are C only, not C++ |
||
590 | # |
||
591 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wc++-compat, C) |
||
592 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wdeclaration-after-statement, C) |
||
593 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunused-const-variable, C) |
||
594 | |||
595 | # |
||
596 | # XXX - OK for C++? |
||
597 | # |
||
598 | # Make sure -Wshadow doesn't complain about variables in function and |
||
599 | # function pointer declarations shadowing other variables; if not, don't |
||
600 | # turn it on, as some versions of GCC (including the one in at least |
||
601 | # some Xcode versions that came with Mac OS X 10.5) complain about |
||
602 | # that. |
||
603 | # |
||
604 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wshadow, C, |
||
605 | [ |
||
606 | extern int bar(int a); |
||
607 | extern int foo(int); |
||
608 | |||
609 | int |
||
610 | foo(int a) |
||
611 | { |
||
612 | int (*fptr)(int a) = bar; |
||
613 | |||
614 | return fptr(a) * 2; |
||
615 | } |
||
616 | ], |
||
617 | [warns about variables in function declarations shadowing other variables]) |
||
618 | |||
619 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-pointer-sign, C) |
||
620 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wold-style-definition, C) |
||
621 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wstrict-prototypes, C) |
||
622 | |||
623 | # Unfortunately some versions of gcc generate logical-op warnings when strchr() |
||
624 | # is given a constant string. |
||
625 | # gcc versions 4.3.2 and 4.4.5 are known to have the problem. |
||
626 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wlogical-op, C, |
||
627 | [ |
||
628 | #include <string.h> |
||
629 | |||
630 | int foo(const char *, int); |
||
631 | int bar(void); |
||
632 | |||
633 | int |
||
634 | foo(const char *sep, int c) |
||
635 | { |
||
636 | if (strchr (sep, c) != NULL) |
||
637 | return 1; |
||
638 | else |
||
639 | return 0; |
||
640 | } |
||
641 | |||
642 | int |
||
643 | bar(void) |
||
644 | { |
||
645 | return foo("<", 'a'); |
||
646 | } |
||
647 | ], |
||
648 | [generates warnings from strchr()]) |
||
649 | |||
650 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wjump-misses-init, C) |
||
651 | # The Qt headers generate a ton of shortening errors on 64-bit systems |
||
652 | # so only enable this for C for now. |
||
653 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wshorten-64-to-32, C) |
||
654 | |||
655 | # Clang only. Avoid "argument unused during compilation" warnings |
||
656 | # (for example, when getting the -gsplit-dwarf option or |
||
657 | # when combining -fwrapv with -fno-strict-overflow) |
||
658 | if test x"$ax_cv_c_compiler_vendor" = xclang; then |
||
659 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments, C) |
||
660 | fi |
||
661 | if test x"$ax_cv_cxx_compiler_vendor" = xclang; then |
||
662 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Qunused-arguments, CXX) |
||
663 | fi |
||
664 | |||
665 | # |
||
666 | # Use the faster pre gcc 4.5 floating point precision if available. |
||
667 | # |
||
668 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fexcess-precision=fast) |
||
669 | |||
670 | # |
||
671 | # Try to have the compiler default to hiding symbols, so that only |
||
672 | # symbols explicitly exported with WS_DLL_PUBLIC will be visible |
||
673 | # outside (shared) libraries; that way, more UN*X builds will catch |
||
674 | # failures to export symbols, rather than having that fail only on |
||
675 | # Windows. |
||
676 | # |
||
677 | # GCC and GCC-compatible compilers |
||
678 | # |
||
679 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fvisibility=hidden) |
||
680 | if test "x$can_add_to_cflags" = "xno" |
||
681 | then |
||
682 | # |
||
683 | # Sun^WOracle C. |
||
684 | # |
||
685 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-xldscope=hidden) |
||
686 | if test "x$can_add_to_cflags" = "xno" |
||
687 | then |
||
688 | # TODO add other ways of hiding symbols |
||
689 | AC_MSG_WARN(Compiler will export all symbols from shared libraries) |
||
690 | fi |
||
691 | fi |
||
692 | |||
693 | #Clang only |
||
694 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wc99-extensions, C) |
||
695 | |||
696 | # |
||
697 | # Try to add some additional checks to CFLAGS. |
||
698 | # These are not enabled by default, because the warnings they produce |
||
699 | # are very hard or impossible to eliminate. |
||
700 | # |
||
701 | AC_ARG_ENABLE(extra-compiler-warnings, |
||
702 | AC_HELP_STRING( [--enable-extra-compiler-warnings], |
||
703 | [do additional compiler warnings @<:@default=no@:>@]), |
||
704 | [ |
||
705 | wireshark_extra_flags=$enableval |
||
706 | if test $enableval != no |
||
707 | then |
||
708 | # |
||
709 | # The following are for C and C++ |
||
710 | # |
||
711 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpedantic) |
||
712 | # |
||
713 | # As we use variadic macros, we don't want warnings |
||
714 | # about them, even with -Wpedantic. |
||
715 | # |
||
716 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-variadic-macros) |
||
717 | # |
||
718 | # Various code blocks this one. |
||
719 | # |
||
720 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Woverflow) |
||
721 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fstrict-overflow -Wstrict-overflow=4) |
||
722 | # |
||
723 | # Due to various places where APIs we don't control |
||
724 | # require us to cast away constness, we can probably |
||
725 | # never enable this one with -Werror. |
||
726 | # |
||
727 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wcast-qual) |
||
728 | # |
||
729 | # Some generated ASN.1 dissectors block this one; |
||
730 | # multiple function declarations for the same |
||
731 | # function are being generated. |
||
732 | # |
||
733 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wredundant-decls) |
||
734 | # |
||
735 | # Some loops are safe, but it's hard to convince the |
||
736 | # compiler of that. |
||
737 | # |
||
738 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunsafe-loop-optimizations) |
||
739 | # |
||
740 | # All the registration functions block these for now. |
||
741 | # |
||
742 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-prototypes) |
||
743 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wmissing-declarations) |
||
744 | # |
||
745 | # A bunch of "that might not work on SPARC" code blocks |
||
746 | # this one for now. |
||
747 | # |
||
748 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wcast-align) |
||
749 | # |
||
750 | # Works only with Clang |
||
751 | # |
||
752 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wunreachable-code) |
||
753 | # |
||
754 | # Works only with Clang but generates a lot of warnings |
||
755 | # (about glib library not using Doxygen) |
||
756 | # |
||
757 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wdocumentation) |
||
758 | |||
759 | # |
||
760 | # The following are C only, not C++ |
||
761 | # |
||
762 | # Due to various places where APIs we don't control |
||
763 | # require us to cast away constness, we can probably |
||
764 | # never enable this one with -Werror. |
||
765 | # |
||
766 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wbad-function-cast, C) |
||
767 | fi |
||
768 | ]) |
||
769 | |||
770 | # Try to add ASAN address analyze. |
||
771 | # Only needed for analyse |
||
772 | # |
||
773 | AC_ARG_ENABLE(asan, |
||
774 | AC_HELP_STRING( [--enable-asan], |
||
775 | [Enable AddressSanitizer (ASAN) for debugging (degrades performance)@<:@default=no@:>@]), |
||
776 | [ |
||
777 | # |
||
778 | # With Clang >= 3.5 Leak detection is enable by default |
||
779 | # and no yet all leak is fixed... |
||
780 | # use ASAN_OPTIONS=detect_leaks=0 to disable detect_leaks |
||
781 | # |
||
782 | # XXX shouldn't this also be added to LDFLAGS? |
||
783 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fsanitize=address) |
||
784 | |||
785 | ]) |
||
786 | |||
787 | # Add check hf conflict.. |
||
788 | # |
||
789 | AC_ARG_ENABLE(checkhf-conflict, |
||
790 | AC_HELP_STRING( [--enable-checkhf-conflict], |
||
791 | [Enable hf conflict check for debugging (start-up may be slower)@<:@default=no@:>@]), |
||
792 | [ |
||
793 | AC_DEFINE(ENABLE_CHECK_FILTER, 1, [Enable hf conflict check]) |
||
794 | ]) |
||
795 | |||
796 | AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed]) |
||
797 | ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,-M]) |
||
798 | ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--cref]) |
||
799 | # AC_WIRESHARK_LDFLAGS_CHECK([-flto]) |
||
800 | # AC_WIRESHARK_LDFLAGS_CHECK([-fwhopr]) |
||
801 | # AC_WIRESHARK_LDFLAGS_CHECK([-fwhole-program]) |
||
802 | |||
803 | # |
||
804 | # Put -fPIE in PIE_CFLAGS and -pie in PIE_LDFLAGS if we can use them, |
||
805 | # so that we can build dumpcap PIE - it may run with elevated |
||
806 | # privileges, and using PIE means the OS can run it at random locations |
||
807 | # in the address space to make attacks more difficult. |
||
808 | # |
||
809 | |||
810 | WS_CFLAGS_saved="$WS_CFLAGS" |
||
811 | WS_LDFLAGS_saved="$WS_LDFLAGS" |
||
812 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fPIE, C) |
||
813 | if test "x$can_add_to_cflags" = "xyes" |
||
814 | then |
||
815 | AC_WIRESHARK_LDFLAGS_CHECK([-fPIE -pie]) |
||
816 | if test "x$can_add_to_ldflags" = "xyes" |
||
817 | then |
||
818 | # We can use PIE |
||
819 | PIE_CFLAGS="-fPIE" |
||
820 | PIE_LDFLAGS="-pie" |
||
821 | fi |
||
822 | fi |
||
823 | WS_CFLAGS="$WS_CFLAGS_saved" |
||
824 | WS_LDFLAGS="$WS_LDFLAGS_saved" |
||
825 | AC_SUBST(PIE_CFLAGS) |
||
826 | AC_SUBST(PIE_LDFLAGS) |
||
827 | |||
828 | WS_CFLAGS_saved="$WS_CFLAGS" |
||
829 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-msse4.2, C) |
||
830 | if test "x$can_add_to_cflags" = "xyes" |
||
831 | then |
||
832 | # |
||
833 | # The compiler supports -msse4.2; use that to enable SSE 4.2. |
||
834 | # |
||
835 | # We only want to apply -msse4.2 to |
||
836 | # wsutil/ws_mempbrk_sse42.c, as the SSE4.2 code there |
||
837 | # is run only if the hardware supports it, but other |
||
838 | # code would do no such checks. |
||
839 | # |
||
840 | ac_sse4_2_flag=-msse4.2 |
||
841 | else |
||
842 | # |
||
843 | # Try -xarch=sse4_2; that's the flag for Sun's compiler. |
||
844 | # |
||
845 | AC_WIRESHARK_COMPILER_FLAGS_CHECK(-xarch=sse4_2, C) |
||
846 | if test "x$can_add_to_cflags" = "xyes" |
||
847 | then |
||
848 | # |
||
849 | # The compiler supports -xarch=sse4_2; use that to |
||
850 | # enable SSE 4.2. |
||
851 | ac_sse4_2_flag=-xarch=sse4_2 |
||
852 | fi |
||
853 | fi |
||
854 | WS_CFLAGS="$WS_CFLAGS_saved" |
||
855 | |||
856 | if test "x$ac_sse4_2_flag" != x; then |
||
857 | # |
||
858 | # OK, we have a compiler flag to enable SSE 4.2. |
||
859 | # |
||
860 | # Make sure we have the necessary headers for the SSE4.2 intrinsics |
||
861 | # and that we can use them. |
||
862 | # |
||
863 | # First, check whether we have emmintrin.h and can use it |
||
864 | # *without* the SSE 4.2 flag. |
||
865 | # |
||
866 | AC_MSG_CHECKING([whether there is emmintrin.h header and we can use it]) |
||
867 | AC_TRY_COMPILE( |
||
868 | [#include <emmintrin.h>], |
||
869 | [return 0;], |
||
870 | [ |
||
871 | emmintrin_h_works=yes |
||
872 | AC_MSG_RESULT([yes]) |
||
873 | ], |
||
874 | [ |
||
875 | emmintrin_h_works=no |
||
876 | AC_MSG_RESULT([no]) |
||
877 | ] |
||
878 | ) |
||
879 | |||
880 | # |
||
881 | # OK, if that works, see whether we have nmmintrin.h and |
||
882 | # can use it *with* the SSE 4.2 flag. |
||
883 | # |
||
884 | if test "x$emmintrin_h_works" = "xyes"; then |
||
885 | # |
||
886 | # Add the SSE4.2 flags to the beginning of CFLAGS, |
||
887 | # in case the user explicitly specified -mno-sse4.2 |
||
888 | # (or in case Gentoo's build tools did so); if they |
||
889 | # did so, we only want this to work if we can use |
||
890 | # the #pragma to override that for ws_mempbrk_sse42.c, |
||
891 | # and putting it at the beginning means that the |
||
892 | # CFLAGS setting in the environment will come later |
||
893 | # and override it. |
||
894 | # |
||
895 | AC_MSG_CHECKING([whether there is nmmintrin.h header and we can use it]) |
||
896 | saved_CFLAGS="$CFLAGS" |
||
897 | CFLAGS="$ac_sse4_2_flag $WS_CFLAGS $CFLAGS" |
||
898 | AC_TRY_COMPILE( |
||
899 | [#include <nmmintrin.h>], |
||
900 | [return 0;], |
||
901 | [ |
||
902 | have_sse42=yes |
||
903 | AC_DEFINE(HAVE_SSE4_2, 1, [Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions]) |
||
904 | CFLAGS_SSE42="$ac_sse4_2_flag" |
||
905 | AC_MSG_RESULT([yes]) |
||
906 | ], |
||
907 | [ |
||
908 | have_sse42=no |
||
909 | AC_MSG_RESULT([no]) |
||
910 | ] |
||
911 | ) |
||
912 | CFLAGS="$saved_CFLAGS" |
||
913 | else |
||
914 | have_sse42=no |
||
915 | fi |
||
916 | else |
||
917 | have_sse42=no |
||
918 | fi |
||
919 | dnl build libwsutil_sse42 only if there is SSE4.2 |
||
920 | AM_CONDITIONAL(SSE42_SUPPORTED, test "x$have_sse42" = "xyes") |
||
921 | AC_SUBST(CFLAGS_SSE42) |
||
922 | |||
923 | # |
||
924 | # If we're running GCC or clang define _U_ to be "__attribute__((unused))" |
||
925 | # so we can use _U_ to flag unused function parameters and not get warnings |
||
926 | # about them. Otherwise, define _U_ to be an empty string so that _U_ used |
||
927 | # to flag an unused function parameters will compile with other compilers. |
||
928 | # |
||
929 | # XXX - similar hints for other compilers? |
||
930 | # |
||
931 | if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then |
||
932 | AC_DEFINE(_U_, __attribute__((unused)), [Hint to the compiler that a function parameters is not used]) |
||
933 | AC_DEFINE(WS_NORETURN, __attribute((noreturn)), [Hint to the compiler that a function never returns]) |
||
934 | else |
||
935 | AC_DEFINE(_U_, , [Hint to the compiler that a function parameters is not used]) |
||
936 | AC_DEFINE(WS_NORETURN, , [Hint to the compiler that a function never returns]) |
||
937 | fi |
||
938 | |||
939 | # If we're running GCC or CLang, use FORTIFY_SOURCE=2 |
||
940 | # (only if the GCC 'optimization level' > 0). |
||
941 | # |
||
942 | # See: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html |
||
943 | # See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979 |
||
944 | # |
||
945 | # Note: FORTIFY_SOURCE is only effective for gcc optimization level > 0 (-O1, etc) |
||
946 | AC_WIRESHARK_GCC_FORTIFY_SOURCE_CHECK |
||
947 | |||
948 | # |
||
949 | # If the compiler supports GCC-style flags, enable a barrier "stop on |
||
950 | # warning". |
||
951 | # This barrier is set for a very large part of the code. However, it is |
||
952 | # typically not set for "generated" code (flex, ans2wrs, idl2wrs, ...) |
||
953 | # |
||
954 | warnings_as_errors_default="no" |
||
955 | AC_MSG_CHECKING(whether we should treat compiler warnings as errors) |
||
956 | AC_ARG_ENABLE(warnings-as-errors, |
||
957 | AC_HELP_STRING( [--enable-warnings-as-errors], |
||
958 | [treat warnings as errors (only for GCC or clang) @<:@default=no@:>@]), |
||
959 | [ |
||
960 | if test "x$ac_supports_gcc_flags" = "xyes" -a "x$enableval" = "xyes"; then |
||
961 | with_warnings_as_errors="yes" |
||
962 | AC_MSG_RESULT(yes) |
||
963 | else |
||
964 | with_warnings_as_errors="no" |
||
965 | AC_MSG_RESULT(no) |
||
966 | fi |
||
967 | ], |
||
968 | [ |
||
969 | if test "x$ac_supports_gcc_flags" = "xyes" -a "x$wireshark_extra_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then |
||
970 | with_warnings_as_errors="yes" |
||
971 | AC_MSG_RESULT(yes) |
||
972 | else |
||
973 | with_warnings_as_errors="no" |
||
974 | AC_MSG_RESULT(no) |
||
975 | fi |
||
976 | ]) |
||
977 | |||
978 | AS_IF([test "x$with_warnings_as_errors" = "xyes"], [WERROR="-Werror"], [WERROR=""]) |
||
979 | AC_SUBST(WERROR) |
||
980 | AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, [test "x$with_warnings_as_errors" = "xyes"]) |
||
981 | |||
982 | # |
||
983 | # Add any platform-specific compiler flags needed. |
||
984 | # |
||
985 | AC_MSG_CHECKING(for platform-specific compiler flags) |
||
986 | if test "x$GCC" = "xyes" ; then |
||
987 | # |
||
988 | # GCC - do any platform-specific tweaking necessary. |
||
989 | # |
||
990 | case "$host_os" in |
||
991 | solaris*) |
||
992 | # the X11 headers don't automatically include prototype info |
||
993 | # and a lot don't include the return type |
||
994 | WS_CPPFLAGS="$WS_CPPFLAGS -DFUNCPROTO=15" |
||
995 | WS_CFLAGS="$WS_CFLAGS -Wno-return-type" |
||
996 | WS_CXXFLAGS="$WS_CXXFLAGS -Wno-return-type" |
||
997 | AC_MSG_RESULT(GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15) |
||
998 | ;; |
||
999 | *) |
||
1000 | AC_MSG_RESULT(none needed) |
||
1001 | ;; |
||
1002 | esac |
||
1003 | else |
||
1004 | # |
||
1005 | # Not GCC - assume it's the vendor's compiler. |
||
1006 | # |
||
1007 | case "$host_os" in |
||
1008 | hpux*) |
||
1009 | # |
||
1010 | # AC_PROG_CC_STDC should already have added whatever |
||
1011 | # flags are necessary for ISO C - C99 if available, |
||
1012 | # otherwise C89 - with extensions. |
||
1013 | # |
||
1014 | # Add +O2, for optimization, as suggested by Jost Martin. |
||
1015 | # XXX - works with "-g"? |
||
1016 | # |
||
1017 | # +O2 is supported both by the C and C++ compiler. |
||
1018 | # |
||
1019 | WS_CFLAGS="+O2 $WS_CFLAGS" |
||
1020 | if test "$CC" = "$CC_FOR_BUILD"; then |
||
1021 | # |
||
1022 | # We're building the build tools with the same |
||
1023 | # compiler as the one with which we're building |
||
1024 | # Wireshark, so add the flags to the flags for |
||
1025 | # that compiler as well. |
||
1026 | # |
||
1027 | CFLAGS_FOR_BUILD="-Ae +O2 $CFLAGS" |
||
1028 | fi |
||
1029 | WS_CXXFLAGS="+O2 $WS_CXXFLAGS" |
||
1030 | AC_MSG_RESULT(HP C/C++ compiler - added +O2) |
||
1031 | ;; |
||
1032 | solaris*) |
||
1033 | # |
||
1034 | # Crank up the warning level. |
||
1035 | # |
||
1036 | WS_CFLAGS="$WS_CFLAGS -v" |
||
1037 | WS_CXXFLAGS="$WS_CXXFLAGS +w2" |
||
1038 | ;; |
||
1039 | *) |
||
1040 | AC_MSG_RESULT(none needed) |
||
1041 | ;; |
||
1042 | esac |
||
1043 | fi |
||
1044 | |||
1045 | # |
||
1046 | # Add any platform-specific linker flags needed. |
||
1047 | # |
||
1048 | AC_MSG_CHECKING(for platform-specific linker flags) |
||
1049 | case "$host_os" in |
||
1050 | darwin*) |
||
1051 | # |
||
1052 | # Add -Wl,-single_module to the LDFLAGS used with shared |
||
1053 | # libraries, to fix some error that show up in some cases; |
||
1054 | # some Apple documentation recommends it for most shared |
||
1055 | # libraries. |
||
1056 | # |
||
1057 | LDFLAGS_SHAREDLIB="-Wl,-single_module" |
||
1058 | # |
||
1059 | # Add -Wl,-headerpad_max_install_names to the LDFLAGS, as |
||
1060 | # code-signing issues is running out of padding space. |
||
1061 | # |
||
1062 | # Add -Wl,-search_paths_first to make sure that if we search |
||
1063 | # directories A and B, in that order, for a given library, a |
||
1064 | # non-shared version in directory A, rather than a shared |
||
1065 | # version in directory B, is chosen (so we can use |
||
1066 | # --with-pcap=/usr/local to force all programs to be linked |
||
1067 | # with a static version installed in /usr/local/lib rather than |
||
1068 | # the system version in /usr/lib). |
||
1069 | # |
||
1070 | WS_LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first $WS_LDFLAGS" |
||
1071 | AC_MSG_RESULT([Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags]) |
||
1072 | ;; |
||
1073 | cygwin*) |
||
1074 | # |
||
1075 | # Shared libraries in cygwin/Win32 must never contain |
||
1076 | # undefined symbols. |
||
1077 | # |
||
1078 | WS_LDFLAGS="$WS_LDFLAGS -no-undefined" |
||
1079 | AC_MSG_RESULT(CygWin GNU ld - added -no-undefined) |
||
1080 | ;; |
||
1081 | *) |
||
1082 | AC_MSG_RESULT(none needed) |
||
1083 | ;; |
||
1084 | esac |
||
1085 | AC_SUBST(LDFLAGS_SHAREDLIB) |
||
1086 | |||
1087 | # |
||
1088 | # On "Darwin", which we assume to mean "OS X" rather than "iOS" or |
||
1089 | # "just Darwin" (as we don't currently support iOS, and as I don't |
||
1090 | # think you can build and run "just Darwin" as an OS for PCs), we |
||
1091 | # arrange to build some programs with Application Services so they |
||
1092 | # can launch Web browsers and Finder windows, arrange to build some |
||
1093 | # programs with System Configuration so they can get "friendly names" |
||
1094 | # and other information about interfaces, and build any programs that |
||
1095 | # use either of those frameworks or that report version information |
||
1096 | # with Core Foundation as the frameworks in question use it and as we |
||
1097 | # get version information from plists and thus need Core Foundation |
||
1098 | # to process those plists. |
||
1099 | # |
||
1100 | have_os_x_frameworks=no |
||
1101 | case "$host_os" in |
||
1102 | darwin*) |
||
1103 | have_os_x_frameworks=yes |
||
1104 | AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks]) |
||
1105 | APPLICATIONSERVICES_FRAMEWORKS="-framework ApplicationServices" |
||
1106 | SYSTEMCONFIGURATION_FRAMEWORKS="-framework SystemConfiguration" |
||
1107 | COREFOUNDATION_FRAMEWORKS="-framework CoreFoundation" |
||
1108 | |||
1109 | # |
||
1110 | # OK, so we have the OS X frameworks; do they include |
||
1111 | # CFPropertyListCreateWithStream, or do we have |
||
1112 | # to fall back on CFPropertyListCreateFromStream? |
||
1113 | # (They only differ in the error return, which we |
||
1114 | # don't care about. And, no, we shouldn't just |
||
1115 | # use CFPropertyListCreateFromStream, because it's |
||
1116 | # deprecated in newer releases.) |
||
1117 | # |
||
1118 | ac_save_LIBS="$LIBS" |
||
1119 | LIBS="$LIBS $COREFOUNDATION_FRAMEWORKS" |
||
1120 | AC_CHECK_FUNCS(CFPropertyListCreateWithStream) |
||
1121 | LIBS="$ac_save_LIBS" |
||
1122 | ;; |
||
1123 | esac |
||
1124 | AC_SUBST(APPLICATIONSERVICES_FRAMEWORKS) |
||
1125 | AC_SUBST(SYSTEMCONFIGURATION_FRAMEWORKS) |
||
1126 | AC_SUBST(COREFOUNDATION_FRAMEWORKS) |
||
1127 | AM_CONDITIONAL(HAVE_OS_X_FRAMEWORKS, [test "x$have_os_x_frameworks" = "xyes"]) |
||
1128 | |||
1129 | # |
||
1130 | # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a |
||
1131 | # link directory. |
||
1132 | # |
||
1133 | case "$host_os" in |
||
1134 | solaris*) |
||
1135 | AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris) |
||
1136 | if test x$LD_LIBRARY_PATH != x ; then |
||
1137 | LIBS="$LIBS -R$LD_LIBRARY_PATH" |
||
1138 | AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path) |
||
1139 | else |
||
1140 | AC_MSG_RESULT(no -- this may be a problem in a few seconds) |
||
1141 | fi |
||
1142 | ;; |
||
1143 | esac |
||
1144 | |||
1145 | # Enable/disable wireshark |
||
1146 | AC_ARG_ENABLE(wireshark, |
||
1147 | AC_HELP_STRING( [--enable-wireshark], |
||
1148 | [build the Wireshark GUI (with Gtk+, Qt, or both) @<:@default=yes@:>@]), |
||
1149 | enable_wireshark=$enableval,enable_wireshark=yes) |
||
1150 | AM_CONDITIONAL(BUILDING_WIRESHARK, test x$enable_wireshark = xyes) |
||
1151 | |||
1152 | AC_ARG_ENABLE(packet-editor, |
||
1153 | AC_HELP_STRING( [--enable-packet-editor], |
||
1154 | [add support for packet editor in Wireshark @<:@default=yes@:>@]), |
||
1155 | enable_packet_editor=$enableval,enable_packet_editor=yes) |
||
1156 | if test x$enable_packet_editor = xyes; then |
||
1157 | AC_DEFINE(WANT_PACKET_EDITOR, 1, [Support for packet editor]) |
||
1158 | fi |
||
1159 | |||
1160 | AC_ARG_ENABLE(profile-build, |
||
1161 | AC_HELP_STRING( [--enable-profile-build], |
||
1162 | [build profile-ready binaries @<:@default=no@:>@]), |
||
1163 | enable_profile_build=$enableval,enable_profile_build=no) |
||
1164 | AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes) |
||
1165 | AC_MSG_CHECKING(if profile builds must be generated) |
||
1166 | if test "x$enable_profile_build" = "xyes" ; then |
||
1167 | if test "x$GCC" = "xyes" -o "x$CLANG" = "xyes" ; then |
||
1168 | AC_MSG_RESULT(yes) |
||
1169 | WS_CFLAGS="-pg $WS_CFLAGS" |
||
1170 | WS_CXXFLAGS="-pg $WS_CXXFLAGS" |
||
1171 | else |
||
1172 | AC_MSG_RESULT(no) |
||
1173 | echo "Building profile binaries currently only supported for GCC and clang." |
||
1174 | fi |
||
1175 | else |
||
1176 | AC_MSG_RESULT(no) |
||
1177 | fi |
||
1178 | |||
1179 | GLIB_MIN_VERSION=2.16.0 |
||
1180 | AC_SUBST(GLIB_MIN_VERSION) |
||
1181 | # GLib checks; we require GLib $GLIB_MIN_VERSION or later, and require gmodule |
||
1182 | # support, as we need that for dynamically loading plugins. |
||
1183 | # |
||
1184 | # Release dates for GLib versions: |
||
1185 | # 2.14.0: 03 Aug 2007 |
||
1186 | # 2.16.0: 10 Mar 2008 |
||
1187 | # 2.18.0: 02 Sep 2008 |
||
1188 | # 2.20.0: 13 Mar 2009 |
||
1189 | # 2.22.0: 22 Sep 2009 |
||
1190 | # 2.24.0: 28 Mar 2010 |
||
1191 | # 2.26.0: 27 Sep 2010 |
||
1192 | # 2.28.0: 08 Feb 2011 |
||
1193 | # 2.30.0: 27 Sep 2011 |
||
1194 | # 2.32.0: 24 Mar 2012 |
||
1195 | # 2.34.0: 24 Sep 2012 |
||
1196 | # 2.36.0: 25 Mar 2013 |
||
1197 | # 2.38.0: 23 Sep 2013 |
||
1198 | # 2.40.0: 24 Mar 2014 |
||
1199 | # 2.42.0: 22 Sep 2014 |
||
1200 | # 2.44.0: 23 Mar 2014 |
||
1201 | # 2.46.0: 25 Sep 2015 |
||
1202 | |||
1203 | PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GLIB], |
||
1204 | [glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION], |
||
1205 | [GLIB_VERSION=`$PKG_CONFIG --modversion glib-2.0`], |
||
1206 | [AC_MSG_ERROR([GLib $GLIB_MIN_VERSION or later not found.])]) |
||
1207 | |||
1208 | # Error out if a glib header other than a "top level" header |
||
1209 | # (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h) |
||
1210 | # is used. |
||
1211 | AX_APPEND_FLAG([-DG_DISABLE_SINGLE_INCLUDES], [GLIB_CONFIG]) |
||
1212 | |||
1213 | # Error out on the usage of deprecated glib functions |
||
1214 | AX_APPEND_FLAG([-DG_DISABLE_DEPRECATED], [GLIB_CONFIG]) |
||
1215 | |||
1216 | GLIB_CFLAGS="$GLIB_CONFIG $GLIB_CFLAGS" |
||
1217 | AC_SUBST(GLIB_CFLAGS) |
||
1218 | AC_SUBST(GLIB_LIBS) |
||
1219 | |||
1220 | GTK2_MIN_VERSION=2.12.0 |
||
1221 | AC_SUBST(GTK2_MIN_VERSION) |
||
1222 | GTK3_MIN_VERSION=3.0.0 |
||
1223 | AC_SUBST(GTK3_MIN_VERSION) |
||
1224 | QT_MIN_VERSION=4.7.0 |
||
1225 | AC_SUBST(QT_MIN_VERSION) |
||
1226 | # GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or |
||
1227 | # GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later. |
||
1228 | # |
||
1229 | # We only do those if we're going to be building Wireshark; |
||
1230 | # otherwise, we don't have any GUI to build, so we don't use |
||
1231 | # GTK+ or Qt. |
||
1232 | # |
||
1233 | # We don't add $GTK_LIBS or $Qt_LIBS to LIBS, because we don't want to |
||
1234 | # force all programs to be built with GTK+ or Qt. |
||
1235 | # |
||
1236 | # Release dates for GTK+ versions: |
||
1237 | # https://en.wikipedia.org/wiki/GTK+#Releases |
||
1238 | # 2.12.0: 14 Sep 2007 |
||
1239 | # 2.14.0: 04 Sep 2008 |
||
1240 | # 2.16.0: 13 Mar 2009 |
||
1241 | # 2.18.0: 23 Sep 2009 |
||
1242 | # 2.20.0: 23 Mar 2010 |
||
1243 | # 2.22.0: 23 Sep 2010 |
||
1244 | # 2.24.0: 30 Jan 2011 |
||
1245 | # 3.0.0: 10 Feb 2011 |
||
1246 | # 3.2.0: 25 Sep 2011 |
||
1247 | # 3.4.0: 26 Mar 2012 |
||
1248 | # 3.6.0: 24 Sep 2012 |
||
1249 | # 3.8.0: 25 Mar 2013 |
||
1250 | # 3.10.0: 23 Sep 2013 |
||
1251 | # 3.12.0: 25 Mar 2014 |
||
1252 | # 3.14.0: 30 Sep 2014 |
||
1253 | # 3.16.0: 22 Mar 2015 |
||
1254 | # 3.18.0 22 Sep 2015 |
||
1255 | # |
||
1256 | # Release dates for Qt versions: |
||
1257 | # https://en.wikipedia.org/wiki/List_of_Qt_releases |
||
1258 | # 4.6.0: 01 Dec 2009 |
||
1259 | # 4.7.0: 21 Sep 2010 |
||
1260 | # 4.8.0: 15 Dec 2011 |
||
1261 | # 5.0.0: 19 Dec 2012 |
||
1262 | # 5.1.0: 03 Jul 2013 |
||
1263 | # 5.2.0: 12 Dec 2013 |
||
1264 | # 5.3.0: 20 May 2014 |
||
1265 | # 5.4.0: 10 Dec 2015 |
||
1266 | # 5.5.0: 01 Jul 2015 |
||
1267 | |||
1268 | have_qt=no |
||
1269 | have_gtk=no |
||
1270 | if test "x$enable_wireshark" = "xyes"; then |
||
1271 | if test "x$with_qt" != "xno"; then |
||
1272 | # |
||
1273 | # Qt was specified; make sure we have a C++ compiler. |
||
1274 | # |
||
1275 | if test -z "$CXX"; then |
||
1276 | AC_MSG_ERROR(Need a working C++ compiler to build Wireshark with Qt) |
||
1277 | fi |
||
1278 | |||
1279 | # |
||
1280 | # Now make sure we have Qt and, if so, add the flags |
||
1281 | # for it to CFLAGS and CXXFLAGS. |
||
1282 | # |
||
1283 | AC_WIRESHARK_QT_CHECK($QT_MIN_VERSION, "$with_qt", |
||
1284 | [ |
||
1285 | AC_SUBST(Qt_CFLAGS) |
||
1286 | AC_SUBST(Qt_LIBS) |
||
1287 | have_qt=yes |
||
1288 | GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-qt" |
||
1289 | |||
1290 | # |
||
1291 | # We're building with Qt, so we need the Qt build |
||
1292 | # tools in order to build the Wireshark GUI. |
||
1293 | # We've found a particular major version of Qt, |
||
1294 | # and we want that version's build tools; for |
||
1295 | # example, the Qt 4 version of uic produces files |
||
1296 | # that include Qt headers with paths that work |
||
1297 | # with Qt 4 but not Qt 5, so we can't use the |
||
1298 | # Qt 4 version of uic if we're building with Qt 5. |
||
1299 | AC_WIRESHARK_QT_TOOL_CHECK(UIC, uic, "$qt_version") |
||
1300 | AC_SUBST(UIC) |
||
1301 | AC_WIRESHARK_QT_TOOL_CHECK(MOC, moc, "$qt_version") |
||
1302 | AC_SUBST(MOC) |
||
1303 | AC_WIRESHARK_QT_TOOL_CHECK(RCC, rcc, "$qt_version") |
||
1304 | AC_SUBST(RCC) |
||
1305 | AC_WIRESHARK_QT_TOOL_CHECK_LRELEASE("$qt_version") |
||
1306 | AC_SUBST(LRELEASE) |
||
1307 | |||
1308 | # |
||
1309 | # On Darwin, find where the Qt frameworks are |
||
1310 | # located, and add that to the rpath, just in |
||
1311 | # case this is Qt 5.5 or later and the frameworks |
||
1312 | # have an install name that begins with @rpath |
||
1313 | # and aren't installed in a frameworks directory |
||
1314 | # that's searched by default. |
||
1315 | # |
||
1316 | case "$host_os" in |
||
1317 | darwin*) |
||
1318 | if test $qt_version -le 4 |
||
1319 | then |
||
1320 | Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs QtCore | sed -e 's/-F//' -e 's/ -framework.*//'` |
||
1321 | else |
||
1322 | Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs Qt${qt_version}Core | sed -e 's/-F//' -e 's/ -framework.*//'` |
||
1323 | fi |
||
1324 | ;; |
||
1325 | esac |
||
1326 | AC_SUBST(Qt_LDFLAGS) |
||
1327 | |||
1328 | if test -z "${MOC_OPTIONS+1}" |
||
1329 | then |
||
1330 | # Squelch moc verbose "nothing to do" output |
||
1331 | if test $QT_VERSION_MAJOR -eq 5 |
||
1332 | then |
||
1333 | MOC_OPTIONS="-nn" |
||
1334 | elif test $QT_VERSION_MAJOR -eq 4 -a $QT_VERSION_MINOR -ge 8 |
||
1335 | then |
||
1336 | MOC_OPTIONS="-nn" |
||
1337 | fi |
||
1338 | fi |
||
1339 | AC_SUBST(MOC_OPTIONS) |
||
1340 | ], |
||
1341 | [ |
||
1342 | case "$with_qt" in |
||
1343 | |||
1344 | unspecified) |
||
1345 | # |
||
1346 | # They didn't explicitly ask for Qt, |
||
1347 | # so just don't build with it. |
||
1348 | # |
||
1349 | ;; |
||
1350 | |||
1351 | yes) |
||
1352 | AC_MSG_ERROR([Qt is not available]) |
||
1353 | ;; |
||
1354 | |||
1355 | 4) |
||
1356 | AC_MSG_ERROR([Qt 4 is not available]) |
||
1357 | ;; |
||
1358 | |||
1359 | 5) |
||
1360 | AC_MSG_ERROR([Qt 5 is not available]) |
||
1361 | ;; |
||
1362 | esac |
||
1363 | ]) |
||
1364 | fi |
||
1365 | |||
1366 | for want_gtk_version in $with_gtk; do |
||
1367 | AS_CASE([$want_gtk_version], |
||
1368 | [3], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK], |
||
1369 | [gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION], |
||
1370 | [ |
||
1371 | have_gtk=yes |
||
1372 | GTK_VERSION=`$PKG_CONFIG --modversion gtk+-3.0` |
||
1373 | GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=3" |
||
1374 | ], |
||
1375 | [ |
||
1376 | : |
||
1377 | ])], |
||
1378 | [2], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK], |
||
1379 | [gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION], |
||
1380 | [ |
||
1381 | have_gtk=yes |
||
1382 | GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0` |
||
1383 | GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=2" |
||
1384 | ], |
||
1385 | [ |
||
1386 | : |
||
1387 | ])], |
||
1388 | [fail3], [AC_MSG_ERROR([GTK+ 3 was requested but is not available])], |
||
1389 | [fail2], [AC_MSG_ERROR([GTK+ 2 was requested but is not available])], |
||
1390 | [fail], [AC_MSG_ERROR([GTK+ was requested but is not available])]) |
||
1391 | |||
1392 | AS_IF([test "x$have_gtk" = xyes], [break]) |
||
1393 | done |
||
1394 | |||
1395 | if test "$have_gtk" = "yes" ; then |
||
1396 | # If we have GTK then add flags for it. |
||
1397 | # |
||
1398 | # GLib flags first |
||
1399 | # |
||
1400 | GTK_CONFIG="$GLIB_CONFIG" |
||
1401 | |||
1402 | gtk_major_version=`echo $GTK_VERSION | cut -d. -f1` |
||
1403 | gtk_minor_version=`echo $GTK_VERSION | cut -d. -f2` |
||
1404 | |||
1405 | AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATED], [GTK_CONFIG]) |
||
1406 | if test \( $gtk_major_version -eq 3 -a $gtk_minor_version -ge 10 \) ; then |
||
1407 | ## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10; |
||
1408 | ## The deprecations in Gtk 3.10 will not be fixed ... |
||
1409 | AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATION_WARNINGS], [GTK_CONFIG]) |
||
1410 | else |
||
1411 | AX_APPEND_FLAG([-DGTK_DISABLE_DEPRECATED], [GTK_CONFIG]) |
||
1412 | fi |
||
1413 | AX_APPEND_FLAG([-DGTK_DISABLE_SINGLE_INCLUDES], [GTK_CONFIG]) |
||
1414 | if test ! \( $gtk_major_version -eq 2 -a $gtk_minor_version -lt 20 \) ; then |
||
1415 | # Enable GSEAL when building with GTK > 2.20 |
||
1416 | # (Versions prior to 2.22 lacked some necessary accessors.) |
||
1417 | AX_APPEND_FLAG([-DGSEAL_ENABLE], [GTK_CONFIG]) |
||
1418 | fi |
||
1419 | |||
1420 | GTK_CFLAGS="$GTK_CONFIG $GTK_CFLAGS" |
||
1421 | fi |
||
1422 | fi |
||
1423 | |||
1424 | AC_SUBST(GTK_CFLAGS) |
||
1425 | AC_SUBST(GTK_LIBS) |
||
1426 | AC_SUBST(GUI_CONFIGURE_FLAGS) |
||
1427 | |||
1428 | # Check for GTK GUI support for GResource pixbufs |
||
1429 | have_gresource_pixbuf=no |
||
1430 | if test "x$have_gtk" = "xyes"; then |
||
1431 | AC_MSG_CHECKING(whether GDK-Pixbuf can load data using GResource) |
||
1432 | PKG_CHECK_EXISTS([gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26], |
||
1433 | [ |
||
1434 | AC_MSG_RESULT(yes) |
||
1435 | AC_DEFINE(HAVE_GDK_GRESOURCE, 1, [Defined if GResource is supported]) |
||
1436 | have_gresource_pixbuf=yes |
||
1437 | ], |
||
1438 | [AC_MSG_RESULT(no)]) |
||
1439 | fi |
||
1440 | AM_CONDITIONAL(HAVE_GRESOURCE_PIXBUF, test "x$have_gresource_pixbuf" = "xyes") |
||
1441 | |||
1442 | if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then |
||
1443 | # We have both GTK and Qt and thus will be building both wireshark |
||
1444 | # and wireshark-gtk. |
||
1445 | |||
1446 | wireshark_bin="wireshark\$(EXEEXT) wireshark-gtk\$(EXEEXT)" |
||
1447 | wireshark_man="wireshark.1" |
||
1448 | wireshark_SUBDIRS="codecs ui/qt ui/gtk" |
||
1449 | elif test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then |
||
1450 | # We don't have GTK+ but we have Qt. |
||
1451 | |||
1452 | wireshark_bin="wireshark\$(EXEEXT)" |
||
1453 | wireshark_man="wireshark.1" |
||
1454 | wireshark_SUBDIRS="codecs ui/qt" |
||
1455 | elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then |
||
1456 | # We have GTK+ but not Qt. |
||
1457 | |||
1458 | wireshark_bin="wireshark-gtk\$(EXEEXT)" |
||
1459 | wireshark_man="wireshark.1" |
||
1460 | wireshark_SUBDIRS="codecs ui/gtk" |
||
1461 | OSX_APP_FLAGS="$OSX_APP_FLAGS -gtk" |
||
1462 | OSX_DMG_FLAGS="-gtk" |
||
1463 | elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then |
||
1464 | # We have neither GTK+ nor Qt. |
||
1465 | # |
||
1466 | # If they didn't explicitly say "--disable-wireshark", |
||
1467 | # fail (so that, unless they explicitly indicated that |
||
1468 | # they don't want Wireshark, we stop so they know they |
||
1469 | # won't be getting Wireshark unless they fix the GTK+/Qt |
||
1470 | # problem). |
||
1471 | # |
||
1472 | if test "x$enable_wireshark" = "xyes"; then |
||
1473 | if test "$with_qt" != "no" -a "$with_gtk" != "no" ; then |
||
1474 | AC_MSG_ERROR([Neither Qt nor GTK+ are available, so Wireshark can't be compiled]) |
||
1475 | elif test "$with_qt" != "no" -a "$with_gtk" = "no" ; then |
||
1476 | AC_MSG_ERROR([Qt is not available and GTK+ was not requested, so Wireshark can't be compiled]) |
||
1477 | elif test "$with_qt" = "no" -a "$with_gtk" != "no" ; then |
||
1478 | AC_MSG_ERROR([Qt was not requested and GTK+ is not available, so Wireshark can't be compiled]) |
||
1479 | elif test "$with_qt" = "no" -a "$with_gtk" = "no" ; then |
||
1480 | AC_MSG_ERROR([Neither Qt nor GTK+ were requested, so Wireshark can't be compiled]) |
||
1481 | fi |
||
1482 | fi |
||
1483 | wireshark_bin="" |
||
1484 | wireshark_man="" |
||
1485 | wireshark_SUBDIRS="" |
||
1486 | fi |
||
1487 | |||
1488 | # |
||
1489 | # Check whether GLib modules are supported, to determine whether we |
||
1490 | # can support plugins. |
||
1491 | # |
||
1492 | |||
1493 | AC_CACHE_CHECK([whether GLib supports loadable modules], |
||
1494 | [ac_cv_glib_supports_modules], [ |
||
1495 | ac_save_CFLAGS="$CFLAGS" |
||
1496 | ac_save_LIBS="$LIBS" |
||
1497 | CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS" |
||
1498 | LIBS="$LIBS $GLIB_LIBS" |
||
1499 | AC_TRY_RUN([ |
||
1500 | #include <glib.h> |
||
1501 | #include <gmodule.h> |
||
1502 | #include <stdio.h> |
||
1503 | #include <stdlib.h> |
||
1504 | |||
1505 | int |
||
1506 | main () |
||
1507 | { |
||
1508 | if (g_module_supported()) |
||
1509 | return 0; /* success */ |
||
1510 | else |
||
1511 | return 1; /* failure */ |
||
1512 | } |
||
1513 | ], ac_cv_glib_supports_modules=yes, ac_cv_glib_supports_modules=no, |
||
1514 | [echo $ac_n "cross compiling; assumed OK... $ac_c" |
||
1515 | ac_cv_glib_supports_modules=yes]) |
||
1516 | CFLAGS="$ac_save_CFLAGS" |
||
1517 | LIBS="$ac_save_LIBS" |
||
1518 | ]) |
||
1519 | if test "$ac_cv_glib_supports_modules" = yes ; then |
||
1520 | have_plugins=yes |
||
1521 | plugins_dir="plugins" |
||
1522 | else |
||
1523 | have_plugins=no |
||
1524 | plugins_dir="" |
||
1525 | fi |
||
1526 | AC_SUBST(plugins_dir) |
||
1527 | |||
1528 | # |
||
1529 | # If we have <dlfcn.h>, check whether we have dladdr. |
||
1530 | # |
||
1531 | if test "$ac_cv_header_dlfcn_h" = "yes" |
||
1532 | then |
||
1533 | # |
||
1534 | # Use GLib compiler flags and linker flags; GLib's gmodule |
||
1535 | # stuff uses the dl APIs if available, so it might know |
||
1536 | # what flags are needed. |
||
1537 | # |
||
1538 | ac_save_CFLAGS="$CFLAGS" |
||
1539 | ac_save_LIBS="$LIBS" |
||
1540 | CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS" |
||
1541 | LIBS="$LIBS $GLIB_LIBS" |
||
1542 | AC_CHECK_FUNCS(dladdr) |
||
1543 | if test x$ac_cv_func_dladdr = xno |
||
1544 | then |
||
1545 | # |
||
1546 | # OK, try it with -ldl, in case you need that to get |
||
1547 | # dladdr(). For some reason, on Linux, that's not |
||
1548 | # part of the GLib flags; perhaps GLib itself is |
||
1549 | # linked with libdl, so that you can link with |
||
1550 | # Glib and it'll pull libdl in itself. |
||
1551 | # |
||
1552 | LIBS="$LIBS -ldl" |
||
1553 | AC_CHECK_FUNCS(dladdr) |
||
1554 | fi |
||
1555 | CFLAGS="$ac_save_CFLAGS" |
||
1556 | LIBS="$ac_save_LIBS" |
||
1557 | fi |
||
1558 | |||
1559 | # |
||
1560 | # Check whether GLib's printf supports thousands grouping. (This might |
||
1561 | # be different from the system's printf since GLib can optionally use |
||
1562 | # its own printf implementation.) |
||
1563 | # |
||
1564 | AC_CACHE_CHECK([whether GLib supports POSIX/XSI thousands grouping], |
||
1565 | [ac_cv_glib_supports_printf_grouping], [ |
||
1566 | ac_save_CFLAGS="$CFLAGS" |
||
1567 | ac_save_LIBS="$LIBS" |
||
1568 | CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS" |
||
1569 | LIBS="$LIBS $GLIB_LIBS" |
||
1570 | AC_TRY_RUN([ |
||
1571 | #include <glib.h> |
||
1572 | #include <locale.h> |
||
1573 | #include <stdio.h> |
||
1574 | #include <string.h> |
||
1575 | |||
1576 | int |
||
1577 | main () |
||
1578 | { |
||
1579 | gchar *str; |
||
1580 | setlocale(LC_ALL, "en_US.UTF-8"); |
||
1581 | str = g_strdup_printf("%'u", 123456); |
||
1582 | return (strcmp (str, "123,456") != 0); |
||
1583 | } |
||
1584 | ], ac_cv_glib_supports_printf_grouping=yes, ac_cv_glib_supports_printf_grouping=no, |
||
1585 | [echo $ac_n "cross compiling; playing it safe... $ac_c" |
||
1586 | ac_cv_glib_supports_printf_grouping=no]) |
||
1587 | CFLAGS="$ac_save_CFLAGS" |
||
1588 | LIBS="$ac_save_LIBS" |
||
1589 | ]) |
||
1590 | if test "$ac_cv_glib_supports_printf_grouping" = yes ; then |
||
1591 | AC_DEFINE(HAVE_GLIB_PRINTF_GROUPING, 1, [Define if GLib's printf functions support thousands grouping.]) |
||
1592 | fi |
||
1593 | |||
1594 | if test "x$have_gtk" = "xyes" |
||
1595 | then |
||
1596 | # |
||
1597 | # We have GTK+; do we want the OS X integration functions and, |
||
1598 | # if so, do we have them and, if so, which versions do we have, |
||
1599 | # the old Carbon-based ones or the new Cocoa-based ones? |
||
1600 | # |
||
1601 | AC_MSG_CHECKING(whether to use OS X integration functions) |
||
1602 | |||
1603 | AC_ARG_WITH(osx-integration, |
||
1604 | AC_HELP_STRING( [--with-osx-integration], |
||
1605 | [use OS X integration functions @<:@default=yes, if available@:>@]), |
||
1606 | [ |
||
1607 | if test $withval = no |
||
1608 | then |
||
1609 | want_osx_integration=no |
||
1610 | else |
||
1611 | want_osx_integration=yes |
||
1612 | fi |
||
1613 | ],[ |
||
1614 | want_osx_integration=yes |
||
1615 | ]) |
||
1616 | if test "x$want_osx_integration" = "xno"; then |
||
1617 | AC_MSG_RESULT(no) |
||
1618 | else |
||
1619 | AC_MSG_RESULT(yes) |
||
1620 | AC_WIRESHARK_OSX_INTEGRATION_CHECK |
||
1621 | fi |
||
1622 | fi |
||
1623 | |||
1624 | AC_SUBST(wireshark_bin) |
||
1625 | AC_SUBST(wireshark_man) |
||
1626 | AC_SUBST(wireshark_SUBDIRS) |
||
1627 | AM_CONDITIONAL(HAVE_Qt, test "$have_qt" = "yes") |
||
1628 | AM_CONDITIONAL(HAVE_GTK, test "$have_gtk" = "yes") |
||
1629 | AC_SUBST(OSX_APP_FLAGS) |
||
1630 | AC_SUBST(OSX_DMG_FLAGS) |
||
1631 | |||
1632 | # Enable/disable tshark |
||
1633 | AC_ARG_ENABLE(tshark, |
||
1634 | AC_HELP_STRING( [--enable-tshark], |
||
1635 | [build tshark @<:@default=yes@:>@]), |
||
1636 | tshark=$enableval,enable_tshark=yes) |
||
1637 | |||
1638 | if test "x$enable_tshark" = "xyes" ; then |
||
1639 | tshark_bin="tshark\$(EXEEXT)" |
||
1640 | tshark_man="tshark.1" |
||
1641 | wiresharkfilter_man="wireshark-filter.4" |
||
1642 | else |
||
1643 | tshark_bin="" |
||
1644 | tshark_man="" |
||
1645 | fi |
||
1646 | AC_SUBST(tshark_bin) |
||
1647 | AC_SUBST(tshark_man) |
||
1648 | |||
1649 | # Enable/disable editcap |
||
1650 | |||
1651 | AC_ARG_ENABLE(editcap, |
||
1652 | AC_HELP_STRING( [--enable-editcap], |
||
1653 | [build editcap @<:@default=yes@:>@]), |
||
1654 | enable_editcap=$enableval,enable_editcap=yes) |
||
1655 | |||
1656 | if test "x$enable_editcap" = "xyes" ; then |
||
1657 | editcap_bin="editcap\$(EXEEXT)" |
||
1658 | editcap_man="editcap.1" |
||
1659 | else |
||
1660 | editcap_bin="" |
||
1661 | editcap_man="" |
||
1662 | fi |
||
1663 | AC_SUBST(editcap_bin) |
||
1664 | AC_SUBST(editcap_man) |
||
1665 | |||
1666 | |||
1667 | # Enabling/disabling of dumpcap is done later (after we know if we have PCAP |
||
1668 | # or not) |
||
1669 | |||
1670 | # Enable/disable capinfos |
||
1671 | |||
1672 | AC_ARG_ENABLE(capinfos, |
||
1673 | AC_HELP_STRING( [--enable-capinfos], |
||
1674 | [build capinfos @<:@default=yes@:>@]), |
||
1675 | enable_capinfos=$enableval,enable_capinfos=yes) |
||
1676 | |||
1677 | if test "x$enable_capinfos" = "xyes" ; then |
||
1678 | capinfos_bin="capinfos\$(EXEEXT)" |
||
1679 | capinfos_man="capinfos.1" |
||
1680 | else |
||
1681 | capinfos_bin="" |
||
1682 | capinfos_man="" |
||
1683 | fi |
||
1684 | AC_SUBST(capinfos_bin) |
||
1685 | AC_SUBST(capinfos_man) |
||
1686 | |||
1687 | # Enable/disable captype |
||
1688 | |||
1689 | AC_ARG_ENABLE(captype, |
||
1690 | AC_HELP_STRING( [--enable-captype], |
||
1691 | [build captype @<:@default=yes@:>@]), |
||
1692 | enable_captype=$enableval,enable_captype=yes) |
||
1693 | |||
1694 | if test "x$enable_captype" = "xyes" ; then |
||
1695 | captype_bin="captype\$(EXEEXT)" |
||
1696 | captype_man="captype.1" |
||
1697 | else |
||
1698 | captype_bin="" |
||
1699 | captype_man="" |
||
1700 | fi |
||
1701 | AC_SUBST(captype_bin) |
||
1702 | AC_SUBST(captype_man) |
||
1703 | |||
1704 | # Enable/disable mergecap |
||
1705 | |||
1706 | AC_ARG_ENABLE(mergecap, |
||
1707 | AC_HELP_STRING( [--enable-mergecap], |
||
1708 | [build mergecap @<:@default=yes@:>@]), |
||
1709 | enable_mergecap=$enableval,enable_mergecap=yes) |
||
1710 | |||
1711 | if test "x$enable_mergecap" = "xyes" ; then |
||
1712 | mergecap_bin="mergecap\$(EXEEXT)" |
||
1713 | mergecap_man="mergecap.1" |
||
1714 | else |
||
1715 | mergecap_bin="" |
||
1716 | mergecap_man="" |
||
1717 | fi |
||
1718 | AC_SUBST(mergecap_bin) |
||
1719 | AC_SUBST(mergecap_man) |
||
1720 | |||
1721 | # Enable/disable reordercap |
||
1722 | |||
1723 | AC_ARG_ENABLE(reordercap, |
||
1724 | AC_HELP_STRING( [--enable-reordercap], |
||
1725 | [build reordercap @<:@default=yes@:>@]), |
||
1726 | enable_reordercap=$enableval,enable_reordercap=yes) |
||
1727 | |||
1728 | if test "x$enable_reordercap" = "xyes" ; then |
||
1729 | reordercap_bin="reordercap\$(EXEEXT)" |
||
1730 | reordercap_man="reordercap.1" |
||
1731 | else |
||
1732 | reordercap_bin="" |
||
1733 | reordercap_man="" |
||
1734 | fi |
||
1735 | AC_SUBST(reordercap_bin) |
||
1736 | AC_SUBST(reordercap_man) |
||
1737 | |||
1738 | # Enable/disable text2pcap |
||
1739 | |||
1740 | AC_ARG_ENABLE(text2pcap, |
||
1741 | AC_HELP_STRING( [--enable-text2pcap], |
||
1742 | [build text2pcap @<:@default=yes@:>@]), |
||
1743 | text2pcap=$enableval,enable_text2pcap=yes) |
||
1744 | |||
1745 | if test "x$enable_text2pcap" = "xyes" ; then |
||
1746 | text2pcap_bin="text2pcap\$(EXEEXT)" |
||
1747 | text2pcap_man="text2pcap.1" |
||
1748 | else |
||
1749 | text2pcap_bin="" |
||
1750 | text2pcap_man="" |
||
1751 | fi |
||
1752 | AC_SUBST(text2pcap_bin) |
||
1753 | AC_SUBST(text2pcap_man) |
||
1754 | |||
1755 | # Enable/disable dftest |
||
1756 | |||
1757 | AC_ARG_ENABLE(dftest, |
||
1758 | AC_HELP_STRING( [--enable-dftest], |
||
1759 | [build dftest @<:@default=yes@:>@]), |
||
1760 | enable_dftest=$enableval,enable_dftest=yes) |
||
1761 | |||
1762 | if test "x$enable_dftest" = "xyes" ; then |
||
1763 | dftest_bin="dftest\$(EXEEXT)" |
||
1764 | dftest_man="dftest.1" |
||
1765 | else |
||
1766 | dftest_bin="" |
||
1767 | dftest_man="" |
||
1768 | fi |
||
1769 | AC_SUBST(dftest_bin) |
||
1770 | AC_SUBST(dftest_man) |
||
1771 | |||
1772 | # Enable/disable randpkt |
||
1773 | |||
1774 | AC_ARG_ENABLE(randpkt, |
||
1775 | AC_HELP_STRING( [--enable-randpkt], |
||
1776 | [build randpkt @<:@default=yes@:>@]), |
||
1777 | enable_randpkt=$enableval,enable_randpkt=yes) |
||
1778 | |||
1779 | if test "x$enable_randpkt" = "xyes" ; then |
||
1780 | randpkt_bin="randpkt\$(EXEEXT)" |
||
1781 | randpkt_man="randpkt.1" |
||
1782 | else |
||
1783 | randpkt_bin="" |
||
1784 | randpkt_man="" |
||
1785 | fi |
||
1786 | AC_SUBST(randpkt_bin) |
||
1787 | AC_SUBST(randpkt_man) |
||
1788 | |||
1789 | AC_SUBST(wiresharkfilter_man) |
||
1790 | |||
1791 | dnl pcap check |
||
1792 | AC_MSG_CHECKING(whether to use libpcap for packet capture) |
||
1793 | |||
1794 | AC_ARG_WITH(pcap, |
||
1795 | AC_HELP_STRING( [--with-pcap@<:@=DIR@:>@], |
||
1796 | [use libpcap for packet capturing @<:@default=yes@:>@]), |
||
1797 | [ |
||
1798 | if test $withval = no |
||
1799 | then |
||
1800 | want_pcap=no |
||
1801 | elif test $withval = yes |
||
1802 | then |
||
1803 | want_pcap=yes |
||
1804 | else |
||
1805 | want_pcap=yes |
||
1806 | pcap_dir=$withval |
||
1807 | fi |
||
1808 | ],[ |
||
1809 | want_pcap=yes |
||
1810 | pcap_dir= |
||
1811 | ]) |
||
1812 | if test "x$want_pcap" = "xno" ; then |
||
1813 | AC_MSG_RESULT(no) |
||
1814 | else |
||
1815 | AC_MSG_RESULT(yes) |
||
1816 | AC_WIRESHARK_PCAP_CHECK |
||
1817 | fi |
||
1818 | |||
1819 | dnl dumpcap check |
||
1820 | AC_MSG_CHECKING(whether to build dumpcap) |
||
1821 | |||
1822 | AC_ARG_ENABLE(dumpcap, |
||
1823 | AC_HELP_STRING( [--enable-dumpcap], |
||
1824 | [build dumpcap @<:@default=yes@:>@]), |
||
1825 | enable_dumpcap=$enableval,enable_dumpcap=yes) |
||
1826 | |||
1827 | if test "x$enable_dumpcap" = "xyes" ; then |
||
1828 | if test "x$want_pcap" = "xno" ; then |
||
1829 | enable_dumpcap=no |
||
1830 | AC_MSG_RESULT(pcap not available - disabling dumpcap) |
||
1831 | else |
||
1832 | AC_MSG_RESULT(yes) |
||
1833 | fi |
||
1834 | else |
||
1835 | AC_MSG_RESULT(no) |
||
1836 | fi |
||
1837 | |||
1838 | if test "x$enable_dumpcap" = "xyes" ; then |
||
1839 | dumpcap_bin="dumpcap\$(EXEEXT)" |
||
1840 | dumpcap_man="dumpcap.1" |
||
1841 | else |
||
1842 | dumpcap_bin="" |
||
1843 | dumpcap_man="" |
||
1844 | fi |
||
1845 | AC_SUBST(dumpcap_bin) |
||
1846 | AC_SUBST(dumpcap_man) |
||
1847 | |||
1848 | # Enable/disable rawshark |
||
1849 | |||
1850 | dnl rawshark check |
||
1851 | AC_MSG_CHECKING(whether to build rawshark) |
||
1852 | |||
1853 | AC_ARG_ENABLE(rawshark, |
||
1854 | AC_HELP_STRING( [--enable-rawshark], |
||
1855 | [build rawshark @<:@default=yes@:>@]), |
||
1856 | rawshark=$enableval,enable_rawshark=yes) |
||
1857 | |||
1858 | if test "x$enable_rawshark" = "xyes" ; then |
||
1859 | if test "x$want_pcap" = "xno" ; then |
||
1860 | enable_rawshark=no |
||
1861 | AC_MSG_RESULT(pcap not available - disabling rawshark) |
||
1862 | else |
||
1863 | AC_MSG_RESULT(yes) |
||
1864 | fi |
||
1865 | else |
||
1866 | AC_MSG_RESULT(no) |
||
1867 | fi |
||
1868 | |||
1869 | if test "x$enable_rawshark" = "xyes" ; then |
||
1870 | rawshark_bin="rawshark\$(EXEEXT)" |
||
1871 | rawshark_man="rawshark.1" |
||
1872 | else |
||
1873 | rawshark_bin="" |
||
1874 | rawshark_man="" |
||
1875 | fi |
||
1876 | AC_SUBST(rawshark_bin) |
||
1877 | AC_SUBST(rawshark_man) |
||
1878 | |||
1879 | # Enable/disable echld |
||
1880 | AC_ARG_ENABLE(echld, |
||
1881 | AC_HELP_STRING( [--enable-echld], |
||
1882 | [support echld (Experimental) @<:@default=no@:>@]), |
||
1883 | have_echld=$enableval,have_echld=no) |
||
1884 | |||
1885 | AM_CONDITIONAL(HAVE_ECHLD, test "x$have_echld" = "xyes") |
||
1886 | if test "x$have_echld" = "xyes" |
||
1887 | then |
||
1888 | AC_DEFINE(HAVE_ECHLD, 1, [Define if echld is enabled]) |
||
1889 | echld_test_bin="echld_test\$(EXEEXT)" |
||
1890 | echld_dir="echld" |
||
1891 | else |
||
1892 | have_echld="no" |
||
1893 | echld_test_bin="" |
||
1894 | echld_dir="" |
||
1895 | fi |
||
1896 | AC_SUBST(echld_test_bin) |
||
1897 | AC_SUBST(echld_dir) |
||
1898 | |||
1899 | # Enable/disable tfshark |
||
1900 | AC_ARG_ENABLE(tfshark, |
||
1901 | AC_HELP_STRING( [--enable-tfshark], |
||
1902 | [build tfshark (Experimental) @<:@default=no@:>@]), |
||
1903 | tfshark=$enableval,enable_tfshark=no) |
||
1904 | |||
1905 | if test "x$enable_tfshark" = "xyes" ; then |
||
1906 | tfshark_bin="tfshark\$(EXEEXT)" |
||
1907 | tfshark_man="tfshark.1" |
||
1908 | wiresharkfilter_man="wireshark-filter.4" |
||
1909 | else |
||
1910 | tfshark_bin="" |
||
1911 | tfshark_man="" |
||
1912 | fi |
||
1913 | AC_SUBST(tfshark_bin) |
||
1914 | AC_SUBST(tfshark_man) |
||
1915 | |||
1916 | |||
1917 | dnl Use pcap-ng by default |
||
1918 | AC_ARG_ENABLE(pcap-ng-default, |
||
1919 | AC_HELP_STRING( [--enable-pcap-ng-default], |
||
1920 | [use the pcap-ng file format by default instead of pcap @<:@default=yes@:>@]), |
||
1921 | enable_pcap_ng_default=$enableval,enable_pcap_ng_default=yes) |
||
1922 | if test x$enable_pcap_ng_default = xyes; then |
||
1923 | AC_DEFINE(PCAP_NG_DEFAULT, 1, [Support for pcap-ng]) |
||
1924 | fi |
||
1925 | |||
1926 | dnl pcap remote check |
||
1927 | AC_MSG_CHECKING(whether to use libpcap remote capturing feature) |
||
1928 | |||
1929 | AC_ARG_WITH(pcap-remote, |
||
1930 | AC_HELP_STRING([--with-pcap-remote], |
||
1931 | [use libpcap remote capturing (requires libpcap)]), |
||
1932 | [ |
||
1933 | if test $withval = no |
||
1934 | then |
||
1935 | want_pcap_remote=no |
||
1936 | else |
||
1937 | want_pcap_remote=yes |
||
1938 | fi |
||
1939 | ],[ |
||
1940 | want_pcap_remote=no |
||
1941 | ]) |
||
1942 | if test "x$want_pcap_remote" = "xno" -o "x$want_pcap" = "xno" ; then |
||
1943 | AC_MSG_RESULT(no) |
||
1944 | else |
||
1945 | AC_MSG_RESULT(yes) |
||
1946 | AC_WIRESHARK_PCAP_REMOTE_CHECK |
||
1947 | fi |
||
1948 | |||
1949 | dnl zlib check |
||
1950 | AC_MSG_CHECKING(whether to use zlib for gzip compression and decompression) |
||
1951 | |||
1952 | AC_ARG_WITH(zlib, |
||
1953 | AC_HELP_STRING([--with-zlib@<:@=DIR@:>@], |
||
1954 | [use zlib (located in directory DIR, if supplied) for gzip compression and decompression @<:@default=yes, if available@:>@]), |
||
1955 | [ |
||
1956 | if test "x$withval" = "xno" |
||
1957 | then |
||
1958 | want_zlib=no |
||
1959 | elif test "x$withval" = "xyes" |
||
1960 | then |
||
1961 | want_zlib=yes |
||
1962 | else |
||
1963 | want_zlib=yes |
||
1964 | zlib_dir="$withval" |
||
1965 | fi |
||
1966 | ],[ |
||
1967 | # |
||
1968 | # Use zlib if it's present, otherwise don't. |
||
1969 | # |
||
1970 | want_zlib=ifavailable |
||
1971 | zlib_dir= |
||
1972 | ]) |
||
1973 | if test "x$want_zlib" = "xno" ; then |
||
1974 | AC_MSG_RESULT(no) |
||
1975 | else |
||
1976 | AC_MSG_RESULT(yes) |
||
1977 | AC_WIRESHARK_ZLIB_CHECK |
||
1978 | if test "x$want_zlib" = "xno" ; then |
||
1979 | AC_MSG_RESULT(zlib not found - disabling gzip compression and decompression) |
||
1980 | else |
||
1981 | if test "x$ac_cv_func_inflatePrime" = "xno" ; then |
||
1982 | AC_MSG_RESULT(inflatePrime not found in zlib - disabling gzipped capture file support) |
||
1983 | fi |
||
1984 | fi |
||
1985 | fi |
||
1986 | |||
1987 | dnl Lua check |
||
1988 | AC_ARG_WITH(lua, |
||
1989 | AC_HELP_STRING( [--with-lua@<:@=DIR@:>@], |
||
1990 | [use liblua (located in directory DIR, if supplied) for the Lua scripting plugin @<:@default=yes, if available@:>@]), |
||
1991 | [ |
||
1992 | if test $withval = no |
||
1993 | then |
||
1994 | want_lua=no |
||
1995 | elif test $withval = yes |
||
1996 | then |
||
1997 | want_lua=yes |
||
1998 | else |
||
1999 | want_lua=yes |
||
2000 | want_lua_dir=$withval |
||
2001 | fi |
||
2002 | ],[ |
||
2003 | # By default use Lua if we can find it |
||
2004 | want_lua=ifavailable |
||
2005 | lua_dir= |
||
2006 | ]) |
||
2007 | if test "x$want_lua" != "xno" ; then |
||
2008 | AC_WIRESHARK_LIBLUA_CHECK |
||
2009 | |||
2010 | if test "x$want_lua" = "xyes" -a "x$have_lua" = "xno" |
||
2011 | then |
||
2012 | AC_MSG_ERROR([Lua support was requested, but is not available]) |
||
2013 | fi |
||
2014 | fi |
||
2015 | if test "x$have_lua" = "xyes" |
||
2016 | then |
||
2017 | AC_DEFINE(HAVE_LUA, 1, [Define to use Lua]) |
||
2018 | fi |
||
2019 | AM_CONDITIONAL(HAVE_LIBLUA, test x$have_lua = xyes) |
||
2020 | AC_SUBST(LUA_LIBS) |
||
2021 | AC_SUBST(LUA_CFLAGS) |
||
2022 | |||
2023 | |||
2024 | dnl portaudio check |
||
2025 | AC_MSG_CHECKING(whether to use libportaudio for the GTK+ RTP player) |
||
2026 | |||
2027 | AC_ARG_WITH(portaudio, |
||
2028 | AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@], |
||
2029 | [use libportaudio (located in directory DIR, if supplied) for the GTK+ RTP player @<:@default=yes, if available@:>@]), |
||
2030 | [ |
||
2031 | if test $withval = no |
||
2032 | then |
||
2033 | want_portaudio=no |
||
2034 | elif test $withval = yes |
||
2035 | then |
||
2036 | want_portaudio=yes |
||
2037 | else |
||
2038 | want_portaudio=yes |
||
2039 | portaudio_dir=$withval |
||
2040 | fi |
||
2041 | ],[ |
||
2042 | # |
||
2043 | # Use libportaudio by default |
||
2044 | # |
||
2045 | want_portaudio=ifavailable |
||
2046 | portaudio_dir= |
||
2047 | ]) |
||
2048 | if test "x$want_portaudio" = "xno" ; then |
||
2049 | AC_MSG_RESULT(no) |
||
2050 | else |
||
2051 | AC_MSG_RESULT(yes) |
||
2052 | AC_WIRESHARK_LIBPORTAUDIO_CHECK |
||
2053 | if test "x$want_portaudio" = "xno" ; then |
||
2054 | AC_MSG_RESULT(libportaudio not found - disabling support for the GTK+ RTP player) |
||
2055 | fi |
||
2056 | fi |
||
2057 | AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes) |
||
2058 | |||
2059 | |||
2060 | dnl Check if dumpcap should be installed with filesystem capabilities |
||
2061 | AC_PATH_PROG(SETCAP, setcap) |
||
2062 | AC_ARG_ENABLE(setcap-install, |
||
2063 | AC_HELP_STRING( [--enable-setcap-install], |
||
2064 | [install dumpcap with cap_net_admin and cap_net_raw @<:@default=no@:>@]), |
||
2065 | enable_setcap_install=$enableval,enable_setcap_install=no) |
||
2066 | |||
2067 | AC_MSG_CHECKING(whether to install dumpcap with cap_net_admin and cap_net_raw capabilities) |
||
2068 | if test "x$enable_setcap_install" = "xno" ; then |
||
2069 | AC_MSG_RESULT(no) |
||
2070 | else |
||
2071 | if test "x$SETCAP" = "x" ; then |
||
2072 | AC_MSG_RESULT(setcap not found) |
||
2073 | AC_MSG_ERROR([Setcap install was requested, but setcap was not found]) |
||
2074 | elif test "x$enable_dumpcap" = "xno" ; then |
||
2075 | AC_MSG_RESULT(dumpcap disabled) |
||
2076 | AC_MSG_ERROR([Setcap install works only with dumpcap, but dumpcap is disabled]) |
||
2077 | else |
||
2078 | AC_MSG_RESULT(yes) |
||
2079 | fi |
||
2080 | fi |
||
2081 | |||
2082 | AM_CONDITIONAL(SETCAP_INSTALL, test x$enable_setcap_install = xyes) |
||
2083 | |||
2084 | dnl Check if dumpcap should be installed setuid |
||
2085 | AC_ARG_ENABLE(setuid-install, |
||
2086 | AC_HELP_STRING( [--enable-setuid-install], |
||
2087 | [install dumpcap as setuid @<:@default=no@:>@]), |
||
2088 | enable_setuid_install=$enableval,enable_setuid_install=no) |
||
2089 | |||
2090 | AC_MSG_CHECKING(whether to install dumpcap setuid) |
||
2091 | if test "x$enable_setuid_install" = "xno" ; then |
||
2092 | AC_MSG_RESULT(no) |
||
2093 | else |
||
2094 | if test "x$enable_setcap_install" = "xyes" ; then |
||
2095 | enable_setuid_install=no |
||
2096 | AC_MSG_RESULT(setcap and setuid both selected) |
||
2097 | AC_MSG_ERROR(You must choose one of setcap install and setuid install) |
||
2098 | elif test "x$enable_dumpcap" = "xno" ; then |
||
2099 | AC_MSG_RESULT(dumpcap disabled) |
||
2100 | AC_MSG_ERROR([Setuid install works only with dumpcap, but dumpcap is disabled]) |
||
2101 | else |
||
2102 | AC_MSG_RESULT(yes) |
||
2103 | fi |
||
2104 | fi |
||
2105 | |||
2106 | AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes) |
||
2107 | AC_CHECK_FUNCS(setresuid setresgid) |
||
2108 | |||
2109 | dnl ...but our Network Operations group is named "no"! |
||
2110 | DUMPCAP_GROUP='' |
||
2111 | AC_ARG_WITH(dumpcap-group, |
||
2112 | AC_HELP_STRING( [--with-dumpcap-group=GROUP], |
||
2113 | [restrict dumpcap to GROUP]), |
||
2114 | [ |
||
2115 | if test "x$withval" = "xyes"; then |
||
2116 | AC_MSG_ERROR([No dumpcap group specified.]) |
||
2117 | elif test "x$withval" != "xno"; then |
||
2118 | if test "x$enable_dumpcap" = "xno" ; then |
||
2119 | AC_MSG_ERROR(dumpcap group install works only with dumpcap but dumpcap is disabled) |
||
2120 | fi |
||
2121 | AC_MSG_RESULT($withval) |
||
2122 | DUMPCAP_GROUP="$withval" |
||
2123 | fi |
||
2124 | ]) |
||
2125 | AC_SUBST(DUMPCAP_GROUP) |
||
2126 | AM_CONDITIONAL(HAVE_DUMPCAP_GROUP, test x$DUMPCAP_GROUP != x) |
||
2127 | |||
2128 | dnl libcap (not libpcap) check |
||
2129 | LIBCAP_LIBS='' |
||
2130 | AC_MSG_CHECKING(whether to use the libcap capabilities library) |
||
2131 | |||
2132 | AC_ARG_WITH(libcap, |
||
2133 | AC_HELP_STRING( [--with-libcap@<:@=DIR@:>@], |
||
2134 | [use libcap (located in directory DIR, if supplied) for POSIX.1e capabilities management @<:@default=yes, if present@:>@]), |
||
2135 | [ |
||
2136 | if test "x$withval" = "xno"; then |
||
2137 | want_libcap=no |
||
2138 | elif test "x$withval" = "xyes"; then |
||
2139 | want_libcap=yes |
||
2140 | elif test -d "$withval"; then |
||
2141 | want_libcap=yes |
||
2142 | AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib) |
||
2143 | fi |
||
2144 | ]) |
||
2145 | if test "x$with_libcap" = "xno" ; then |
||
2146 | AC_MSG_RESULT(no) |
||
2147 | else |
||
2148 | AC_MSG_RESULT(yes) |
||
2149 | AC_WIRESHARK_LIBCAP_CHECK |
||
2150 | fi |
||
2151 | AC_SUBST(LIBCAP_LIBS) |
||
2152 | |||
2153 | dnl Checks for header files. |
||
2154 | dnl Some of these may not be needed: http://hacks.owlfolio.org/header-survey/ |
||
2155 | dnl Note, however, that, whilst this script is generally run only on UN*Xes: |
||
2156 | dnl |
||
2157 | dnl 1) we also support building on and for Windows and not all of those |
||
2158 | dnl headers are present on Windows, so the code has to check a |
||
2159 | dnl #define *anyway* to determine whether to include the header |
||
2160 | dnl file |
||
2161 | dnl |
||
2162 | dnl and |
||
2163 | dnl |
||
2164 | dnl 2) this might also be run on Windows with a sufficiently UNIXy |
||
2165 | dnl environment such as Cygwin (although Wireshark should be built |
||
2166 | dnl natively rather than using Cygwin). |
||
2167 | dnl |
||
2168 | AC_CHECK_HEADERS(fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h unistd.h) |
||
2169 | AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h) |
||
2170 | AC_CHECK_HEADERS(netinet/in.h) |
||
2171 | AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h) |
||
2172 | AC_CHECK_HEADERS(ifaddrs.h) |
||
2173 | |||
2174 | # |
||
2175 | # On Linux, check for some additional headers, which we need as a |
||
2176 | # workaround for a bonding driver bug and for libpcap's current lack |
||
2177 | # of its own workaround for that bug. |
||
2178 | # |
||
2179 | case "$host_os" in |
||
2180 | linux*) |
||
2181 | AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,,[#include <sys/socket.h>]) |
||
2182 | ;; |
||
2183 | esac |
||
2184 | |||
2185 | dnl SSL Check |
||
2186 | SSL_LIBS='' |
||
2187 | AC_MSG_CHECKING(whether to use SSL library) |
||
2188 | |||
2189 | AC_ARG_WITH(ssl, |
||
2190 | AC_HELP_STRING( [--with-ssl@<:@=DIR@:>@], |
||
2191 | [use SSL crypto library (located in directory DIR, if supplied) @<:@default=no@:>@]), |
||
2192 | [ |
||
2193 | if test "x$withval" = "xno"; then |
||
2194 | want_ssl=no |
||
2195 | elif test "x$withval" = "xyes"; then |
||
2196 | want_ssl=yes |
||
2197 | elif test -d "$withval"; then |
||
2198 | want_ssl=yes |
||
2199 | AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib) |
||
2200 | fi |
||
2201 | ],[ |
||
2202 | want_ssl=no |
||
2203 | ]) |
||
2204 | if test "x$want_ssl" = "xyes"; then |
||
2205 | AC_MSG_RESULT(yes) |
||
2206 | AC_CHECK_LIB(crypto,EVP_md5, |
||
2207 | [ |
||
2208 | SSL_LIBS=-lcrypto |
||
2209 | ], |
||
2210 | [ |
||
2211 | AC_MSG_ERROR([SSL crypto library was requested, but is not available]) |
||
2212 | ]) |
||
2213 | else |
||
2214 | AC_MSG_RESULT(no) |
||
2215 | fi |
||
2216 | AC_SUBST(SSL_LIBS) |
||
2217 | |||
2218 | dnl kerberos check |
||
2219 | AC_MSG_CHECKING(whether to use Kerberos library) |
||
2220 | |||
2221 | AC_ARG_WITH(krb5, |
||
2222 | AC_HELP_STRING( [--with-krb5@<:@=DIR@:>@], |
||
2223 | [use Kerberos library (located in directory DIR, if supplied) to use in Kerberos dissection @<:@default=yes@:>@]), |
||
2224 | [ |
||
2225 | if test $withval = no |
||
2226 | then |
||
2227 | want_krb5=no |
||
2228 | elif test $withval = yes |
||
2229 | then |
||
2230 | want_krb5=yes |
||
2231 | else |
||
2232 | want_krb5=yes |
||
2233 | krb5_dir=$withval |
||
2234 | fi |
||
2235 | ],[ |
||
2236 | # |
||
2237 | # Use Kerberos library if available, otherwise don't. |
||
2238 | # |
||
2239 | want_krb5=ifavailable |
||
2240 | krb5_dir= |
||
2241 | ]) |
||
2242 | if test "x$want_krb5" = "xno" ; then |
||
2243 | AC_MSG_RESULT(no) |
||
2244 | else |
||
2245 | AC_MSG_RESULT(yes) |
||
2246 | AC_WIRESHARK_KRB5_CHECK |
||
2247 | fi |
||
2248 | |||
2249 | |||
2250 | dnl c-ares Check |
||
2251 | C_ARES_LIBS='' |
||
2252 | AC_MSG_CHECKING(whether to use the c-ares library if available) |
||
2253 | |||
2254 | AC_ARG_WITH(c-ares, |
||
2255 | AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@], |
||
2256 | [use c-ares (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]), |
||
2257 | [ |
||
2258 | if test "x$withval" = "xno"; then |
||
2259 | want_c_ares=no |
||
2260 | elif test "x$withval" = "xyes"; then |
||
2261 | want_c_ares=yes |
||
2262 | elif test -d "$withval"; then |
||
2263 | want_c_ares=yes |
||
2264 | AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib) |
||
2265 | fi |
||
2266 | ]) |
||
2267 | if test "x$want_c_ares" = "xno" ; then |
||
2268 | AC_MSG_RESULT(no) |
||
2269 | else |
||
2270 | AC_MSG_RESULT(yes) |
||
2271 | AC_WIRESHARK_C_ARES_CHECK |
||
2272 | fi |
||
2273 | AC_SUBST(C_ARES_LIBS) |
||
2274 | |||
2275 | dnl GEOIP Check |
||
2276 | GEOIP_LIBS='' |
||
2277 | AC_MSG_CHECKING(whether to use the GeoIP IP address mapping library if available) |
||
2278 | |||
2279 | AC_ARG_WITH(geoip, |
||
2280 | AC_HELP_STRING( [--with-geoip@<:@=DIR@:>@], |
||
2281 | [use GeoIP (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]), |
||
2282 | [ |
||
2283 | if test "x$withval" = "xno"; then |
||
2284 | want_geoip=no |
||
2285 | elif test "x$withval" = "xyes"; then |
||
2286 | want_geoip=yes |
||
2287 | elif test -d "$withval"; then |
||
2288 | want_geoip=yes |
||
2289 | AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib) |
||
2290 | fi |
||
2291 | ]) |
||
2292 | if test "x$want_geoip" = "xno"; then |
||
2293 | AC_MSG_RESULT(no) |
||
2294 | else |
||
2295 | AC_MSG_RESULT(yes) |
||
2296 | AC_WIRESHARK_GEOIP_CHECK |
||
2297 | fi |
||
2298 | AC_SUBST(GEOIP_LIBS) |
||
2299 | |||
2300 | dnl LIBSSH Check |
||
2301 | LIBSSH='' |
||
2302 | AC_MSG_CHECKING(whether to use the libssh library if available) |
||
2303 | |||
2304 | AC_ARG_WITH(ssh, |
||
2305 | AC_HELP_STRING( [--with-libssh@<:@=DIR@:>@], |
||
2306 | [use libssh (located in directory DIR, if supplied) @<:@default=yes, if present@:>@]), |
||
2307 | [ |
||
2308 | if test "x$withval" = "xno"; then |
||
2309 | want_libssh=no |
||
2310 | elif test "x$withval" = "xyes"; then |
||
2311 | want_libssh=yes |
||
2312 | elif test -d "$withval"; then |
||
2313 | want_libssh=yes |
||
2314 | AC_WIRESHARK_ADD_DASH_L(WS_LDFLAGS, ${withval}/lib) |
||
2315 | fi |
||
2316 | ]) |
||
2317 | if test "x$want_libssh" = "xno"; then |
||
2318 | AC_MSG_RESULT(no) |
||
2319 | else |
||
2320 | AC_MSG_RESULT(yes) |
||
2321 | AC_WIRESHARK_LIBSSH_CHECK |
||
2322 | fi |
||
2323 | AC_SUBST(LIBSSH_LIBS) |
||
2324 | |||
2325 | dnl Checks for typedefs, structures, and compiler characteristics. |
||
2326 | # AC_C_CONST |
||
2327 | |||
2328 | # Check how we can get the time zone abbreviation |
||
2329 | AC_STRUCT_TIMEZONE |
||
2330 | |||
2331 | # We need to know whether "struct stat" has an "st_flags" member |
||
2332 | # for file_user_immutable(). |
||
2333 | |||
2334 | AC_CHECK_MEMBERS([struct stat.st_flags]) |
||
2335 | |||
2336 | # We need to know whether "struct stat" has an "st_birthtime" member |
||
2337 | # or an "__st_birthtime" member for the file set dialog. |
||
2338 | |||
2339 | AC_CHECK_MEMBERS([struct stat.st_birthtime]) |
||
2340 | AC_CHECK_MEMBERS([struct stat.__st_birthtime]) |
||
2341 | |||
2342 | # We need to know whether "struct sockaddr" has an "sa_len" member |
||
2343 | # for get_interface_list(). |
||
2344 | |||
2345 | AC_CHECK_MEMBERS([struct sockaddr.sa_len]) |
||
2346 | |||
2347 | # We must know our byte order |
||
2348 | AC_C_BIGENDIAN |
||
2349 | |||
2350 | # Checks whether "-traditional" is needed when using "ioctl". |
||
2351 | # XXX - do we need this? |
||
2352 | AC_PROG_GCC_TRADITIONAL |
||
2353 | |||
2354 | AC_REPLACE_FUNCS(getopt_long) |
||
2355 | dnl |
||
2356 | dnl Do we have optreset? |
||
2357 | dnl |
||
2358 | if test "x$ac_cv_func_getopt_long" = xyes; then |
||
2359 | AC_CACHE_CHECK([whether optreset is defined], ac_cv_have_optreset, |
||
2360 | AC_LINK_IFELSE([AC_LANG_SOURCE([[extern int optreset;return optreset;]])], |
||
2361 | ac_cv_have_optreset=yes, ac_cv_have_optreset=no)) |
||
2362 | if test "$ac_cv_have_optreset" = yes ; then |
||
2363 | AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if you have the optreset variable]) |
||
2364 | fi |
||
2365 | fi |
||
2366 | |||
2367 | AC_REPLACE_FUNCS(inet_aton) |
||
2368 | |||
2369 | AC_CHECK_FUNC(inet_pton, [ |
||
2370 | dnl check for pre-BIND82 inet_pton() bug. |
||
2371 | AC_MSG_CHECKING(for broken inet_pton) |
||
2372 | AC_TRY_RUN([#include <sys/types.h> |
||
2373 | #include <sys/socket.h> |
||
2374 | #include <netinet/in.h> |
||
2375 | #include <arpa/inet.h> |
||
2376 | int main() |
||
2377 | { |
||
2378 | #ifdef AF_INET6 |
||
2379 | char buf[16]; |
||
2380 | /* this should return 0 (error) */ |
||
2381 | return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf); |
||
2382 | #else |
||
2383 | return 1; |
||
2384 | #endif |
||
2385 | }], [AC_MSG_RESULT(ok); |
||
2386 | have_inet_pton=yes], [AC_MSG_RESULT(broken); |
||
2387 | have_inet_pton=no], [AC_MSG_RESULT([cross compiling, assume it is broken]); |
||
2388 | have_inet_pton=no])], |
||
2389 | have_inet_pton=no) |
||
2390 | if test "$have_inet_pton" = no; then |
||
2391 | AC_LIBOBJ(inet_pton) |
||
2392 | else |
||
2393 | AC_DEFINE(HAVE_INET_PTON, 1, [Define to 1 if you have the `inet_pton' function.]) |
||
2394 | fi |
||
2395 | |||
2396 | AC_REPLACE_FUNCS(inet_ntop) |
||
2397 | AC_REPLACE_FUNCS(strptime) |
||
2398 | AC_REPLACE_FUNCS(popcount) |
||
2399 | |||
2400 | AC_CHECK_FUNCS(mkstemps mkdtemp) |
||
2401 | AC_CHECK_FUNCS(getprotobynumber) |
||
2402 | AC_CHECK_FUNCS(issetugid) |
||
2403 | AC_CHECK_FUNCS(sysconf) |
||
2404 | AC_CHECK_FUNCS(getifaddrs) |
||
2405 | AC_CHECK_FUNC(getexecname) |
||
2406 | |||
2407 | # |
||
2408 | # Check for SpeexDSP (http://www.speex.org) |
||
2409 | # |
||
2410 | AS_IF([test "x$have_qt_multimedia_lib" = xyes], |
||
2411 | [PKG_CHECK_MODULES(SPEEXDSP, speexdsp, [have_speexdsp=yes], [have_speexdsp=no])]) |
||
2412 | AS_IF([test "x$have_speexdsp" = xyes], |
||
2413 | [AC_DEFINE(HAVE_SPEEXDSP, 1, [Define to 1 if you have SpeexDSP])]) |
||
2414 | AM_CONDITIONAL(HAVE_SPEEXDSP, [test "x$have_speexdsp" = "xyes"]) |
||
2415 | |||
2416 | # Check Bluetooth SBC codec for RTP Player |
||
2417 | # git://git.kernel.org/pub/scm/bluetooth/sbc.git |
||
2418 | AC_ARG_WITH([sbc], |
||
2419 | AC_HELP_STRING( [--with-sbc=@<:@yes/no@:>@], |
||
2420 | [use SBC codec to play Bluetooth A2DP stream @<:@default=yes, if available@:>@]), |
||
2421 | with_sbc="$withval"; want_sbc="yes", with_sbc="yes") |
||
2422 | |||
2423 | PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no]) |
||
2424 | if test "x$with_sbc" != "xno"; then |
||
2425 | if (test "${have_sbc}" = "yes"); then |
||
2426 | AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library]) |
||
2427 | elif test "x$want_sbc" = "xyes"; then |
||
2428 | # Error out if the user explicitly requested the sbc library |
||
2429 | AC_MSG_ERROR([SBC codec library was requested, but is not available]) |
||
2430 | fi |
||
2431 | else |
||
2432 | have_sbc=no |
||
2433 | fi |
||
2434 | AM_CONDITIONAL(HAVE_SBC, test "x$have_sbc" = "xyes") |
||
2435 | |||
2436 | dnl |
||
2437 | dnl check whether plugins should be enabled and, if they should be, |
||
2438 | dnl check for plugins directory - stolen from Amanda's configure.ac |
||
2439 | dnl |
||
2440 | dnl we don't wish to expand ${libdir} yet |
||
2441 | plugindir="\${libdir}/wireshark/plugins/${VERSION}" |
||
2442 | AC_ARG_WITH(plugins, |
||
2443 | AC_HELP_STRING( [--with-plugins@<:@=DIR@:>@], |
||
2444 | [support plugins (installed in DIR, if supplied) @<:@default=yes, if possible@:>@]), |
||
2445 | [ |
||
2446 | if test "x$withval" = "xno"; then |
||
2447 | have_plugins=no |
||
2448 | elif test "x$have_plugins" = "xno"; then |
||
2449 | AC_MSG_ERROR([GLib on this platform doesn't support loadable modules, so you can't enable plugins.]) |
||
2450 | elif test "x$withval" != "xyes"; then |
||
2451 | plugindir="$withval" |
||
2452 | fi |
||
2453 | ]) |
||
2454 | AM_CONDITIONAL(HAVE_PLUGINS, test "x$have_plugins" = "xyes") |
||
2455 | if test x$have_plugins = xyes |
||
2456 | then |
||
2457 | AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled]) |
||
2458 | fi |
||
2459 | AC_SUBST(plugindir) |
||
2460 | |||
2461 | # |
||
2462 | # The plugin dissectors reside in ./plugins/PROTO/ |
||
2463 | # |
||
2464 | PLUGIN_LIBS="" |
||
2465 | AC_SUBST(PLUGIN_LIBS) |
||
2466 | |||
2467 | dnl |
||
2468 | dnl check whether extcap programs should be enabled and, if they should be, |
||
2469 | dnl check for extcap directory - stolen from Amanda's configure.ac |
||
2470 | dnl |
||
2471 | dnl we don't wish to expand ${libdir} yet |
||
2472 | extcapdir="\${libdir}/wireshark/extcap" |
||
2473 | AC_ARG_WITH(extcap, |
||
2474 | AC_HELP_STRING( [--with-extcap@<:@=DIR@:>@], |
||
2475 | [use extcap for external capture sources (installed in DIR, if supplied) @<:@default=yes, if possible@:>@]), |
||
2476 | [ |
||
2477 | if test "x$withval" = "xno"; then |
||
2478 | have_extcap=no |
||
2479 | elif test "x$withval" = "xyes"; then |
||
2480 | have_extcap=yes |
||
2481 | elif test "x$withval" != "xyes"; then |
||
2482 | have_extcap=yes |
||
2483 | extcapdir ="$withval" |
||
2484 | fi |
||
2485 | ],[ |
||
2486 | have_extcap=yes |
||
2487 | ]) |
||
2488 | AM_CONDITIONAL(HAVE_EXTCAP, test "x$have_extcap" = "xyes") |
||
2489 | if test "x$have_extcap" = "xyes" |
||
2490 | then |
||
2491 | AC_DEFINE(HAVE_EXTCAP, 1, [Define if external capture sources should be enabled]) |
||
2492 | extcap_subdir="extcap" |
||
2493 | extcap_man="extcap.4" |
||
2494 | fi |
||
2495 | AC_SUBST(extcap_subdir) |
||
2496 | AC_SUBST(extcap_man) |
||
2497 | AC_SUBST(extcapdir) |
||
2498 | |||
2499 | dnl androiddump check |
||
2500 | AC_MSG_CHECKING(whether to build androiddump) |
||
2501 | |||
2502 | AC_ARG_ENABLE(androiddump, |
||
2503 | AC_HELP_STRING( [--enable-androiddump], |
||
2504 | [build androiddump @<:@default=yes@:>@]), |
||
2505 | androiddump=$enableval,enable_androiddump=yes) |
||
2506 | |||
2507 | if test "x$have_extcap" != xyes; then |
||
2508 | AC_MSG_RESULT([no, extcap disabled]) |
||
2509 | enable_androiddump=no |
||
2510 | elif test "x$enable_androiddump" = "xyes" ; then |
||
2511 | AC_MSG_RESULT(yes) |
||
2512 | else |
||
2513 | AC_MSG_RESULT(no) |
||
2514 | fi |
||
2515 | |||
2516 | AC_ARG_ENABLE(androiddump_use_libpcap, |
||
2517 | AC_HELP_STRING( [--enable-androiddump-use-libpcap], |
||
2518 | [build androiddump using libpcap @<:@default=no@:>@]), |
||
2519 | androiddump_use_libpcap=$enableval,enable_androiddump_use_libpcap=no) |
||
2520 | |||
2521 | if test "x$enable_androiddump" = "xyes" -a "x$enable_androiddump_use_libpcap" = "xyes" ; then |
||
2522 | AC_DEFINE(ANDROIDDUMP_USE_LIBPCAP, 1, [Androiddump will use Libpcap]) |
||
2523 | fi |
||
2524 | |||
2525 | if test "x$enable_androiddump" = "xyes" ; then |
||
2526 | androiddump_bin="androiddump\$(EXEEXT)" |
||
2527 | androiddump_man="androiddump.1" |
||
2528 | else |
||
2529 | androiddump_bin="" |
||
2530 | androiddump_man="" |
||
2531 | fi |
||
2532 | AC_SUBST(androiddump_bin) |
||
2533 | AC_SUBST(androiddump_man) |
||
2534 | |||
2535 | dnl sshdump check |
||
2536 | AC_MSG_CHECKING(whether to build sshdump) |
||
2537 | |||
2538 | AC_ARG_ENABLE(sshdump, |
||
2539 | AC_HELP_STRING( [--enable-sshdump], |
||
2540 | [build sshdump @<:@default=yes@:>@]), |
||
2541 | [],[enable_sshdump=yes]) |
||
2542 | |||
2543 | if test "x$have_extcap" != xyes; then |
||
2544 | AC_MSG_RESULT([no, extcap disabled]) |
||
2545 | enable_sshdump=no |
||
2546 | elif test "x$have_libssh_pointsix" != xyes; then |
||
2547 | AC_MSG_RESULT([no, libssh >= 0.6.0 not available]) |
||
2548 | enable_sshdump=no |
||
2549 | elif test "x$enable_sshdump" = "xyes" ; then |
||
2550 | AC_MSG_RESULT(yes) |
||
2551 | else |
||
2552 | AC_MSG_RESULT(no) |
||
2553 | fi |
||
2554 | |||
2555 | if test "x$enable_sshdump" = "xyes" ; then |
||
2556 | sshdump_bin="sshdump\$(EXEEXT)" |
||
2557 | sshdump_man="sshdump.1" |
||
2558 | else |
||
2559 | sshdump_bin="" |
||
2560 | sshdump_man="" |
||
2561 | fi |
||
2562 | AC_SUBST(sshdump_bin) |
||
2563 | AC_SUBST(sshdump_man) |
||
2564 | |||
2565 | dnl ciscodump check |
||
2566 | AC_MSG_CHECKING(whether to build ciscodump) |
||
2567 | |||
2568 | AC_ARG_ENABLE(ciscodump, |
||
2569 | AC_HELP_STRING( [--enable-ciscodump], |
||
2570 | [build ciscodump @<:@default=yes@:>@]), |
||
2571 | [],[enable_ciscodump=yes]) |
||
2572 | |||
2573 | if test "x$have_extcap" != xyes; then |
||
2574 | AC_MSG_RESULT([no, extcap disabled]) |
||
2575 | enable_ciscodump=no |
||
2576 | elif test "x$have_libssh_pointsix" != xyes; then |
||
2577 | AC_MSG_RESULT([no, libssh >= 0.6.0 not available]) |
||
2578 | enable_ciscodump=no |
||
2579 | elif test "x$enable_ciscodump" = "xyes" ; then |
||
2580 | AC_MSG_RESULT(yes) |
||
2581 | else |
||
2582 | AC_MSG_RESULT(no) |
||
2583 | fi |
||
2584 | |||
2585 | if test "x$enable_ciscodump" = "xyes" ; then |
||
2586 | ciscodump_bin="ciscodump\$(EXEEXT)" |
||
2587 | ciscodump_man="ciscodump.1" |
||
2588 | else |
||
2589 | ciscodump_bin="" |
||
2590 | ciscodump_man="" |
||
2591 | fi |
||
2592 | AC_SUBST(ciscodump_bin) |
||
2593 | AC_SUBST(ciscodump_man) |
||
2594 | |||
2595 | dnl randpktdump check |
||
2596 | AC_MSG_CHECKING(whether to build randpktdump) |
||
2597 | |||
2598 | AC_ARG_ENABLE(randpktdump, |
||
2599 | AC_HELP_STRING( [--enable-randpktdump], |
||
2600 | [build randpktdump @<:@default=yes@:>@]), |
||
2601 | randpktdump=$enableval,enable_randpktdump=yes) |
||
2602 | |||
2603 | if test "x$have_extcap" != xyes; then |
||
2604 | AC_MSG_RESULT([no, extcap disabled]) |
||
2605 | enable_randpktdump=no |
||
2606 | elif test "x$enable_randpktdump" = "xyes" ; then |
||
2607 | AC_MSG_RESULT(yes) |
||
2608 | else |
||
2609 | AC_MSG_RESULT(no) |
||
2610 | fi |
||
2611 | |||
2612 | if test "x$enable_randpktdump" = "xyes" ; then |
||
2613 | randpktdump_bin="randpktdump\$(EXEEXT)" |
||
2614 | randpktdump_man="randpktdump.1" |
||
2615 | else |
||
2616 | randpktdump_bin="" |
||
2617 | randpktdump_man="" |
||
2618 | fi |
||
2619 | AC_SUBST(randpktdump_bin) |
||
2620 | AC_SUBST(randpktdump_man) |
||
2621 | |||
2622 | AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes) |
||
2623 | if test x$enable_static = xyes -a x$have_plugins = xyes |
||
2624 | then |
||
2625 | AC_DEFINE(ENABLE_STATIC, 1, [Link plugins statically into Wireshark]) |
||
2626 | fi |
||
2627 | AC_SUBST(ENABLE_STATIC) |
||
2628 | |||
2629 | # Gather which GUI we're building for rpmbuild |
||
2630 | if test "x$have_gtk" = "xyes"; then |
||
2631 | if test "x$gtk_major_version" = "x3"; then |
||
2632 | RPMBUILD_WITH_ARGS="--with gtk3 --without gtk2" |
||
2633 | else |
||
2634 | RPMBUILD_WITH_ARGS="--without gtk3 --with gtk2" |
||
2635 | fi |
||
2636 | else |
||
2637 | RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3" |
||
2638 | fi |
||
2639 | if test "x$have_qt" = "xyes" ; then |
||
2640 | if test "$qt_version" -eq "5"; then |
||
2641 | RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt5" |
||
2642 | else |
||
2643 | RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt" |
||
2644 | fi |
||
2645 | else |
||
2646 | RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt --without qt5" |
||
2647 | fi |
||
2648 | if test "x$have_lua" = "xyes" ; then |
||
2649 | RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with lua" |
||
2650 | else |
||
2651 | RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without lua" |
||
2652 | fi |
||
2653 | AC_SUBST(RPMBUILD_WITH_ARGS) |
||
2654 | AC_SUBST(RPM_VERSION, version_major.version_minor.version_micro) |
||
2655 | |||
2656 | AC_SUBST(WS_CPPFLAGS) |
||
2657 | AC_SUBST(WS_CFLAGS) |
||
2658 | AC_SUBST(WS_CXXFLAGS) |
||
2659 | AC_SUBST(WS_LDFLAGS) |
||
2660 | |||
2661 | AC_SUBST(WS_CFLAGS_FOR_BUILD) |
||
2662 | |||
2663 | AH_BOTTOM([#include <ws_diag_control.h>]) |
||
2664 | |||
2665 | dnl Save the cacheable configure results to config.cache before recursing |
||
2666 | AC_CACHE_SAVE |
||
2667 | |||
2668 | sinclude(plugins/Custom.m4) dnl |
||
2669 | ifdef(_CUSTOM_AC_OUTPUT_,, define(_CUSTOM_AC_OUTPUT_, )) dnl |
||
2670 | |||
2671 | sinclude(epan/dissectors/asn1/Custom.m4) dnl |
||
2672 | ifdef(_CUSTOM_ASN1_AC_OUTPUT_,, define(_CUSTOM_ASN1_AC_OUTPUT_, )) dnl |
||
2673 | |||
2674 | AC_CONFIG_HEADERS([config.h]) |
||
2675 | |||
2676 | AC_CONFIG_FILES( |
||
2677 | Makefile |
||
2678 | doxygen.cfg |
||
2679 | epan/dissectors/asn1/Makefile |
||
2680 | wireshark.pc |
||
2681 | _CUSTOM_ASN1_AC_OUTPUT_ |
||
2682 | epan/dissectors/asn1/acp133/Makefile |
||
2683 | epan/dissectors/asn1/acse/Makefile |
||
2684 | epan/dissectors/asn1/ansi_map/Makefile |
||
2685 | epan/dissectors/asn1/ansi_tcap/Makefile |
||
2686 | epan/dissectors/asn1/atn-cm/Makefile |
||
2687 | epan/dissectors/asn1/atn-cpdlc/Makefile |
||
2688 | epan/dissectors/asn1/atn-ulcs/Makefile |
||
2689 | epan/dissectors/asn1/c1222/Makefile |
||
2690 | epan/dissectors/asn1/camel/Makefile |
||
2691 | epan/dissectors/asn1/cdt/Makefile |
||
2692 | epan/dissectors/asn1/charging_ase/Makefile |
||
2693 | epan/dissectors/asn1/cmip/Makefile |
||
2694 | epan/dissectors/asn1/cmp/Makefile |
||
2695 | epan/dissectors/asn1/crmf/Makefile |
||
2696 | epan/dissectors/asn1/cms/Makefile |
||
2697 | epan/dissectors/asn1/credssp/Makefile |
||
2698 | epan/dissectors/asn1/dap/Makefile |
||
2699 | epan/dissectors/asn1/disp/Makefile |
||
2700 | epan/dissectors/asn1/dop/Makefile |
||
2701 | epan/dissectors/asn1/dsp/Makefile |
||
2702 | epan/dissectors/asn1/ess/Makefile |
||
2703 | epan/dissectors/asn1/ftam/Makefile |
||
2704 | epan/dissectors/asn1/goose/Makefile |
||
2705 | epan/dissectors/asn1/gprscdr/Makefile |
||
2706 | epan/dissectors/asn1/gsm_map/Makefile |
||
2707 | epan/dissectors/asn1/h225/Makefile |
||
2708 | epan/dissectors/asn1/h235/Makefile |
||
2709 | epan/dissectors/asn1/h245/Makefile |
||
2710 | epan/dissectors/asn1/h248/Makefile |
||
2711 | epan/dissectors/asn1/h282/Makefile |
||
2712 | epan/dissectors/asn1/h283/Makefile |
||
2713 | epan/dissectors/asn1/h323/Makefile |
||
2714 | epan/dissectors/asn1/h450/Makefile |
||
2715 | epan/dissectors/asn1/h450-ros/Makefile |
||
2716 | epan/dissectors/asn1/h460/Makefile |
||
2717 | epan/dissectors/asn1/h501/Makefile |
||
2718 | epan/dissectors/asn1/HI2Operations/Makefile |
||
2719 | epan/dissectors/asn1/hnbap/Makefile |
||
2720 | epan/dissectors/asn1/idmp/Makefile |
||
2721 | epan/dissectors/asn1/ilp/Makefile |
||
2722 | epan/dissectors/asn1/inap/Makefile |
||
2723 | epan/dissectors/asn1/isdn-sup/Makefile |
||
2724 | epan/dissectors/asn1/kerberos/Makefile |
||
2725 | epan/dissectors/asn1/lcsap/Makefile |
||
2726 | epan/dissectors/asn1/ldap/Makefile |
||
2727 | epan/dissectors/asn1/logotypecertextn/Makefile |
||
2728 | epan/dissectors/asn1/lpp/Makefile |
||
2729 | epan/dissectors/asn1/lppa/Makefile |
||
2730 | epan/dissectors/asn1/lppe/Makefile |
||
2731 | epan/dissectors/asn1/lte-rrc/Makefile |
||
2732 | epan/dissectors/asn1/m3ap/Makefile |
||
2733 | epan/dissectors/asn1/mms/Makefile |
||
2734 | epan/dissectors/asn1/mpeg-audio/Makefile |
||
2735 | epan/dissectors/asn1/mpeg-pes/Makefile |
||
2736 | epan/dissectors/asn1/nbap/Makefile |
||
2737 | epan/dissectors/asn1/ns_cert_exts/Makefile |
||
2738 | epan/dissectors/asn1/novell_pkis/Makefile |
||
2739 | epan/dissectors/asn1/ocsp/Makefile |
||
2740 | epan/dissectors/asn1/p1/Makefile |
||
2741 | epan/dissectors/asn1/p22/Makefile |
||
2742 | epan/dissectors/asn1/p7/Makefile |
||
2743 | epan/dissectors/asn1/p772/Makefile |
||
2744 | epan/dissectors/asn1/pcap/Makefile |
||
2745 | epan/dissectors/asn1/pkcs1/Makefile |
||
2746 | epan/dissectors/asn1/pkcs12/Makefile |
||
2747 | epan/dissectors/asn1/pkinit/Makefile |
||
2748 | epan/dissectors/asn1/pkixac/Makefile |
||
2749 | epan/dissectors/asn1/pkix1explicit/Makefile |
||
2750 | epan/dissectors/asn1/pkix1implicit/Makefile |
||
2751 | epan/dissectors/asn1/pkixproxy/Makefile |
||
2752 | epan/dissectors/asn1/pkixqualified/Makefile |
||
2753 | epan/dissectors/asn1/pkixtsp/Makefile |
||
2754 | epan/dissectors/asn1/pres/Makefile |
||
2755 | epan/dissectors/asn1/q932/Makefile |
||
2756 | epan/dissectors/asn1/q932-ros/Makefile |
||
2757 | epan/dissectors/asn1/qsig/Makefile |
||
2758 | epan/dissectors/asn1/ranap/Makefile |
||
2759 | epan/dissectors/asn1/rnsap/Makefile |
||
2760 | epan/dissectors/asn1/ros/Makefile |
||
2761 | epan/dissectors/asn1/rrc/Makefile |
||
2762 | epan/dissectors/asn1/rrlp/Makefile |
||
2763 | epan/dissectors/asn1/rtse/Makefile |
||
2764 | epan/dissectors/asn1/rua/Makefile |
||
2765 | epan/dissectors/asn1/s1ap/Makefile |
||
2766 | epan/dissectors/asn1/sabp/Makefile |
||
2767 | epan/dissectors/asn1/sbc-ap/Makefile |
||
2768 | epan/dissectors/asn1/smrse/Makefile |
||
2769 | epan/dissectors/asn1/snmp/Makefile |
||
2770 | epan/dissectors/asn1/spnego/Makefile |
||
2771 | epan/dissectors/asn1/sv/Makefile |
||
2772 | epan/dissectors/asn1/t124/Makefile |
||
2773 | epan/dissectors/asn1/t125/Makefile |
||
2774 | epan/dissectors/asn1/t38/Makefile |
||
2775 | epan/dissectors/asn1/tcap/Makefile |
||
2776 | epan/dissectors/asn1/tetra/Makefile |
||
2777 | epan/dissectors/asn1/ulp/Makefile |
||
2778 | epan/dissectors/asn1/wlancertextn/Makefile |
||
2779 | epan/dissectors/asn1/x2ap/Makefile |
||
2780 | epan/dissectors/asn1/x509af/Makefile |
||
2781 | epan/dissectors/asn1/x509ce/Makefile |
||
2782 | epan/dissectors/asn1/x509if/Makefile |
||
2783 | epan/dissectors/asn1/x509sat/Makefile |
||
2784 | epan/dissectors/asn1/x721/Makefile |
||
2785 | capchild/Makefile |
||
2786 | capchild/doxygen.cfg |
||
2787 | caputils/Makefile |
||
2788 | caputils/doxygen.cfg |
||
2789 | doc/Makefile |
||
2790 | docbook/Makefile |
||
2791 | epan/Makefile |
||
2792 | epan/compress/Makefile |
||
2793 | epan/crypt/Makefile |
||
2794 | epan/doxygen.cfg |
||
2795 | epan/dfilter/Makefile |
||
2796 | epan/dissectors/Makefile |
||
2797 | epan/dissectors/dcerpc/Makefile |
||
2798 | epan/ftypes/Makefile |
||
2799 | epan/nghttp2/Makefile |
||
2800 | epan/wmem/Makefile |
||
2801 | epan/wslua/Makefile |
||
2802 | extcap/Makefile |
||
2803 | codecs/Makefile |
||
2804 | ui/Makefile |
||
2805 | ui/doxygen.cfg |
||
2806 | ui/gtk/Makefile |
||
2807 | ui/gtk/doxygen.cfg |
||
2808 | ui/cli/Makefile |
||
2809 | ui/qt/Makefile |
||
2810 | ui/qt/doxygen.cfg |
||
2811 | help/Makefile |
||
2812 | packaging/Makefile |
||
2813 | packaging/macosx/Info.plist |
||
2814 | packaging/macosx/Makefile |
||
2815 | packaging/macosx/osx-dmg.sh |
||
2816 | packaging/macosx/Wireshark_package.pmdoc/index.xml |
||
2817 | packaging/nsis/Makefile |
||
2818 | packaging/rpm/Makefile |
||
2819 | packaging/rpm/SPECS/Makefile |
||
2820 | packaging/rpm/SPECS/wireshark.spec |
||
2821 | packaging/svr4/Makefile |
||
2822 | packaging/svr4/checkinstall |
||
2823 | packaging/svr4/pkginfo |
||
2824 | packaging/wix/Makefile |
||
2825 | plugins/Makefile |
||
2826 | plugins/docsis/Makefile |
||
2827 | plugins/easy_codec/Makefile |
||
2828 | plugins/ethercat/Makefile |
||
2829 | plugins/gryphon/Makefile |
||
2830 | plugins/irda/Makefile |
||
2831 | plugins/m2m/Makefile |
||
2832 | plugins/mate/Makefile |
||
2833 | plugins/opcua/Makefile |
||
2834 | plugins/profinet/Makefile |
||
2835 | plugins/stats_tree/Makefile |
||
2836 | plugins/unistim/Makefile |
||
2837 | plugins/wimax/Makefile |
||
2838 | plugins/wimaxasncp/Makefile |
||
2839 | plugins/wimaxmacphy/Makefile |
||
2840 | randpkt_core/doxygen.cfg |
||
2841 | randpkt_core/Makefile |
||
2842 | tools/Makefile |
||
2843 | tools/lemon/Makefile |
||
2844 | wiretap/Makefile |
||
2845 | writecap/Makefile |
||
2846 | writecap/doxygen.cfg |
||
2847 | wsutil/Makefile |
||
2848 | echld/Makefile |
||
2849 | _CUSTOM_AC_OUTPUT_ |
||
2850 | ) |
||
2851 | |||
2852 | AC_OUTPUT |
||
2853 | |||
2854 | |||
2855 | # Pretty messages |
||
2856 | |||
2857 | if test "x$have_gtk" = "xyes"; then |
||
2858 | gtk_lib_message=" (with GTK+ v$GTK_VERSION" |
||
2859 | if test "x$have_ige_mac" = "xyes"; then |
||
2860 | gtk_lib_message="$gtk_lib_message and OS X integration)" |
||
2861 | else |
||
2862 | gtk_lib_message="$gtk_lib_message)" |
||
2863 | fi |
||
2864 | fi |
||
2865 | |||
2866 | if test "x$have_qt" = "xyes" ; then |
||
2867 | enable_wireshark_qt="yes" |
||
2868 | qt_lib_message=" (with Qt$qt_version v$QT_VERSION)" |
||
2869 | else |
||
2870 | enable_wireshark_qt="no" |
||
2871 | fi |
||
2872 | |||
2873 | if test "x$enable_setcap_install" = "xyes" ; then |
||
2874 | setcap_message="yes" |
||
2875 | else |
||
2876 | setcap_message="no" |
||
2877 | fi |
||
2878 | |||
2879 | if test "x$enable_setuid_install" = "xyes" ; then |
||
2880 | setuid_message="yes" |
||
2881 | else |
||
2882 | setuid_message="no" |
||
2883 | fi |
||
2884 | |||
2885 | if test "x$DUMPCAP_GROUP" = "x" ; then |
||
2886 | dumpcap_group_message="(none)" |
||
2887 | else |
||
2888 | dumpcap_group_message="$DUMPCAP_GROUP" |
||
2889 | fi |
||
2890 | |||
2891 | if test "x$want_zlib" = "xno" ; then |
||
2892 | zlib_message="no" |
||
2893 | else |
||
2894 | zlib_message="yes" |
||
2895 | fi |
||
2896 | |||
2897 | if test "x$have_lua" = "xyes" ; then |
||
2898 | lua_message="yes" |
||
2899 | else |
||
2900 | lua_message="no" |
||
2901 | fi |
||
2902 | |||
2903 | if test "x$have_qt_multimedia_lib" = "xyes" ; then |
||
2904 | qt_multimedia_message="yes" |
||
2905 | else |
||
2906 | qt_multimedia_message="no" |
||
2907 | fi |
||
2908 | |||
2909 | if test "x$want_portaudio" = "xyes" ; then |
||
2910 | portaudio_message="yes" |
||
2911 | else |
||
2912 | portaudio_message="no" |
||
2913 | fi |
||
2914 | |||
2915 | if test "x$want_ssl" = "xno" ; then |
||
2916 | ssl_message="no" |
||
2917 | else |
||
2918 | ssl_message="yes" |
||
2919 | fi |
||
2920 | |||
2921 | if test "x$want_krb5" = "xno" ; then |
||
2922 | krb5_message="no" |
||
2923 | else |
||
2924 | krb5_message="yes ($ac_krb5_version)" |
||
2925 | fi |
||
2926 | |||
2927 | if test "x$have_good_c_ares" = "xyes" ; then |
||
2928 | c_ares_message="yes" |
||
2929 | else |
||
2930 | c_ares_message="no (name resolution will be disabled)" |
||
2931 | fi |
||
2932 | |||
2933 | if test "x$have_good_libcap" = "xyes" ; then |
||
2934 | libcap_message="yes" |
||
2935 | else |
||
2936 | libcap_message="no" |
||
2937 | fi |
||
2938 | |||
2939 | if test "x$have_good_geoip" = "xyes" ; then |
||
2940 | geoip_message="yes" |
||
2941 | else |
||
2942 | geoip_message="no" |
||
2943 | fi |
||
2944 | |||
2945 | if test "x$have_good_libssh" = "xyes" ; then |
||
2946 | libssh_message="yes" |
||
2947 | else |
||
2948 | libssh_message="no" |
||
2949 | fi |
||
2950 | |||
2951 | if test "x$have_ssh_userauth_agent" = "xyes" ; then |
||
2952 | ssh_userauth_agent_message="yes" |
||
2953 | else |
||
2954 | ssh_userauth_agent_message="no" |
||
2955 | fi |
||
2956 | |||
2957 | echo "" |
||
2958 | echo " CPPFLAGS: $WS_CPPFLAGS $CPPFLAGS" |
||
2959 | echo "" |
||
2960 | echo " CFLAGS: $WS_CFLAGS $CFLAGS" |
||
2961 | echo "" |
||
2962 | echo " CXXFLAGS: $WS_CXXFLAGS $CXXFLAGS" |
||
2963 | echo "" |
||
2964 | echo " LDFLAGS: $WS_LDFLAGS $LDFLAGS" |
||
2965 | echo "" |
||
2966 | echo " LIBS: $LIBS" |
||
2967 | |||
2968 | echo "" |
||
2969 | echo "The Wireshark package has been configured with the following options:" |
||
2970 | echo " GLib version : v$GLIB_VERSION" |
||
2971 | echo " Build wireshark : $enable_wireshark_qt$qt_lib_message" |
||
2972 | echo " Build wireshark-gtk : $have_gtk""$gtk_lib_message" |
||
2973 | echo " Build tshark : $enable_tshark" |
||
2974 | echo " Build tfshark : $enable_tfshark" |
||
2975 | echo " Build capinfos : $enable_capinfos" |
||
2976 | echo " Build captype : $enable_captype" |
||
2977 | echo " Build editcap : $enable_editcap" |
||
2978 | echo " Build dumpcap : $enable_dumpcap" |
||
2979 | echo " Build mergecap : $enable_mergecap" |
||
2980 | echo " Build reordercap : $enable_reordercap" |
||
2981 | echo " Build text2pcap : $enable_text2pcap" |
||
2982 | echo " Build randpkt : $enable_randpkt" |
||
2983 | echo " Build dftest : $enable_dftest" |
||
2984 | echo " Build rawshark : $enable_rawshark" |
||
2985 | echo " Build androiddump : $enable_androiddump" |
||
2986 | echo " Build sshdump : $enable_sshdump" |
||
2987 | echo " Build ciscodump : $enable_ciscodump" |
||
2988 | echo " Build randpktdump : $enable_randpktdump" |
||
2989 | echo " Build echld : $have_echld" |
||
2990 | echo "" |
||
2991 | echo " Save files as pcap-ng by default : $enable_pcap_ng_default" |
||
2992 | echo " Install dumpcap with capabilities : $setcap_message" |
||
2993 | echo " Install dumpcap setuid : $setuid_message" |
||
2994 | echo " Use dumpcap group : $dumpcap_group_message" |
||
2995 | echo " Use plugins : $have_plugins" |
||
2996 | echo " Use external capture sources : $have_extcap" |
||
2997 | echo " Use Lua library : $lua_message" |
||
2998 | echo " Build Qt RTP player : $qt_multimedia_message" |
||
2999 | echo " Build GTK+ RTP player : $portaudio_message" |
||
3000 | echo " Build profile binaries : $enable_profile_build" |
||
3001 | echo " Use pcap library : $want_pcap" |
||
3002 | echo " Use zlib library : $zlib_message" |
||
3003 | echo " Use kerberos library : $krb5_message" |
||
3004 | echo " Use c-ares library : $c_ares_message" |
||
3005 | echo " Use SMI MIB library : $libsmi_message" |
||
3006 | echo " Use GNU gcrypt library : $gcrypt_message" |
||
3007 | echo " Use SSL crypto library : $ssl_message" |
||
3008 | echo " Use GnuTLS library : $tls_message" |
||
3009 | echo " Use POSIX capabilities library : $libcap_message" |
||
3010 | echo " Use GeoIP library : $geoip_message" |
||
3011 | echo " Use libssh library : $libssh_message" |
||
3012 | echo " Have ssh_userauth_agent : $ssh_userauth_agent_message" |
||
3013 | echo " Use nl library : $libnl_message" |
||
3014 | echo " Use SBC codec library : $have_sbc" |
||
3015 | #echo " Use GDK-Pixbuf with GResource: $have_gresource_pixbuf" |