Commit Graph

587 Commits

Author SHA1 Message Date
Peter Wu 98a50d8513 cmake: print the current CMAKE_C_FLAGS/CMAKE_CXX_FLAGS
It is misleading to print RelWithDebInfo flags if I am using Debug.

Change-Id: I575d5c950cbe9d59852799c28fd88426f20cdaab
Reviewed-on: https://code.wireshark.org/review/12133
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26 05:48:42 +00:00
Peter Wu 12b2e3d4e2 cmake: fix dependencies for copy_data_files
Ensure that files from INSTALL_FILES depend on html_docs, not the parent
target copy_data_files (that would not help at all). Ensure that lua
scripts are generated before copying them (another moved dependency).
Explicitly track the help files that have to be textified for Windows
(this finalizes the addition of proper dependencies to copy_data_files
targets).

Since there is no compelling reason for the extra
copy_data_files_depends target now, remove it and move copy_data_files a
bit further in the file such that the dependencies can be set.

While at it, remove the unnecessary make_directory, the copy_data_files
target will create it automatically when copying a file into it.

Should fix the problem reported at https://code.wireshark.org/review/12028

Change-Id: I81e56c93ac0fc85e7385605b9c780a80b3d43c85
Reviewed-on: https://code.wireshark.org/review/12130
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-25 11:01:10 +00:00
AndersBroman 46f3fe48a3 [Custom plugins] CUSTOM_PLUGIN_IN_FILES is no longer required.
Change-Id: I329a26ece145d70221d47c728e11dca54416a5cf
Reviewed-on: https://code.wireshark.org/review/12092
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-24 12:01:33 +00:00
Pascal Quantin 8748a047bf Fix NSIS installer generation broken in gffb5b3d
Change-Id: Ife7595f1bdeba02d53ec558cd4f26288b26687e7
Reviewed-on: https://code.wireshark.org/review/12091
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-24 09:24:53 +00:00
Peter Wu ffb5b3d727 cmake: add dependency information for copy_data_files
Original problem: run/radius/ (and other files) would continuously be
copied over because the "copy_directory" command is always invoked,
resulting in a newer timestamp (observable via rsync output).

Fix 1: convert from "copy_directory" to copying individual files
(matched via a glob pattern).

Fix 2: add DEPENDS information to the commands, ensuring that the
copy commands are only invoked when the file is actually newer.
(copy_if_different does not respect timestamp, so use plain copy.)

Other visible changes:
 - radius/Custom.make (automake thingey) is not copied anymore because
   an explicit list is used with glob patterns.
 - Removed comment about "default.tt" (gone since
   v1.99.0-rc1-1684-g07b003a, Makefile.nmake is still untouched though).

Due to fix 1, the number of processes increase by about 300. Due to fix
2 however, less processes are executed for repetitive runs. This is
visible in the following build time comparison:

    patch/generator cmake  build1  build2   clean
    before/make     24.86  152.73    3.46    1.04
    after/make      24.78  153.08    3.40    1.03
    before/ninja    22.99  141.68    0.64    0.24
    after/ninja     22.89  141.66    0.10    0.25

cmake is "cmake -DCMAKE_BUILD_TYPE=None -GNinja" (-G"Unix Makefiles");
build1 is invocation of "make -j10"/"ninja" on v2.1.0rc0-668-g94b9907;
build2 is the second invocation with this patch;
clean is "make clean" or "ninja clean".

Numbers are in seconds over 3 runs. This patch has no significant
performance impact for the first build, but the second run has improved
because the more efficient Ninja generator executes less processes.

Change-Id: I7b62556393520044aaaad17dafb82ac137ae73bb
Reviewed-on: https://code.wireshark.org/review/12028
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-24 06:13:56 +00:00
Alexis La Goutte 073cfb33ec CMakeLists (root): fix indent (use tabs)
Change-Id: I14089fbdafa00280ff7b3148c2e0a880b925958e
Reviewed-on: https://code.wireshark.org/review/11872
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-23 12:25:10 +00:00
Guy Harris d69cec7cff Quote the path for the Windows setup script.
The path may contain a space (it does on my Windows 7 VM), so quote it
in the PowerShell command.

