- Lookup for crypto functions in libcrypto instead of libssl. Some systems
(Mac OS) do not provide libssl, and the other have crypto functions in
libcrypto but libssl is dynamically linked against libcrypto:
% ldd /usr/lib/libssl.so
/usr/lib/libssl.so:
libcrypto.so.6 => /lib/libcrypto.so.6 (0x800c00000)
libc.so.7 => /lib/libc.so.7 (0x800647000)
- Do not explicitly link against libssl (instead of libcrypto BTW): the
autotools magic already does this at some point;
- Improve error message when headers cannot be found.
Not a hack this time:
- Use the hexdump(3) function of the system if it exists;
- Build the subpart of FreeBSD's libutil if not (contrib);
- Do this only if configured --with-debug.
The Mifare Classic / Ultralight code will be eventually changed to also provide this functionality.
This header is not available on e.g. FreeBSD so detect it's presence in configure.ac and only include it if appropriate. Then, if byte order manipulation macros are not defined (old glibc like the one provided by Debian GNU/Linux) define them.
Endianness fun is not provided by the same header file on GNU/Linux (endian.h) and FreeBSD (sys/endian.h). Add some magic for the autotools to detect the correct header file. While here, add AC_C_INLINE: it's reported as missing by autoscan(1).