1 # libtool version: current:revision:age
3 # If the library source code has changed at all since the last update, then
4 # increment revision (`c:r:a' becomes `c:r+1:a').
6 # If any interfaces have been added, removed, or changed since the last update,
7 # increment current, and set revision to 0.
9 # If any interfaces have been added since the last public release, then
12 # If any interfaces have been removed since the last public release, then set
17 # If any interface has been changed or removed, `c:r:a' becomes `c+1:0:0';
18 # else if any interface has been added, `c:r:a' becomes `c+1:0:a+1';
19 # else, `c:r:a' becomes `c:r+1:a'.
21 m4_define([comedilib_lt_current], [10])
22 m4_define([comedilib_lt_revision], [0])
23 m4_define([comedilib_lt_age], [10])
26 m4_define([scxi_lt_current], [9])
27 m4_define([scxi_lt_revision], [0])
28 m4_define([scxi_lt_age], [9])
30 # comedilib version: major.minor.micro
33 # * 'major' may be incremented at the whim of the maintainers.
34 # * 'minor' is libtool 'current' minus the value of 'current' when major
35 # changed (comedilib_major_base_current).
36 # * 'micro' is libtool 'revision'.
38 # Manually set 'comedilib_major_base_current' to new 'comedilib_lt_current'
39 # whenever 'comedilib_version_major' is incremented below.
40 m4_define([comedilib_major_base_current], [0])
42 m4_define([comedilib_version_major], [0])
43 m4_define([comedilib_version_minor],
44 [m4_eval(comedilib_lt_current - comedilib_major_base_current)])
45 m4_define([comedilib_version_micro], [comedilib_lt_revision])
46 m4_define([comedilib_pkg_version],
47 [comedilib_version_major.comedilib_version_minor.comedilib_version_micro])
49 AC_INIT([comedilib], [comedilib_pkg_version])
50 AC_CANONICAL_TARGET([])
52 COMEDILIB_VERSION_MAJOR=comedilib_version_major
53 COMEDILIB_VERSION_MINOR=comedilib_version_minor
54 COMEDILIB_VERSION_MICRO=comedilib_version_micro
55 AC_SUBST(COMEDILIB_VERSION_MAJOR)
56 AC_SUBST(COMEDILIB_VERSION_MINOR)
57 AC_SUBST(COMEDILIB_VERSION_MICRO)
59 AC_CONFIG_MACRO_DIR([m4])
60 AC_CONFIG_AUX_DIR([.])
61 #COMEDILIB_DEBUG="-Wall -Werror"
62 COMEDILIB_DEBUG="-Wall"
63 AM_INIT_AUTOMAKE([-Wall -Werror])
65 # AS_LIBTOOL arguments are (prefix, current, revision, age)
66 AS_LIBTOOL(COMEDILIB, comedilib_lt_current, comedilib_lt_revision, comedilib_lt_age)
67 SCXI_SO_VERSION=scxi_lt_current:scxi_lt_revision:scxi_lt_age
68 AC_SUBST(SCXI_SO_VERSION)
70 AM_CONFIG_HEADER(config.h)
72 ACLOCAL="$ACLOCAL -I m4"
88 COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include $COMEDILIB_DEBUG"
89 COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
90 AC_SUBST(COMEDILIB_CFLAGS)
91 AC_SUBST(COMEDILIB_LIBS)
93 # autoconf backwards compatibility
94 if test "$datarootdir" = ""; then
95 datarootdir='${datadir}'
99 if test "$docdir" = ""; then
100 docdir='${datarootdir}/doc/${PACKAGE}'
104 if test "$htmldir" = ""; then
109 if test "$pdfdir" = ""; then
115 AC_PATH_PROG(SWIG, swig, "no")
116 if test "$SWIG" == "no" ; then
117 AC_MSG_WARN([swig not found, will not be able to build swig based bindings])
121 AC_ARG_ENABLE([python-binding],[ --disable-python-binding Disable building of Python binding],
122 [ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
123 if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
125 AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
129 AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])
131 AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
132 AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
133 AC_SUBST(PYTHON_QUIET)
136 AC_ARG_ENABLE([ruby-binding], [ --disable-ruby-binding Disable building of Ruby binding],
137 [ENABLE_RUBY=$enableval], [ENABLE_RUBY="yes"])
138 if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
139 AC_PATH_PROG(RUBY, ruby, no)
140 if test "$RUBY" != "no" ; then
141 RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
142 AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])])
144 AC_MSG_WARN([ruby not found, disabling ruby binding])
151 AM_CONDITIONAL(HAVE_RUBY, [test "$ENABLE_RUBY" == "yes"])
153 AC_ARG_VAR(RUBY_PREFIX,[path prefix for Ruby binding])
154 AC_ARG_VAR(RUBY_SO_DIR,[path for Ruby extensions])
155 if test "$RUBY_PREFIX" != "" ; then
156 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --prefix=\$(RUBY_PREFIX)"
158 if test "$RUBY_SO_DIR" != "" ; then
159 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --so-dir=\$(RUBY_SO_DIR)"
161 AC_SUBST(RUBY_CONFIG_OPTIONS)
164 AC_ARG_ENABLE([scxi], [ --enable-scxi Enable SCXI convenience library],
165 [ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
166 AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
169 AC_ARG_ENABLE([docbook], [ --disable-docbook Disable docbook],[ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
171 if test "$ENABLE_DOCBOOK" == "yes"; then
172 AC_PATH_PROG(XMLTO, xmlto, no)
173 if test "$XMLTO" = "no" ; then
174 AC_MSG_WARN([xmlto not found, will not be able to rebuild documentation])
179 AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
181 pcmciadir="\${sysconfdir}/pcmcia"
187 AC_ARG_WITH([udev-hotplug], [ --with-udev-hotplug=[[/lib]] enable udev hotplug],
188 [ENABLE_UDEVHOTPLUG=$withval], [ENABLE_UDEVHOTPLUG="no"])
189 AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
190 if test "$ENABLE_UDEVHOTPLUG" != "no"; then
191 udevrulesdir="\${sysconfdir}/udev/rules.d/"
192 if test "$ENABLE_UDEVHOTPLUG" == "yes"; then
193 AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
195 if test "$ENABLE_UDEVHOTPLUG" != "/lib"; then
196 AC_MSG_WARN([Installing the udev scripts in the non-standard location: $ENABLE_UDEVHOTPLUG (should be --enable-udev-hotplug=/lib)])
198 if test "$sysconfdir" != "/etc"; then
199 AC_MSG_WARN([udev hotplug works only if sysconfdir is set to /etc.])
201 udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
202 udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
203 AC_SUBST(udevrulesdir)
204 AC_SUBST(udevfirmwaredir)
205 AC_SUBST(udevscriptsdir)
207 ENABLE_UDEVHOTPLUG="no"
211 # old hotplug mechanism
212 AC_ARG_ENABLE([etc-hotplug], [ --enable-etc-hotplug enable old hotplug in /etc/hotplug],
213 [ENABLE_ETCHOTPLUG=$enableval], [ENABLE_ETCHOTPLUG="no"])
214 AM_CONDITIONAL(INSTALL_ETCHOTPLUG, [test "$ENABLE_ETCHOTPLUG" != "no"])
216 if test "$ENABLE_ETCHOTPLUG" != "no"; then
217 #see: http://linux-hotplug.sourceforge.net/
218 #the hotplug expects the device dependent scripts here:
219 usbhotplugdir="\${sysconfdir}/hotplug/usb"
220 AC_SUBST(usbhotplugdir)
222 #firmware for the hotplug script
223 #see: http://linux-hotplug.sourceforge.net/
224 usbfirmwaredir="\${datadir}/usb"
225 AC_SUBST(usbfirmwaredir)
226 if test "$sysconfdir" != "/etc"; then
227 AC_MSG_WARN([hotplug works only if sysconfdir is set to /etc.])
231 if test "$ENABLE_ETCHOTPLUG" = "no" && test "$ENABLE_UDEVHOTPLUG" = "no" ; then
232 AC_MSG_WARN([No hotplug mechanism will be installed. Consult ./configure --help if you want hotplug.])
237 comedi_config/Makefile
243 etc/hotplug/usb/Makefile
244 etc/hotplug/usb/usbdux/Makefile
245 etc/hotplug/usb/usbduxfast/Makefile
250 include/comedilib_version.h