Support building with Enchant 2.x

This adds support for Enchant 2 named "enchant" and Enchant 2 named
"enchant-2" (!)
This commit is contained in:
Michael Gratton 2019-01-16 10:05:08 +11:00 committed by Michael James Gratton
parent f80fe6b7c0
commit 68a985a76c
3 changed files with 41 additions and 14 deletions

View file

@ -52,7 +52,7 @@ sqlite = dependency('sqlite3', version: '>= 3.12')
webkit2gtk = dependency('webkit2gtk-4.0', version: '>=' + target_webkit)
# Secondary deps - keep sorted alphabetically
enchant = dependency('enchant', version: '>= 1.6')
enchant = dependency('enchant-2', version: '>=2.1', required: false) # see below
gck = dependency('gck-1')
gcr = dependency('gcr-3', version: '>= 3.10.1')
gdk = dependency('gdk-3.0', version: '>=' + target_gtk)
@ -76,6 +76,12 @@ posix = valac.find_library('posix')
webkit2gtk = dependency('webkit2gtk-4.0', version: '>=' + target_webkit)
webkit2gtk_web_extension = dependency('webkit2gtk-web-extension-4.0', version: '>=' + target_webkit)
# Can currently use either Enchant 1 or 2
if not enchant.found()
enchant = dependency('enchant', version: '>=1.6')
endif
# Libunwind system dependencies above ensures appropriate versions,
# but this declared depencency is what we actually build against so we
# can include the custom VAPI correctly. We need to add unwind_lib to