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], [1])
23 m4_define([comedilib_lt_age], [10])
24 # Set 'letter', normally empty. See below for rules.
25 m4_define([comedilib_version_letter], [])
28 m4_define([scxi_lt_current], [9])
29 m4_define([scxi_lt_revision], [0])
30 m4_define([scxi_lt_age], [9])
32 # comedilib library version: major.minor.micro
33 # comedilib package version: major.minor.micro[letter]
36 # * 'major' may be incremented at the whim of the maintainers.
37 # * 'minor' is libtool 'current' minus the value of 'current' when major
38 # changed (comedilib_major_base_current).
39 # * 'micro' is libtool 'revision'.
40 # * 'letter' is normally absent and is removed if any of 'major', 'minor'
41 # or 'micro' are changed between releases. Otherwise it is set if the
42 # only changes between releases are outside the library source code or
43 # language binding, for example the comedilib manual, "readme" files
44 # or sample configuration files. When it needs to be set, it is set to
45 # 'a' if previously absent, otherwise the next lower-case ASCII letter
46 # in the sequence. (In the unlikely event that we we need to go beyond
47 # 'z', append an extra letter.)
49 # Example package version sequence: 0.10.1, 0.10.1a, 0.10.1b, 0.10.2,
50 # 0.10.2a, ..., 0.10.2z, 0.10.2za, 0,10.2zb, 0.11.0.
52 # Gentle reminder: The comedilib manual mentions the version of comedilib
53 # it applies to. This is done by setting the 'comedilib_version' entity
54 # in "doc/comedilib.ent". That needs to be edited manually as it is not
55 # updated automatically. Policy: the version of the manual is usually only
56 # updated if the contents have changed since the previous release. In that
57 # case, it is set to the comedilib package version.
59 # Manually set 'comedilib_major_base_current' to new 'comedilib_lt_current'
60 # whenever 'comedilib_version_major' is incremented below.
61 m4_define([comedilib_major_base_current], [0])
63 m4_define([comedilib_version_major], [0])
64 m4_define([comedilib_version_minor],
65 [m4_eval(comedilib_lt_current - comedilib_major_base_current)])
66 m4_define([comedilib_version_micro], [comedilib_lt_revision])
67 m4_define([comedilib_pkg_version],
69 m4_join([.], comedilib_version_major,
70 comedilib_version_minor,
71 comedilib_version_micro),
72 comedilib_version_letter)])
74 AC_INIT([comedilib], [comedilib_pkg_version])
75 AC_CANONICAL_TARGET([])
77 COMEDILIB_VERSION_MAJOR=comedilib_version_major
78 COMEDILIB_VERSION_MINOR=comedilib_version_minor
79 COMEDILIB_VERSION_MICRO=comedilib_version_micro
80 AC_SUBST(COMEDILIB_VERSION_MAJOR)
81 AC_SUBST(COMEDILIB_VERSION_MINOR)
82 AC_SUBST(COMEDILIB_VERSION_MICRO)
84 AC_CONFIG_MACRO_DIR([m4])
85 AC_CONFIG_AUX_DIR([.])
86 #COMEDILIB_DEBUG="-Wall -Werror"
87 COMEDILIB_DEBUG="-Wall"
88 AM_INIT_AUTOMAKE([-Wall -Werror])
90 # AS_LIBTOOL arguments are (prefix, current, revision, age)
91 AS_LIBTOOL(COMEDILIB, comedilib_lt_current, comedilib_lt_revision, comedilib_lt_age)
92 SCXI_SO_VERSION=scxi_lt_current:scxi_lt_revision:scxi_lt_age
93 AC_SUBST(SCXI_SO_VERSION)
95 AM_CONFIG_HEADER(config.h)
97 ACLOCAL="$ACLOCAL -I m4"
113 COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include -I\$(top_builddir)/include $COMEDILIB_DEBUG"
114 COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
115 AC_SUBST(COMEDILIB_CFLAGS)
116 AC_SUBST(COMEDILIB_LIBS)
118 # autoconf backwards compatibility
119 if test "$datarootdir" = ""; then
120 datarootdir='${datadir}'
121 AC_SUBST(datarootdir)
124 if test "$docdir" = ""; then
125 docdir='${datarootdir}/doc/${PACKAGE}'
129 if test "$htmldir" = ""; then
134 if test "$pdfdir" = ""; then
140 AC_PATH_PROG(SWIG, swig, "no")
141 if test "$SWIG" == "no" ; then
142 AC_MSG_WARN([swig not found, will not be able to build swig based bindings])
146 AC_ARG_ENABLE([python-binding],
147 [AS_HELP_STRING([--disable-python-binding],
148 [Disable building of Python binding])],
149 [ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
150 if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
152 AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
156 AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])
158 AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
159 AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
160 AC_SUBST(PYTHON_QUIET)
163 AC_ARG_ENABLE([ruby-binding],
164 [AS_HELP_STRING([--enable-ruby-binding],
165 [Enable building of Ruby binding])],
166 [ENABLE_RUBY=$enableval], [ENABLE_RUBY="no"])
167 if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
168 AC_PATH_PROG(RUBY, ruby, no)
169 if test "$RUBY" != "no" ; then
170 RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
171 AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])])
173 AC_MSG_WARN([ruby not found, disabling ruby binding])
180 AM_CONDITIONAL(HAVE_RUBY, [test "$ENABLE_RUBY" == "yes"])
182 AC_ARG_VAR(RUBY_PREFIX,[path prefix for Ruby binding])
183 AC_ARG_VAR(RUBY_SO_DIR,[path for Ruby extensions])
184 if test "$RUBY_PREFIX" != "" ; then
185 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --prefix=\$(RUBY_PREFIX)"
187 if test "$RUBY_SO_DIR" != "" ; then
188 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --so-dir=\$(RUBY_SO_DIR)"
190 AC_SUBST(RUBY_CONFIG_OPTIONS)
193 AC_ARG_ENABLE([scxi],
194 [AS_HELP_STRING([--enable-scxi], [Enable SCXI convenience library])],
195 [ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
196 AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
199 AC_ARG_ENABLE([docbook],
200 [AS_HELP_STRING([--disable-docbook], [Disable docbook])],
201 [ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
203 if test "$ENABLE_DOCBOOK" == "yes"; then
204 AC_PATH_PROG(XMLTO, xmlto, no)
205 if test "$XMLTO" = "no" ; then
206 AC_MSG_WARN([xmlto not found, will not be able to rebuild documentation])
212 if test "$XMLTO" != "no"; then
213 AC_ARG_WITH([pdf-backend],
214 [AS_HELP_STRING([--with-pdf-backend=[[yes|no|dblatex|fop|default]]],
215 [Enable or disable PDF generation with backend])],
216 [WITH_PDF_BACKEND=$withval],[WITH_PDF_BACKEND="yes"])
217 case "$WITH_PDF_BACKEND" in
222 # Prefer dblatex, then default backend.
223 # Could use [dblatex fop] to prefer dblatex or fop.
224 AC_CHECK_PROGS([PDF_BACKEND], [dblatex], [default])
225 # The default backend is broken, so avoid it for now.
226 if test "$PDF_BACKEND" = "default"; then
227 AC_MSG_WARN([Default PDF backend is broken, disabling PDF generation])
228 AC_MSG_WARN([(dblatex is recommended for PDF generation)])
231 if test "$PDF_BACKEND" != "no"; then
232 AC_MSG_NOTICE([Will use $PDF_BACKEND backend for PDF generation])
236 # Use xmlto's default backend.
237 PDF_BACKEND="default"
240 AC_CHECK_PROG([PDF_BACKEND], [$WITH_PDF_BACKEND],
241 [$WITH_PDF_BACKEND], [no])
242 if test "$PDF_BACKEND" = "no"; then
243 AC_MSG_WARN([$WITH_PDF_BACKEND not found, disabling PDF generation])
247 AC_MSG_WARN([Bad --with-pdf-backend option, disabling PDF generation])
256 AC_MSG_WARN([$PDF_BACKEND PDF backend might not work. --without-pdf-backend disables PDF generation.])
259 AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
260 AM_CONDITIONAL(BUILD_PDF, [test "$PDF_BACKEND" != "no"])
261 AM_CONDITIONAL(BUILD_PDF_USING_DBLATEX, [test "$PDF_BACKEND" = "dblatex"])
262 AM_CONDITIONAL(BUILD_PDF_USING_FOP, [test "$PDF_BACKEND" = "fop"])
264 pcmciadir="\${sysconfdir}/pcmcia"
268 AC_ARG_ENABLE([firmware],
269 [AS_HELP_STRING([--disable-firmware], [Disable installation of firmware files])],
270 [ENABLE_FIRMWARE=$enableval],[ENABLE_FIRMWARE="yes"])
273 AC_ARG_WITH([udev-hotplug],
274 [AS_HELP_STRING([--with-udev-hotplug=[[/lib]]], [enable udev hotplug])],
275 [ENABLE_UDEVHOTPLUG=$withval], [ENABLE_UDEVHOTPLUG="no"])
276 AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
277 if test "$ENABLE_UDEVHOTPLUG" != "no"; then
278 if test "$ENABLE_UDEVHOTPLUG" == "yes"; then
279 AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
281 if test "$ENABLE_UDEVHOTPLUG" != "/lib"; then
282 AC_MSG_WARN([Installing the udev scripts in the non-standard location: $ENABLE_UDEVHOTPLUG (should be --enable-udev-hotplug=/lib)])
284 udevrulesdir="$ENABLE_UDEVHOTPLUG/udev/rules.d/"
285 udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
286 AC_SUBST(udevrulesdir)
287 AC_SUBST(udevscriptsdir)
288 if test "$ENABLE_FIRMWARE" == "yes"; then
289 udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
290 AC_SUBST(udevfirmwaredir)
293 ENABLE_UDEVHOTPLUG="no"
296 if test "$ENABLE_UDEVHOTPLUG" = "no" ; then
297 AC_MSG_WARN([No hotplug mechanism will be installed. Consult ./configure --help if you want hotplug.])
302 comedi_config/Makefile
303 comedi_board_info/Makefile
309 etc/hotplug/usb/Makefile
310 etc/hotplug/usb/usbdux/Makefile
311 etc/hotplug/usb/usbduxfast/Makefile
312 etc/hotplug/usb/usbduxsigma/Makefile
317 include/comedilib_version.h