1 dnl Process this file with autoconf to create configure.
5 AM_INIT_AUTOMAKE(librfid, 0.2.0)
13 AC_SUBST(LIBTOOL_DEPS)
15 AC_MSG_CHECKING([for build environment])
16 case "$target_alias" in
17 *-mingw*) BUILDENV=WIN32;;
18 *-cygwin*) BUILDENV=WIN32;;
21 AC_MSG_RESULT($BUILDENV)
23 AM_CONDITIONAL(ENABLE_WIN32, test "$BUILDENV" == "WIN32")
24 AM_CONDITIONAL(DISABLE_WIN32, test "$BUILDENV" != "WIN32")
26 AC_C_BIGENDIAN(AC_DEFINE(RFID_BIG_ENDIAN_BITFIELD, 1, [Big-endian bitfield]),,)
29 [ --enable-ccid Include internal CCID driver for CM5121],
30 [MY_CCID=1], [MY_CCID=0])
32 AM_CONDITIONAL(ENABLE_CCID, test "$MY_CCID" == "1")
34 dnl Enable/disable openct
36 AC_HELP_STRING([--enable-openct], [Use (patched) OpenCT for CM5121 CCID access. [[default=no]]]),
37 [ENABLE_OPENCT="${enableval}"],
41 [ --enable-spidev Enable spidev reader],
42 [ENABLE_SPIDEV=1], [ENABLE_SPIDEV=0])
43 AM_CONDITIONAL(ENABLE_SPIDEV, test "$ENABLE_SPIDEV" == "1")
46 if test "x${ENABLE_OPENCT}" = "xyes"; then
47 PKG_CHECK_MODULES(OPENCT, [libopenct], [
49 AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files])
53 AC_SUBST(OPENCT_CFLAGS)
56 AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes")
59 [ --with-firmware=PATH Compile for running inside firmware],
60 [FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""])
61 AC_SUBST(FIRMWARE_PATH)
62 AM_CONDITIONAL(ENABLE_FIRMWARE, test "$FIRMWARE_PATH" != "")
65 [ --enable-static Don't use dynamic allocations at all],
66 [ENABLE_STATIC=1], [ENABLE_STATIC=0])
67 AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1")
71 AC_CHECK_LIB(usb, usb_close, [HAVE_LIBUSB=1], [HAVE_LIBUSB=0])
72 AM_CONDITIONAL(HAVE_LIBUSB, test "$HAVE_LIBUSB" == "1")
74 dnl Output the makefile
75 AC_OUTPUT(Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile)