From 87df43f876abd0f74ceecfb6ec3812edac30381f Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Sat, 16 Feb 2019 21:37:31 +0800 Subject: Fix build fail on Archlinux The enchant on Archlinux is 2.2.3-2, that include enchant-2.pc. This commit first check enchant-2, then check enchant. --- configure.ac | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index e1a1167d..822e7a1b 100644 --- a/configure.ac +++ b/configure.ac @@ -108,10 +108,14 @@ AC_ARG_ENABLE([spell], if test "x$enable_enchant" = "xyes" ; then - PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED, \ - have_enchant=yes, have_enchant=no) - - if test "x$have_enchant" = "xyes"; then + PKG_CHECK_MODULES(ENCHANT, enchant-2 >= $ENCHANT_REQUIRED, \ + have_enchant_2=yes, have_enchant_2=no) + + if test "x$have_enchant_2" = "xno"; then + PKG_CHECK_MODULES(ENCHANT, enchant >= $ENCHANT_REQUIRED, \ + have_enchant=yes, have_enchant=no) + fi + if test "x$have_enchant_2" = "xyes" || test "x$have_enchant" = "xyes"; then PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED], [have_iso_codes=yes],[have_iso_codes=no]) -- cgit v1.2.1