1 dnl Process this file with autoconf to create configure.
6 AM_INIT_AUTOMAKE(librfid, 0.1.0)
11 AC_SUBST(LIBTOOL_DEPS)
13 AC_MSG_CHECKING([for build environment])
14 case "$target_alias" in
15 *-mingw*) BUILDENV=WIN32;;
16 *-cygwin*) BUILDENV=WIN32;;
19 AC_MSG_RESULT($BUILDENV)
21 AM_CONDITIONAL(ENABLE_WIN32, test "$BUILDENV" == "WIN32")
22 AM_CONDITIONAL(DISABLE_WIN32, test "$BUILDENV" != "WIN32")
25 [ --enable-ccid Include internal CCID driver for CM5121],
26 [MY_CCID=1], [MY_CCID=0])
28 AM_CONDITIONAL(ENABLE_CCID, test "$MY_CCID" == "1")
30 dnl Enable/disable openct
32 AC_HELP_STRING([--enable-openct], [Use (patched) OpenCT for CM5121 CCID access. [[default=no]]]),
33 [ENABLE_OPENCT="${enableval}"],
37 if test "x${ENABLE_OPENCT}" = "xyes"; then
38 PKG_CHECK_MODULES(OPENCT, [libopenct], [
40 AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files])
44 AC_SUBST(OPENCT_CFLAGS)
47 AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes")
50 [ --with-firmware=PATH Compile for running inside firmware],
51 [FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""])
52 AC_SUBST(FIRMWARE_PATH)
55 [ --enable-static Don't use dynamic allocations at all],
56 [ENABLE_STATIC=1], [ENABLE_STATIC=0])
57 AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1")
59 AC_ARG_ENABLE(firmware,
60 [ --enable-firmware Don't use dynamic allocations at all],
61 [ENABLE_FIRMWARE=1], [ENABLE_FIRMWARE=0])
62 AM_CONDITIONAL(ENABLE_FIRMWARE, test "$ENABLE_FIRMWARE" == "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)