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], [2])
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 AC_CONFIG_HEADERS([config.h])
92 ACLOCAL="$ACLOCAL -I m4"
109 # AS_LIBTOOL arguments are (prefix, current, revision, age)
110 AS_LIBTOOL(COMEDILIB, comedilib_lt_current, comedilib_lt_revision, comedilib_lt_age)
111 SCXI_SO_VERSION=scxi_lt_current:scxi_lt_revision:scxi_lt_age
112 AC_SUBST(SCXI_SO_VERSION)
114 COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include -I\$(top_builddir)/include $COMEDILIB_DEBUG"
115 COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
116 AC_SUBST(COMEDILIB_CFLAGS)
117 AC_SUBST(COMEDILIB_LIBS)
119 # autoconf backwards compatibility
120 if test "$datarootdir" = ""; then
121 datarootdir='${datadir}'
122 AC_SUBST(datarootdir)
125 if test "$docdir" = ""; then
126 docdir='${datarootdir}/doc/${PACKAGE}'
130 if test "$htmldir" = ""; then
135 if test "$pdfdir" = ""; then
141 AC_PATH_PROG(SWIG, swig, "no")
142 if test "$SWIG" == "no" ; then
143 AC_MSG_WARN([swig not found, will not be able to build swig based bindings])
147 AC_ARG_ENABLE([python-binding],
148 [AS_HELP_STRING([--disable-python-binding],
149 [Disable building of Python binding])],
150 [ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
151 if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
153 AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
157 AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])
159 AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
160 AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
161 AC_SUBST(PYTHON_QUIET)
164 AC_ARG_ENABLE([ruby-binding],
165 [AS_HELP_STRING([--enable-ruby-binding],
166 [Enable building of Ruby binding])],
167 [ENABLE_RUBY=$enableval], [ENABLE_RUBY="no"])
168 if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
169 AC_PATH_PROG(RUBY, ruby, no)
170 if test "$RUBY" != "no" ; then
171 RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
172 AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])])
174 AC_MSG_WARN([ruby not found, disabling ruby binding])
181 AM_CONDITIONAL(HAVE_RUBY, [test "$ENABLE_RUBY" == "yes"])
183 AC_ARG_VAR(RUBY_PREFIX,[path prefix for Ruby binding])
184 AC_ARG_VAR(RUBY_SO_DIR,[path for Ruby extensions])
185 if test "$RUBY_PREFIX" != "" ; then
186 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --prefix=\$(RUBY_PREFIX)"
188 if test "$RUBY_SO_DIR" != "" ; then
189 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --so-dir=\$(RUBY_SO_DIR)"
191 AC_SUBST(RUBY_CONFIG_OPTIONS)
194 AC_ARG_ENABLE([scxi],
195 [AS_HELP_STRING([--enable-scxi], [Enable SCXI convenience library])],
196 [ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
197 AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
200 AC_ARG_ENABLE([docbook],
201 [AS_HELP_STRING([--disable-docbook], [Disable docbook])],
202 [ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
204 if test "$ENABLE_DOCBOOK" == "yes"; then
205 AC_PATH_PROG(XMLTO, xmlto, no)
206 if test "$XMLTO" = "no" ; then
207 AC_MSG_WARN([xmlto not found, will not be able to rebuild documentation])
213 if test "$XMLTO" != "no"; then
214 AC_ARG_WITH([pdf-backend],
215 [AS_HELP_STRING([--with-pdf-backend=[[yes|no|dblatex|fop|default]]],
216 [Enable or disable PDF generation with backend])],
217 [WITH_PDF_BACKEND=$withval],[WITH_PDF_BACKEND="yes"])
218 case "$WITH_PDF_BACKEND" in
223 # Prefer dblatex, then default backend.
224 # Could use [dblatex fop] to prefer dblatex or fop.
225 AC_CHECK_PROGS([PDF_BACKEND], [dblatex], [default])
226 # The default backend is broken, so avoid it for now.
227 if test "$PDF_BACKEND" = "default"; then
228 AC_MSG_WARN([Default PDF backend is broken, disabling PDF generation])
229 AC_MSG_WARN([(dblatex is recommended for PDF generation)])
232 if test "$PDF_BACKEND" != "no"; then
233 AC_MSG_NOTICE([Will use $PDF_BACKEND backend for PDF generation])
237 # Use xmlto's default backend.
238 PDF_BACKEND="default"
241 AC_CHECK_PROG([PDF_BACKEND], [$WITH_PDF_BACKEND],
242 [$WITH_PDF_BACKEND], [no])
243 if test "$PDF_BACKEND" = "no"; then
244 AC_MSG_WARN([$WITH_PDF_BACKEND not found, disabling PDF generation])
248 AC_MSG_WARN([Bad --with-pdf-backend option, disabling PDF generation])
257 AC_MSG_WARN([$PDF_BACKEND PDF backend might not work. --without-pdf-backend disables PDF generation.])
260 AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
261 AM_CONDITIONAL(BUILD_PDF, [test "$PDF_BACKEND" != "no"])
262 AM_CONDITIONAL(BUILD_PDF_USING_DBLATEX, [test "$PDF_BACKEND" = "dblatex"])
263 AM_CONDITIONAL(BUILD_PDF_USING_FOP, [test "$PDF_BACKEND" = "fop"])
265 pcmciadir="\${sysconfdir}/pcmcia"
269 AC_ARG_ENABLE([firmware],
270 [AS_HELP_STRING([--disable-firmware], [Disable installation of firmware files])],
271 [ENABLE_FIRMWARE=$enableval],[ENABLE_FIRMWARE="yes"])
274 AC_ARG_WITH([udev-hotplug],
275 [AS_HELP_STRING([--with-udev-hotplug=[[/lib]]], [enable udev hotplug])],
276 [ENABLE_UDEVHOTPLUG=$withval], [ENABLE_UDEVHOTPLUG="no"])
277 AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
278 if test "$ENABLE_UDEVHOTPLUG" != "no"; then
279 if test "$ENABLE_UDEVHOTPLUG" == "yes"; then
280 AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
282 if test "$ENABLE_UDEVHOTPLUG" != "/lib"; then
283 AC_MSG_WARN([Installing the udev scripts in the non-standard location: $ENABLE_UDEVHOTPLUG (should be --enable-udev-hotplug=/lib)])
285 udevrulesdir="$ENABLE_UDEVHOTPLUG/udev/rules.d/"
286 udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
287 AC_SUBST(udevrulesdir)
288 AC_SUBST(udevscriptsdir)
289 if test "$ENABLE_FIRMWARE" == "yes"; then
290 udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
291 AC_SUBST(udevfirmwaredir)
294 ENABLE_UDEVHOTPLUG="no"
297 if test "$ENABLE_UDEVHOTPLUG" = "no" ; then
298 AC_MSG_WARN([No hotplug mechanism will be installed. Consult ./configure --help if you want hotplug.])
303 comedi_config/Makefile
304 comedi_board_info/Makefile
310 etc/hotplug/usb/Makefile
311 etc/hotplug/usb/usbdux/Makefile
312 etc/hotplug/usb/usbduxfast/Makefile
313 etc/hotplug/usb/usbduxsigma/Makefile
318 include/comedilib_version.h