make cvs checkout compilable by people without swig

This commit is contained in:
Frank Mori Hess 2004-01-08 03:10:32 +00:00
parent 76c73a0956
commit a64c59b46d
3 changed files with 18 additions and 7 deletions

View file

@ -29,9 +29,10 @@ AC_SUBST(COMEDILIB_CFLAGS)
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])])
@ -42,7 +43,7 @@ AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused
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])

View file

@ -2,19 +2,24 @@
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

View file

@ -3,6 +3,11 @@ EXTRA_DIST = examples
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