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")
27 [ --enable-ccid Include internal CCID driver for CM5121],
28 [MY_CCID=1], [MY_CCID=0])
30 AM_CONDITIONAL(ENABLE_CCID, test "$MY_CCID" == "1")
32 dnl Enable/disable openct
34 AC_HELP_STRING([--enable-openct], [Use (patched) OpenCT for CM5121 CCID access. [[default=no]]]),
35 [ENABLE_OPENCT="${enableval}"],
39 if test "x${ENABLE_OPENCT}" = "xyes"; then
40 PKG_CHECK_MODULES(OPENCT, [libopenct], [
42 AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files])
46 AC_SUBST(OPENCT_CFLAGS)
49 AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes")
52 [ --with-firmware=PATH Compile for running inside firmware],
53 [FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""])
54 AC_SUBST(FIRMWARE_PATH)
55 AM_CONDITIONAL(ENABLE_FIRMWARE, test "$FIRMWARE_PATH" != "")
58 [ --enable-static Don't use dynamic allocations at all],
59 [ENABLE_STATIC=1], [ENABLE_STATIC=0])
60 AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1")
64 AC_CHECK_LIB(usb, usb_close,,)
65 AM_CONDITIONAL(HAVE_LIBUSB, test "x$have_libusb" = "xyes")
67 dnl Output the makefile
68 AC_OUTPUT(Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile)