summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-02-17 21:46:00 +0800
committerraveit65 <[email protected]>2019-02-17 16:14:36 +0100
commite27a451893ce6f772feb284fbb0d740fe23c003e (patch)
treeb11b9ffd608700cabe45f58fa0d87d40ee05b26a /configure.ac
parent73e0a823b1c040beb68bc48b8279bcef11115a3f (diff)
downloadpluma-e27a451893ce6f772feb284fbb0d740fe23c003e.tar.bz2
pluma-e27a451893ce6f772feb284fbb0d740fe23c003e.tar.xz
show enchant version when configure
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 12 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 822e7a1b..5dc511a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,7 +98,7 @@ dnl ================================================================
dnl spell plugins checks: enchant and iso-codes
dnl ================================================================
-ENCHANT_REQUIRED=1.2.0
+ENCHANT_REQUIRED=1.6.0
ISO_CODES_REQUIRED=0.35
AC_ARG_ENABLE([spell],
@@ -107,15 +107,19 @@ AC_ARG_ENABLE([spell],
[enable_enchant=yes])
if test "x$enable_enchant" = "xyes" ; then
+ ENCHANT_MODNAME=enchant
+ PKG_CHECK_EXISTS([enchant-2 >= $ENCHANT_REQUIRED], [have_enchant_2=yes], [have_enchant_2=no])
+ if test "x$have_enchant_2" = "xyes"; then
+ ENCHANT_MODNAME=enchant-2
+ fi
- PKG_CHECK_MODULES(ENCHANT, enchant-2 >= $ENCHANT_REQUIRED, \
- have_enchant_2=yes, have_enchant_2=no)
+ AC_MSG_CHECKING([the version of enchant])
+ ENCHANT_VERSION=`pkg-config --modversion $ENCHANT_MODNAME`
+ AC_MSG_RESULT([$ENCHANT_VERSION])
- 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_MODULES(ENCHANT, [$ENCHANT_MODNAME >= $ENCHANT_REQUIRED], \
+ have_enchant=yes, have_enchant=no)
+ if test "x$have_enchant" = "xyes"; then
PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
[have_iso_codes=yes],[have_iso_codes=no])