make cvs checkout compilable by people without swig
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 8 Jan 2004 03:10:32 +0000 (03:10 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 8 Jan 2004 03:10:32 +0000 (03:10 +0000)
configure.ac
swig/python/Makefile.am
swig/ruby/Makefile.am

index 0805aeacb556af01c08e501b1c71ad5c9a6f9280..dc4f93c917697129211e63e909201e05cbe71d0f 100644 (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])
index 99786bd26913e5118d4e549f65ee102fa201c8ac..89309332ed5f97134ae7204dd89d9edd03ba7a6f 100644 (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
index 2d29bddc73770f86561991eb708d4cd0e02a41e5..22c5ec4f740b8a473962a262e47ce51a8ae221c5 100644 (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