summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2020-02-18 00:29:33 +0530
committerArun Isaac2020-02-18 00:29:33 +0530
commit5f91419a86508125715a306e67fb7f2d3634b7d0 (patch)
tree3e1908f08b6624863c47ce937fec75313673d267
parentb2a79064c7fcdcda5f730233a7c5a97e92134943 (diff)
downloadguile-xapian-5f91419a86508125715a306e67fb7f2d3634b7d0.tar.gz
guile-xapian-5f91419a86508125715a306e67fb7f2d3634b7d0.tar.lz
guile-xapian-5f91419a86508125715a306e67fb7f2d3634b7d0.zip
Rerun pkg-config to find xapian include flags for swig.
* configure.ac: Rerun pkg-config to find xapian include flags for swig. Store result in SWIG_FLAGS. * Makefile.am: Use SWIG_CFLAGS.
-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