AC_SUBST(COMEDILIB_LIBS)
AC_PATH_PROG(SWIG, swig, no)
-if test x$SWIG = xno ; then
+if test "x$SWIG" == xno ; then
AC_MSG_WARN([swig not found, will not be able to regenerate code for swig bindings])
fi
+AM_CONDITIONAL(HAVE_SWIG, [test "x$SWIG" != xno])
AM_PATH_PYTHON
AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
AC_SUBST(PYTHON_QUIET)
AC_PATH_PROG(RUBY, ruby, no)
-if test x$RUBY = xno ; then
+if test "x$RUBY" == xno ; then
AC_MSG_WARN([ruby not found, disabling ruby binding])
fi
AM_CONDITIONAL(HAVE_RUBY, [test "x$RUBY" != xno])
if HAVE_PYTHON
pyexec_LTLIBRARIES = _comedi.la
else
-pyexec_LTLIBRARIES =
+pyexec_LTLIBRARIES =
endif
+BUILT_SOURCES = comedi_python_wrap.c
+
_comedi_la_SOURCES = comedi_python_wrap.c
_comedi_la_CFLAGS = $(COMEDILIB_CFLAGS) $(PYTHON_INCLUDES) $(PYTHON_QUIET)
_comedi_la_LDFLAGS = -module -avoid-version $(COMEDILIB_LIBS)
pyexec_SCRIPTS = comedi.py
-BUILT_SOURCES = comedi_python_wrap.c
-
EXTRA_DIST = README.txt comedi.py setup.py test_comedi.py
+if HAVE_SWIG
comedi_python_wrap.c: ../comedi.i
$(SWIG) -python -o ./comedi_python_wrap.c ../comedi.i
-
+else
+comedi_python_wrap.c:
+ echo WARNING: creating bogus comedi_python_wrap.c because you don\'t have swig.
+ touch comedi_python_wrap.c
+endif
BUILT_SOURCES = comedi_ruby_wrap.c
+if HAVE_SWIG
comedi_ruby_wrap.c: ../comedi.i
$(SWIG) -ruby -o ./comedi_ruby_wrap.c ../comedi.i
-
+else
+comedi_ruby_wrap.c:
+ echo WARNING: creating bogus comedi_ruby_wrap.c because you don\'t have swig.
+ touch comedi_ruby_wrap.c
+endif