Wireshark-dev: [Wireshark-dev] --with-net-snmp adds addtional options to CFLAGS: Issue if using

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Wed, 22 Aug 2007 12:56:26 -0400
While researching a different Linux Wireshark build problem I found the following:

A default Linux Wireshark './configure && make' with net-snmp present uses an "enhanced" set of CFLAGS. That is: a './configure --without-net-snmp && make' uses a distinctly (smaller) set of CFLAGS than when building with net-snmp present.

This happens because if net-snmp is present than "net-snmp-config --cflags" is used to get a list of compiler options to be added to CFLAGS (& CXXFLAGS).

The options included in CFLAGS *only* when building with net-snmp (the default build) include the following;

            -pipe
            --param=ssp-buffer-size=4

            -Wp,-D_FORTIFY_SOURCE=2

            -fexceptions
            -fstack-protector
            -fasynchronous-unwind-tables
            -fno-strict-aliasing

            -m32
            -march=i386
            -mtune=generic

            -Ulinux

            -Dlinux=linux
            -D_REENTRANT
            -D_GNU_SOURCE
            -D_LARGEFILE_SOURCE
            -D_FILE_OFFSET_BITS=64

            -I/usr/include/gdbm
            -I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE
            -I.
            -I/usr/include/net-snmp

So: my question: should any of the above options be used for a Wireshark build when using --without-snmp??

Also: as noted elsewhere on the list it sounds like the use of net-snmp will be replaced by the use of libsmi, If so, I'm assuming that the additional options as above will no longer be part of CFLAGS for a Wireshark build. Again: In this case will any of the above options need to be added to the CFLAGS used for making Wireshark ?

(The exception to the above is wiretap: the CFLAGS used in the wiretap Makefile do not include the additional flags as above. I'll guess that this is because a separate configure is done for wiretap).