aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
AgeCommit message (Collapse)AuthorFilesLines
2015-04-13Add a major version number argument to --with-qt.Guy Harris1-22/+62
Without a major version number, it behaves as before, picking whatever version it finds, and preferring Qt 5 to Qt 4. With a major version number, it looks only for the version in question. Bug: 10793 Change-Id: Idf6c2c61e84bb87f7b601d8f09c33f31b67bf46d Reviewed-on: https://code.wireshark.org/review/8052 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-12Only add flags to CFLAGS_FOR_BUILD if $CC and $CC_FOR_BUILD are the same.Guy Harris1-8/+16
Otherwise, just because a flag is appropriate for $CC, that doesn't necessarily mean it's appropriate for $CFLAGS_FOR_BUILD. (We don't use CFLAGS_FOR_BUILD for many things, so it's probably not worth making a lot of effort to throw all the warning flags into it if we're cross-compiling; we *do* throw them in for native compilation, which is what most developers use and test with, so that should be sufficient to let the warnings catch problems with the build tools we're building.) Change-Id: Iad9d611b4687e9e154f9871f741f3c8f3b307c88 Reviewed-on: https://code.wireshark.org/review/8026 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-25Have a #define for whether the capture buffer size can be set.Guy Harris1-1/+8
It can be set if either 1) this is Windows (where we're assumed to be using WinPcap, which includes calls to set the buffer size) or 2) we have pcap_create() (in which case we also have pcap_set_buffer_size(), at least in a normal libpcap release). Use that rather than testing "defined(_WIN32) || defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's being tested. Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12 Reviewed-on: https://code.wireshark.org/review/7816 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-03Look for and use gethostbyname() if we don't have getaddrinfo(). Fail toJeff Morriss1-8/+35
configure if we can't find any name resolver (autotools only). This puts back the gethostbyname()/gethostbyname2() code removed in I3348179626e97daaddfbc89e3ed21e39915e3de4 and If59ce8a038776eadd6cd1794ed0e2dad8bf8a22c but as a last-resort option (only if we don't have a better or more modern name resolver). As suggested/requested by Guy in https://code.wireshark.org/review/#/c/7423/ Change-Id: I706dbbd65135f47c67d3d8d88a61ad7273914c47 Reviewed-on: https://code.wireshark.org/review/7447 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-26Actually define HAVE_GETADDRINFO if we find it.Jeff Morriss1-17/+7
AC_CHECK_FUNC() doesn't define HAVE_XXX but AC_CHECK_FUNCS() does. And AC_CHECK_LIBS() certainly doesn't define HAVE_<function>. Also remove some ancient comments. Change-Id: I49d701bb96d3bd3c55c4beb99d532e397ec554ad Reviewed-on: https://code.wireshark.org/review/7400 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-06Remove gethostbyaddr and gethostbyaddr2.Gerald Combs1-7/+9
They've been deprecated for a very long time. Replace them with getaddrinfo. Note that we might not want to do synchronous name resolution at all. Add HAVE_GETADDRINFO to the KfW win-mac.h collision list. Change-Id: If59ce8a038776eadd6cd1794ed0e2dad8bf8a22c Reviewed-on: https://code.wireshark.org/review/6958 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-04Simplify how we find Lua and expand the places we look.Jeff Morriss1-208/+93
First, it appears some packagers actually ship a pkg-config file for Lua. Try to use it. (Unfortunately the package name varies so we have to try several package names.) If that fails, try to find Lua directly, accounting for the various naming conventions we've seen. Bug: 10475 Bug: 10572 Change-Id: I82e789c466a488dc12431cdd90c49b4c1052414a Reviewed-on: https://code.wireshark.org/review/6756 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-01-04No *pcap should have pcap_open() without the other remote extensions.Guy Harris1-4/+2
WinPcap 3.0 introduced pcap_open(); it also introduced pcap_findalldevs_ex() and pcap_createsrcstr(). If you're going to put pcap_open() in libpcap, there's not much point to doing so but not also putting pcap_findalldevs_ex() and pcap_createsrcstr() there. (And, in the future, there'll be support for remote capturing with pcap_create() and pcap_activate(), with no need for pcap_createsrcstr(), and a replacement for pcap_findalldevs() and pcap_findalldevs_ex(), which we'll also check for.) So there's no need to check for pcap_findalldevs_ex() or pcap_createsrcstr(). Change-Id: I9323aad20136684d05d1e909326792a2f1408887 Reviewed-on: https://code.wireshark.org/review/6311 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-09Qt: Initial VoIP Calls dialog.Gerald Combs1-0/+7
Add Telephony menu items for VoIP Calls and SIP Flows. Put VoIP Calls at the top, since that seems to be the primary item. Add configure-time checks for QtMultimediaWidgets in anticipation of adding a VoIP playback dialog. Add an icon for the playback button. (Yes, I've been avoiding GNOME-level gratuitous icons so far but this is one of the rare occiasions where it makes sense.) Add a help link define for the VoIP calls dialog. Change-Id: I5d0799685c598ad9af76fe9667f8ea7d14b66050 Reviewed-on: https://code.wireshark.org/review/5674 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-28Add support for getting nanosecond time stamp resolution when capturing.Guy Harris1-1/+1
If we have pcap_set_tstamp_precision(), use it to request nanosecond time stamp resolution *if* we're writing a pcap-ng file; any code that reads those files and can't handle nanosecond time stamp resolution is broken and needs to be fixed. If we're writing a pcap file, don't ask for nanosecond resolution time stamps, as that requires a different magic number for pcap files, and not all code that reads pcap files can handle that. (Unlike pcap-ng, where the ability to have non-microsecond time stamp resolution was present from Day One, it's a relatively recent addition to pcap.) We could add a command-line option/GUI option for that, like the option recent versions of tcpdump have, if it matters. Change-Id: I8fa464eb929feecb9a70be70712502c9f0cc5270 Reviewed-on: https://code.wireshark.org/review/4355 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-22Cope with MIT being line wrapped when compiling with kerberosGarming Sam1-2/+2
The line "Massachusetts Institute of Technology" now appears across two lines in the header file. Change-Id: I618b520d6c15f51180b47d93c75e29a6f43b868b Reviewed-on: https://code.wireshark.org/review/3790 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-04Fix a comment.Guy Harris1-2/+4
Change-Id: I4dff4912ad8355552ba9efee73c0aae9a2a55000 Reviewed-on: https://code.wireshark.org/review/3415 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03Define INET6 in config.h rather than in the Makefile.Guy Harris1-7/+17
That's what we do with nmake and CMake; this makes it uniform, so it's easier to compare compiler commands. Change-Id: Ice2c4bd796e921fa3089e8a45a32ad14d9b0e0a4 Reviewed-on: https://code.wireshark.org/review/3387 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01Don't check for -Wl,{option} support.Guy Harris1-27/+17
Not all AC_WIRESHARK_LDFLAGS_CHECK flags are -Wl,{option} flags, so don't check for that first. If we want to check for specific compilers and linkers, we should do that, not for -Wl,{option} support. Change-Id: Ib9581d4a1573a1ffa2493ce08e6d5845d2601352 Reviewed-on: https://code.wireshark.org/review/2755 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01Fix comments to reflect reality.Guy Harris1-4/+8
Change-Id: Id56f5844932371a89785f4ddce87eb66789acdc8 Reviewed-on: https://code.wireshark.org/review/2754 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18If we don't check for something, don't print a result.Guy Harris1-2/+0
This caues a bunch of bogus "no"s to be printed when testing for various compiler options when the compiler isn't GCC-like enough to accept GCC-style -W, -f, and -m flags. Change-Id: I16cf45729c61d166644cbddccfbaeb9b7770b045 Reviewed-on: https://code.wireshark.org/review/2365 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18Don't do the check for clang/clang++.Guy Harris1-42/+0
Adding -Qunused-arguments to CXXFLAGS causes the checks for -f and -m flags not to fail with clang++, causing the configure script to warn about -f flags supported by clang but not clang++ indicating that the compilers are a mismatched pair. The checks we do for flags should eliminate "unused" -f/-m flags, suppressing the warnings that way. Change-Id: I749d6f499a3d34300518cc0ba539f355377359af Reviewed-on: https://code.wireshark.org/review/2362 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18Add -Werror when testing -m compiler flags.Guy Harris1-2/+18
As with -f flags, some compilers need -Werror to force the compiler to fail when passed an unknown -m flag. Also, if it's not a -W or -f or -m flag, don't forget to add it to CFLAGS and/or CXXFLAGS. And propagate a comment to the C++ flag testing. Change-Id: I53e0e59b34b10b9477c60ddd4f2e047b3b8be77f Reviewed-on: https://code.wireshark.org/review/2361 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-16Get rid of the last bits of Python, as they break the build.Guy Harris1-81/+0
Bereft of life, it rests in peace. Change-Id: I8b9bc8c6cef0635d5526aa6b389aa33bc41fbc66 Reviewed-on: https://code.wireshark.org/review/2284 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-20Don't distinguish between "GCC" and "Clang" extra -W flags.Guy Harris1-1/+1
We test whether a given compiler supports a given -W flag, so we don't need to separate them and check them only for particular compilers. To make that even clearer, rename the --enable option from --enable-extra-gcc-checks to --enable-extra-compiler-checks, and document it as just "do additional -W checks", and rename the WIRESHARK_EXTRA_GCC_ CMake variables to WIRESHARK_EXTRA_COMPILER_. Sync up the lists of warning flags in CMake with the lists in autoconf. Uncomment -Wdocumentation while we're at it. If it doesn't work *at all*, comment it out until it's fixed, or, better yet, fix it; if it still produces warnings, we just leave it among the "extra" flags. Change-Id: I4042affdade612e4025e2881d08f1ca69d759626 Reviewed-on: https://code.wireshark.org/review/1226 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-09Try to improve the "Kerberos requested but not OpenSSL" message.Guy Harris1-1/+1
At least one person didn't realize that it meant that you have to specify --with-ssl when configuring, so try saying that a bit more explicitly. Change-Id: If15a9cfaeaf7d4aca2c570602fc09ff3ae489d35 Reviewed-on: https://code.wireshark.org/review/575 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2013-12-26Fix configure-script errors with some versions of autoconf.Guy Harris1-0/+6
svn path=/trunk/; revision=54470
2013-12-26OK, "i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc.Guy Harris1-18/+59
build 5658) (LLVM build 2336.11.00)" likes -Wmissing-prototypes but not -Wmissing-declarations and G++ 4.8.2 likes -Wmissing-declarations but not -Wmissing-prototypes, so check whether *either* of them requires -Werror in order to be detected as NSFC++. Fix a copy-and-pasteo while we're at it. Don't treat a different willingness to accept -Wmissing-{prototypes,declarations} as an indication that you have mismatched C and C++ compilers. svn path=/trunk/; revision=54468
2013-12-24No need for quotes around the arguments to AC_MSG_ macros.Guy Harris1-2/+2
svn path=/trunk/; revision=54448
2013-12-24Some warning options are, for reasons not entirely obvious to me, notGuy Harris1-1/+42
supported by some versions of g++ even though the corresponding version of gcc supports them. Other versions of g++, and clang, support them. Check, before adding a -W option for C++, whether the compiler supports it; that check must be done with -Werror, at least with g++, in order to get a non-zero exit status from the compiler. svn path=/trunk/; revision=54447
2013-10-16Add checks to see if CC and/or CXX are Clang. Add "-Qunused-arguments"Gerald Combs1-0/+42
to CFLAGS and/or CXXFLAGS as needed. svn path=/trunk/; revision=52654
2013-10-10Fix other HAVE_LUA entry.Guy Harris1-1/+1
svn path=/trunk/; revision=52517
2013-10-10Just describe HAVE_LUA as "Define to use Lua"; it's not tied to aGuy Harris1-1/+1
version, and this matches cmakeconfig.h.in. svn path=/trunk/; revision=52511
2013-09-18Revert "Prefer newer Lua versions"Balint Reczey1-1/+1
The original version was OK, obviously. svn path=/trunk/; revision=52141
2013-09-18Prefer newer Lua versionsBalint Reczey1-1/+1
svn path=/trunk/; revision=52140
2013-09-14Fix a typo Jörg Mayer1-1/+1
svn path=/trunk/; revision=52030
2013-08-12Just check whether dladdr() is available; we check in the code whetherGuy Harris1-36/+0
it succeeds, so there's no point in checking whether it succeeds in a sample program. svn path=/trunk/; revision=51322
2013-08-12On some platforms, to get dladdr() you need to link with -ldl. FirstGuy Harris1-0/+36
try it without -ldl (in case the OS doesn't have it - not a good idea, as it complicates the build process for cross-platform tools that might require it on other platforms, but "not a good idea" never stopped UN*X vendors in the past) and, if that fails, try it with -ldl. svn path=/trunk/; revision=51309
2013-07-24Add a AC_WIRESHARK_QT_MODULE_CHECK that checks for a particular QtGuy Harris1-67/+63
module, and use that in AC_WIRESHARK_QT_CHECK. svn path=/trunk/; revision=50882
2013-07-24The files in aclocal-fallback are copies of .m4 files from variousGuy Harris1-0/+125
packages, providing macros that we use in our configure script in case somebody building from SVN doesn't happen to have the package installed and thus doesn't happen to have those macros defined. In the case of Qt, there *isn't* such a .m4 file, so we had to create the macro. Move it to acinclude.m4, and rename it to AC_WIRESHARK_QT_CHECK to indicate that it's our own check. svn path=/trunk/; revision=50881
2013-07-02If the LHS of an "expr LHS : RHS" expression has an X added to avoidGuy Harris1-4/+4
confusing expr if the LHS is an empty string, the RHS needs it as well. Also, fix some typoes ("$X" rather than "X$"), and use lower-case "x", as that's what's used elsewhere when doing that sort of thing. svn path=/trunk/; revision=50331
2013-07-02Change additions from r50178 from if expr "$GCC_OPTION" to if exprStephen Fisher1-4/+4
"X$GCC_OPTION" so expr doesn't get confused by the GCC_OPTION that starts with a hyphen and spit out messages like this (on FreeBSD): checking whether we can add -fexcess-precision=fast to CXXFLAGS... expr: illegal option -- f expr: usage: expr [-e] expression expr: illegal option -- f expr: usage: expr [-e] expression no svn path=/trunk/; revision=50330
2013-06-28Rename AC_WIRESHARK_GCC_CFLAGS_CHECK toGuy Harris1-3/+3
AC_WIRESHARK_COMPILER_FLAGS_CHECK, because it doesn't just affect CFLAGS and it doesn't just affect the flags for GCC. svn path=/trunk/; revision=50222
2013-06-28Change formatting in the hopes of making the code a bit easier to figureGuy Harris1-104/+102
out, and update a comment. svn path=/trunk/; revision=50221
2013-06-28When checking whether a given option should be added to the compilerGuy Harris1-28/+16
flags, if the option should be added to the flags for both C and C++, test both the C and C++ compilers and, if the answers are different, print a warning; the user might have (intentionally or unintentionally) selected mismatched compilers, e.g. clang and g++ on OS X. svn path=/trunk/; revision=50219
2013-06-27Don't assume that compilers not named "clang" will, by default, reportGuy Harris1-5/+22
an error, or not issue warnings, by default if you give them an unknown -f flag. Instead, test that flag with all compilers, and use -Werror to force it to error out. As with C/C++ flags, so with C++-only flags. svn path=/trunk/; revision=50178
2013-06-26Don't assume that compilers that need an extra option to report errors,Guy Harris1-15/+35
rather than just warnings, for unknown warning options are named "clang"; they might not be. svn path=/trunk/; revision=50177
2013-06-26(Attempt to) fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8813 :Jeff Morriss1-5/+5
Enable INET6 checking on Solaris versions other than 5.8. (Yes, theoretically this should be checking for Solaris 5.7 or later. I'm going to go out on a limb and assume that no one is actually still using 5.7 or, if they are, they aren't trying to compile a modern Wireshark on it...) svn path=/trunk/; revision=50173
2013-03-06look for /usr/include/lua5.x directories to determine the lua versionMartin Kaiser1-1/+8
(Debian squeeze installs lua includes in /usr/include/lua5.1 and libs under /usr/lib, there's no --with-lua=<dir> setting for this configuration) see also https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8438 svn path=/trunk/; revision=48146
2013-02-04Add the warning flags to CFLAGS_FOR_BUILD, so any build tools we buildGuy Harris1-0/+10
are built with warnings. Also add compiler-specific flags (in this case, just the flags to enable ANSI C compilation) to CFLAGS_FOR_BUILD. svn path=/trunk/; revision=47479
2013-01-04In AC_WIRESHARK_GCC_CFLAGS_CHECK() don't check if $3 (the program to be run)Jeff Morriss1-4/+10
exists by doing: if test "x$3" != "x" ; then because if the program contains quotes it breaks the shell's parsing. Instead test for the existence of $4 (which is mandatory if $3 is given). Fix up the test program for -Wlogical-op so that it actually compiles warning-free (at least on my system) when the compiler doesn't have the bug we're checking for. svn path=/trunk/; revision=46926
2012-12-09Add some additional arguments to AC_WIRESHARK_GCC_CFLAGS_CHECK() to makeGuy Harris1-8/+77
it do an additional check, if it finds that a given compiler option is supported by the compiler, to see whether it's supported but undesirable. The arguments are a chunk of code to try to compile with -Werror, and a string to be used in the "checking..." message printed when trying to compile the cunk of code. Try enabling -Wshadow again, but have it check whether extern int atoi(char *p); int foo(char *p) { int (*fptr)(char *p) = atoi; return fptr(p) * 2; } compiles with -Wshadow and -Werror, so that we don't use -Wshadow with compilers that complain about that; some older versions of GCC complain about that, and it's really not worth our effort to eliminate or rename arguments in function prototypes to make -Wshadow work even with those compilers. svn path=/trunk/; revision=46475
2012-11-02From Jim Young and updated by Max Romanov:Anders Broman1-12/+18
The modification to acinclude.m4 adds a new test in the AC_WIRESHARK_OSX_INTEGRATION_CHECK section to first look for the library gtkmacintegration. "gtkmacintegration" is the new internal name for GTK+ MAC OSX library after the project was moved to www.gtk.org. Previously this library was known as igemacintegration. The patches to the three gtk/*.c files update the conditional #include <gtkmacintegration/gtkosxapplication.h> to use the new folder name. The Option 1 patch will break any build environment that expects to find the gtkosapplication.h file in the older igemacintegration folder. In addition the patch includes updates to gtk/main.c and gtk/main_menubar.c for a more standard looking App menu. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6702 svn path=/trunk/; revision=45869
2012-07-07Use -D_FORTIFY_SOURCE=2 only if the gc optimization level is greater than 0.Bill Meier1-0/+46
Fixes Bug #7449: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7449 ----- Issue: Building Wireshark with '-O0 -D_FORTIFY_SOURCE=2 ...' fails The warning [error] message: /usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]` A bit of research shows that this warning was added to a recent version of glibc (on at least Fedora). See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979 The warning message occurs if -D_FORTIFY_SOURCE=... is used and the gcc 'optimization level' == 0 (-O0). Unfortunately when building with -O0 this warning message: 1. Causes compiles to fail (if -Werror [stop on warning]) 2. Causes ./configure to fail with an (incorrect) message about the pcap header being older than the libpcap version. svn path=/trunk/; revision=43601
2012-06-25From Tony Trinh:Anders Broman1-2/+2
Update Lua from 5.1 to 5.2 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400 svn path=/trunk/; revision=43482