Commit Graph

237 Commits

Author SHA1 Message Date
Gerald Combs 4921e55990 Qt: Initial VoIP Calls dialog.
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-12-09 21:25:33 +00:00
Guy Harris 392c41ce30 Add support for getting nanosecond time stamp resolution when capturing.
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-09-28 23:29:05 +00:00
Garming Sam df335d52c0 Cope with MIT being line wrapped when compiling with kerberos
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-22 23:24:17 +00:00
Guy Harris d434e08b01 Fix a comment.
Change-Id: I4dff4912ad8355552ba9efee73c0aae9a2a55000
Reviewed-on: https://code.wireshark.org/review/3415
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-04 20:42:28 +00:00
Guy Harris 27cfea6467 Define INET6 in config.h rather than in the Makefile.
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-08-03 18:49:17 +00:00
Guy Harris aa0f80981a Don't check for -Wl,{option} support.
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-01 19:47:07 +00:00
Guy Harris b378f72545 Fix comments to reflect reality.
Change-Id: Id56f5844932371a89785f4ddce87eb66789acdc8
Reviewed-on: https://code.wireshark.org/review/2754
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-01 19:27:01 +00:00
Guy Harris c507304d98 If we don't check for something, don't print a result.
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-18 05:47:24 +00:00
Guy Harris 20accf341c Don't do the check for clang/clang++.
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-18 04:58:42 +00:00
Guy Harris 4cebb0686f Add -Werror when testing -m compiler flags.
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-18 04:27:59 +00:00
Guy Harris d58ac9ad38 Get rid of the last bits of Python, as they break the build.
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-06-16 22:54:42 +00:00
Guy Harris 68f9811b1b Don't distinguish between "GCC" and "Clang" extra -W flags.
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-04-20 22:47:18 +00:00
Guy Harris 81c0091c0a Try to improve the "Kerberos requested but not OpenSSL" message.
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>
2014-03-09 22:42:41 +00:00
Guy Harris 2412913616 Fix configure-script errors with some versions of autoconf.
svn path=/trunk/; revision=54470
2013-12-26 21:45:51 +00:00
Guy Harris 0893e06324 OK, "i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc.
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-26 21:03:54 +00:00
Guy Harris b5baf01b86 No need for quotes around the arguments to AC_MSG_ macros.
svn path=/trunk/; revision=54448
2013-12-24 18:51:13 +00:00
Guy Harris 8713e0457b Some warning options are, for reasons not entirely obvious to me, not
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-12-24 18:43:42 +00:00
Gerald Combs f6884b5945 Add checks to see if CC and/or CXX are Clang. Add "-Qunused-arguments"
to CFLAGS and/or CXXFLAGS as needed.

svn path=/trunk/; revision=52654
2013-10-16 22:39:44 +00:00
Guy Harris 2accaae68a Fix other HAVE_LUA entry.
svn path=/trunk/; revision=52517
2013-10-10 22:56:48 +00:00
Guy Harris 36fe610b11 Just describe HAVE_LUA as "Define to use Lua"; it's not tied to a
version, and this matches cmakeconfig.h.in.

svn path=/trunk/; revision=52511
2013-10-10 20:20:45 +00:00
Balint Reczey d353e38a41 Revert "Prefer newer Lua versions"
The original version was OK, obviously.

svn path=/trunk/; revision=52141
2013-09-18 21:51:45 +00:00
Balint Reczey 3db47e653e Prefer newer Lua versions
svn path=/trunk/; revision=52140
2013-09-18 21:13:36 +00:00
Jörg Mayer f9faa339a5 Fix a typo
svn path=/trunk/; revision=52030
2013-09-14 07:00:52 +00:00
Guy Harris bebe1200de Just check whether dladdr() is available; we check in the code whether
it succeeds, so there's no point in checking whether it succeeds in a
sample program.

svn path=/trunk/; revision=51322
2013-08-12 20:01:30 +00:00
Guy Harris 70523b5014 On some platforms, to get dladdr() you need to link with -ldl. First
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-08-12 09:09:32 +00:00
Guy Harris 05a7ab12c1 Add a AC_WIRESHARK_QT_MODULE_CHECK that checks for a particular Qt
module, and use that in AC_WIRESHARK_QT_CHECK.

svn path=/trunk/; revision=50882
2013-07-24 23:44:56 +00:00
Guy Harris f317c7821d The files in aclocal-fallback are copies of .m4 files from various
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-24 22:34:44 +00:00
Guy Harris f4361b8e38 If the LHS of an "expr LHS : RHS" expression has an X added to avoid
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-02 23:56:32 +00:00
Stephen Fisher b4dca0fbd2 Change additions from r50178 from if expr "$GCC_OPTION" to if expr
"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-07-02 23:28:51 +00:00
Guy Harris 70075fa70f Rename AC_WIRESHARK_GCC_CFLAGS_CHECK to
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-28 22:00:52 +00:00
Guy Harris eea87ac6e7 Change formatting in the hopes of making the code a bit easier to figure
out, and update a comment.

svn path=/trunk/; revision=50221
2013-06-28 21:51:31 +00:00
Guy Harris 623cca3634 When checking whether a given option should be added to the compiler
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-28 21:38:51 +00:00
Guy Harris 04cc1e2fb5 Don't assume that compilers not named "clang" will, by default, report
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-27 00:45:39 +00:00
Guy Harris eaf5e3fd1f Don't assume that compilers that need an extra option to report errors,
rather than just warnings, for unknown warning options are named
"clang"; they might not be.

