Commit Graph

197 Commits

Author SHA1 Message Date
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
Gerald Combs b9b05239f1 Add GeoIP IPv6 database support. Tested with GeoIP 1.4.7, but older
versions *should* be supported.

svn path=/trunk/; revision=39280
2011-10-05 22:27:51 +00:00
Stig Bjørlykke 5603cef9f2 Remove support for libpcre, we use GRegex in GLib.
svn path=/trunk/; revision=38683
2011-08-23 09:25:06 +00:00
Jeff Morriss 3ba6316a06 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5607 :
When testing if we can add things to LDFLAGS, don't set LDFLAGS to CFLAGS
if the test determines that the flag cannot be added to LDFLAGS.

(Simple typo: LDFLAGS_saved was being set to CFLAGS instead of LDFLAGS.)

svn path=/trunk/; revision=38434
2011-08-09 19:49:08 +00:00
Guy Harris 0bd4a1ac3f Use spaces uniformly in AC_WIRESHARK_PYTHON_CHECK.
If we don't find python-config, set want_python to no, so the
end-of-configuration message says we're not using the Python
interpreter.  Also fix some cases where we were setting want_zlib rather
than want_python (cut-and-pasteo).

svn path=/trunk/; revision=37654
2011-06-11 21:49:24 +00:00
Guy Harris 350ec69e9a Do the Python embedding similarly to other "default = yes, if available"
items.

Add some quoting to the zlib tests, just in case the argument contains
white space.

Clean up capitalization of Lua and Python.

Link programs that use libwireshark with the Python libraries, and build
Epan with the Python cflags.

svn path=/trunk/; revision=37652
2011-06-11 19:05:17 +00:00
Guy Harris 7eb4723184 Don't bother checking for gzgets(), as we don't use it, and don't even
need to use its presence in zlib as a proxy for "not the crufty old zlib
that comes with some versions of X11".

Do, however, check for inflatePrime() there, instead, just in case the
crufty old zlib that comes with some versions of X11 lack it; this is to
prevent the configure script from assuming a shiny new zlib by testing
with a non-X11 program, causing the build to fail when you build
Wireshark.

svn path=/trunk/; revision=36969
2011-05-03 04:48:02 +00:00
Jeff Morriss ed8ea7bb34 After testing for the presence of python-config, fix typo so that we actually
test whether we found it or not.

If the user asked for Python support, error out if we find we can't use it.

svn path=/trunk/; revision=36924
2011-04-28 02:24:46 +00:00
Guy Harris f4ed7e8927 By default, clang only warns about unknown -W options, it doesn't
generate an error for them.  Force them to be treated as errors, so we
correctly test whether an option is supported.

svn path=/trunk/; revision=36732
2011-04-20 09:16:44 +00:00
Guy Harris b9d4c025d1 Instead of having GCC and CLANG variables, just have
ac_supports_gcc_flags and ac_supports_W_linker_passthrough flags, the
first of which, for now, we set for GCC and clang, and the latter of
which we set for GCC, clang, and xlc (probably true for some other
compilers as well).

Rename AC_WIRESHARK_GCC_LDFLAGS_CHECK to AC_WIRESHARK_LDFLAGS_CHECK, as
it's not checking for anything GCC-specific.  (Leave
AC_WIRESHARK_GCC_CFLAGS_CHECK unrenamed for now, as the flags we test
with it are originally GCC flags that clang also supports for GCC
compatibility.)

Fix some string-equality tests to use = rather than ==; the former is
what the test/[ command uses.

Don't turn on "-no-cpp-precomp" for clang - it whines if you do.

svn path=/trunk/; revision=36731
2011-04-20 08:37:45 +00:00
Guy Harris 05e06f7a7a First cut at support for clang. We may want to have specific items for
"supports GCC-style -W flags", etc., and may want to improve the check
for "is this clang", as well as deciding what other stuff should be done
if we have clang as well.  clang should, I think, largely be
gcc-compatible at the command line.

svn path=/trunk/; revision=36729
2011-04-20 03:22:19 +00:00
Guy Harris 4d6cb744df Add a "-d" flag to dumpcap, to print out the generated code for the
capture filter in human-readable form.  (Well, readable by humans who
know BPF machine language, at least. :-))

svn path=/trunk/; revision=33509
2010-07-13 23:26:07 +00:00
Guy Harris 22c9dd27f7 First check for the new GTK+/OS X integration functions, then the old
ones; it appears that at least one user's -ligemacintegration has both
(see bug 4823), and we should choose the new ones in that case.

Also, always set have_ige_mac if we have the functions.

Fix tpyoes while we're at it.

svn path=/trunk/; revision=33106
2010-06-05 22:04:28 +00:00
Guy Harris 36623bcb71 From H.sivank: GtkOSXApplication support.
Call the various flavors of OS X integration just "OS X integration",
not anything with "IGE" in it - it appears that, in some places,
"ige-mac-integration" refers only to the older Carbon-based functions,
although the library still appears to be called -ligemacintegration.

Update the URLs for the information about the OS X integration
libraries.

Clean up help message for --with-pcap-remote.

Clean up white space a bit.

Speaking of white space, it's "Mac OS X", not "MacOS X".

svn path=/trunk/; revision=32941
2010-05-25 00:35:44 +00:00
Stephen Fisher 3e3cb2d6a3 As of release 1.5, MIT Kerberos moved krb5.h to krb5/krb5.h. Check both
places.  Fix prompted by report on -dev from Jeff Blaine using MIT Kerberos
1.8.


svn path=/trunk/; revision=32727
2010-05-09 06:33:03 +00:00
Guy Harris 7dbbb8c572 Just check for pcap_create(); it first appeared in libpcap 1.0.0, and
pcap_set_buffer_size() did as well, so there aren't any libpcap releases
with pcap_create() but not pcap_set_buffer_size().

Only do one check for pcap_create.

svn path=/trunk/; revision=32695
2010-05-06 23:33:41 +00:00
Anders Broman f9981411f1 Checking in Stigs changes from
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=475
BUT not activating the check for 
pcap_create()
pcap_set_buffer_size()
This should make it possible to build with support for setting the buffersize if not capturing 802.11 traffic.

The code for handling the 'B' option should be OK in any case.

svn path=/trunk/; revision=32688
2010-05-06 18:34:30 +00:00
Anders Broman c911b0101b Check for pcap_create
Using pcap create and pcap_activate should make it possible
to set the capture buffer size on Linux systems as well as Windows.
Help to implement it would be apreciated :-)

Ref:
http://seclists.org/tcpdump/2009/q3/151

svn path=/trunk/; revision=32687
2010-05-06 15:39:08 +00:00
Guy Harris 980ac5960e Don't say "Checking for broken pcap-config" if we don't have a
pcap-config to check for brokenness.

svn path=/trunk/; revision=31919
2010-02-19 00:15:29 +00:00
Guy Harris 56cffa1135 Put in missing comma.
svn path=/trunk/; revision=31241
2009-12-11 09:11:42 +00:00
Guy Harris 488253bfe7 Add the time zone abbreviation to the result of abs_time_to_str() and
abs_time_secs_to_str().

svn path=/trunk/; revision=31234
2009-12-11 03:39:17 +00:00
Jörg Mayer b6cffe4050 - Add an AC macro to test linker flags.
- Test whether the linker supports --as-needed and if so,
  adds it to LDFLAGS

svn path=/trunk/; revision=29327
2009-08-07 18:49:24 +00:00
Guy Harris e411397ef8 Check for libpcap 1.0's broken pcap-config, which put a space between -L
and its argument - that doesn't work on some platforms (e.g., OS X).

svn path=/trunk/; revision=28664
2009-06-08 17:23:00 +00:00
Guy Harris 923b8ae800 Check for a pcap-config script (as provided by libpcap 1.x) and, if we
find it, use it to determine where to find libpcap and what additional
libraries it requires.

svn path=/trunk/; revision=28653
2009-06-08 02:12:23 +00:00
Stig Bjørlykke 31a2a3065d Don't reuse lua_dir in a for loop.
svn path=/trunk/; revision=28625
2009-06-03 15:40:12 +00:00
Stig Bjørlykke 863e456e78 Fixed setting of LUA_INCLUDES when having extraneous lua heder directory.
Fixed resetting flags after negative check for Lua.

svn path=/trunk/; revision=28624
2009-06-03 15:28:30 +00:00
Stig Bjørlykke d861a1a6dc Only give a failure message if configuring with --with-lua=yes.
svn path=/trunk/; revision=28623
2009-06-03 13:45:48 +00:00
Stig Bjørlykke 76520bcc34 Added check for extraneous lua header directories, as some systems
apparently put the headers in a "lua5.1" subdirectory.

svn path=/trunk/; revision=28622
2009-06-03 13:21:48 +00:00
Stig Bjørlykke 39d713806f Use liblua by default, if available.
svn path=/trunk/; revision=28621
2009-06-03 12:13:07 +00:00
Sebastien Tandel 52cc5fb1e8 python binding for wireshark (first commit)
* ability to write dissectors with python for wireshark.
        documentation (http://wiki.wireshark.org/Python)


svn path=/trunk/; revision=28529
2009-05-29 21:10:40 +00:00
Stig Bjørlykke 26424033d3 From Petr Sumbera (bug 3305):
Recognize Solaris Kerberos (which is based on MIT Kerberos).

svn path=/trunk/; revision=27622
2009-03-06 18:56:53 +00:00
Stephen Fisher 3a50c0063f Fix bug #3152 for good.
svn path=/trunk/; revision=27092
2008-12-23 03:25:56 +00:00
Jeff Morriss 6c81d84efc Fix bug 3152: when searching for igemacintegration manually set GTK_LIBS to
the found library (AC_SEARCH_LIBS sets the LIBS variable but we really don't
want that).

svn path=/trunk/; revision=27088
2008-12-22 16:10:14 +00:00
Guy Harris 44f8cae6ab If we don't have any of the pcap_datalink_XXX_to_YYY routines,
substitute our own (I wrote them all, so I can steal them from the
BSD-licensed libpcap if I want :-)).  This means that
linktype_name_to_val() and linktype_val_to_name() are always available,
and we don't need to #ifdef use of them.

Use pcap_datalink_val_to_description() to get the description for a
particular DLT_ value, rather than mapping the DLT_ value to a
WTAP_ENCAP_ value and getting the description for the latter.

svn path=/trunk/; revision=27074
2008-12-21 23:22:12 +00:00
Jeff Morriss 5b9a2fdd6d After checking for ige_mac_menu_set_menu_bar reset CFLAGS and LIBS
back to what they were before the test (without GTK_LIBS).
This prevents tshark (and every other program) from unnecessarily linking
against GTK_LIBS.

svn path=/trunk/; revision=27056
2008-12-19 02:48:19 +00:00
Balint Reczey 2b90b483f5 Require Lua 5.1 for Lua plugin.
This fixes bug 2510.

svn path=/trunk/; revision=26805
2008-11-18 14:55:01 +00:00
Gerald Combs 1b7064bb6a Add support for the GeoIP library. Using different database files,
GeoIP can map IP addresses to Countries, Cities, AS numbers, ISPs,
etc. If any library paths are defined AND any database files are found,
corresponding columns are added to the endpoint tables in the GUI.

To do:
  - Add columns to the conversation list
  - Add GeoIP info to "-z conv,..."
  - Create a default UAT file.

svn path=/trunk/; revision=26571
2008-10-27 04:50:57 +00:00
Stephen Fisher 812ecb21c3 Tweak Mac IGE integration detection so that it can find the functions not
only in the Gtk+ OS X framework, but also in the separate igemacintegration
library.  Also add call to ite_mac_menu_set_menu_bar() to synchronize the
OS X menu bar with the Gtk menu bar in Wireshark.  The Gtk menu bar in
Wireshark will remain there.


svn path=/trunk/; revision=26560
2008-10-26 20:09:54 +00:00
Gerald Combs e8aee91bc3 Add an option to look for the presence of Imendio's Mac OS X integration
functions in GTK+.

svn path=/trunk/; revision=26539
2008-10-24 18:08:32 +00:00
Gerald Combs 9fbab46ad4 Add support for c-ares to the GNU toolchain.
svn path=/trunk/; revision=25955
2008-08-08 00:04:38 +00:00
Guy Harris e82d99d2b4 If we have pcap_free_datalinks(), use it. If not, then, on Windows,
just leak the list returned by pcap_list_datalinks(), as there's no
guarantee that if you have a library built with one version of the
MSVC++ run-time library, and it returns a pointer to allocated data, you
can free that data from a program linked with another version of the
MSVC++ run-time library.  (This is not an issue on UN*X.)

This should fix bug 2677.

svn path=/trunk/; revision=25668
2008-07-04 03:33:00 +00:00