Commit Graph

242 Commits

Author SHA1 Message Date
Guy Harris 73af2d63ae We require pkg-config to check for, for example, GLib.
If the check for pkg-config fails, quit immediately; don't leave the
failure message for later, as the error message in question might not be
as blunt.

Change-Id: I530e8b62f5adff228ae8ff6f9798ac538c2ad684
Reviewed-on: https://code.wireshark.org/review/6084
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-27 23:03:56 +00:00
Guy Harris c2c9a09880 Use getopt_long() for the first pass through the argument list.
That way:

	1) we don't have to worry about the system getopt() and our
	   getopt_long(), on platforms that have getopt() but not
	   getopt_long() (Solaris prior to Solaris 10, HP-UX, AIX), not
	   working well together;

	2) if necessary, we can handle long options in the first pass.

Switch to using getopt_long() for the *second* pass for the GTK+ version
of Wireshark.

Use the documented mechanism for resetting the argument parser for the
glibc version of getopt_long(); use the mostly-undocumented-but-at-least-
they-documented-optreset mechanism for the *BSD version.

(We should look into doing only one pass, saving away arguments that
can't fully be processed in the first pass for further processing after
initializing libwireshark.)

Change-Id: Ide5069f1c7c66a5d04acc712551eb201080ce02f
Reviewed-on: https://code.wireshark.org/review/6063
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-26 22:39:46 +00:00
Guy Harris 20503c7047 Check for getopt_long(), not getopt().
We support three types of platforms:

	1) UN*Xes that have both getopt() and getopt_long();

	2) UN*Xes that have getopt() but not getopt_long();

	3) Windows, which has neither.

Checking for getopt_long() lets us distinguish between 1) and 2) and
build getopt_long() for them.

Change-Id: Iaf0f142f9bebaa2eed2128d544ec9786711def45
Reviewed-on: https://code.wireshark.org/review/6045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-25 01:11:10 +00:00
Stephen Fisher 3d62d2c396 Move popcount() to an optionally built part of wsutil for systems that
provide their own popcount().

Change-Id: Ic26f3b50cf0bd2b4af0d42e9c27488ebbac1ab33
Reviewed-on: https://code.wireshark.org/review/5998
Petri-Dish: Stephen Fisher <sfisher@sdf.org>
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-23 00:22:23 +00:00
Guy Harris caf4cc6399 Use AC_SEARCH_LIBS() for math functions.
Use it to check whether we need -lm for various math functions -
including floorl().  Let it handle adding -lm, rather than having that
in the various _LDADD macros.

Change-Id: Ic5d24ec35e060306351f4981c92e26879e597d81
Reviewed-on: https://code.wireshark.org/review/5908
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 04:45:48 +00:00
Guy Harris b736896490 Handle floorl() the same way we handle other not-on-all-platforms functions.
Use AC_CHECK_FUNC() for it, define FLOORL_LO to floorl.lo if we *don't*
have it, add FLOORL_LO to the list of items conditionally built in
libwsutil, and include "wsutil/floor.h" only if HAVE_FLOORL is *not*
defined, as that means it's *not* supplied by the platform and thus
*not* declared in <math.h>.

Also, use the standard export stuff in wsutil/floor.h.

Change-Id: Ic24aa69f65f2d15450d8b84b0c2b0c58f38edebe
Reviewed-on: https://code.wireshark.org/review/5901
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 02:54:04 +00:00
Stephen Fisher dba361be1a Add a missing line related to previous two commits
(I messed up my local git repo using git branches and stash/stash pops,
sorry for all of the extra commits for one change)

Change-Id: Ib031ae7d57ba9ea4b19fe13121643799e7563046
Reviewed-on: https://code.wireshark.org/review/5893
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 23:22:02 +00:00
Stephen Fisher 47dc4e77cc Revert "Provide a floorl() function (which is currently only able to call GCC's __builtin_floorl() function) for systems which don't provide one." because I left off the new wsutil/floor.[ch] files
This reverts commit e2586ec36d.

