-
-AC_INIT([comedilib], [0.8.0])
-AC_CANONICAL_TARGET([])
-
-AC_CONFIG_AUX_DIR([.])
-#COMEDILIB_DEBUG="-Wall -Werror"
-COMEDILIB_DEBUG="-Wall"
-AM_INIT_AUTOMAKE([-Wall -Werror])
-
# libtool version: current:revision:age
#
# If the library source code has changed at all since the last update, then
# If any interfaces have been removed since the last public release, then set
# age to 0.
#
+# In summary:
+#
+# If any interface has been changed or removed, `c:r:a' becomes `c+1:0:0';
+# else if any interface has been added, `c:r:a' becomes `c+1:0:a+1';
+# else, `c:r:a' becomes `c:r+1:a'.
+#
+m4_define([comedilib_lt_current], [10])
+m4_define([comedilib_lt_revision], [0])
+m4_define([comedilib_lt_age], [10])
+
+#libscxi c:r:a
+m4_define([scxi_lt_current], [9])
+m4_define([scxi_lt_revision], [0])
+m4_define([scxi_lt_age], [9])
+
+# comedilib version: major.minor.micro
+#
+# Currently:
+# * 'major' may be incremented at the whim of the maintainers.
+# * 'minor' is libtool 'current' minus the value of 'current' when major
+# changed (comedilib_major_base_current).
+# * 'micro' is libtool 'revision'.
+
+# Manually set 'comedilib_major_base_current' to new 'comedilib_lt_current'
+# whenever 'comedilib_version_major' is incremented below.
+m4_define([comedilib_major_base_current], [0])
+
+m4_define([comedilib_version_major], [0])
+m4_define([comedilib_version_minor],
+ [m4_eval(comedilib_lt_current - comedilib_major_base_current)])
+m4_define([comedilib_version_micro], [comedilib_lt_revision])
+m4_define([comedilib_pkg_version],
+ [comedilib_version_major.comedilib_version_minor.comedilib_version_micro])
+
+AC_INIT([comedilib], [comedilib_pkg_version])
+AC_CANONICAL_TARGET([])
+
+COMEDILIB_VERSION_MAJOR=comedilib_version_major
+COMEDILIB_VERSION_MINOR=comedilib_version_minor
+COMEDILIB_VERSION_MICRO=comedilib_version_micro
+AC_SUBST(COMEDILIB_VERSION_MAJOR)
+AC_SUBST(COMEDILIB_VERSION_MINOR)
+AC_SUBST(COMEDILIB_VERSION_MICRO)
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([.])
+#COMEDILIB_DEBUG="-Wall -Werror"
+COMEDILIB_DEBUG="-Wall"
+AM_INIT_AUTOMAKE([-Wall -Werror])
+
# AS_LIBTOOL arguments are (prefix, current, revision, age)
-AS_LIBTOOL(COMEDILIB, 8, 0, 8)
+AS_LIBTOOL(COMEDILIB, comedilib_lt_current, comedilib_lt_revision, comedilib_lt_age)
+SCXI_SO_VERSION=scxi_lt_current:scxi_lt_revision:scxi_lt_age
+AC_SUBST(SCXI_SO_VERSION)
AM_CONFIG_HEADER(config.h)
AC_HEADER_STDC([])
+AX_TLS
+
COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include $COMEDILIB_DEBUG"
COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
AC_SUBST(COMEDILIB_CFLAGS)
AC_SUBST(COMEDILIB_LIBS)
+# autoconf backwards compatibility
+if test "$datarootdir" = ""; then
+ datarootdir='${datadir}'
+ AC_SUBST(datarootdir)
+fi
+
+if test "$docdir" = ""; then
+ docdir='${datarootdir}/doc/${PACKAGE}'
+ AC_SUBST(docdir)
+fi
+
+if test "$htmldir" = ""; then
+ htmldir='${docdir}'
+ AC_SUBST(htmldir)
+fi
+
+if test "$pdfdir" = ""; then
+ pdfdir='${docdir}'
+ AC_SUBST(pdfdir)
+fi
+
#swig
AC_PATH_PROG(SWIG, swig, "no")
if test "$SWIG" == "no" ; then
AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
# docbook
-AC_ARG_ENABLE([docbook],[ --disable-docbook-binding Disable docbook],[ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
+AC_ARG_ENABLE([docbook], [ --disable-docbook Disable docbook],[ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
if test "$ENABLE_DOCBOOK" == "yes"; then
- AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
- if test "$DOCBOOK2MAN" = "no" ; then
- AC_MSG_WARN([docbook2man not found, will not be able to rebuild man pages])
+ AC_PATH_PROG(XMLTO, xmlto, no)
+ if test "$XMLTO" = "no" ; then
+ AC_MSG_WARN([xmlto not found, will not be able to rebuild documentation])
fi
else
- DOCBOOK2MAN="no"
+ XMLTO="no"
fi
-AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])
-
-if test "$ENABLE_DOCBOOK" == "yes"; then
- AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf, no)
- if test "$DOCBOOK2PDF" = "no" ; then
- AC_MSG_WARN([docbook2pdf not found, will not be able to rebuild pdf documentation])
- fi
-else
- DOCBOOK2PDF="no"
-fi
-AM_CONDITIONAL(HAVE_DOCBOOK2PDF, [test "$DOCBOOK2PDF" != "no"])
-
-
-if test "$ENABLE_DOCBOOK" == "yes"; then
- AC_PATH_PROG(DOCBOOK2HTML, docbook2html, no)
- if test "$DOCBOOK2HTML" = "no" ; then
- AC_MSG_WARN([docbook2html not found, will not be able to rebuild html documentation])
- fi
-else
- DOCBOOK2HTML="no"
-fi
-AM_CONDITIONAL(HAVE_DOCBOOK2HTML, [test "$DOCBOOK2HTML" != "no"])
-
+AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
pcmciadir="\${sysconfdir}/pcmcia"
AC_SUBST(pcmciadir)
fi
if test "$ENABLE_ETCHOTPLUG" = "no" && test "$ENABLE_UDEVHOTPLUG" = "no" ; then
- AC_MSG_WARN([No hotplug mechanism will we installed. Consult ./configure --help if you want hotplug.])
+ AC_MSG_WARN([No hotplug mechanism will be installed. Consult ./configure --help if you want hotplug.])
fi
AC_CONFIG_FILES(
Makefile
comedi_config/Makefile
+c++/Makefile
+c++/include/Makefile
etc/Makefile
etc/pcmcia/Makefile
etc/hotplug/Makefile
doc/Makefile
demo/Makefile
include/Makefile
+include/comedilib_version.h
lib/Makefile
man/Makefile
scxi/Makefile