[tracker/wip/sam/meson: 14/15] Make the configuration neater again



commit 2901ee67690a702106e6dd5ccf7accc28c03e75b
Author: Sam Thursfield <sam afuera me uk>
Date:   Thu Feb 23 18:16:24 2017 +0000

    Make the configuration neater again
    
    I'll replace #if with #ifdef everywhere instead.
    
    As discussed in https://github.com/mesonbuild/meson/issues/1424

 meson.build |   62 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/meson.build b/meson.build
index 9efa633..c62d10b 100644
--- a/meson.build
+++ b/meson.build
@@ -396,37 +396,37 @@ tracker_micro_version = meson.project_version().split('.')[2].to_int()
 
 conf = configuration_data()
 
-if get_option('journal') == false  conf.set('DISABLE_JOURNAL', 1)  endif
-if get_option('unzip_ps_gz_files') == false  conf.set('USING_UNZIPPSFILES', 1)  endif
-
-if enable_extract  conf.set('HAVE_TRACKER_EXTRACT', 1)  endif
-if enable_fts  conf.set('HAVE_TRACKER_FTS', 1)  endif
-if enable_writeback  conf.set('HAVE_TRACKER_WRITEBACK', 1)  endif
-
-if sqlite3_has_builtin_fts5  conf.set('HAVE_BUILTIN_FTS', 1)  endif
-if charset_library_name == 'enca' conf.set('HAVE_ENCA', 1) endif
-if exempi.found() conf.set('HAVE_EXEMPI', 1) endif
-if generic_media_handler_name == 'gstreamer'  conf.set('HAVE_GSTREAMER', 1)  endif
-if gstreamer_backend_name == 'Discoverer'  conf.set('GSTREAMER_BACKEND_DISCOVERER', 1)  endif
-if gstreamer_backend_name == 'GUPnP-DNLA'  conf.set('GSTREAMER_BACKEND_GUPNP_DLNA', 1)  endif
-if battery_detection_library_name == 'hal'  conf.set('HAVE_HAL', 1)  endif
-if libcue.found()  conf.set('HAVE_LIBCUE', 1)  endif
-if libcue.version() >= '2.0.0'  conf.set('HAVE_LIBCUE2', 1)  endif
-if unicode_library_name == 'icu'  conf.set('HAVE_LIBICU', 1)  endif
-if charset_library_name == 'icu'  conf.set('HAVE_LIBICU_CHARSET_DETECTION', 1)  endif
-if libexif.found()  conf.set('HAVE_LIBEXIF', 1)  endif
-if libiptcdata.found()  conf.set('HAVE_LIBIPTCDATA', 1)  endif
-if libmediaart.found()  conf.set('HAVE_LIBMEDIAART', 1)  endif
-if have_libstemmer  conf.set('HAVE_LIBSTEMMER', 1)  endif
-if unicode_library_name == 'unistring' conf.set('HAVE_LIBUNISTRING', 1) endif
-if have_meegotouch  conf.set('HAVE_MEEGOTOUCH', 1)  endif
-if network_manager.found()  conf.set('HAVE_NETWORK_MANAGER', 1)  endif
-if battery_detection_library_name == 'upower'  conf.set('HAVE_UPOWER', 1)  endif
-
-if cc.has_function('getline', prefix : '#include <stdio.h>')  conf.set('HAVE_GETLINE', 1)  endif
-if cc.has_function('posix_fadvise', prefix : '#include <fcntl.h>')  conf.set('HAVE_POSIX_FADVISE', 1)  endif
-if cc.has_header_symbol('sys/statvfs.h', 'statvfs64', args: '-D_LARGEFILE64_SOURCE')  
conf.set('HAVE_STATVFS64', 1)  endif
-if cc.has_function('strnlen', prefix : '#include <string.h>')  conf.set('HAVE_STRNLEN', 1)  endif
+conf.set('DISABLE_JOURNAL', get_option('journal') == false)
+conf.set('USING_UNZIPPSFILES', get_option('unzip_ps_gz_files') == false)
+
+conf.set('HAVE_TRACKER_EXTRACT', enable_extract)
+conf.set('HAVE_TRACKER_FTS', enable_fts)
+conf.set('HAVE_TRACKER_WRITEBACK', enable_writeback)
+
+conf.set('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
+conf.set('HAVE_ENCA', charset_library_name == 'enca')
+conf.set('HAVE_EXEMPI', exempi.found())
+conf.set('HAVE_GSTREAMER', generic_media_handler_name == 'gstreamer')
+conf.set('GSTREAMER_BACKEND_DISCOVERER', gstreamer_backend_name == 'Discoverer')
+conf.set('GSTREAMER_BACKEND_GUPNP_DLNA', gstreamer_backend_name == 'GUPnP-DNLA')
+conf.set('HAVE_HAL', battery_detection_library_name == 'hal')
+conf.set('HAVE_LIBCUE', libcue.found())
+conf.set('HAVE_LIBCUE2', libcue.version() >= '2.0.0')
+conf.set('HAVE_LIBICU', unicode_library_name == 'icu')
+conf.set('HAVE_LIBICU_CHARSET_DETECTION', charset_library_name == 'icu')
+conf.set('HAVE_LIBEXIF', libexif.found())
+conf.set('HAVE_LIBIPTCDATA', libiptcdata.found())
+conf.set('HAVE_LIBMEDIAART', libmediaart.found())
+conf.set('HAVE_LIBSTEMMER', have_libstemmer)
+conf.set('HAVE_LIBUNISTRING', unicode_library_name == 'unistring')
+conf.set('HAVE_MEEGOTOUCH', have_meegotouch)
+conf.set('HAVE_NETWORK_MANAGER', network_manager.found())
+conf.set('HAVE_UPOWER', battery_detection_library_name == 'upower')
+
+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>'))
+conf.set('HAVE_STATVFS64', cc.has_header_symbol('sys/statvfs.h', 'statvfs64', args: '-D_LARGEFILE64_SOURCE'))
+conf.set('HAVE_STRNLEN', cc.has_function('strnlen', prefix : '#include <string.h>'))
 
 conf.set('LOCALEDIR', '"@0@/@1@"'.format(get_option('prefix'), get_option('localedir')))
 conf.set('SHAREDIR', '"@0@/@1@"'.format(get_option('prefix'), get_option('datadir')))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]