redesign autoconf/automake infrastructure to support
[librfid] / configure.in
1 dnl Process this file with autoconf to create configure.
2
3 AC_INIT
4
5 AC_CANONICAL_SYSTEM
6
7 AM_INIT_AUTOMAKE(librfid, 0.0.1)
8
9 AC_PROG_CC
10 AC_EXEEXT
11 AM_PROG_LIBTOOL
12 AC_SUBST(LIBTOOL_DEPS)
13
14 AC_ARG_ENABLE(ccid,
15         [  --enable-ccid        Include internal CCID driver for CM5121],
16         [MY_CCID=1], [MY_CCID=0])
17 # AC_SUBST(MY_CCID)
18 AM_CONDITIONAL(ENABLE_CCID, test "$MY_CCID" == "1")
19
20 AC_ARG_WITH(openct,
21         [  --with-openct        Use (patched) OpenCT for CM5121 CCID access],
22         [OPENCT_PATH="$withval"], [OPENCT_PATH=""])
23 AC_SUBST(OPENCT_PATH)
24 AM_CONDITIONAL(ENABLE_OPENCT, test "$OPENCT_PATH" != "")
25
26 AC_ARG_WITH(firmware,
27         [  --with-firmware=PATH Compile for running inside firmware],
28         [FIRMWARE_PATH="$withval"], [FIRMWARE_PATH=""])
29 AC_SUBST(FIRMWARE_PATH)
30
31 AC_ARG_ENABLE(static,
32         [  --enable-static      Don't use dynamic allocations at all],
33         [ENABLE_STATIC=1], [ENABLE_STATIC=0]) 
34 AM_CONDITIONAL(ENABLE_STATIC, test "$ENABLE_STATIC" == "1")
35
36 AC_ARG_ENABLE(firmware,
37         [  --enable-firmware    Don't use dynamic allocations at all],
38         [ENABLE_FIRMWARE=1], [ENABLE_FIRMWARE=0]) 
39 AM_CONDITIONAL(ENABLE_FIRMWARE, test "$ENABLE_FIRMWARE" == "1")
40
41 AC_ARG_ENABLE(reader-cm5x21,
42         [  --enable-reader-cm5x21 Support for Omnikey Cardman 5121/5321],
43         [ENABLE_CM5121=1], [ENABLE_CM5121=0])
44 AM_CONDITIONAL(ENABLE_CM5121, test "$ENABLE_CM5121" == "1")
45
46
47 AC_ARG_WITH()
48 #AC_CHECK_HEADERS(usb.h, [have_libusb="yes"], [ AC_MSG_WARN([usb.h not found, use --enable-libusb=PATH. Otherwise, INDI will compile without Apogee USB support.]) ])
49
50 AC_CHECK_LIB(usb, usb_close,,)
51 AM_CONDITIONAL(HAVE_LIBUSB, test "x$have_libusb" = "xyes")
52
53 dnl Output the makefile
54 AC_OUTPUT(Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile)