configure.ac: Use xapian-core.pc when available
Only fall back to xapian-config if it isn't.
This commit is contained in:
11
configure.ac
11
configure.ac
@ -155,8 +155,15 @@ AS_IF([test "x$have_json_glib" = "xyes"],[
|
||||
AM_CONDITIONAL(HAVE_JSON_GLIB,[test "x$have_json_glib" = "xyes"])
|
||||
|
||||
# xapian checking - we need 1.4 at least
|
||||
PKG_CHECK_MODULES(XAPIAN,xapian-core >= 1.4,[
|
||||
have_xapian=yes
|
||||
xapian_version=$($PKG_CONFIG xapian-core --modversion)
|
||||
AC_SUBST(XAPIAN_CXXFLAGS,${XAPIAN_CFLAGS})
|
||||
],[
|
||||
# fall back to the xapian-config script. Not sure if there are cases where the
|
||||
# pkgconfig does not work, but xapian-config does, so keep this for now.
|
||||
AC_MSG_NOTICE([falling back to xapian-config])
|
||||
AC_CHECK_PROG(XAPIAN_CONFIG,xapian-config,xapian-config,no)
|
||||
AM_CONDITIONAL(HAVE_XAPIAN,test "x$XAPIAN_CONFIG" != "xno")
|
||||
AS_IF([test "x$XAPIAN_CONFIG" = "xno"],[
|
||||
AC_MSG_ERROR([
|
||||
*** xapian could not be found; please install it
|
||||
@ -176,7 +183,7 @@ have_xapian="yes"
|
||||
|
||||
AC_SUBST(XAPIAN_CXXFLAGS)
|
||||
AC_SUBST(XAPIAN_LIBS)
|
||||
|
||||
])
|
||||
###############################################################################
|
||||
# we set the set the version of the MuStore (Xapian database) layout
|
||||
# here; it will become part of the db name, so we can automatically
|
||||
|
||||
Reference in New Issue
Block a user