* Removes internal DBG/WARN/ERR macros (but keep them in examples);
* Removes almost all DEBUG define references;
* Uses the flexible log4c library to log all messages.
- Attempt to sort errors depending their source
- Rename DE* errors to differenciate Device-Error and Driver-Error
- Add ENOTIMPL error to raise a error when a feature is not (yet) implemented in libnfc
- Does not send any ACK frame at start: my ARYGON does get happy with this frame (see code comments)
- Send a TAMA reset (for PN532) instead of ACK frame
- Remove bzero use: its a deprecated function
ISO C forbids empty source files. Instead of compiling possibly empty source
files depending on the compiler parameters, only compile required files to
build the library as requested at the ./configure stage.
Windows users (and more precisely non-autotools users), you may have to update
whatever you use to build the libnfc to fit your needs. The Makefile shipped
in the windows directory compiles all drivers as it is written so you should
not notice any difference, but if you don't use _that_ makefile, then you will
have to do some adjustment.
For now, keep the defines in CFLAGS just in case. Planned for removal in circa
one week.
While here, pet `./configure` output (--help format and summary).
- Put libusb and PC/SC check in m4 macros.
- Suppress --disable-pcsclite and --disable-libusb
- Add --with-drivers option: we now could choose which driver to build. without this option a default set is build (ATM all drivers except PN532_UART)
1. Try to use pkg-config to locate libusb;
2. Try with libusb-config if not found;
3. Try to locate headers and lib if still not found.
This would hopefully prevent build failures in some very particular cases, such as cross compiling libnfc on a FreeBSD version for another FreeBSD version that does not use the same libusb.
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/142836
Reported by: Dmitry Marakasov
Since March 9, 2009; the FreeBSD operating system base ships with libusb. As a consequence, the devel/libusb ports that used to provide userland programs access to USB devices is useless and so marked as IGNORE for recent versions of FreeBSD. This patch detects the FreeBSD version configure is run on and conditionally ignore the libusb detection if relevant.
Obtained from: Ooo vcs.