Check for enchant-2 (necessary since enchant 2.1.3).
authorwwp <wwp@free.fr>
Tue, 10 Apr 2018 07:26:21 +0000 (09:26 +0200)
committerwwp <wwp@free.fr>
Tue, 10 Apr 2018 07:26:21 +0000 (09:26 +0200)
configure.ac

index 87c95e5..791a2dd 100644 (file)
@@ -596,8 +596,16 @@ if test $enable_enchant = yes; then
                enable_enchant=yes
        ],
        [
-               echo "Building without enchant-notification"
-               enable_enchant=no
+               PKG_CHECK_MODULES(ENCHANT, enchant-2 >= 2.0.0,
+               [
+                       AC_DEFINE(USE_ENCHANT, 1, enchant-2)
+                       echo "Building with enchant-2"
+                       enable_enchant=yes
+               ],
+               [
+                       echo "Building without enchant-notification"
+                       enable_enchant=no
+               ])
        ])
        AC_SUBST(ENCHANT_CFLAGS)
        AC_SUBST(ENCHANT_LIBS)