svn path=/trunk/; revision=50177
2013-06-26 22:43:51 +00:00
Jeff Morriss ffc5183fd2 (Attempt to) fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8813 :
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-06-26 18:19:43 +00:00
Martin Kaiser 43db810318 look for /usr/include/lua5.x directories to determine the lua version
(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-03-06 21:48:30 +00:00
Guy Harris 1d3e62c025 Add the warning flags to CFLAGS_FOR_BUILD, so any build tools we build
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-02-04 22:23:19 +00:00
Jeff Morriss 3be49bedd1 In AC_WIRESHARK_GCC_CFLAGS_CHECK() don't check if $3 (the program to be run)
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
2013-01-04 02:12:51 +00:00
Guy Harris b961881fb3 Add some additional arguments to AC_WIRESHARK_GCC_CFLAGS_CHECK() to make
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-12-09 02:52:33 +00:00
Anders Broman d54b681f84 From Jim Young and updated by Max Romanov:
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-11-02 09:58:43 +00:00
Bill Meier 88c8b9218d Use -D_FORTIFY_SOURCE=2 only if the gc optimization level is greater than 0.
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-07-07 22:35:55 +00:00
Anders Broman e6e6d6217b From Tony Trinh:
Update Lua from 5.1 to 5.2

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400

svn path=/trunk/; revision=43482
2012-06-25 20:42:07 +00:00
Anders Broman aeceb172a4 From Tony Trinh:
Update autoconf script to check for Lua 5.2 

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400

svn path=/trunk/; revision=43480
2012-06-25 20:31:24 +00:00
Jörg Mayer 7e10804902 Whitespace fix
svn path=/trunk/; revision=43305
2012-06-17 12:07:08 +00:00
Guy Harris 68a4971594 If the user tries to save a capture file atop a file that has all its
write bits turned off or, on 4.4-Lite-based systems, has its "user
immutable" bit turned on, ask them if they really want to overwrite the
file (as those are both used to say "this file is precious, don't let me
easily accidentally trash it") and, if the "user immutable" bit is set,
turn it off first so that the move in the "safe save" won't fail.

svn path=/trunk/; revision=43006
2012-06-02 18:53:13 +00:00
Guy Harris 931acaff3e Fix some comments and some indentation.
svn path=/trunk/; revision=41596
2012-03-16 08:02:35 +00:00
Guy Harris 04acb74936 Put -D and -I flags into CPPFLAGS rather than into CFLAGS; that should
make them apply to C++ as well as C.  That seems to be what the autoconf
documentation suggests:

- Variable: CFLAGS
  Debugging and optimization options for the C compiler. If it is not set
  in the environment when configure runs, the default value is set when
  you call AC_PROG_CC (or empty if you don't). configure uses this
  variable when compiling or linking programs to test for C features.

  If a compiler option affects only the behavior of the preprocessor
  (e.g., -Dname), it should be put into CPPFLAGS instead. If it affects
  only the linker (e.g., -Ldirectory), it should be put into LDFLAGS
  instead. If it affects only the compiler proper, CFLAGS is the natural
  home for it. If an option affects multiple phases of the compiler,
  though, matters get tricky. One approach to put such options directly
  into CC, e.g., CC='gcc -m64'. Another is to put them into both CPPFLAGS
  and LDFLAGS, but not into CFLAGS.

	...

- Variable: CPPFLAGS
  Preprocessor options for the C, C++, Objective C, and Objective C++
  preprocessors and compilers. If it is not set in the environment when
  configure runs, the default value is empty. configure uses this variable
  when preprocessing or compiling programs to test for C, C++, Objective
  C, and Objective C++ features.

  This variable's contents should contain options like -I, -D, and -U that
  affect only the behavior of the preprocessor. Please see the explanation
  of CFLAGS for what you can do if an option affects other phases of the
  compiler as well.

svn path=/trunk/; revision=41593
2012-03-16 03:27:45 +00:00
Guy Harris b53e379447 Have AC_WIRESHARK_GCC_CFLAGS_CHECK take an optional second flag to
indicate whether the flag is C-only, C++-only, or for both compilers;
pass the appropriate value for C-only flags.  Have the "Checking for..."
message indicate whether we're adding to CFLAGS, CXXFLAGS, or both.

(Yes, the macro should probably be renamed.  "GCC" refers to the GNU
Compiler Collection, which includes a C++ compiler, although that's also
used for compilers that are more-or-less compatible with the ones from
the GNU Compiler Collection, such as the clang compilers.)

We set -Wformat-security whether or not --enable-extra-gcc-checks was
specified, so we don't need to do it again if it was specified.

svn path=/trunk/; revision=41586
2012-03-16 00:49:01 +00:00
Guy Harris e42d0d35d8 Referring to pcap_version[] doesn't do what you want on at least some
UN*Xes (Fedora 16 and probably other Linux distributions, probably at
least some if not all other ELF-based systems, and perhaps also Mac OS
X), and causes problems if pcap_version[] has a different length in the
libpcap with which the executable was built and the libpcap with which
it's run, so we avoid using it for now.

svn path=/trunk/; revision=40138
2011-12-09 21:15:48 +00:00
Anders Broman 0b41604bad From Kevin Hildebrand:
Typo in acinclude.m4 breaks Heimdal kerberos builds

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6512

svn path=/trunk/; revision=39677
2011-10-30 16:19:05 +00:00