fix handling of swig so it is run at compile time instead of when
building tarball (due to possible dependence on swig library).
This commit is contained in:
parent
96e61f54e8
commit
366b8b5da0
5 changed files with 18 additions and 1054 deletions
|
@ -14,6 +14,6 @@ aclocal -I m4 && \
|
|||
libtoolize --copy --force && \
|
||||
autoheader && \
|
||||
autoconf && \
|
||||
automake -a -c && \
|
||||
./configure --enable-maintainer-mode $*
|
||||
automake -a -c
|
||||
|
||||
|
||||
|
|
22
configure.ac
22
configure.ac
|
@ -28,19 +28,16 @@ COMEDILIB_LIBS="$COMEDILIB_LIBS \$(top_builddir)/lib/libcomedi.la -lm"
|
|||
AC_SUBST(COMEDILIB_CFLAGS)
|
||||
AC_SUBST(COMEDILIB_LIBS)
|
||||
|
||||
|
||||
#swig
|
||||
AC_PATH_PROG(SWIG, swig, no)
|
||||
if test "$SWIG" == no ; then
|
||||
AC_MSG_WARN([swig not found, will not be able to regenerate code for swig bindings])
|
||||
AC_PATH_PROG(SWIG, swig, "no")
|
||||
if test "$SWIG" == "no" ; then
|
||||
AC_MSG_WARN([swig not found, will not be able to build swig based bindings])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_SWIG, [test "$SWIG" != "no"])
|
||||
|
||||
|
||||
#python
|
||||
AC_ARG_ENABLE([python-binding],[ --disable-python-binding Disable building of Python binding],
|
||||
[ENABLE_PYTHON=$enableval],[ENABLE_PYTHON="yes"])
|
||||
if test "$ENABLE_PYTHON" == "yes"; then
|
||||
if test "$ENABLE_PYTHON" == "yes" && test "$SWIG" != "no"; then
|
||||
AM_PATH_PYTHON
|
||||
AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON=yes,[HAVE_PYTHON=no;AC_MSG_WARN([python headers not found, disabling python binding])])
|
||||
else
|
||||
|
@ -48,8 +45,6 @@ else
|
|||
fi
|
||||
AM_CONDITIONAL(HAVE_PYTHON, [test "$HAVE_PYTHON" == "yes" && test "$ENABLE_PYTHON" == "yes"])
|
||||
|
||||
|
||||
|
||||
AS_COMPILER_FLAG([-fno-strict-aliasing],[PYTHON_QUIET="$PYTHON_QUIET -fno-strict-aliasing"], true )
|
||||
AS_COMPILER_FLAG([-Wno-unused-function],[PYTHON_QUIET="$PYTHON_QUIET -Wno-unused-function"], true )
|
||||
AC_SUBST(PYTHON_QUIET)
|
||||
|
@ -57,7 +52,7 @@ AC_SUBST(PYTHON_QUIET)
|
|||
# ruby
|
||||
AC_ARG_ENABLE([ruby-binding], [ --disable-ruby-binding Disable building of Ruby binding],
|
||||
[ENABLE_RUBY=$enableval], [ENABLE_RUBY="yes"])
|
||||
if test "$ENABLE_RUBY" == "yes"; then
|
||||
if test "$ENABLE_RUBY" == "yes" && test "$SWIG" != "no"; then
|
||||
AC_PATH_PROG(RUBY, ruby, no)
|
||||
if test "$RUBY" != "no" ; then
|
||||
RUBY_INC_DIR=`$RUBY -e "require 'rbconfig'; c = ::Config::CONFIG; print c[['archdir']];"`
|
||||
|
@ -82,18 +77,14 @@ if test "$RUBY_SO_DIR" != "" ; then
|
|||
fi
|
||||
AC_SUBST(RUBY_CONFIG_OPTIONS)
|
||||
|
||||
|
||||
# scxi
|
||||
AC_ARG_ENABLE([scxi], [ --enable-scxi Enable SCXI convenience library],
|
||||
[ENABLE_SCXI=$enableval], [ENABLE_SCXI="no"])
|
||||
AM_CONDITIONAL(BUILD_SCXI, [test "$ENABLE_SCXI" == "yes"])
|
||||
|
||||
|
||||
# docbook
|
||||
AC_ARG_ENABLE([docbook-binding],[ --disable-docbook-binding Disable docbook],[ENABLE_DOCBOOK=$enableval],[ENABLE_DOCBOOK="yes"])
|
||||
|
||||
|
||||
|
||||
if test "$ENABLE_DOCBOOK" == "yes"; then
|
||||
AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
|
||||
if test "$DOCBOOK2MAN" = "no" ; then
|
||||
|
@ -104,11 +95,10 @@ else
|
|||
fi
|
||||
AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])
|
||||
|
||||
|
||||
if test "$ENABLE_DOCBOOK" == "yes"; then
|
||||
AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf, no)
|
||||
if test "$DOCBOOK2PDF" = "no" ; then
|
||||
AC_MSG_WARN([docbook2pdf not found, will not be able to rebuild pdf documentation])
|
||||
AC_MSG_WARN([docbook2pdf not found, will not be able to rebuild pdf documentation])
|
||||
fi
|
||||
else
|
||||
DOCBOOK2PDF="no"
|
||||
|
|
|
@ -1,25 +1,20 @@
|
|||
|
||||
if HAVE_PYTHON
|
||||
pyexec_LTLIBRARIES = _comedi.la
|
||||
clean-local:
|
||||
$(RM) comedi_python_wrap.c comedi.py
|
||||
else
|
||||
pyexec_LTLIBRARIES =
|
||||
clean-local:
|
||||
endif
|
||||
|
||||
BUILT_SOURCES = comedi_python_wrap.c
|
||||
|
||||
_comedi_la_SOURCES = comedi_python_wrap.c
|
||||
nodist__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
|
||||
|
||||
EXTRA_DIST = README.txt comedi.py setup.py test_comedi.py
|
||||
EXTRA_DIST = README.txt setup.py test_comedi.py
|
||||
|
||||
if HAVE_SWIG
|
||||
$(srcdir)/comedi_python_wrap.c: $(srcdir)/../comedi.i
|
||||
$(SWIG) -python -o $(srcdir)/comedi_python_wrap.c $(srcdir)/../comedi.i
|
||||
else
|
||||
$(srcdir)/comedi_python_wrap.c:
|
||||
echo WARNING: creating bogus comedi_python_wrap.c because you don\'t have swig.
|
||||
touch $(srcdir)/comedi_python_wrap.c
|
||||
endif
|
||||
comedi_python_wrap.c comedi.py: $(srcdir)/../comedi.i
|
||||
$(SWIG) -python -o comedi_python_wrap.c $(srcdir)/../comedi.i
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,17 +1,7 @@
|
|||
## explicitly list ext/comedi_ruby_wrap.c in EXTRA_DIST so that it
|
||||
## gets built and put into tarball during 'make dist'
|
||||
EXTRA_DIST = demo lib ext ext/comedi_ruby_wrap.c setup.rb
|
||||
EXTRA_DIST = demo lib ext setup.rb
|
||||
|
||||
BUILT_SOURCES = ext/comedi_ruby_wrap.c
|
||||
|
||||
if HAVE_SWIG
|
||||
$(srcdir)/ext/comedi_ruby_wrap.c: $(srcdir)/../comedi.i
|
||||
$(SWIG) -ruby -o $(srcdir)/ext/comedi_ruby_wrap.c $(srcdir)/../comedi.i
|
||||
else
|
||||
$(srcdir)/ext/comedi_ruby_wrap.c:
|
||||
echo WARNING: creating bogus comedi_ruby_wrap.c because you don\'t have swig.
|
||||
touch $(srcdir)/ext/comedi_ruby_wrap.c
|
||||
endif
|
||||
|
||||
if HAVE_RUBY
|
||||
all-local: ext/comedi.so
|
||||
|
@ -31,7 +21,8 @@ ext/comedi.so ext/comedi_ruby_wrap.o: ext/Makefile config.save $(srcdir)/ext/com
|
|||
if HAVE_RUBY
|
||||
clean-local:
|
||||
$(RUBY) $(srcdir)/setup.rb clean
|
||||
|
||||
$(RM) $(srcdir)/ext/comedi_ruby_wrap.c
|
||||
$(RM) ext/Makefile config.save
|
||||
distclean-local:
|
||||
$(RUBY) $(srcdir)/setup.rb distclean
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue