add warning to 6711 calibration if driver version might be too old
[comedilib.git] / configure.ac
1
2 AC_INIT
3 AC_CANONICAL_TARGET([])
4
5 AC_CONFIG_AUX_DIR([.])
6 AS_VERSION(comedilib, COMEDILIB, 0, 7, 21)
7 #COMEDILIB_DEBUG="-Wall -Werror"
8 COMEDILIB_DEBUG="-Wall"
9 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
10 AS_LIBTOOL(COMEDILIB, 0, 7, 18, yes)
11
12 AM_CONFIG_HEADER(config.h)
13
14 ACLOCAL="$ACLOCAL -I m4"
15
16 AM_MAINTAINER_MODE
17
18 AC_PROG_CC
19 AM_PROG_CC_STDC
20 AC_ISC_POSIX
21 AM_PROG_LEX
22 AC_PROG_YACC
23
24 AC_HEADER_STDC([])
25
26 COMEDILIB_CFLAGS="$COMEDILIB_CFLAGS -I\$(top_srcdir)/include $COMEDILIB_DEBUG"
27 COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
28 AC_SUBST(COMEDILIB_CFLAGS)
29 AC_SUBST(COMEDILIB_LIBS)
30
31 AC_PATH_PROG(SWIG, swig, no)
32 if test "$SWIG" == no ; then
33   AC_MSG_WARN([swig not found, will not be able to regenerate code for swig bindings])
34 fi
35 AM_CONDITIONAL(HAVE_SWIG, [test "$SWIG" != "no"])
36
37 AC_ARG_ENABLE([python-binding],[  --disable-python-binding      Disable building of Python binding],
38         [ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
39 AM_PATH_PYTHON
40 AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
41 AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])
42
43 AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
44 AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
45 AC_SUBST(PYTHON_QUIET)
46
47 AC_ARG_ENABLE([ruby-binding], [  --disable-ruby-binding Disable building of Ruby binding],
48         [ENABLE_RUBY=$enableval], [ENABLE_RUBY="yes"])
49 AC_PATH_PROG(RUBY, ruby, no)
50 if test "$RUBY" != "no" ; then
51         RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
52         AC_CHECK_HEADER([$RUBY_INC_DIR/ruby.h],[],[ENABLE_RUBY="no";AC_MSG_WARN([ruby.h not found, disabling Ruby binding])])
53 else
54         AC_MSG_WARN([ruby not found, disabling ruby binding])
55         ENABLE_RUBY="no"
56 fi
57 AM_CONDITIONAL(HAVE_RUBY, [test "$ENABLE_RUBY" == "yes"])
58 AC_ARG_VAR(RUBY_PREFIX,[path prefix for Ruby binding [PREFIX/]])
59 AC_ARG_VAR(RUBY_SO_DIR,[path for Ruby extensions])
60 if test "$RUBY_PREFIX" != "" ; then
61         RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --prefix=\$(RUBY_PREFIX)"
62 fi
63 if test "$RUBY_SO_DIR" != "" ; then
64         RUBY_CONFIG_OPTIONS="$RUBY_CONFIG_OPTIONS --so-dir=\$(RUBY_SO_DIR)"
65 fi
66 AC_SUBST(RUBY_CONFIG_OPTIONS)
67
68 AC_ARG_ENABLE([scxi], [  --enable-scxi  Enable SCXI convenience library],
69         [ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
70 AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
71
72 AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
73 if test "$DOCBOOK2MAN" = "no" ; then
74   AC_MSG_WARN([docbook2man not found, will not be able to rebuild man pages])
75 fi
76 AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])
77
78 AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf, no)
79 if test "$DOCBOOK2PDF" = "no" ; then
80   AC_MSG_WARN([docbook2pdf not found, will not be able to rebuild pdf documentation])
81 fi
82 AM_CONDITIONAL(HAVE_DOCBOOK2PDF, [test "$DOCBOOK2PDF" != "no"])
83
84 AC_PATH_PROG(DOCBOOK2HTML, docbook2html, no)
85 if test "$DOCBOOK2HTML" = "no" ; then
86   AC_MSG_WARN([docbook2html not found, will not be able to rebuild html documentation])
87 fi
88 AM_CONDITIONAL(HAVE_DOCBOOK2HTML, [test "$DOCBOOK2HTML" != "no"])
89
90 pcmciadir="\${sysconfdir}/pcmcia"
91 AC_SUBST(pcmciadir)
92
93 #see: http://linux-hotplug.sourceforge.net/
94 #the hotplug expects the device dependent scripts here:
95 usbhotplugdir="/etc/hotplug/usb"
96 AC_SUBST(usbhotplugdir)
97
98 #firmware for the hotplug script
99 #see: http://linux-hotplug.sourceforge.net/
100 usbfirmwaredir="/usr/share/usb"
101 AC_SUBST(usbfirmwaredir)
102
103 AC_CONFIG_FILES(
104 Makefile
105 comedi_calibrate/Makefile
106 comedi_config/Makefile
107 etc/Makefile
108 etc/pcmcia/Makefile
109 etc/hotplug/Makefile
110 etc/hotplug/usb/Makefile
111 etc/hotplug/usb/usbdux/Makefile
112 doc/Makefile
113 demo/Makefile
114 include/Makefile
115 lib/Makefile
116 man/Makefile
117 scxi/Makefile
118 swig/Makefile
119 swig/python/Makefile
120 swig/ruby/Makefile
121 testing/Makefile
122 comedilib.spec
123 )
124
125 AC_OUTPUT
126
127