Change-Id: Ib130991b8c29cb327832f2fe51cb37828526448b
Reviewed-on: https://code.wireshark.org/review/12041
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-22 19:16:25 +00:00
Graham Bloice f1efeb1eba Fix Windows hardening check
The hardening check runs on all binaries and quite a few third party binaries
are not hardened, thus leading to a warning on the buildslave.
The change reduces the noise by not counting the binaries that are known to be
"soft".  They are still printed in the output though, for reference.

Also fixed the search directory passed to the script.

Change-Id: I1619066c687c9ba934ab38fccbbf2011108328e4
Reviewed-on: https://code.wireshark.org/review/12016
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2015-11-21 18:20:55 +00:00
Dario Lombardo d6da95231e extcap: add sshdump.
sshdump is an extcap module that allows dumping from a remote host using an ssh connection.
It goes with the existing extcap plugin interface.

Change-Id: I8987614fdd817b8173a50130812bc643a4833bca
Reviewed-on: https://code.wireshark.org/review/11402
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-19 15:29:18 +00:00
Gerald Combs e3eb9f3208 CMake: Add Qt5Svg to PACKAGELIST.
...otherwise we won't copy it to ${CMAKE_BINARY_DIR}/run/Wireshark.app on
OS X, which means our flag icons won't be displayed.

Bug: 11697
Change-Id: I26cd6a2dd13be35f9a80fd93adc8248848df5978
Reviewed-on: https://code.wireshark.org/review/11923
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-17 22:45:44 +00:00
Peter Wu 442314e8b2 Revert "Override optimization and other flags for make based generators."
Some compiler flags may not be passed twice (such as -mllvm
-msan-keep-going), so avoid duplicating CMAKE_C(XX)_FLAGS.

When -DCMAKE_BUILD_TYPE=<type> is set, you can override the default
optimization and debug flags with -DCMAKE_C_FLAGS_<type>=....

This reverts commit 15a238a28d.

Change-Id: I4e1cf11c49eaf00ad4a2c430454a127b4be20d9e
Reviewed-on: https://code.wireshark.org/review/11597
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-16 08:36:01 +00:00
Guy Harris d66d379ac8 Try retroactively applying the Qt folks' fix for QTBUG-47942.
The current version of the fix only adds -fPIC under certain
circumstances; we check whether it was added and, if it was, and those
circumstances are *not* in effect, we remove it.

Bug: 11643
Change-Id: I75d0ff9b4781d7d4cd884a29bbce7d392939315c
Reviewed-on: https://code.wireshark.org/review/11849
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-15 22:04:26 +00:00
Pascal Quantin b20d5bbc0b CMake: set WinPcap version in top CMakeLists.txt file like for NMake
This allows displaying the WinPcap version in about dialog

Change-Id: Ic3f4256d81db68314a158fc55682dfd9dbf799a0
Reviewed-on: https://code.wireshark.org/review/11726
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-11-11 17:47:45 +00:00
Dario Lombardo f1ff6d62c4 randpkt: split into a core and an app.
This will allow other apps to use the random packet generation
features.

Change-Id: I7e9af58cbe39da4908242b5fbb292f473e03b4f2
Reviewed-on: https://code.wireshark.org/review/11579
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-11 13:22:05 +00:00
Evan Huus 4f01f3d806 Move -fno-delete-null-pointer-checks to optional
It is no longer supported on El Capitan's clang, which was causing my
cmake/osx/qt build to fail with:

    clang: error: optimization flag '-fno-delete-null-pointer-checks' is not
    supported

Change-Id: Idfac336758cdea9a34446d8281cd237ad3ee6823
Reviewed-on: https://code.wireshark.org/review/11571
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-11-06 04:40:42 +00:00
Ryan Doyle 2014eb0ad3 CMake: Fix compatibility with CMake 3
The version of CMake I use (3.2.2) failed to parse the
CMakeLists.txt

Change-Id: I146c5a5ba8cd6fa6236b53039a31cc085bf5b460
Reviewed-on: https://code.wireshark.org/review/11392
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-29 20:59:50 +00:00
Gerald Combs 670475413a CMake: Use CMAKE_CL_64.
CMake sets CMAKE_CL_64 if we're using a 64-bit version of Visual Studio.
Use it.

Change-Id: I04595a0e703e39e428d853a506472f3881672a35
Reviewed-on: https://code.wireshark.org/review/11376
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-29 00:52:07 +00:00
Peter Wu fe1ab42f16 Require GnuTLS 2.12.0, add cmake version detection
Since v2.1.0rc0-17-g877fd03 and v2.0.0rc0-23-g263ff53 ("ssl-utils:
load RSA keys based on their modulus+exponent"), GnuTLS 2.12.0 is
needed.

Add a version check to cmake as well, tested on CentOS6 (with
pkg-config check disabled to verify the code path). Note that RHEL6
has GnuTLS 2.8.5 and thus SSL decryption with a RSA private key is no
longer supported on that version.

Change-Id: I99fdfe6790107f48629dd435794fe8880263063d
Reviewed-on: https://code.wireshark.org/review/11044
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-25 14:05:07 +00:00
Gerald Combs 1cecd985ab Pass --verbose to windeployqt.
Change-Id: I0adc2eb294c7165b9a327a70b2437916b228f044
Reviewed-on: https://code.wireshark.org/review/11219
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-22 21:11:32 +00:00
Peter Wu 1eba9d926b Avoid adding -pie on older cmake versions
Fixes building on Ubuntu 12.04 x86_64 which has cmake 2.8.7.

Bug: 11617
Change-Id: I253e9fda698d4b963d50516e483d8243231f056b
Reviewed-on: https://code.wireshark.org/review/11193
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-22 06:16:24 +00:00
Peter Wu 82ec0bb0fc Require libgcrypt 1.4.2, add cmake version detection
libgcrypt 1.4.2 is required since since v1.11.0-rc1-2787-g23f9100
("Really add support for AEAD ciphers (GCM)") due to the use of
gcry_cipher_setctr. Bump the version in configure.ac too.

Add version check for gcrypt to cmake. Tested with CentOS 6 (cmake
2.8.12.2, libgcrypt 1.4.5).

Change-Id: I93c3ed902a764d9d14675779e866230d073c96d5
Reviewed-on: https://code.wireshark.org/review/11043
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-20 03:28:55 +00:00
Guy Harris 08a20705b4 Do -fPIC only if it's necessary.
Or, at least, undo the unconditional addition of -fPIC to
Qt5Widgets_EXECUTABLE_COMPILE_FLAGS, and add it back only if we need it
to compile a small test program that includes <QtCore>.

-fPIC still shows up for other reasons; perhaps we need to undo other
unconditional operations "helpfully" done by Qt5CoreConfigExtras.cmake.

Change-Id: I76c1b01b3dce7398e4115552bc4ff87bc775e027
Reviewed-on: https://code.wireshark.org/review/11079
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-19 21:17:52 +00:00
Joerg Mayer 94fee9e78f Move the static handling to a place where it is effective during package
discovery.
  More work needed to get static really working.

v2:
  - Rebase
  - Remove accidentally added macos-setup.sh changes

Change-Id: Ic3a68d2ab7064afffbf5dcfc90925699e8729780
Reviewed-on: https://code.wireshark.org/review/11082
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-10-17 10:40:44 +00:00
Gerald Combs b05803db4b CMake: Add /WX
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off,
similar to config.nmake.

We haven't compiled C++ code with -Wshorten-64-to-32 for quite 
some time so there's no need to add -Wno-shorten-64-to-32 in
ui/qt/CMakeLists.txt.

Additionally, squelch

----
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled
        with
        [
            _Iter=QList<QString>::iterator
,            _RanIt=QList<QString>::iterator
,            _Diff=int
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
----

in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp
so that we'll compile successfully.

Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357
Reviewed-on: https://code.wireshark.org/review/10533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 21:32:22 +00:00
Gerald Combs 7682ae4887 Keep CMake from finding Cygwin's Python.
Try to find Python and set PYTHON_EXECUTABLE on Windows via the registry
prior to calling FindPythonInterp. This works around a bug in CMake that
prefers Cygwin's Python, which is a symlink, which by default is a text
file that contains a Cygwin-specific cookie, which is therefore useless
outside of Cygwin.

This is avoids the need to pass -DPYTHON_EXECUTABLE=... to CMake.

Change-Id: Ife37221b61d920682c20357b6d139a93067a5ad1
Reviewed-on: https://code.wireshark.org/review/11071
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 20:40:28 +00:00
Guy Harris b84b0315d3 Revert "Remove -fPIC with more than just MSVC."
This reverts commit 222de975c4.

I realized how to do it with a compile test.

Change-Id: I9468c50777e387c572f60411ca39ea86ba6ce520
Reviewed-on: https://code.wireshark.org/review/11078
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-16 02:31:27 +00:00
Guy Harris 1a94667cc3 Revert "+ OR OR OR OR OR"
This reverts commit 6bdfa95a1e.

Next I'll revert my change, as I realized how I *can* do it with a compile test, instead.

Change-Id: I75335ef4522af23340fdc9e5d68634cb5a5835d8
Reviewed-on: https://code.wireshark.org/review/11077
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-16 02:30:52 +00:00
Joerg Mayer 6bdfa95a1e + OR OR OR OR OR
Change-Id: I2e6480a519bd01a924a7145bc1e4e899e3fa1c1c
Reviewed-on: https://code.wireshark.org/review/11073
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-10-15 22:39:14 +00:00
Guy Harris 222de975c4 Remove -fPIC with more than just MSVC.
There are other compilers that won't like it or even that may not like
it.

Change-Id: I0d50e4217994bc930914c0fbcf1c5d2fc18a0e3a
Reviewed-on: https://code.wireshark.org/review/11072
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-15 22:04:11 +00:00
Gerald Combs 6ea71d9ad2 CMake: Don't feed -fPIC to Visual C++, second try.
Qt5CoreConfigExtras.cmake in Qt 5.5.0 sets -fPIC unconditionally.

Change-Id: Idf88b0f34b7cec40530702350b417ce1924db9f1
Reviewed-on: https://code.wireshark.org/review/11050
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-15 18:26:31 +00:00
Peter Wu 95804d94e8 cmake: avoid adding -fPIE to libraries (fixes gcc 4.7)
On Debian Wheezy, the cmake build would fail with:

    /usr/bin/ld: CMakeFiles/wsutil.dir/privileges.c.o: relocation
    R_X86_64_PC32 against symbol `started_with_special_privs' can not be
    used when making a shared object; recompile with -fPIC

Issue was introduced with v1.99.10rc0-222-g3fb1d68 ("cmake: Enable PIE
when it is available by default").

Bug: 11587
Change-Id: I62eec8d1db020128eeeb77b38e3316abf71e6e6a
Reviewed-on: https://code.wireshark.org/review/10916
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-14 22:49:47 +00:00
Peter Wu e059e45886 cmake: always enable -Qunused-arguments for clang
"argument unused during compilation" warnings suggest that some options
do not make sense (such as passing the -gsplit-dwarf option to the
linking command while it is only valid during compilation).

For now we do not care about these warnings, the option is accepted by
clang and whether it used in a particular step or not is uninteresting.

Change-Id: I3b6efa0dccd33c7f351c5938a29adef64ac1706d
Reviewed-on: https://code.wireshark.org/review/10893
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-14 16:53:21 +00:00
Guy Harris 9a702e41b0 If we have QtMultimedia with Qt4, add its libraries to the Qt libraries.
Change-Id: I41208287b87fba59d188e0db3bee36ee17cf3b18
Reviewed-on: https://code.wireshark.org/review/11006
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-14 09:10:56 +00:00
Guy Harris 4b73a29093 Add the directory for QtMultimedia to the list of include directories.
Change-Id: I670b42fcb3b8068ac9ac2809ae4445879444f554
Reviewed-on: https://code.wireshark.org/review/11000
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-14 07:50:17 +00:00
Guy Harris 66526f60c4 Set QT_MULTIMEDIA_LIB if we're using Qt 4 and have QtMultimedia.
Change-Id: Iee13fe86c0d8cacc71ab1cae25f4c735c5fe7b1d
Reviewed-on: https://code.wireshark.org/review/10993
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-14 04:07:58 +00:00
Peter Wu 01f82ee84c cmake: fix kerberos library lookup, support Heimdal
A build with the gold linker broke with:

    run/libwireshark.so.0.0.0: error: undefined reference to 'krb5_c_decrypt'

Fix this my restructuring the FindKERBEROS module to use the libraries
found by pkg-config.

While at it, check for MIT and Heimdal instead of assuming MIT. Remove
HAVE_KEYTYPE_ARCFOUR_56 as this macro is not used.

Change-Id: Iab23d79bc3f25e9c0fd7203b6f050f875fb4a2b5
Reviewed-on: https://code.wireshark.org/review/10907
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-13 07:36:30 +00:00
Guy Harris 177cf492dc Back out the verbose Makefile stuff.
I give up.  I don't know whether this all means our build mechanism is
too fragile, our code is to fragile, autotools are too fragile, the
compilers we're using are too fragile, Qt is too fragile, or C++ is too
fragile, but if the build breaks that easily, maybe we should just give
up on Leopard.

Change-Id: If700d928da95d09ed5173b976261e4ddd236d654
Reviewed-on: https://code.wireshark.org/review/10946
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-11 23:44:07 +00:00
Guy Harris 3d9f0db88a Temporarily make cmake builds verbose, for debugging purposes.
Try to figure out why CMake builds work on the 32-bit OS X buildbot but
autotools builds don't; either the compiler commands are different in
ways that break the autotools build, or the config.h files are different
in ways that break the autotools build, or magic pixies affect the
builds in different ways that only break the autotools build.

Change-Id: Id24bad04ff8ef755e4966e28fd445c2ab05c6913
Reviewed-on: https://code.wireshark.org/review/10931
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-11 04:59:07 +00:00
Gerald Combs 047c47e9a6 Initialize 2.1.
Change-Id: I515c53bb56cf82d1911b58f2cb2103afd0e597a5
Reviewed-on: https://code.wireshark.org/review/10810
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-05 20:11:12 +00:00
Peter Wu 6d7b29592a Allow use of variadic macros
Remove variadic macros restriction (c99, c++11 feature) from
README.developer. GCC, Clang, MSVC 2005 all support it.

Enable -Wno-variadic-macros in configure.ac and CMakeLists.txt when
-Wpedantic is enabled (which would enable -Wvariadic-macros).

For all files matching 'define\s*\w+[0-9]\(', replace "FOO[0-9]" by
"FOO" and adjust the macro definition accordingly. The nbap dissector
was regenerated after adjusting its template and .cnf file. The
generated code is the same since all files disabled the debug macros.

Discussed at:
https://www.wireshark.org/lists/wireshark-dev/201209/msg00142.html
https://www.wireshark.org/lists/wireshark-dev/201510/msg00012.html

Change-Id: I3b2e22487db817cbbaac774a592669a4f44314b2
Reviewed-on: https://code.wireshark.org/review/10781
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-05 07:57:14 +00:00
Gerald Combs 835cfa50cb Revert "CMake: Don't feed -fPIC to Visual C++."
This doesn't appear to fix the issue unfortunately.

This reverts commit fd5eafa50a.

Change-Id: Ida25881fca0a667c7d47692465b8f1fc9d335697
Reviewed-on: https://code.wireshark.org/review/10753
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 20:50:20 +00:00
Gerald Combs 3687d39304 Qt: Initial RTP playback.
Note the "initial". This is woefully incomplete.  See the "to do" lists
below and in the code.

This differs a bit from the GTK+ version in that you specify one or more
streams to be decoded.

Instead of showing waveforms in individual widgets, add them all to a
single QCustomPlot. This conserves screen real estate and lets us more
easily take advantage of the QCP API. It also looks better IMHO.

Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We
probably won't use the widgets until we make 5.0 our minimum Qt
version and plain old QtMultimedia lets us support Qt 4 more easily
(in theory at least).

Add resampling code from libspeex. I initially used this to resample
each packet to match the preferred rate of our output device, but this
resulted in poorer audio quality than expected. Leave it in and use to
create visual samples for QCP and to match rates any time the rate
changes. The latter is currently untested.

Add some debugging macros.

Note that both the RTP player and RTP analysis dialogs decode audio data
using different code.

Note that voip_calls_packet and voip_calls_init_tap appear to be dead
code.

To do:

- Add silence frames where needed.
- Implement the jitter buffer.
- Implement the playback timing controls.
- Tapping / scanning streams might be too slow.

Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4
Bug: 9007
Reviewed-on: https://code.wireshark.org/review/10458
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:26:05 +00:00
Gerald Combs fd5eafa50a CMake: Don't feed -fPIC to Visual C++.
Change-Id: If6dd0619052b7735d7c5eb84aadc191545df7bee
Reviewed-on: https://code.wireshark.org/review/10735
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 15:52:24 +00:00
Gerald Combs 8976b78392 CMake: Fix the dmg_package target.
We don't have Wireshark.pkgproj so don't try to copy it.

Change-Id: I649fce27e53cbd45ffc50e4095252a665c49165d
Reviewed-on: https://code.wireshark.org/review/10739
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 01:25:30 +00:00
Gerald Combs cc9de69b49 Set the minimum Qt version to 4.7.
We've been using QElapsedTimer for a while now with no complaints. It
was introduced in Qt 4.7, which was first released in September 2010.

Change-Id: I21ca768c6a7bab8a08626957583d81fd771c64b4
Reviewed-on: https://code.wireshark.org/review/10732
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-01 22:28:51 +00:00
Gerald Combs cf3d279e04 CMake: OS X packaging updates.
Add a dmg_package_prep target as an alias to app_bundle. Rename the
osx-dmg target to dmg_package. This matches the Windows packaging
target names.

In osx-app.sh, make sure we rpathify the bundle plugin directory.

Change-Id: If41195c9d405ad6bff865625500a8227b77e8092
Reviewed-on: https://code.wireshark.org/review/10734
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-01 21:04:26 +00:00
Gerald Combs 7199fc7cab OS X: Integrate CMake and osx-dmg.sh
Change-Id: Ide608f5e73ecd40c67a6b1c0e16f11233cd49c9d
Reviewed-on: https://code.wireshark.org/review/10694
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-01 16:26:25 +00:00
Gerald Combs ff1dbba6ec CMake: Add a hardening-check target.
On Windows, add a hardening-check target which checks for DYNAMICBASE
and NXCOMPAT using the PowerShell script Get-HardenFlags.ps1.
For a Visual Studio solution, run the check by calling:

    msbuild /m /p:Configuration=RelWithDebInfo hardening-check.vcxproj

using the config as appropriate for your build.

Otherwise if we find the Debian/Fedora hardening-check script add a
target which runs it for each of our executables.

Change-Id: I62263e81d155c66e8c8edc751ffab535bf9f3b96
Reviewed-on: https://code.wireshark.org/review/10641
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-25 20:04:42 +00:00
Balint Reczey 3fb1d6853d cmake: Enable PIE when it is available by default
Change-Id: I88930b8a9de596f93677052b2046c1b85cc34c6b
Reviewed-on: https://code.wireshark.org/review/10635
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2015-09-25 14:12:41 +00:00
Jeff Morriss 5eee0b9e44 Don't use any -fsanitize options unless we're using ASAN.
This lets cmake users configure without installing libusan.

A better or more final fix awaits a decision in bug 11009.

Change-Id: Iea6c4e2ce31817c17931a448f0c72da2a31a2e6d
Ping-Bug: 11009
Reviewed-on: https://code.wireshark.org/review/10454
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>
2015-09-10 11:59:56 +00:00