Change-Id: Ie38b7f32b2d21e3beba5173eec22ca12b7f5da91
Reviewed-on: https://code.wireshark.org/review/5891
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 23:12:09 +00:00
Stephen Fisher e2586ec36d Provide a floorl() function (which is currently only able to call GCC's
__builtin_floorl() function) for systems which don't provide one.

Change-Id: Ie0140ff195f0eae525c7bd70c7c3e23039fde569
Reviewed-on: https://code.wireshark.org/review/5889
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-19 22:56:18 +00:00
Gerald Combs 3f08a85819 1.99.1 → 1.99.2.
Change-Id: Ie2e9e81ce1b1d876ae550fc0c17c4367aaa35d98
Reviewed-on: https://code.wireshark.org/review/5705
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-10 19:17:18 +00:00
Stephen Fisher 086734456d Look for python3 in addition to python in configure script.
Change-Id: I77ff22aabdbbbf7376483b53d8795e7fbf0c0433
Reviewed-on: https://code.wireshark.org/review/5627
Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-05 00:00:42 +00:00
Guy Harris b8a23643b3 Don't do the desktop integration stuff if we're not building Wireshark.
Wireshark is the desktop app; if we're not building it (i.e., we're only
building the command-line TShark), we don't need any desktop files.

Change-Id: Id8244b417fd53c9d55b4d77fe3ad748c98868ad7
Reviewed-on: https://code.wireshark.org/review/5615
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-04 08:03:32 +00:00
Guy Harris c02417f851 Don't do all the fd.o desktop integration stuff on OS X.
It doesn't need it, so don't install those files, or uninstall them, or
suggest running various unnecessary commands after the installation
finishes.

Change-Id: Ieecab22884723670f47f2fc7cc1ac827f48c1967
Reviewed-on: https://code.wireshark.org/review/5614
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-04 07:56:48 +00:00
Alexis La Goutte 7b558dd105 Add unused-const-variable (enable by default on new clang release)
Change-Id: I1d882e02188ba38ec1b5583c5933d0c92f0539e4
Reviewed-on: https://code.wireshark.org/review/5068
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-11-16 17:25:58 +00:00
Stephen Fisher 547323b0ba Allow the environment variable RCC to set before running configure to
allow for unusual paths for Qt's rcc program (FreeBSD ports puts it in
/usr/local/lib/qt5/bin).  This matches the existing functionality of the
MOC and UIC variables/programs.

Change-Id: I885d61bce54d9e893e0c2fc496a9ff767a096ae6
Reviewed-on: https://code.wireshark.org/review/5139
Petri-Dish: Stephen Fisher <stephenfisher@centurylink.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stephen Fisher <stephenfisher@centurylink.net>
2014-11-05 19:24:30 +00:00
Guy Harris e65f581ffa Revert "Follow a suggestion from libtoolize:"
Sadly, older versions of autoconf - such as the ones on the OS X buildbots - don't know about AC_CONFIG_MACRO_DIRS.

This reverts commit 89291ad4f3.

Change-Id: Ie4fa71062886f58c7f6014f6b7969921f0b824ae
Reviewed-on: https://code.wireshark.org/review/5116
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-04 20:36:22 +00:00
Stephen Fisher 89291ad4f3 Follow a suggestion from libtoolize:
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([./aclocal-fallback])' to
configure.ac

This is explained in the libtool manual:

"In the future other Autotools will automatically check the contents of
AC_CONFIG_MACRO_DIRS, but at the moment it is more portable to add the macro
directory to ACLOCAL_AMFLAGS in Makefile.am, which is where the tools currently
look. If libtoolize doesn't see AC_CONFIG_MACRO_DIRS, it too will
honour the first -I argument in ACLOCAL_AMFLAGS when
choosing a directory to store libtool configuration macros in. It is perfectly
sensible to use both AC_CONFIG_MACRO_DIRS and ACLOCAL_AMFLAGS, as long as they
are kept in synchronisation."

Change-Id: Ic203b0b5104ea3423cf8c0042b2278e82bcea332
Reviewed-on: https://code.wireshark.org/review/5113
Reviewed-by: Stephen Fisher <stephenfisher@centurylink.net>
2014-11-04 19:55:58 +00:00
Guy Harris 3426ffa248 For OS X, don't rigidly tie the SDK version to the minimum target version.
According to

	https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1

the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.

Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target.  Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases.  (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)

This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.

For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.

Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:16:10 +00:00
Matthieu Patou cda985d3eb Create the compress module for compression functions.
For the moment there is only the lzxpress compression used by DRS

Bug: 10546
Change-Id: Ifc7e1767934224c0198f0b09caa3efbad979ca1f
Reviewed-on: https://code.wireshark.org/review/4600
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-30 15:28:47 +00:00
Jeff Morriss 79c977cf0a Remove the optional strncasecmp.{h,c} target (for systems that don't have that API).
strncasecmp() has been prohibited for years (in favor of the g_ascii_ version).

Change-Id: I64b7c29099b1c5240757e2026fe3490096a84755
Reviewed-on: https://code.wireshark.org/review/4980
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-10-30 13:39:44 +00:00
Gerald Combs 86386243cd Make the "-qt" option the default in the OS X packaging scripts.
Change-Id: I1e404c342d06381be71735ff6fbc47e9b2b13899
Reviewed-on: https://code.wireshark.org/review/4895
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-21 16:16:56 +00:00
Mikael Kanstrup 27e4ac85e8 Add support for split wiphy dump to Wireless Toolbar
To populate the Wireless Toolbar menu the NL80211_CMD_GET_WIPHY
command is used. Some network interfaces must use split wiphy dump
feature for this command to function properly. One such example is the
D-Link DWA-160 USB adapter that does not show up when used without.

Make use of split wiphy dump feature whenever kernel supports it
to populate the list of monitor interfaces for the Wireless Toolbar.

Bug: 10564
Change-Id: Idc28e92f91a2488fa48eeb282a0ef1e2bd40a5f0
Reviewed-on: https://code.wireshark.org/review/4611
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-18 14:26:00 +00:00
Gerald Combs d98debe6d0 1.99.0 → 1.99.1.
Change-Id: I8580be0bfe88e33df333f0397f51762f4af819f6
Reviewed-on: https://code.wireshark.org/review/4532
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-07 19:41:19 +00:00
Gerald Combs 8576e1c103 Qt: Add stock icons.
The new icons are patterned after the existing capture icons. They could
probably benefit from some adjustments here and there.

Start moving toward icon names and a directory layout compliant with
freedesktop.org's Icon Naming Specification and Icon Theme
Specification. We aren't fully compliant and might never be but anyone
with exposure to FDO icon themes should at least know where everything
is.

Make Capture Start (x-capture-start) the first icon in the toolbar.

Define the Colorize Packets, Auto Scroll, and zoom icons even though the
Qt UI doesn't use them yet.

Leave the Capture Filter, Display Filter, Coloring Rules, Preferences,
and Help icons off for now. The GTK+ toolbar is overly cluttered and I'm
not sure they're necessary.

Try not to break ui/gtk/toolbar_icons.h.

Remove welcome.qrc. I initially added it in case we needed to overlay
the welcome screen with translucent .pngs but that never happened.

To do:

- Move the old GTK+ icons to their own directory.

- Find a better name for the "toolbar" directory. "stock"?

- Make the toolbar configurable.

Change-Id: Ie07592113d307b8db786aedace672312a870fe38
Reviewed-on: https://code.wireshark.org/review/4182
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-20 19:54:04 +00:00
AndersBroman 07b003a98f Remove obsolete dissectors.
Change-Id: Icd480491670de9d8495a95861b18a8a5cb9724b4
Reviewed-on: https://code.wireshark.org/review/4006
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-06 09:52:01 +00:00
Jeff Morriss 1a446079d1 Simplify ./configure logic for telling rpmbuild which GUI(s) we're building.
Rather than checking for all the "--with" arguments just use the "$have_xxx"
variables.

Don't allow rpmbuild's ./configure to decide to build a GUI just because it's
available: make it build only what was ./configure'd.

Change-Id: I68582b4c13da7b52d56591dce68ac426e9f607f1
Reviewed-on: https://code.wireshark.org/review/3958
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-09-02 16:34:00 +00:00
Gerald Combs b7fb1167e3 Qt → wireshark. GTK+ → wireshark-gtk.
Make sure the Qt UI is named "Wireshark" and its executable is named
"wireshark" or "wireshark.exe". Make sure the GTK+ UI is named
"Wireshark 1" or "Wireshark (GTK+)" depending on how much the target
audience is likely to care about UI toolkits. Make sure the GTK+
executable is named "wireshark-gtk" or "wireshark-gtk.exe".

It looks like moving to Qt 5.3 (g978faf3) broke the PortableApps
package. It's likely even more broken now.

Autotools out-of-tree builds also broke on Ubuntu 12.02 (automake
1.11.3) at some point. The first attempt to compile in ui/qt returns
"error: source_file.cpp: No such file or directory". The second attempt
works. Out-of-tree builds work fine on Ubuntu 14.04 (automake 1.14.1).

Tested:

- Nmake builds

- NSIS packaging

- CMake builds (Windows, OS X)

- Autotools build and distcheck

- RPM packaging

To do:

- Test Debian packaging

- Fix PortableApps

Change-Id: I66429870e05fd2d6fc901942477959ed6164fce2
Reviewed-on: https://code.wireshark.org/review/3919
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-02 15:39:17 +00:00
Roland Knall bed29af46d Extcap Capture Interface
Extcap is a plugin interface, which allows for the usage
 of external capture interfaces via pipes using a predefined
 configuration language which results in a graphical gui.

 This implementation seeks for a generic implementation,
 which results in a seamless integration with the current
 system, and does add all external interfaces as simple
 interfaces.

 Windows Note: Due to limitations with GTK and Windows,
 a gspawn-winXX-helper.exe, respective gspawn-winXX-helper-console.exe
 is needed, which is part of any GTK windows installation.

 The default installation directory from the build is an extcap
 subdirectory underneath the run directory. The folder used by
 extcap may be viewed in the folders tab of the about dialog.

 The default installation directory for extcap plugins with
 a pre-build or installer version of wireshark is the extcap
 subdirectory underneath the main wireshark directory.

 For more information see:

  http://youtu.be/Nn84T506SwU
  bug #9009

 Also take a look in doc/extcap_example.py for a Python-example
 and in extcap.pod for the arguments grammer.

 Todo:
   - Integrate with Qt - currently no GUI is generated, but
     the interfaces are still usable

Change-Id: I4f1239b2f1ebd8b2969f73af137915f5be1ce50f
Signed-off-by: Mike Ryan <mikeryan+wireshark@lacklustre.net>
Signed-off-by: Mike Kershaw <dragorn@kismetwireless.net>
Signed-off-by: Roland Knall <rknall@gmail.com>
Reviewed-on: https://code.wireshark.org/review/359
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-21 03:34:02 +00:00
Jeff Morriss 61b01c37a9 If the user explicitly requested gnutls or libgcrypt generate an error if they
are not found.

Accurately describe the default behavior: Wireshark will use the libraries if
they are available.

May help avoid problems like that described in:
https://ask.wireshark.org/questions/35600/not-able-to-configure-wireshark-with-gnutls

Change-Id: I5f0b2ce87cb7c6b337de93609f13d8027e662263
Reviewed-on: https://code.wireshark.org/review/3750
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-20 19:11:42 +00:00
Jeff Morriss 7ee2d6b697 Mark echld and tfshark as experimental in the ./configure help.
Move them to the end of the list of optional programs.
Make it clear that echld is not built by default.
Change capitalization of tshark and tfshark.

Change-Id: Ib702ed72eb2469968e06a16c73a4009ba4cf68ad
Ping-Bug: 10380
Reviewed-on: https://code.wireshark.org/review/3596
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-15 13:57:32 +00:00
Joerg Mayer 65ac652a07 Remove make-dissector-reg and require python for autotool builds as well
Change-Id: I6239063a08ba37199a4e95302a3650a80544c750
Reviewed-on: https://code.wireshark.org/review/3562
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-08-12 21:31:34 +00:00
Evan Huus 37b5b095b9 Rip out the filetap code
We decided at sharkfest that this wasn't the right design for file dissection;
we have more-or-less settled on way forward, but nobody's shown interest in
implementing it. Whether or not that ever happens, this code is effectively
dead and should be removed.

Change-Id: I14d6086df3204fffb6485228db39d9f407661417
Reviewed-on: https://code.wireshark.org/review/3400
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-04 14:31:37 +00:00
Guy Harris 7df03a7c3e Get rid of debugging output, and get CMake to produce verbose makefiles.
On the 32-bit OS X buildbot, automake is old enough that autotools
builds are verbose, printing the command line for each compile step; if
we cause CMake to produce verbose makefiles, they will also print the
command line, so we can see what differences there are.

This means the other debugging output we added isn't necessary; remove
it.

Sort the extra warning options in configure.ac based on whether they're
for C and C++ or just C, just as is the case in CMake, to make it easier
to keep the lists in sync; add comments to configure.ac to mirror the
ones in CMakeLists.txt.

Get rid of -Wno-deprecated-declarations; the CMake build doesn't use it,
and it doesn't appear to be necessary - if we ever have problems with OS
X complaining about using OpenSSL, for example, we should do as tcpdump
does and wrap uses of the "deprecated"-but-cross-platform APIs in
the appropriate pragmas.

Change-Id: I0b8b45f00481ac2b67da5c7dd028a029b130dcc4
Reviewed-on: https://code.wireshark.org/review/3377
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03 10:41:19 +00:00
Guy Harris 5234d4c2d0 OK, try sorting the compiler options.
Also, comment out the addition of -Wno-deprecated-declarations, as the
CMake build doesn't use it.

If this succeeds in making the autotools and CMake builds compile C code
with the same -W and -f flags in the same order, that should eliminate
at least one reason why the CMake build produces compiler warnings that
the autotools build doesn't.

Change-Id: I0eaeae91b8e3c39c53f502daef86c2d103c8bdab
Reviewed-on: https://code.wireshark.org/review/3374
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03 00:47:00 +00:00
Guy Harris 81f5d71ff3 Get rid of trailing blank line.
Change-Id: Ibcdacbad865478ee682995170937cedd575389ec
Reviewed-on: https://code.wireshark.org/review/3368
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-02 21:19:00 +00:00
Guy Harris 50b67345b7 Dump additional debugging information.
For autotools, dump CC, CFLAGS, CXX, and CXXFLAGS.

For CMake, dump CMAKE_C_COMPILER_ID and CMAKE_CXX_COMPILER_ID.

Hopefully this will help figure out why CMake builds catch different
warnings from autotools builds.

Change-Id: I26955ad955f60e8bad248562fa87963a3a1bb42f
Reviewed-on: https://code.wireshark.org/review/3365
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-02 21:01:49 +00:00
Jeff Morriss e7df09b82f Add the easy_codec plugin to the source distribution.
It doesn't build on Linux but cmake looks for it (won't build without it) and
Windows users might want it.

Change-Id: I978f0de0a2895a82f4f3b8c1e9e0ecec6a93e6f4
Reviewed-on: https://code.wireshark.org/review/3325
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-08-01 16:17:38 +00:00
Guy Harris 4d90d6e38d Add some files under asn1 to the distribution.
Include CMakeLists.txt files and the gnm subdirectory, along with the
top-level Makefile.inc and Makefile.preinc files.  Don't explicitly
include Custom.make, as automake does that automatically given that it's
included by asn1/Makefile.am.

Add some files to EXTRA_DIST lists.

Move some .asn files to EXTRA_DIST; they don't need to be in SRC_FILES,
as SRC_FILES always includes EXTRA_DIST, and they *do* need to be in
EXTRA_DIST so that they're in the distribution.

Change-Id: Id91df577260fa57028d40fe098be1d79c59398e6
Reviewed-on: https://code.wireshark.org/review/3273
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-30 23:42:55 +00:00
Guy Harris f724cae763 Only ABI-check strncasecmp.h if strncasecmp() is part of the API/ABI.
Some routines Wireshark uses are present in some, but not all,
platforms; for routines that would be used on all platforms, libwsutil
provides its own implementations on platforms that lack them.

On platforms that provide a routine, that routine will not be part of
the API and ABI, and, if we do an API or ABI check using the header
libwsutil provides to declare the function on platforms that lack it, we
may have a collision between the declaration in our header and the
declaration in a system header.

There's no guarantee that we can make them match, as the declaration
might differ from platform to platform and from platform version to
platform version, so we simply leave the header file out of the check if
we have the function on the platform on which we're checking the API or
ABI.

Change-Id: I8a23e63d9e17e5c1f5a83304dbe14d1e7df22e7e
Reviewed-on: https://code.wireshark.org/review/3115
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-19 07:24:01 +00:00
Graham Bloice 4b5967f683 Moved nghttp2 to epan
Cleaned up nghttp2 build

Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d
Reviewed-on: https://code.wireshark.org/review/2937
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-09 05:31:31 +00:00
Guy Harris 5bfc21cf9e Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.

If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.

Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.

Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.

Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 21:03:09 +00:00
Guy Harris 318205e699 Fix an error caught by enum-conversion warnings.
(Strong typing is for weak minds.

Human minds are weak.

Therefore, strong typing is for human minds.)

Change-Id: I099b85e98f3b9742b1addd8d260b3e94ca7add31
Reviewed-on: https://code.wireshark.org/review/2866
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-05 22:22:44 +00:00
Guy Harris 9e6487f247 Move utility routines for capturing into a libcaputils static library.
Some of those routines are used only in dumpcap; others are used in
TShark and Wireshark as well.

Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7
Reviewed-on: https://code.wireshark.org/review/2841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-04 07:25:26 +00:00
Guy Harris 096aca67de Make some inconsistent configuration options errors.
This way, if you ask for both setuid and setcap installation of dumpcap,
it will fail, rather than silently (other than a message you might miss)
ignoring the request for setuid installation.  See bug 10246.

Also:

	if you ask for setuid or setcap installation of dumpcap, but
	dumpcap isn't built, it'll let you know that there's nothing to
	make setuid/setcap, and fail;

	if you ask for setcap installation of dumpcap, but setcap wasn't
	found, it'll let you know that it can't install it setcap, and
	fail;

so that it won't silently (other than a message you might miss) ignore
those requests, either.

Change-Id: Ibc01593e59fd1cd1be8c68d8cdacbfdca863efa0
Reviewed-on: https://code.wireshark.org/review/2771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 00:48:28 +00:00
Guy Harris ae26b12f3e If -fvisibility=hidden isn't supported, try -xldscope=hidden.
That's the option for newer versions of Sun^WOracle C.

Change-Id: I62c12d5870d84587f81a8789732675021523e9ed
Reviewed-on: https://code.wireshark.org/review/2769
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-02 00:20:46 +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 b671551625 Another file to generate in the configure script.
Change-Id: I6dafc9ab9fafd465cb2ad83e5e56e4d22b36d41b
Reviewed-on: https://code.wireshark.org/review/2609
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 03:35:47 +00:00
Guy Harris 213189ef9e Move the routines to talk to dumpcap into a static libcapchild.
This pulls some stuff out of the top-level directory, and means we don't
have to build them once for every program using them.

Change-Id: I37b31fed20f2d5c3563ecd2bae9fd86af70afff5
Reviewed-on: https://code.wireshark.org/review/2591
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-23 23:58:29 +00:00
Guy Harris 421d817d70 Don't compile anything with -msse4.2 unless the compiler supports it.
This includes ws_mempbrk_sse42.c; if the compiler doesn't support
-msse4.2, HAS_SSE4_2 isn't defined, so all the stuff in
ws_mempbrk_sse42.c that uses SSE 4.2 will be #ifdeffed out.

Not all compilers with which we're built will support -msse4.2; in
particular, the ones that aren't compiling for x86 won't....

Change-Id: I69566ca06f602104b40c78b3b06fcb7dfeb054b2
Reviewed-on: https://code.wireshark.org/review/2373
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 09:50:43 +00:00