1 dnl Process this file with autoconf to create configure.
5 AM_INIT_AUTOMAKE(librfid, 0.1.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 if test "x${ENABLE_OPENCT}" = "xyes"; then
42 PKG_CHECK_MODULES(OPENCT, [libopenct], [
44 AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files])
48 AC_SUBST(OPENCT_CFLAGS)
51 AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes")
54 [ --with-firmware=PATH Compile for running inside firmware],
55 [FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""])
56 AC_SUBST(FIRMWARE_PATH)
57 AM_CONDITIONAL(ENABLE_FIRMWARE, test "$FIRMWARE_PATH" != "")
60 [ --enable-static Don't use dynamic allocations at all],
61 [ENABLE_STATIC=1], [ENABLE_STATIC=0])
62 AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1")
66 AC_CHECK_LIB(usb, usb_close,,)
67 AM_CONDITIONAL(HAVE_LIBUSB, test "x$have_libusb" = "xyes")
69 dnl Output the makefile
70 AC_OUTPUT(Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile)