X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=configure.in;h=36702acc7167bfb9080cf482ba012a19ada9a335;hb=c69c7ef8c8fd8095f77c87aedcd894616055b6d8;hp=13993dfc0c105f646ef316355661f04d94ae42e9;hpb=450231b0d409522b87240eaec208e039b37cb1e2;p=librfid diff --git a/configure.in b/configure.in index 13993df..36702ac 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ dnl Process this file with autoconf to create configure. AC_INIT AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(librfid, 0.1.0) +AM_INIT_AUTOMAKE(librfid, 0.2.0) AC_PROG_CC AM_PROG_CC_C_O @@ -23,6 +23,8 @@ AC_SUBST(BUILDENV) AM_CONDITIONAL(ENABLE_WIN32, test "$BUILDENV" == "WIN32") AM_CONDITIONAL(DISABLE_WIN32, test "$BUILDENV" != "WIN32") +AC_C_BIGENDIAN(AC_DEFINE(RFID_BIG_ENDIAN_BITFIELD, 1, [Big-endian bitfield]),,) + AC_ARG_ENABLE(ccid, [ --enable-ccid Include internal CCID driver for CM5121], [MY_CCID=1], [MY_CCID=0]) @@ -35,38 +37,43 @@ AC_ARG_ENABLE(openct, [ENABLE_OPENCT="${enableval}"], [ENABLE_OPENCT="no"]) +AC_ARG_ENABLE(spidev, + [ --enable-spidev Enable spidev reader], + [ENABLE_SPIDEV=1], [ENABLE_SPIDEV=0]) +AM_CONDITIONAL(ENABLE_SPIDEV, test "$ENABLE_SPIDEV" == "1") + OPENCT_MSG=no -if test "x${ENABLE_OPENCT}" = "xyes"; then - PKG_CHECK_MODULES(OPENCT, [libopenct], [ - OPENCT_MSG=yes - AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files]) - ], [ - OPENCT_MSG=no - ]) - AC_SUBST(OPENCT_CFLAGS) - AC_SUBST(OPENCT_LIBS) -fi +AC_PROVIDE_IFELSE([PKG_CHECK_MODULES)], [ + if test "x${ENABLE_OPENCT}" = "xyes"; then + PKG_CHECK_MODULES(OPENCT, [libopenct], [ + OPENCT_MSG=yes + AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files]) + ], [ + OPENCT_MSG=no + ]) + AC_SUBST(OPENCT_CFLAGS) + AC_SUBST(OPENCT_LIBS) + fi ], [ + AC_SUBST(OPENCT_CFLAGS) + AC_SUBST(OPENCT_LIBS) + ]) AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes") AC_ARG_WITH(firmware, [ --with-firmware=PATH Compile for running inside firmware], [FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""]) AC_SUBST(FIRMWARE_PATH) +AM_CONDITIONAL(ENABLE_FIRMWARE, test "$FIRMWARE_PATH" != "") AC_ARG_ENABLE(static, [ --enable-static Don't use dynamic allocations at all], [ENABLE_STATIC=1], [ENABLE_STATIC=0]) AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1") -AC_ARG_ENABLE(firmware, - [ --enable-firmware Don't use dynamic allocations at all], - [ENABLE_FIRMWARE=1], [ENABLE_FIRMWARE=0]) -AM_CONDITIONAL(ENABLE_FIRMWARE, test "$ENABLE_FIRMWARE" == "1") - AC_ARG_WITH() -AC_CHECK_LIB(usb, usb_close,,) -AM_CONDITIONAL(HAVE_LIBUSB, test "x$have_libusb" = "xyes") +AC_CHECK_LIB(usb, usb_close, [HAVE_LIBUSB=1], [HAVE_LIBUSB=0]) +AM_CONDITIONAL(HAVE_LIBUSB, test "$HAVE_LIBUSB" == "1") dnl Output the makefile AC_OUTPUT(Makefile etc/Makefile etc/udev/Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc win32/Makefile)