2 AC_INIT([comedi],[0.7.76])
3 AC_CONFIG_SRCDIR([comedi/comedi_fops.c])
4 AC_CONFIG_HEADERS(config.h)
6 AC_CANONICAL_TARGET([])
8 if test x$prefix = xNONE ; then
15 COMEDI_MICROVERSION=76
16 # set the nanoversion to 0 for releases, 1 for CVS, >= 2 for prereleases
19 if test x$COMEDI_NANOVERSION = x0 ; then
20 VERSION=$COMEDI_MAJORVERSION.$COMEDI_MINORVERSION.$COMEDI_MICROVERSION
22 VERSION=$COMEDI_MAJORVERSION.$COMEDI_MINORVERSION.$COMEDI_MICROVERSION.$COMEDI_NANOVERSION
30 AC_DEFINE_UNQUOTED(COMEDI_MAJORVERSION, $COMEDI_MAJORVERSION, [Comedi major version])
31 AC_DEFINE_UNQUOTED(COMEDI_MINORVERSION, $COMEDI_MINORVERSION, [Comedi minor version])
32 AC_DEFINE_UNQUOTED(COMEDI_MICROVERSION, $COMEDI_MICROVERSION, [Comedi micro version])
36 AC_PATH_TOOL([STRIP],[strip])
37 AC_PATH_PROG([DEPMOD], [depmod], [no], [$PATH:/sbin:/usr/sbin:/usr/local/sbin])
38 if test "$DEPMOD" == "no" ; then
39 AC_MSG_ERROR([unable to find the 'depmod' program.])
45 AC_ARG_ENABLE([rtai], [ --disable-rtai disable use of rtai],
46 [ENABLE_RTAI=$enableval], [ENABLE_RTAI="yes"])
47 DS_RTAI([HAVE_RTAI=yes],[HAVE_RTAI=no])
48 if test "$HAVE_RTAI" == "yes" -a "$ENABLE_RTAI" == "yes"; then
53 DS_RTLINUX([USE_RTLINUX=yes],[USE_RTLINUX=no])
54 AM_CONDITIONAL([CONFIG_COMEDI_RT],
55 [test ${USE_RTAI} = "yes" -o ${USE_RTLINUX} = "yes"])
56 if test ${USE_RTAI} = "yes" -o ${USE_RTLINUX} = "yes" ; then
57 AC_DEFINE([CONFIG_COMEDI_RT],[true],[Define to enable Comedi's real-time support])
63 #ERROR_CFLAGS="-Werror"
65 [COMEDI_CFLAGS="$ERROR_CFLAGS -I\$(top_srcdir)/include/\
66 -DKBUILD_MODNAME=\$(shell basename \$@ .o | sed 's/\(.*\)_ko.*/\1/g')\
67 -DKBUILD_BASENAME=\$(shell basename \$< .c)"]
68 AC_SUBST(COMEDI_CFLAGS)
70 AS_CHECK_LINUX_CONFIG_OPTION([CONFIG_PCI],[HAVE_PCI="yes"],[HAVE_PCI="yes"],[HAVE_PCI="no"])
71 AM_CONDITIONAL([CONFIG_PCI],[test "$HAVE_PCI" = "yes"])
72 AC_ARG_ENABLE([pci],[ --disable-pci Disable support for PCI devices],
73 [ENABLE_PCI=$enableval],[ENABLE_PCI="maybe"])
74 if test "$HAVE_PCI" = "yes" ; then
75 if test "ENABLE_PCI" = "no" ; then
76 AC_MSG_NOTICE([PCI support disabled])
79 AC_DEFINE([CONFIG_COMEDI_PCI],[true],[Define if PCI support is enabled])
83 if test "ENABLE_PCI" = "yes" ; then
84 AC_MSG_ERROR([Kernel does not support PCI])
88 AM_CONDITIONAL([CONFIG_COMEDI_PCI],[test "$USE_PCI" = "yes"])
90 COMEDI_CHECK_PCMCIA_PROBE([$LINUX_SRC_DIR], [HAVE_PCMCIA="yes"], [HAVE_PCMCIA="no"])
91 AM_CONDITIONAL([CONFIG_PCMCIA],[test "$HAVE_PCMCIA" = "yes"])
92 AC_ARG_ENABLE([pcmcia],[ --disable-pcmcia Disable support for PCMCIA devices],
93 [ENABLE_PCMCIA=$enableval],[ENABLE_PCMCIA="maybe"])
94 if test "$HAVE_PCMCIA" = "yes" ; then
95 if test "$ENABLE_PCMCIA" = "no" ; then
96 AC_MSG_NOTICE([PCMCIA support disabled])
99 AC_DEFINE([CONFIG_COMEDI_PCMCIA],[true],[Define if using PCMCIA support])
103 if test "$ENABLE_PCMCIA" = "yes" ; then
104 AC_MSG_ERROR([Kernel does not support PCMCIA or its API is not suported by Comedi])
108 AM_CONDITIONAL([CONFIG_COMEDI_PCMCIA],[test "$USE_PCMCIA" = "yes"])
110 AS_CHECK_LINUX_CONFIG_OPTION([CONFIG_USB],[HAVE_USB="yes"],[HAVE_USB="yes"],[HAVE_USB="no"])
111 AM_CONDITIONAL([CONFIG_USB],[test "$HAVE_USB" = "yes"])
112 AC_ARG_ENABLE([usb],[ --disable-usb Disable support for USB devices],
113 [ENABLE_USB=$enableval],[ENABLE_USB="maybe"])
114 if test "$HAVE_USB" = "yes" ; then
115 if test "$ENABLE_USB" = "no" ; then
116 AC_MSG_NOTICE([USB support disabled])
119 AC_DEFINE([CONFIG_COMEDI_USB],[true],[Define if using USB support])
123 if test "$ENABLE_USB" = "yes" ; then
124 AC_MSG_ERROR([Kernel does not support USB])
128 AM_CONDITIONAL([CONFIG_COMEDI_USB],[test "$USE_USB" = "yes"])
130 COMEDI_CHECK_LINUX_KBUILD([$LINUX_SRC_DIR], [ENABLE_KBUILD="yes"], [ENABLE_KBUILD="no"])
131 AC_ARG_ENABLE([kbuild], [ --enable-kbuild Force use (or not) of kernel's Kbuild system to build modules (needs recent 2.6 kernel)],
132 [ENABLE_KBUILD=$enableval], [])
133 AM_CONDITIONAL([CONFIG_KBUILD], [test ${ENABLE_KBUILD} = "yes"])
134 COMEDI_CHECK_HAVE_MUTEX_H([$LINUX_SRC_DIR], [HAVE_MUTEX_H="yes"], [HAVE_MUTEX_H="no"])
135 AS_LINUX_CONFIG_OPTION_MODULE(CONFIG_ISA)
137 AC_DEFINE(CONFIG_COMEDI_DEBUG, true, [Define if debugging is enabled])
138 AC_DEFINE(CONFIG_COMEDI_8255, true, [Define if 8255 support is enabled])
140 DISTCHECK_CONFIGURE_FLAGS="--with-modulesdir=\\\$\$\(prefix\)/modules"
141 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
146 comedi/comedi_kbuild.inc
147 comedi/drivers/Makefile
148 comedi/drivers/addi-data/Makefile
149 comedi/kcomedilib/Makefile
152 include/linux/Makefile
153 include/pcmcia/Makefile