AC_CANONICAL_TARGET([])
PACKAGE=comedi
-VERSION=0.7.67
+COMEDI_MAJORVERSION=0
+COMEDI_MINORVERSION=7
+COMEDI_MICROVERSION=67
+# set the nanoversion to 0 for releases, 1 for CVS, >= 2 for prereleases
+COMEDI_NANOVERSION=1
+
+if test x$COMEDI_NANOVERSION = x0 ; then
+ VERSION=$COMEDI_MAJORVERSION.$COMEDI_MINORVERSION.$COMEDI_MICROVERSION
+else
+ VERSION=$COMEDI_MAJORVERSION.$COMEDI_MINORVERSION.$COMEDI_MICROVERSION.$COMEDI_NANOVERSION
+fi
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AM_MAINTAINER_MODE
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
+AC_DEFINE_UNQUOTED(COMEDI_MAJORVERSION, $COMEDI_MAJORVERSION, [Comedi major version])
+AC_DEFINE_UNQUOTED(COMEDI_MINORVERSION, $COMEDI_MINORVERSION, [Comedi minor version])
+AC_DEFINE_UNQUOTED(COMEDI_MICROVERSION, $COMEDI_MICROVERSION, [Comedi micro version])
AC_PROG_CC
AC_SUBST(modulePROGRAMS_INSTALL)
DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCMCIA)
+DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_ISA)
+DS_LINUX_CONFIG_OPTION_MODULE(CONFIG_PCI)
#AM_CONDITIONAL(CONFIG_PCMCIA,false)
AC_DEFINE(CONFIG_COMEDI_DEBUG, true, [Define if debugging is enabled])
#include <linux/comedi.h>
+#include <config.h>
+
#define DPRINTK(format, args...) do{ \
if(comedi_debug)printk("comedi: " format , ## args ); \
} while(0)
-#ifndef COMEDI_VERSION_CODE
-#define COMEDI_VERSION_CODE 0x10000
-#define COMEDI_RELEASE "1.0.0"
-#endif
+#define COMEDI_VERSION_CODE COMEDI_VERSION(COMEDI_MAJORVERSION,COMEDI_MINORVERSION,COMEDI_MICROVERSION)
+#define COMEDI_RELEASE VERSION
#define COMEDI_INITCLEANUP_NOMODULE(x) \
static int __init x ## _init_module(void) \