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).