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 # Gentle reminder: The comedilib manual mentions the version of comedilib
39 # it applies to. This is done by setting the 'comedilib_version' entity
40 # in "doc/comedilib.ent". That needs to be edited manually as it is not
41 # updated automatically.
43 # Manually set 'comedilib_major_base_current' to new 'comedilib_lt_current'
44 # whenever 'comedilib_version_major' is incremented below.
45 m4_define([comedilib_major_base_current], [0])
47 m4_define([comedilib_version_major], [0])
48 m4_define([comedilib_version_minor],
49 [m4_eval(comedilib_lt_current - comedilib_major_base_current)])
50 m4_define([comedilib_version_micro], [comedilib_lt_revision])
51 m4_define([comedilib_pkg_version],
52 [comedilib_version_major.comedilib_version_minor.comedilib_version_micro])
54 AC_INIT([comedilib], [comedilib_pkg_version])
55 AC_CANONICAL_TARGET([])
57 COMEDILIB_VERSION_MAJOR=comedilib_version_major
58 COMEDILIB_VERSION_MINOR=comedilib_version_minor
59 COMEDILIB_VERSION_MICRO=comedilib_version_micro
60 AC_SUBST(COMEDILIB_VERSION_MAJOR)
61 AC_SUBST(COMEDILIB_VERSION_MINOR)
62 AC_SUBST(COMEDILIB_VERSION_MICRO)
64 AC_CONFIG_MACRO_DIR([m4])
65 AC_CONFIG_AUX_DIR([.])
66 #COMEDILIB_DEBUG="-Wall -Werror"
67 COMEDILIB_DEBUG="-Wall"
68 AM_INIT_AUTOMAKE([-Wall -Werror])
70 # AS_LIBTOOL arguments are (prefix, current, revision, age)
71 AS_LIBTOOL(COMEDILIB, comedilib_lt_current, comedilib_lt_revision, comedilib_lt_age)
72 SCXI_SO_VERSION=scxi_lt_current:scxi_lt_revision:scxi_lt_age
73 AC_SUBST(SCXI_SO_VERSION)
75 AM_CONFIG_HEADER(config.h)
77 ACLOCAL="$ACLOCAL -I m4"
93 COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include -I\$(top_builddir)/include $COMEDILIB_DEBUG"
94 COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
95 AC_SUBST(COMEDILIB_CFLAGS)
96 AC_SUBST(COMEDILIB_LIBS)
98 # autoconf backwards compatibility
99 if test "$datarootdir" = ""; then
100 datarootdir='${datadir}'
101 AC_SUBST(datarootdir)
104 if test "$docdir" = ""; then
105 docdir='${datarootdir}/doc/${PACKAGE}'
109 if test "$htmldir" = ""; then
114 if test "$pdfdir" = ""; then
120 AC_PATH_PROG(SWIG, swig, "no")
121 if test "$SWIG" == "no" ; then
122 AC_MSG_WARN([swig not found, will not be able to build swig based bindings])
126 AC_ARG_ENABLE([python-binding],
127 [AS_HELP_STRING([--disable-python-binding],
128 [Disable building of Python binding])],
129 [ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
130 if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
132 AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
136 AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])
138 AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
139 AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
140 AC_SUBST(PYTHON_QUIET)
143 AC_ARG_ENABLE([ruby-binding],
144 [AS_HELP_STRING([--enable-ruby-binding],
145 [Enable building of Ruby binding])],
146 [ENABLE_RUBY=$enableval], [ENABLE_RUBY="no"])
147 if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
148 AC_PATH_PROG(RUBY, ruby, no)
149 if test "$RUBY" != "no" ; then
150 RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
151 AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])])
153 AC_MSG_WARN([ruby not found, disabling ruby binding])
160 AM_CONDITIONAL(HAVE_RUBY, [test "$ENABLE_RUBY" == "yes"])
162 AC_ARG_VAR(RUBY_PREFIX,[path prefix for Ruby binding])
163 AC_ARG_VAR(RUBY_SO_DIR,[path for Ruby extensions])
164 if test "$RUBY_PREFIX" != "" ; then
165 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --prefix=\$(RUBY_PREFIX)"
167 if test "$RUBY_SO_DIR" != "" ; then
168 RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --so-dir=\$(RUBY_SO_DIR)"
170 AC_SUBST(RUBY_CONFIG_OPTIONS)
173 AC_ARG_ENABLE([scxi],
174 [AS_HELP_STRING([--enable-scxi], [Enable SCXI convenience library])],
175 [ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
176 AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
179 AC_ARG_ENABLE([docbook],
180 [AS_HELP_STRING([--disable-docbook], [Disable docbook])],
181 [ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
183 if test "$ENABLE_DOCBOOK" == "yes"; then
184 AC_PATH_PROG(XMLTO, xmlto, no)
185 if test "$XMLTO" = "no" ; then
186 AC_MSG_WARN([xmlto not found, will not be able to rebuild documentation])
192 if test "$XMLTO" != "no"; then
193 AC_ARG_WITH([pdf-backend],
194 [AS_HELP_STRING([--with-pdf-backend=[[yes|no|dblatex|fop|default]]],
195 [Enable or disable PDF generation with backend])],
196 [WITH_PDF_BACKEND=$withval],[WITH_PDF_BACKEND="yes"])
197 case "$WITH_PDF_BACKEND" in
202 # Prefer dblatex, then default backend.
203 # Could use [dblatex fop] to prefer dblatex or fop.
204 AC_CHECK_PROGS([PDF_BACKEND], [dblatex], [default])
205 # The default backend is broken, so avoid it for now.
206 if test "$PDF_BACKEND" = "default"; then
207 AC_MSG_WARN([Default PDF backend is broken, disabling PDF generation])
208 AC_MSG_WARN([(dblatex is recommended for PDF generation)])
211 if test "$PDF_BACKEND" != "no"; then
212 AC_MSG_NOTICE([Will use $PDF_BACKEND backend for PDF generation])
216 # Use xmlto's default backend.
217 PDF_BACKEND="default"
220 AC_CHECK_PROG([PDF_BACKEND], [$WITH_PDF_BACKEND],
221 [$WITH_PDF_BACKEND], [no])
222 if test "$PDF_BACKEND" = "no"; then
223 AC_MSG_WARN([$WITH_PDF_BACKEND not found, disabling PDF generation])
227 AC_MSG_WARN([Bad --with-pdf-backend option, disabling PDF generation])
236 AC_MSG_WARN([$PDF_BACKEND PDF backend might not work. --without-pdf-backend disables PDF generation.])
239 AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
240 AM_CONDITIONAL(BUILD_PDF, [test "$PDF_BACKEND" != "no"])
241 AM_CONDITIONAL(BUILD_PDF_USING_DBLATEX, [test "$PDF_BACKEND" = "dblatex"])
242 AM_CONDITIONAL(BUILD_PDF_USING_FOP, [test "$PDF_BACKEND" = "fop"])
244 pcmciadir="\${sysconfdir}/pcmcia"
248 AC_ARG_ENABLE([firmware],
249 [AS_HELP_STRING([--disable-firmware], [Disable installation of firmware files])],
250 [ENABLE_FIRMWARE=$enableval],[ENABLE_FIRMWARE="yes"])
253 AC_ARG_WITH([udev-hotplug],
254 [AS_HELP_STRING([--with-udev-hotplug=[[/lib]]], [enable udev hotplug])],
255 [ENABLE_UDEVHOTPLUG=$withval], [ENABLE_UDEVHOTPLUG="no"])
256 AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
257 if test "$ENABLE_UDEVHOTPLUG" != "no"; then
258 if test "$ENABLE_UDEVHOTPLUG" == "yes"; then
259 AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
261 if test "$ENABLE_UDEVHOTPLUG" != "/lib"; then
262 AC_MSG_WARN([Installing the udev scripts in the non-standard location: $ENABLE_UDEVHOTPLUG (should be --enable-udev-hotplug=/lib)])
264 udevrulesdir="$ENABLE_UDEVHOTPLUG/udev/rules.d/"
265 udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
266 AC_SUBST(udevrulesdir)
267 AC_SUBST(udevscriptsdir)
268 if test "$ENABLE_FIRMWARE" == "yes"; then
269 udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
270 AC_SUBST(udevfirmwaredir)
273 ENABLE_UDEVHOTPLUG="no"
276 if test "$ENABLE_UDEVHOTPLUG" = "no" ; then
277 AC_MSG_WARN([No hotplug mechanism will be installed. Consult ./configure --help if you want hotplug.])
282 comedi_config/Makefile
283 comedi_board_info/Makefile
289 etc/hotplug/usb/Makefile
290 etc/hotplug/usb/usbdux/Makefile
291 etc/hotplug/usb/usbduxfast/Makefile
292 etc/hotplug/usb/usbduxsigma/Makefile
297 include/comedilib_version.h