Backported from upstream master. Patch below is alterned to revert commit 5e9525c41272e850cbba0f65ce5809e5167880f2 From 1dd00d036344f72ab8d647d3f5614940c95e2384 Mon Sep 17 00:00:00 2001 From: Nikolay Shaplov Date: Sat, 30 Nov 2019 20:57:57 +0300 Subject: [PATCH] Fix build with old version of enchant, take two enchant-2 is not wide spread enough, for example debian have it only in experemental repo now. So it would be wise to make it possible to buld subtitleeditor with both enchant and echant-2 --- configure.ac | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index bfe30a3..beddd65 100644 --- a/configure.ac +++ b/configure.ac @@ -74,10 +74,17 @@ AC_SUBST(GTKMM_LIBS) # ========================================================================= # check enchant -PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0) +PKG_CHECK_MODULES(ENCHANT2, enchant-2 >= 2.2.0, have_enchant_2=yes, have_enchant_2=no) -AC_SUBST(ENCHANT_CFLAGS) -AC_SUBST(ENCHANT_LIBS) +if test "x$have_enchant_2" = "xyes"; then + ENCHANT_CFLAGS=$ENCHANT2_CFLAGS + ENCHANT_LIBS=$ENCHANT2_LIBS + AC_SUBST(ENCHANT_CFLAGS) + AC_SUBST(ENCHANT_LIBS) + +else + PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0) +fi # ========================================================================= # check libxml++