Split off the shared-library tests into a separate AC_LBL_SHLIBS_INIT
macro, so the libpcap and tcpdump versions of AC_LBL_C_INIT can be the
same. While we're at it, clean up some of the AC_PREREQ and AC_BEFORE
stuff.
elsewhere in the macro.
For the Alpha C compiler, don't set -std1 unless it's necessary for ANSI
mode - we don't want to limit the compiler only to C89 features and,
more importantly, C89 headers (<inttypes.h> doesn't work, on at least
some versions of Digital UNIX and some C compiler versions, with -std1).
AC_DEFINEd value with no comment, and thus eliminates the need for
acconfig.h, so get rid of it.
Get rid of AC_LBL_LIBPCAP - we don't need it, this *is* libpcap.
Get rid of AC_LBL_TYPE_SIGNAL - we don't use it.
Update comments for AC_LBL_SOCKADDR_SA_LEN and AC_LBL_CHECK_LIB to match
tcpdump's versions.
written shared library support.
Clean up some comments, and (for now) always use "$(CC) -shared" to
build shared libraries with GCC.
Merge two separate "check the platform and set the compiler options"
switches.
build "traditional" AIX shared libraries, which are archive libraries
containing shared objects, so, on AIX, we build the archive library, for
the benefit of "build libpcap and tcpdump in subdirectories of the same
directory, with tcpdump linked statically with that libpcap", but don't
install it. Newer versions of AIX, at least, also support "standard"
.so-style UN*X shared libraries, but we stick with
<Tevye>Tradition!</Tevye>.)
Fix an AIX build problem that shows up when building with GCC.
Clean up HP-UX stuff.
linker, and include *BSD in the list of systems using GNU C and GNU ld.
Add support for building shared libraries on HP-UX (not yet tested).
Attempt to set the soname (or equivalent) appropriately when building a
shared library.
Build, and install, shared libraries by default.
Update config.guess and config.sub.
Currently make install in libpcap never installs pcap/{vlan,bluetooth}.h
headers. Attached patch makes it install them in case support was built
in into libpcap.
scripts, "target" refers to the platform, presumably a compiler, linker,
assembler, etc., for which the software generates code, "host" refers to
the platform on which the software runs, and "build" refers to the
platform on which the software is being built.
before using that member.
Don't define variables if we aren't going to use them.
If we have an unknown tpacket version (this "can't happen"), return an
error.
on Solaris, it's a "gethostbyname() -ish function", and we'll find it
only when we're linking with whatever libraries are required for finding
those functions.
Get the AC_LBL_LIBRARY_NET macro from tcpdump; that macro works with
autoconf 2.5x, but the one here didn't.
where we wire in the idea that it can't handle unaligned accesses. (I
don't know why the test program doesn't work - but perhaps the test
program is the wrong answer anyway, as it doesn't work when
cross-compiling.)
source files, rather than having a pile of #ifdefs in "inet.c". Add
code to the configure script to determine which implementation to use on
the platform for which libpcap is being built.
Add a "pcap_findalldevs()" implementation for Solaris 8 and later that
handles IPv6 addresses.
section - the other section gets stuck in the middle of "main()", and,
although GCC lets you define functions inside functions, other C
compilers don't.
Pick a name more likely to be unique to use as the iterator variable in
AC_LBL_C_INLINE.
Make AC_LBL_C_INLINE print "no" rather than "not supported" if inline
isn't supported, to match what AC_C_INLINE does.
return a structure pointer. Check whether the C compiler can handle
inline functions that return a structure pointer, not whether they can
handle inline functions that return an int, as at least some versions of
autoconf's AC_C_INLINE do.
warns about them and probably performance suffers). Therefore I added
the cpu to the list of systems where unaligned access should be avoided.
See also http://bugs.debian.org/112152
SOL_PACKET/PACKET_STATISTICS "getsockopt()" call, on Linux kernels that
support it, to get packet statistics, so that we can report the number
of dropped packets, and always use <linux/if_packet.h> to get
definitions for PF_PACKET sockets, so that we don't depend on glibc's
header files having been updated to support all the latest shiniest
kernel features (many systems with 2.4[.x] kernels don't have a
<netpacket/packet.h> that defines "struct tpacket_stats", for example,
so we wouldn't have been able to support that kernel feature on those
systems).
names, e.g. "alphaev56", rather than just "alpha", so, in
"AC_LBL_UNALIGNED_ACCESS", we should check for "alpha*", rather than
"alpha", in our test for platforms we *know* shouldn't do unaligned
accesses (Digital^H^H^H^H^H^H^HTru64 UNIX, by default, may just catch
the alignment trap, complain on the console, and then simulate the
unaligned access, but that's slow - and, in one test, didn't appear to
prevent all the faults from unaligned accesses).
./configure --enable-ipv6 (requires getaddrinfo(3) and getnameinfo(3)).
TODO: make it work even without getaddrinfo(3) or getnameinfo(3)
(or, tcpdump/configure.in should provide alternative version by
AC_REPLACE_FUNCS)
TODO: make IPv6 filtering code work by default
TODO: make "protochain" friendly with optimization