Commit Graph

354 Commits

Author SHA1 Message Date
Guy Harris fe42762f23 Move some more stuff into wsutil.
Move the routines to parse numerical command-line arguments there.

Make cmdarg_err() and cmdarg_err_cont() routines in wsutil that just
call routines specified by a call to cmdarg_err_init(), and have
programs supply the appropriate routines to it.

Change-Id: Ic24fc758c0e647f4ff49eb91673529bcb9587b01
Reviewed-on: https://code.wireshark.org/review/2704
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-29 23:03:24 +00:00
Graham Bloice 4742fc8ed2 Fixed linker flags for MSVC to not attempt to make and link a manifest
Added solution "folder" for tests.

Change-Id: I96dfb4a28fb7aaf3e84cea026e1f5d15afe6c0c6
Reviewed-on: https://code.wireshark.org/review/2635
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-26 21:34:38 +00:00
Joerg Mayer e978cad6a1 Create capchild/doxygen.cfg
Change-Id: I215a9d9849c752f9e8e3216c0f6479d1ba1cfafd
Reviewed-on: https://code.wireshark.org/review/2608
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 03:28:19 +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
Joerg Mayer 3c979e63a7 Reorder some statements to avoid unused build-type directories
Change-Id: I4209eff78faa619030d3cacdc759fd143a238247
Reviewed-on: https://code.wireshark.org/review/2526
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-21 20:36:07 +00:00
Guy Harris a1112249fa Move get_os_version_info() to libwsutil.
This mean we also have to move CFString_to_C_string() there for OS X.

Change-Id: Ic91ad872e9d5290cf34f842503ededd5452e4337
Reviewed-on: https://code.wireshark.org/review/2511
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-21 18:02:32 +00:00
Joerg Mayer c11ae8ac82 Add .rc files to the sources to have them included in the build
Change-Id: I84dda519e617b24d92fcf374670a4a6ee6f488ee
Reviewed-on: https://code.wireshark.org/review/2506
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-20 23:58:22 +00:00
Joerg Mayer 5d65e022df More .in files to handle
Change-Id: I55a04fe6f72c22f1a936ef45b215a8813f7a02db
Reviewed-on: https://code.wireshark.org/review/2502
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-20 23:05:57 +00:00
Joerg Mayer fd8bf42152 Process all .in files, not only the ones needed for Unix'ish systems.
Change-Id: I265367f07253be4379efbb6689ec944f04ef6134
Reviewed-on: https://code.wireshark.org/review/2500
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-20 22:39:37 +00:00
Graham Bloice dc5d0ed0bc Add flags required for VS2013 to Cmake
Change-Id: I666d819fdee67d945dd46bd03749f190eb2873b4
Reviewed-on: https://code.wireshark.org/review/2499
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-20 22:05:50 +00:00
Joerg Mayer 72078cfc91 Undo more of Graham's changes:
- We don't expect to find all packages and it is normally OK for
  some to fail.

Change-Id: I46c5edbf8ea3635fd703b222d4a9beb5ebb4745a
Reviewed-on: https://code.wireshark.org/review/2406
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-18 19:28:49 +00:00
Guy Harris ff5c9684db Only check for -msse4.2.
We don't care about instruction set extensions other than SSE 4.2, just
check for that.

Do so on all compilers other than MSVC.

Change-Id: I227c31715aab6df0e020d6bc3e3aa41e1bc5cb7e
Reviewed-on: https://code.wireshark.org/review/2405
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 19:27:24 +00:00
Guy Harris 8dabe0027a We don't need -Qunused-arguments with Clang
check_c_compiler_flag now checks for the message Clang prints for -f and
-m flags it doesn't handle ("argument unused during compilation:
'-{flag}'"), so the checks for it now should fail properly during
testing, causing us not to use the flag in question.  This means we
don't need to suppress that warning, as we shouldn't be getting it.

Change-Id: Ieb9657f9e2cee2f357acd52725199d78d2dad80f
Reviewed-on: https://code.wireshark.org/review/2401
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 18:58:57 +00:00
Guy Harris c6007e8d26 We don't need -Werror=unknown-warning-option with Clang.
check_c_compiler_flag checks for the message Clang prints for an unknown
warning option ("unknown warning option '-WXXX'"), and fails if it's
produced, so we don't need to force the compiler to fail by passing it
-Werror=unknown-warning-option.

(Yes, the CMake way of handling those annoying options is different from
the way we do that in autotools - autotools adds flags to force errors,
CMake checks for the warning messages - but that's OK.)

Change-Id: I5c2e5d6f4826eba7048736d5134d20417778276a
Reviewed-on: https://code.wireshark.org/review/2400
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 18:55:27 +00:00
Guy Harris 77e34736c5 Do C-Flags and CXX-Flags the same way.
It looks weird to have "-- " before C-Flags but not CXX-Flags.

Change-Id: I95f309b60a45cbd4477c8ed6187b198ab9bac9d8
Reviewed-on: https://code.wireshark.org/review/2398
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 18:31:20 +00:00
Joerg Mayer 289aa37d8d Remove detection of Python libraries: They are not used anymore.
Change-Id: If42bb16d5c6202889ff933af6c9d974866d2a950
Reviewed-on: https://code.wireshark.org/review/2290
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-17 00:44:53 +00:00
Jeff Morriss f113306e0e More Python-bindings removal.
Change-Id: I4d82175781e65c73179f4c8e737a7900cb050bce
Reviewed-on: https://code.wireshark.org/review/2283
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-16 23:14:05 +00:00
Joerg Mayer 67a924be4a The visibility warning is only valid on non-msvc platforms
Change-Id: Iec90ac8654d08b63cfda7d14c370f3c800c74038
Reviewed-on: https://code.wireshark.org/review/2263
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-16 19:15:32 +00:00
Joerg Mayer 4c261cf6a0 Policy CMP020 was being set twice. Remove my original clumsy implementation.
Set CMP0015 to NEW

Change-Id: Idea76f365f27e59eb6f56c7edec6d96224668c0d
Reviewed-on: https://code.wireshark.org/review/2219
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-14 14:34:22 +00:00
Joerg Mayer 30480da87a Match for contents of WIRESHARK_SIMD_FLAGS only if non-empty
Change-Id: I99e15b237c74783b455461ce58ba32f1f8202990
Reviewed-on: https://code.wireshark.org/review/2208
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-14 08:49:51 +00:00
Joerg Mayer 935280317a Backport autofoo simd optimization
Change-Id: I5d58154bf8266eabedf550b54f18845612f514c6
Reviewed-on: https://code.wireshark.org/review/2206
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-14 06:44:15 +00:00
Joerg Mayer 21b08ba8c8 Rename WIRESHARK_C_FLAGS to WIRESHARK_COMMON_FLAGS
Change-Id: If78801de797264c0924e81abaf8cd49cc5715a83
Reviewed-on: https://code.wireshark.org/review/2204
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-14 06:42:39 +00:00
Joerg Mayer 9b4991098f Linking against libgettext and libm got broken by
commit 561460160a
 Author: Graham Bloice <graham.bloice@trihedral.com>
 Date:   Fri May 16 20:43:17 2014 +0100

     Update CMake build for win32 to build QT again, and to find
     GLib and GThread libs

Fix that (basically it put them into the packagelist which got
*replaced* by the next set of things to test).

Change-Id: I0f43a17a7c7eb087c530f6336dc61f93b121fda8
Reviewed-on: https://code.wireshark.org/review/2035
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-08 14:36:37 +00:00
Graham Bloice 561460160a Update CMake build for win32 to build QT again, and to find
GLib and GThread libs

Change-Id: If7e8ebc46f42389d174959303e13cde20687ae8a
Reviewed-on: https://code.wireshark.org/review/2010
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-08 12:13:35 +00:00
Michal Labedzki c04b5292b1 cmake: Add feature info for SBC
It is helpful to find and build this optional dependance.

Change-Id: I73d7a7bb730778bc8b9a54d6560f7f42f1e23bc0
Reviewed-on: https://code.wireshark.org/review/1876
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-30 13:59:02 +00:00
Balint Reczey 7c1171f784 Fix wireshark.pc install destination
Change-Id: I136d654ac5ea54237494d9b61c3ddb445b0720ae
Reviewed-on: https://code.wireshark.org/review/1863
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-30 13:36:29 +00:00
Balint Reczey 7bf49b31ac Set PLUGIN_INSTALL_DIR properly for wireshark.pc
Change-Id: I64c04095ce780ce2cc44a54a68695506d27e5747
Reviewed-on: https://code.wireshark.org/review/1861
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-30 12:48:08 +00:00
Joerg Mayer 6dabe124dc Commit 5ff629ec5a requires the minimum
cmake version to be 2.8.3. Make this explicit.

  commit 5ff629ec5a
  Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
  Date:   Thu May 22 22:05:08 2014 +0200

  CMake: Remove FeatureSummary.cmake and fix display of feature

Change-Id: If6f67c837f1bee92a22bbff8965baa3cc71bf663
Reviewed-on: https://code.wireshark.org/review/1841
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-05-28 15:15:32 +00:00
Alexis La Goutte 5ff629ec5a CMake: Remove FeatureSummary.cmake and fix display of feature
Bug:8819

Change-Id: I35778a4ce198245fbe86eaded2b733745ff8e934
Reviewed-on: https://code.wireshark.org/review/1728
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-27 11:20:55 +00:00
Alexis La Goutte ca97ba0fcb Update comment about -Wunreachable-code and -Wdocumentation
Change-Id: I5b942bdacc5f4a9ecfa084dbff479eba6582b0df
Reviewed-on: https://code.wireshark.org/review/1726
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-23 07:23:42 +00:00
Alexis La Goutte 2b0ad54034 Fix indent (use tabs)
Change-Id: Ie23faaeeab61c684d57c4ff7b3c1b4ff95906dbe
Reviewed-on: https://code.wireshark.org/review/1706
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-21 02:06:10 +00:00
Guy Harris 8f2f727571 Not finding a non-required package is *NOT* an error!
If you think not finding a package that the user specifies should be
used should be an error, please fix bug 10074 first - not finding a
package that the user *didn't* specify should be used or shouldn't be
used should not be an error.

Change-Id: I62aba4309e227352e114f2d291aaa74dba78840f
Reviewed-on: https://code.wireshark.org/review/1498
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-05 03:12:14 +00:00
Guy Harris 0b0c98a040 set(<variable>) *undefines* the variable; a value must be specified.
When setting the XXX_REQUIRED variables, set them to TRUE.

Change-Id: I1591ffe221e15d65cb64516a45e9dc8461051373
Reviewed-on: https://code.wireshark.org/review/1497
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-05 03:07:21 +00:00
Michał Orynicz fbd3c93798 Fix procedure of finding packages
Before this change the code using make package was just showing
a string ${PACKAGE_VAR}_FOUND instead of showing if the
${PACKAGE_VAR}_FOUND variable was set true by find_package function.
Now the user will be informed about which packages were not found
and an error will be raised, as packages sought are the ones that
are selected for the build.

This change also ads fixes to some improper PACKAGE_VAR
variables that prevented find_package from finding
proper packages.

Change-Id: Ic20bc50ace65bab385059a7430909f95367520a3
Reviewed-on: https://code.wireshark.org/review/1410
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-01 12:12:12 +00:00
Graham Bloice 14017dc6f1 Set CMake defaults for Windows build to:
Use GTK2 as per nmake.
  Not to build the dumpabi executables.

Change-Id: Ia28cf1a80b81e10595f4af5bbd46da3b3675faf5
Reviewed-on: https://code.wireshark.org/review/1376
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-29 04:25:26 +00:00
Guy Harris fde8ef0713 Rename ENABLE_EXTRA_COMPILER_CHECKS to ENABLE_EXTRA_COMPILER_WARNINGS.
This matches the current name of the --enable-extra-compiler-warnings
option in autotools.

Fix the documentation of the option to match.

(Note that "compiler" won't necessarily always be GCC or Clang, and
won't necessarily always use -W for warning options, so speaking of them
as "-W checks" isn't future-proof.)

Change-Id: I2e142532e78be3c8051f1e738b3109a83e7d10dc
Reviewed-on: https://code.wireshark.org/review/1231
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-20 23:54:46 +00:00
Guy Harris f456a6e0a5 Get rid of ENABLE_EXTRA_CLANG_CHECKS.
It no longer does anything, and it refers to variables that no longer
exist, as we're not distinguishing between extra GCC warning flags and
extra CLang warning flags any more.

Change-Id: If0b346f669f2573e46261e6da4dc78e96ef79a8f
Reviewed-on: https://code.wireshark.org/review/1228
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-20 23:22:33 +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
Michał Orynicz 412c6cabcf Make makefile verbosity configurable from CMake
This change makes CMAKE_VERBOSE_MAKEFILE option
of CMake used to determine verbosity of generated
makefile, instead of hardcoding it in CMakeLists.txt
script and forcing user to read the script and use
workarounds like "make VERBOSE=1"

Change-Id: I0f3b90ccf962ff88fbfa21ad2f3920b1644d6b6e
Reviewed-on: https://code.wireshark.org/review/1002
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-09 08:00:31 +00:00
Michał Orynicz 3057e309df Change how WERROR and WERR_UNKNOWN is turned off
Use setting WERROR and WERR_UNKNOWN explicitly to 
FALSE instead using unset command. This ensures that
no if(WERROR) or if(WERR_UNKNOWN) clause will trigger
unless these variables are set to another value.

Change-Id: I752d7691c9c101b07c6ee85db83d96d9190bccd7
Reviewed-on: https://code.wireshark.org/review/1001
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-09 07:54:10 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Alexis La Goutte 280c2958f2 Add --enable-extra-clang-checks for autotools and CMakeList
With -Wunreachable-code flags (and disable for the moment -Wdocumentation)

Change-Id: I126c962b32e650a63b78092e95896736ae7335c9
Reviewed-on: https://code.wireshark.org/review/678
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-31 08:29:58 +00:00
Alexis La Goutte d43f7d134b Remove -Wunreachable-code it is removed from GCC
http://gcc.gnu.org/ml/gcc-help/2011-05/msg00360.html

Change-Id: I3f016611d0dc5e7cc6d53965f9b5d2b1ee88fe1c
Reviewed-on: https://code.wireshark.org/review/677
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-17 14:32:44 +00:00
Balint Reczey ff6cc9b0cb Add pkg-config file
Change-Id: Ia55a2e560aef8d2f9a3cede18af4555507656047
Reviewed-on: https://code.wireshark.org/review/500
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-03-08 23:55:38 +00:00
Michal Labedzki 1fd434e4f1 Add missing SBC library to cmake build
Change-Id: I4eb2dacc196b8feef62ff633322c53c04f78fc92
Reviewed-on: https://code.wireshark.org/review/252
Reviewed-by: Michal Orynicz <michal.orynicz@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-20 18:24:24 +00:00
Michal Labedzki 5e27a39fc6 Add Bluetooth SBC Codec support in cmake
SBC Codec can be optionally linked with Wireshark to provide
ability to playing RTP/SBC stream by RTP Player.

Change-Id: Iffbae16a741ffbfd0fb55a300064739d2c27c2e5
Reviewed-on: https://code.wireshark.org/review/223
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-17 21:44:17 +00:00
Evan Huus b24339e22d Disable tfshark taps for now.
Should fix build issue and none of the current taps are relevant to tfshark
anyways.

Change-Id: I29168e0b296cd64fe3783de63e1fdd2a472ee6d3
Reviewed-on: https://code.wireshark.org/review/218
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-14 20:58:53 +00:00
Gerald Combs f966980937 Replace "svn" with "git" all over the place.
Rename "SVNPATH" to "GITBRANCH" since that seems more appropriate.
Rename "svnversion.h" to "version.h" as Evan suggested. Update some
URLs. In make-version.pl, make sure we don't set an improper upstream
branch name. Use the number of commits + short hash from `git describe`
for package names by default.

Change-Id: I922bba8d83eabdf49284a119f55b4076bc469b96
Reviewed-on: https://code.wireshark.org/review/139
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-02-07 23:03:03 +00:00
Jörg Mayer 88a205d5e6 Error doesn't exist, use warning instead.
svn path=/trunk/; revision=54841
2014-01-19 01:08:52 +00:00
Jörg Mayer 2a21b01fbb Add option to specify special permissions for dumpcap during cmake phase:
set(DUMPCAP_INSTALL_OPTION   <val>)
where val is one of "normal" "suid" "capabilities"

Some things left to do:
- Error out in cmake if setcap isn't found or libcap isn't found.
- Move multivalue option handling into it's own macro (-file) with
  value checking


svn path=/trunk/; revision=54840
2014-01-19 00:48:22 +00:00