Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix ruby header-dir detection

  • Loading branch information...
commit 455625a254500316f6084180b0037c476a28299f 1 parent 857b3dd
@rescrv authored
Showing with 12 additions and 1 deletion.
  1. +1 −1  Makefile.am
  2. +11 −0 m4/ax_ruby_ext.m4
View
2  Makefile.am
@@ -419,7 +419,7 @@ ruby_LTLIBRARIES = client/ruby/hyperclient.la
endif
client_ruby_hyperclient_la_SOURCES = client/ruby/hyperclient.c client/ruby/type_conversion.cc
-client_ruby_hyperclient_la_CPPFLAGS = -I$(RUBY_EXT_INC) $(RUBY_EXT_CPPFLAGS) $(CPPFLAGS)
+client_ruby_hyperclient_la_CPPFLAGS = -I$(RUBY_EXT_INC) -I$(RUBY_EXT_ARCHINC) $(RUBY_EXT_CPPFLAGS) $(CPPFLAGS)
client_ruby_hyperclient_la_LIBADD = libhyperclient.la $(RUBY_EXT_LDFLAGS)
client_ruby_hyperclient_la_LDFLAGS = -module -avoid-version
View
11 m4/ax_ruby_ext.m4
@@ -91,6 +91,17 @@ AC_DEFUN([AX_RUBY_EXT],[
AC_SUBST(RUBY_EXT_INC)
#
+ # Check for Ruby config.h include path.
+ #
+ AC_ARG_VAR(RUBY_EXT_ARCHINC, [Another directory to include ruby headers from])
+ AC_MSG_CHECKING([for other Ruby headers include path])
+ if test -z "$RUBY_EXT_ARCHINC" ; then
+ [RUBY_EXT_ARCHINC=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"] + "/" + RbConfig::CONFIG["arch"]'`];
+ fi
+ AC_MSG_RESULT([$RUBY_EXT_ARCHINC])
+ AC_SUBST(RUBY_EXT_ARCHINC)
+
+ #
# Check for the extensions target directory.
#
AC_ARG_VAR(RUBY_EXT_LIB, [Directory to install ruby extensions into])
Please sign in to comment.
Something went wrong with that request. Please try again.