From ec83c4d01d565e36d5db1bcc521e6494291bf74c Mon Sep 17 00:00:00 2001 From: Sumeet Chhetri Date: Sun, 9 Jun 2024 17:44:52 +0530 Subject: [PATCH] Fixed some build failures --- meson.build | 8 ++++---- sconstruct | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index f8eaf9ee..d6f8fac8 100644 --- a/meson.build +++ b/meson.build @@ -145,9 +145,9 @@ if get_option('MOD_SDORM_SQL') == true if not cc.has_header('libpq-fe.h', args : '-I/usr/local/include/postgresql') if cc.has_header('libpq-fe.h', args : '-I/usr/local/include/pgsql') pqincpath = '/usr/local/include/pgsql' - else if cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/postgresql') + elif cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/postgresql') pqincpath = '/opt/homebrew/include/postgresql' - else if cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/pgsql') + elif cc.has_header('libpq-fe.h', args : '-I/opt/homebrew/include/pgsql') pqincpath = '/opt/homebrew/include/pgsql' else error('libpq headers not found') @@ -189,7 +189,7 @@ if get_option('MOD_SDORM_MONGO') == true if not cc.has_header('bson.h', args : '-I/usr/include/libbson-1.0') if cc.has_header('bson.h', args : '-I/usr/local/include/libbson-1.0') global_includes += ['/usr/local/include/libbson-1.0'] - else notif cc.has_header('bson.h', args : '-I/opt/homebrew/include/libbson-1.0') + elif cc.has_header('bson.h', args : '-I/opt/homebrew/include/libbson-1.0') global_includes += ['/opt/homebrew/include/libbson-1.0'] else error('bson headers not found') @@ -200,7 +200,7 @@ if get_option('MOD_SDORM_MONGO') == true if not cc.has_header('mongoc.h', args : '-I/usr/include/libmongoc-1.0') if cc.has_header('mongoc.h', args : '-I/usr/local/include/libmongoc-1.0') global_includes += ['/usr/local/include/libmongoc-1.0'] - else notif cc.has_header('mongoc.h', args : '-I/opt/homebrew/include/libmongoc-1.0') + elif cc.has_header('mongoc.h', args : '-I/opt/homebrew/include/libmongoc-1.0') global_includes += ['/opt/homebrew/include/libmongoc-1.0'] else error('mongoc headers not found') diff --git a/sconstruct b/sconstruct index 8ff0e1c3..a737d220 100644 --- a/sconstruct +++ b/sconstruct @@ -170,14 +170,14 @@ if bool(mod_mongo): if FindFile('bson.h', '/usr/include/libbson-1.0'): conf.env.Append(CPPPATH=['/usr/include/libbson-1.0']) conf.env.Append(CPPPATH=['/usr/include/libmongoc-1.0']) + conf.env.Append(CPPDEFINES=['HAVE_BSONLIB', 'HAVE_MONGOCLIB', 'HAVE_BSONINC', 'HAVE_MONGOINC', 'INC_SDORM', 'INC_SDORM_MONGO']) elif FindFile('bson.h', '/usr/local/include/libbson-1.0'): conf.env.Append(CPPPATH=['/usr/local/include/libbson-1.0']) conf.env.Append(CPPPATH=['/usr/local/include/libmongoc-1.0']) + conf.env.Append(CPPDEFINES=['HAVE_BSONLIB', 'HAVE_MONGOCLIB', 'HAVE_BSONINC', 'HAVE_MONGOINC', 'INC_SDORM', 'INC_SDORM_MONGO']) elif FindFile('bson.h', '/opt/homebrewinclude/libbson-1.0'): conf.env.Append(CPPPATH=['/opt/homebrew/include/libbson-1.0']) conf.env.Append(CPPPATH=['/opt/homebrew/include/libmongoc-1.0']) - - if oi or li: conf.env.Append(CPPDEFINES=['HAVE_BSONLIB', 'HAVE_MONGOCLIB', 'HAVE_BSONINC', 'HAVE_MONGOINC', 'INC_SDORM', 'INC_SDORM_MONGO']) else: print('Did not find mongo development files!')