make cvs checkout compilable by people without swig
[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 "x$SWIG" == xno ; 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 "x$SWIG" != xno])
36
37 AM_PATH_PYTHON
38 AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
39 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = xyes])
40
41 AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
42 AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
43 AC_SUBST(PYTHON_QUIET)
44
45 AC_PATH_PROG(RUBY, ruby, no)
46 if test "x$RUBY" == xno ; then
47   AC_MSG_WARN([ruby not found, disabling ruby binding])
48 fi
49 AM_CONDITIONAL(HAVE_RUBY, [test "x$RUBY" != xno])
50
51 AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
52 if test x$DOCBOOK2MAN = xno ; then
53   AC_MSG_WARN([docbook2man not found, will not be able to rebuild man pages])
54 fi
55 AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "x$DOCBOOK2MAN" != xno])
56
57 AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf, no)
58 if test x$DOCBOOK2PDF = xno ; then
59   AC_MSG_WARN([docbook2pdf not found, will not be able to rebuild pdf documentation])
60 fi
61 AM_CONDITIONAL(HAVE_DOCBOOK2PDF, [test "x$DOCBOOK2PDF" != xno])
62
63 AC_PATH_PROG(DOCBOOK2HTML, docbook2html, no)
64 if test x$DOCBOOK2HTML = xno ; then
65   AC_MSG_WARN([docbook2html not found, will not be able to rebuild html documentation])
66 fi
67 AM_CONDITIONAL(HAVE_DOCBOOK2HTML, [test "x$DOCBOOK2HTML" != xno])
68
69 pcmciadir="\${sysconfdir}/pcmcia"
70 AC_SUBST(pcmciadir)
71
72 #see: http://linux-hotplug.sourceforge.net/
73 #the hotplug expects the device dependent scripts here:
74 usbhotplugdir="/etc/hotplug/usb"
75 AC_SUBST(usbhotplugdir)
76
77 #firmware for the hotplug script
78 #see: http://linux-hotplug.sourceforge.net/
79 usbfirmwaredir="/usr/share/usb"
80 AC_SUBST(usbfirmwaredir)
81
82 AC_CONFIG_FILES(
83 Makefile
84 comedi_calibrate/Makefile
85 comedi_config/Makefile
86 etc/Makefile
87 etc/pcmcia/Makefile
88 etc/hotplug/Makefile
89 etc/hotplug/usb/Makefile
90 etc/hotplug/usb/usbdux/Makefile
91 doc/Makefile
92 demo/Makefile
93 include/Makefile
94 lib/Makefile
95 man/Makefile
96 swig/Makefile
97 swig/python/Makefile
98 swig/ruby/Makefile
99 testing/Makefile
100 comedilib.spec
101 )
102
103 AC_OUTPUT
104
105