mcr / tcpdump

the TCPdump network dissector. now moved to:
https://github.com/the-tcpdump-group/tcpdump
Other
84 stars 2 forks source link

Simplify the detection of OpenSSL libcrypto in configure.in #35

Closed msabramo closed 12 years ago

msabramo commented 12 years ago

Simplify the detection of OpenSSL libcrypto by using standard AC_CHECK_LIB and AC_CHECK_HEADERS autoconf macros rather than a local copy of AC_LBL_SSLEAY.

AC_LBL_SSLEAY is old and has not kept pace with some more recent developments in packaging like Debian and Ubuntu's multiarch support. The autoconf macros do work with multiarch so using them means that tcpdump gains the ability to be built with libcrypto on these new multiarch distros and to work successfully with Travis CI, which uses Ubuntu 12, which is one such multiarch distro (see GH-32, a PR to add a .travis.yml for Travis CI).

Fixes GH-33, 7 test failures on Ubuntu 11 and 12 that happen because tcpdump builds without OpenSSL on these platforms and the tests rely on OpenSSL support being compiled and linked in.

This is a small tweak of a patch for Debian Squeeze that was pointed out to me by the Debian tcpdump maintainer, Romain Francoise.

In #32, I have posted results of using the Debian patch and building and testing on a bunch of different platforms and the approach seems to work very well over a wide range of platforms.

Note that this patch removes the ability to manually specify a path to OpenSSL, but a strong argument can be made that this is not ideal (see http://stackoverflow.com/questions/10199754/adding-a-path-to-ac-check-lib) and it's better to make the user point the system at a non-standard libcrypto using standard mechanisms like LDFLAGS.

Testing on various platforms

Travis CI (Ubuntu 12)

https://travis-ci.org/#!/msabramo/tcpdump/builds/2779572

Ubuntu 11

https://gist.github.com/3886690

Ubuntu 10

https://gist.github.com/3887997

One test failure (e1000g), but I'm sure that it's not related to this patch, as I also reproduced it in the master branch.

Fedora 17

https://gist.github.com/3887729

Fedora 16

https://gist.github.com/3887943

Mac OS X 10.7.4

https://gist.github.com/3887757

Mac OS X 10.6.8

https://gist.github.com/3888080

One test failure (e1000g), but I'm sure that it's not related to this patch, as I also reproduced it in the master branch.

FreeBSD 9

https://gist.github.com/3887823