Commit 186d8b4c authored by Quentin Glidic's avatar Quentin Glidic Committed by Sam Thursfield

meson: Avoid NetworkManager automagic dependency

https://bugzilla.gnome.org/show_bug.cgi?id=791433Signed-off-by: Quentin Glidic's avatarQuentin Glidic <sardemff7+git@sardemff7.net>
parent 19443a0f
......@@ -28,7 +28,6 @@ icu_uc = dependency('icu-uc', version: '> 4.8.1.1', required: false)
json_glib = dependency('json-glib-1.0', version: '>= 1.0', required: true)
libsoup = dependency('libsoup-2.4', version: '> 2.40', required: true)
libxml2 = dependency('libxml-2.0', version: '> 2.6')
network_manager = dependency('libnm', required: false)
sqlite = dependency('sqlite3', version: '>' + sqlite_required)
libmath = cc.find_library('m', required: false)
......@@ -48,6 +47,12 @@ add_project_arguments('-DTRACKER_COMPILATION', language: 'c')
enable_fts = get_option('fts')
have_network_manager = false
if get_option('network_manager') != 'no'
network_manager = dependency('libnm', required: get_option('network_manager') == 'yes')
have_network_manager = network_manager.found()
endif
##################################################################
# Check for libtracker-common, make sure libstemmer exists
##################################################################
......@@ -196,7 +201,7 @@ conf.set('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
conf.set('HAVE_LIBICU', unicode_library_name == 'icu')
conf.set('HAVE_LIBSTEMMER', have_libstemmer)
conf.set('HAVE_LIBUNISTRING', unicode_library_name == 'unistring')
conf.set('HAVE_NETWORK_MANAGER', network_manager.found())
conf.set('HAVE_NETWORK_MANAGER', have_network_manager)
conf.set('HAVE_GETLINE', cc.has_function('getline', prefix : '#include <stdio.h>'))
conf.set('HAVE_POSIX_FADVISE', cc.has_function('posix_fadvise', prefix : '#include <fcntl.h>'))
......@@ -300,7 +305,7 @@ summary = [
' Source code location: ' + meson.current_source_dir(),
' Compiler: ' + cc.get_id(),
'\nFeature Support:',
' Support for network status detection: ' + network_manager.found().to_string(),
' Support for network status detection: ' + have_network_manager.to_string(),
' Unicode support library: ' + unicode_library_name,
' Build with Journal support: ' + get_option('journal').to_string(),
' Build with SQLite FTS support: @0@ (built-in FTS: @1@)'.format(
......
......@@ -7,6 +7,8 @@ option('functional_tests', type: 'boolean', value: true,
option('journal', type: 'boolean', value: true,
description: 'Enable database journal backup mechanism')
option('network_manager', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'auto',
description: 'Enable connection detection through NetworkManager')
option('stemmer', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'auto',
description: 'Enable stemming words while indexing')
option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto',
......
......@@ -52,7 +52,7 @@ libtracker_miner_private = static_library(
)
tracker_miner_dependencies = []
if network_manager.found()
if have_network_manager
tracker_miner_dependencies += network_manager
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment