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 COMEDI_CHECK_PCMCIA_PROBE([$LINUX_SRC_DIR], [HAVE_PCMCIA="yes"], [HAVE_PCMCIA="no"])
71 AM_CONDITIONAL([CONFIG_PCMCIA],[test "$HAVE_PCMCIA" = "yes"])
72 AC_ARG_ENABLE([pcmcia],[ --disable-pcmcia Disable support for PCMCIA devices],
73 [ENABLE_PCMCIA=$enableval],[ENABLE_PCMCIA="maybe"])
74 if test "$HAVE_PCMCIA" = "yes" ; then
75 if test "$ENABLE_PCMCIA" = "no" ; then
76 AC_MSG_NOTICE([PCMCIA support disabled])
79 AC_DEFINE([CONFIG_COMEDI_PCMCIA],[true],[Define if using PCMCIA support])
83 if test "$ENABLE_PCMCIA" = "yes" ; then
84 AC_MSG_ERROR([Kernel does not support PCMCIA or its API is not suported by Comedi])
88 AM_CONDITIONAL([CONFIG_COMEDI_PCMCIA],[test "$USE_PCMCIA" = "yes"])
90 AS_CHECK_LINUX_CONFIG_OPTION([CONFIG_USB],[HAVE_USB="yes"],[HAVE_USB="yes"],[HAVE_USB="no"])
91 AM_CONDITIONAL([CONFIG_USB],[test "$HAVE_USB" = "yes"])
92 AC_ARG_ENABLE([usb],[ --disable-usb Disable support for USB devices],
93 [ENABLE_USB=$enableval],[ENABLE_USB="maybe"])
94 if test "$HAVE_USB" = "yes" ; then
95 if test "$ENABLE_USB" = "no" ; then
96 AC_MSG_NOTICE([USB support disabled])
99 AC_DEFINE([CONFIG_COMEDI_USB],[true],[Define if using USB support])
103 if test "$ENABLE_USB" = "yes" ; then
104 AC_MSG_ERROR([Kernel does not support USB])
108 AM_CONDITIONAL([CONFIG_COMEDI_USB],[test "$USE_USB" = "yes"])
110 COMEDI_CHECK_LINUX_KBUILD([$LINUX_SRC_DIR], [ENABLE_KBUILD="yes"], [ENABLE_KBUILD="no"])
111 AC_ARG_ENABLE([kbuild], [ --enable-kbuild Force use (or not) of kernel's Kbuild system to build modules (needs recent 2.6 kernel)],
112 [ENABLE_KBUILD=$enableval], [])
113 AM_CONDITIONAL([CONFIG_KBUILD], [test ${ENABLE_KBUILD} = "yes"])
114 COMEDI_CHECK_HAVE_MUTEX_H([$LINUX_SRC_DIR], [HAVE_MUTEX_H="yes"], [HAVE_MUTEX_H="no"])
115 AS_LINUX_CONFIG_OPTION_MODULE(CONFIG_ISA)
116 AS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCI)
118 AC_DEFINE(CONFIG_COMEDI_DEBUG, true, [Define if debugging is enabled])
119 AC_DEFINE(CONFIG_COMEDI_8255, true, [Define if 8255 support is enabled])
121 DISTCHECK_CONFIGURE_FLAGS="--with-modulesdir=\\\$\$\(prefix\)/modules"
122 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
127 comedi/comedi_kbuild.inc
128 comedi/drivers/Makefile
129 comedi/drivers/addi-data/Makefile
130 comedi/kcomedilib/Makefile
133 include/linux/Makefile
134 include/pcmcia/Makefile