summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk2
-rw-r--r--configure.ac1
-rw-r--r--template/Makefile.in1
3 files changed, 3 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index d35b2f3381..c7fd2f1af5 100644
--- a/common.mk
+++ b/common.mk
@@ -46,7 +46,7 @@ RUN_OPTS = --disable-gems
# GITPULLOPTIONS = --no-tags
YARP_SRCDIR = $(srcdir)/yarp
-INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(YARP_SRCDIR) -I$(UNICODE_HDR_DIR)
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(YARP_SRCDIR) -I$(UNICODE_HDR_DIR) $(incflags)
GEM_HOME =
GEM_PATH =
diff --git a/configure.ac b/configure.ac
index 70400dd797..fc468389da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -970,6 +970,7 @@ AS_IF([test "x$OPT_DIR" != x], [
INCFLAGS="${INCFLAGS:+$INCFLAGS }"`echo "$OPT_DIR" | tr "${PATH_SEPARATOR}" '\012' |
sed '/^$/d;s|^|-I|;s|$|/include|' | tr '\012' ' ' | sed 's/ *$//'`
])
+AC_SUBST(incflags, "$INCFLAGS")
test -z "${ac_env_CFLAGS_set}" -a -n "${cflags+set}" && eval CFLAGS="\"$cflags $ARCH_FLAG\""
test -z "${ac_env_CXXFLAGS_set}" -a -n "${cxxflags+set}" && eval CXXFLAGS="\"$cxxflags $ARCH_FLAG\""
diff --git a/template/Makefile.in b/template/Makefile.in
index 893581c457..6fdece8efe 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -89,6 +89,7 @@ optflags = @optflags@
debugflags = @debugflags@
warnflags = @warnflags@ @strict_warnflags@
cppflags = @cppflags@
+incflags = @incflags@
RUBY_DEVEL = @RUBY_DEVEL@ # "yes" or empty
_RUBY_DEVEL_enabled = $(RUBY_DEVEL:no=)
XCFLAGS = @XCFLAGS@ $(INCFLAGS) $(_RUBY_DEVEL_enabled:yes=-DRUBY_DEVEL=1)