summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac7
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index bb1b74f..e7aed53 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,7 @@ libguilexapian_la_CXXFLAGS = $(GUILE_CFLAGS) $(XAPIAN_CFLAGS)
libguilexapian_la_LDFLAGS = $(GUILE_LIBS) $(XAPIAN_LIBS)
xapian_wrap.cc: xapian.i xapian-head.i xapian-headers.i
- $(SWIG) $(XAPIAN_CFLAGS) -scmstub -o $@ -guile -package xapian -c++ $<
+ $(SWIG) $(SWIG_FLAGS) -scmstub -o $@ -guile -package xapian -c++ $<
xapian_wrap.scm: xapian_wrap.cc
diff --git a/configure.ac b/configure.ac
index 6814e48..2d9139a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,13 @@ GUILE_PROGS
PKG_CHECK_MODULES([XAPIAN], [xapian-core])
PKG_CHECK_MODULES([ZLIB], [zlib])
+dnl pkg-config does not output xapian include flags when the include
+dnl path is already in CPATH. See
+dnl https://unix.stackexchange.com/questions/362289/why-is-pkg-config-cflags-openssl-returning-nothing-on-rhel-6-8
+dnl But, swig does not use CPATH. So, we need to invoke pkg-config
+dnl again forcing it to output all include flags.
+AC_SUBST([SWIG_FLAGS], [$(PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --cflags xapian-core)])
+
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_OUTPUT