configure.ac: Add reminder comment for updating documentation version.
[comedilib.git] / configure.ac
index e59cb563df04b6dbc3c83a824ba69dc9d68e1b7b..b448dad9427bc438206ab428c48d22877eeaa6b7 100644 (file)
@@ -35,6 +35,11 @@ m4_define([scxi_lt_age], [9])
 #    changed (comedilib_major_base_current).
 #  * 'micro' is libtool 'revision'.
 
+# Gentle reminder: The comedilib manual mentions the version of comedilib
+# it applies to.  This is done by setting the 'comedilib_version' entity
+# in "doc/comedilib.ent".  That needs to be edited manually as it is not
+# updated automatically.
+
 # 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])
@@ -85,7 +90,7 @@ AC_HEADER_STDC([])
 
 AX_TLS
 
-COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include $COMEDILIB_DEBUG"
+COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include -I\$(top_builddir)/include $COMEDILIB_DEBUG"
 COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
 AC_SUBST(COMEDILIB_CFLAGS)
 AC_SUBST(COMEDILIB_LIBS)
@@ -118,7 +123,9 @@ if test "$SWIG" == "no" ; then
 fi
 
 #python
-AC_ARG_ENABLE([python-binding],[  --disable-python-binding     Disable building of Python binding],
+AC_ARG_ENABLE([python-binding],
+       [AS_HELP_STRING([--disable-python-binding],
+               [Disable building of Python binding])],
        [ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
 if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
        AM_PATH_PYTHON
@@ -133,8 +140,10 @@ AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused
 AC_SUBST(PYTHON_QUIET)
 
 # ruby
-AC_ARG_ENABLE([ruby-binding], [  --disable-ruby-binding        Disable building of Ruby binding],
-       [ENABLE_RUBY=$enableval], [ENABLE_RUBY="yes"])
+AC_ARG_ENABLE([ruby-binding],
+       [AS_HELP_STRING([--enable-ruby-binding],
+               [Enable building of Ruby binding])],
+       [ENABLE_RUBY=$enableval], [ENABLE_RUBY="no"])
 if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
        AC_PATH_PROG(RUBY, ruby, no)
        if test "$RUBY" != "no" ; then
@@ -161,12 +170,15 @@ fi
 AC_SUBST(RUBY_CONFIG_OPTIONS)
 
 # scxi
-AC_ARG_ENABLE([scxi], [  --enable-scxi  Enable SCXI convenience library],
+AC_ARG_ENABLE([scxi],
+       [AS_HELP_STRING([--enable-scxi], [Enable SCXI convenience library])],
        [ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
 AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
 
 # docbook
-AC_ARG_ENABLE([docbook], [  --disable-docbook         Disable docbook],[ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
+AC_ARG_ENABLE([docbook],
+       [AS_HELP_STRING([--disable-docbook], [Disable docbook])],
+       [ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
 
 if test "$ENABLE_DOCBOOK" == "yes"; then
        AC_PATH_PROG(XMLTO, xmlto, no)
@@ -176,65 +188,99 @@ if test "$ENABLE_DOCBOOK" == "yes"; then
 else
        XMLTO="no"
 fi
+
+if test "$XMLTO" != "no"; then
+       AC_ARG_WITH([pdf-backend],
+               [AS_HELP_STRING([--with-pdf-backend=[[yes|no|dblatex|fop|default]]],
+                       [Enable or disable PDF generation with backend])],
+               [WITH_PDF_BACKEND=$withval],[WITH_PDF_BACKEND="yes"])
+       case "$WITH_PDF_BACKEND" in
+       no)
+               PDF_BACKEND="no"
+               ;;
+       yes)
+               # Prefer dblatex, then default backend.
+               # Could use [dblatex fop] to prefer dblatex or fop.
+               AC_CHECK_PROGS([PDF_BACKEND], [dblatex], [default])
+               # The default backend is broken, so avoid it for now.
+               if test "$PDF_BACKEND" = "default"; then
+                       AC_MSG_WARN([Default PDF backend is broken, disabling PDF generation])
+                       AC_MSG_WARN([(dblatex is recommended for PDF generation)])
+                       PDF_BACKEND="no"
+               fi
+               if test "$PDF_BACKEND" != "no"; then
+                       AC_MSG_NOTICE([Will use $PDF_BACKEND backend for PDF generation])
+               fi
+               ;;
+       default)
+               # Use xmlto's default backend.
+               PDF_BACKEND="default"
+               ;;
+       dblatex|fop)
+               AC_CHECK_PROG([PDF_BACKEND], [$WITH_PDF_BACKEND],
+                       [$WITH_PDF_BACKEND], [no])
+               if test "$PDF_BACKEND" = "no"; then
+                       AC_MSG_WARN([$WITH_PDF_BACKEND not found, disabling PDF generation])
+               fi
+               ;;
+       *)
+               AC_MSG_WARN([Bad --with-pdf-backend option, disabling PDF generation])
+               PDF_BACKEND="no"
+               ;;
+       esac
+else
+       PDF_BACKEND="no"
+fi
+case $PDF_BACKEND in
+fop|default)
+       AC_MSG_WARN([$PDF_BACKEND PDF backend might not work.  --without-pdf-backend disables PDF generation.])
+       ;;
+esac
 AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
+AM_CONDITIONAL(BUILD_PDF, [test "$PDF_BACKEND" != "no"])
+AM_CONDITIONAL(BUILD_PDF_USING_DBLATEX, [test "$PDF_BACKEND" = "dblatex"])
+AM_CONDITIONAL(BUILD_PDF_USING_FOP, [test "$PDF_BACKEND" = "fop"])
 
 pcmciadir="\${sysconfdir}/pcmcia"
 AC_SUBST(pcmciadir)
 
-
+# firmware
+AC_ARG_ENABLE([firmware],
+       [AS_HELP_STRING([--disable-firmware], [Disable installation of firmware files])],
+       [ENABLE_FIRMWARE=$enableval],[ENABLE_FIRMWARE="yes"])
 
 # new udev hotplug
-AC_ARG_WITH([udev-hotplug], [  --with-udev-hotplug=[[/lib]]    enable udev hotplug],
+AC_ARG_WITH([udev-hotplug],
+       [AS_HELP_STRING([--with-udev-hotplug=[[/lib]]], [enable udev hotplug])],
        [ENABLE_UDEVHOTPLUG=$withval], [ENABLE_UDEVHOTPLUG="no"])
 AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
 if test "$ENABLE_UDEVHOTPLUG" != "no"; then
-       udevrulesdir="\${sysconfdir}/udev/rules.d/"
        if  test "$ENABLE_UDEVHOTPLUG" == "yes"; then
                AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
        fi
        if test "$ENABLE_UDEVHOTPLUG" != "/lib"; then
                AC_MSG_WARN([Installing the udev scripts in the non-standard location: $ENABLE_UDEVHOTPLUG (should be --enable-udev-hotplug=/lib)])
        fi
-       if test "$sysconfdir" != "/etc"; then
-               AC_MSG_WARN([udev hotplug works only if sysconfdir is set to /etc.])
-       fi
-       udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
+       udevrulesdir="$ENABLE_UDEVHOTPLUG/udev/rules.d/"
        udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
        AC_SUBST(udevrulesdir)
-       AC_SUBST(udevfirmwaredir)
        AC_SUBST(udevscriptsdir)
+       if test "$ENABLE_FIRMWARE" == "yes"; then
+       udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
+       AC_SUBST(udevfirmwaredir)
+       fi
 else
        ENABLE_UDEVHOTPLUG="no"
 fi
 
-
-# old hotplug mechanism
-AC_ARG_ENABLE([etc-hotplug], [  --enable-etc-hotplug    enable old hotplug in /etc/hotplug],
-       [ENABLE_ETCHOTPLUG=$enableval], [ENABLE_ETCHOTPLUG="no"])
-AM_CONDITIONAL(INSTALL_ETCHOTPLUG, [test "$ENABLE_ETCHOTPLUG" != "no"])
-
-if test "$ENABLE_ETCHOTPLUG" != "no"; then
-#see: http://linux-hotplug.sourceforge.net/
-#the hotplug expects the device dependent scripts here:
-       usbhotplugdir="\${sysconfdir}/hotplug/usb"
-       AC_SUBST(usbhotplugdir)
-
-#firmware for the hotplug script
-#see: http://linux-hotplug.sourceforge.net/
-       usbfirmwaredir="\${datadir}/usb"
-       AC_SUBST(usbfirmwaredir)
-       if test "$sysconfdir" != "/etc"; then
-               AC_MSG_WARN([hotplug works only if sysconfdir is set to /etc.])
-       fi
-fi
-
-if test "$ENABLE_ETCHOTPLUG" = "no" && test "$ENABLE_UDEVHOTPLUG" = "no" ; then
+if test "$ENABLE_UDEVHOTPLUG" = "no" ; then
                AC_MSG_WARN([No hotplug mechanism will be installed. Consult ./configure --help if you want hotplug.])
 fi
 
 AC_CONFIG_FILES(
 Makefile
 comedi_config/Makefile
+comedi_board_info/Makefile
 c++/Makefile
 c++/include/Makefile
 etc/Makefile
@@ -243,6 +289,7 @@ etc/hotplug/Makefile
 etc/hotplug/usb/Makefile
 etc/hotplug/usb/usbdux/Makefile
 etc/hotplug/usb/usbduxfast/Makefile
+etc/hotplug/usb/usbduxsigma/Makefile
 etc/udev/Makefile
 doc/Makefile
 demo/Makefile