configure: replace buggy AX_RUBY_EXT by a proper implementation
This actually allows to get the proper DLEXT expected by Ruby on the target system.
This commit is contained in:
parent
e469259a57
commit
e922790220
|
@ -660,7 +660,7 @@ RDIR = bindings/ruby
|
||||||
RDOC = $(RDIR)/doc.i
|
RDOC = $(RDIR)/doc.i
|
||||||
RWRAP = $(RDIR)/classes_wrap.cpp
|
RWRAP = $(RDIR)/classes_wrap.cpp
|
||||||
ROBJ = $(RWRAP:.cpp=.o)
|
ROBJ = $(RWRAP:.cpp=.o)
|
||||||
REXT = $(RDIR)/sigrok.so
|
REXT = $(RDIR)/sigrok.$(RUBY_DLEXT)
|
||||||
|
|
||||||
$(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
|
$(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
|
||||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@
|
$(AM_V_GEN)$(PYTHON) $(srcdir)/bindings/swig/doc.py ruby $(CPPXMLDOC) > $@
|
||||||
|
@ -683,8 +683,8 @@ $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la
|
||||||
ruby-build: $(REXT)
|
ruby-build: $(REXT)
|
||||||
|
|
||||||
ruby-install: $(REXT)
|
ruby-install: $(REXT)
|
||||||
$(INSTALL) -d $(prefix)/$(RBSIGROK_EXTDIR)
|
$(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
|
||||||
$(INSTALL) $< $(prefix)/$(RBSIGROK_EXTDIR)
|
$(INSTALL) $< $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
|
||||||
|
|
||||||
ruby-clean:
|
ruby-clean:
|
||||||
-$(AM_V_at)rm -fr $(RDIR)/doc
|
-$(AM_V_at)rm -fr $(RDIR)/doc
|
||||||
|
|
11
configure.ac
11
configure.ac
|
@ -403,10 +403,16 @@ AS_IF([test "x$BINDINGS_CXX" = xyes],
|
||||||
[sr_ruby_missing=],
|
[sr_ruby_missing=],
|
||||||
[sr_ruby_missing='C++ bindings'])
|
[sr_ruby_missing='C++ bindings'])
|
||||||
|
|
||||||
AX_RUBY_EXT
|
AC_PATH_PROGS(RUBY, ["${RUBY-ruby}"], [])
|
||||||
|
AS_IF([test "x$RUBY" != x],
|
||||||
|
AC_MSG_CHECKING([for Ruby version])
|
||||||
|
[RUBY_VERSION=`$RUBY -e 'puts RUBY_VERSION'`]
|
||||||
|
AC_MSG_RESULT([$RUBY_VERSION])
|
||||||
|
[RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["DLEXT"]]'`]
|
||||||
|
AC_SUBST(RUBY_DLEXT))
|
||||||
|
|
||||||
AS_IF([test "x$RUBY" = x],
|
AS_IF([test "x$RUBY" = x],
|
||||||
[SR_APPEND([sr_ruby_missing], [', '], ['Ruby'])])
|
[SR_APPEND([sr_ruby_missing], [', '], [Ruby])])
|
||||||
|
|
||||||
# Extract major and minor version number of the Ruby interpreter.
|
# Extract major and minor version number of the Ruby interpreter.
|
||||||
sr_rbmajor=${RUBY_VERSION%%.*}
|
sr_rbmajor=${RUBY_VERSION%%.*}
|
||||||
|
@ -430,7 +436,6 @@ AS_IF([test "x$SWIG" = x],
|
||||||
AS_IF([test -z "$sr_ruby_missing"],
|
AS_IF([test -z "$sr_ruby_missing"],
|
||||||
[BINDINGS_RUBY=$enable_ruby], [BINDINGS_RUBY=no])
|
[BINDINGS_RUBY=$enable_ruby], [BINDINGS_RUBY=no])
|
||||||
AM_CONDITIONAL([BINDINGS_RUBY], [test "x$BINDINGS_RUBY" = xyes])
|
AM_CONDITIONAL([BINDINGS_RUBY], [test "x$BINDINGS_RUBY" = xyes])
|
||||||
# AC_SUBST(RUBY_EXT_DLEXT, $RUBY_EXT_DLEXT)
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
## Java bindings ##
|
## Java bindings ##
|
||||||
|
|
Loading…
Reference in New Issue