meson: add Solaris support

Summary: Add Solaris support for meson

Test Plan: test on OpenIndiana

Reviewers: raster, bu5hm4n, stefan_schmidt

Reviewed By: raster, stefan_schmidt

Subscribers: alarcher, stefan_schmidt, bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11973
This commit is contained in:
Vincent Torri 2020-06-18 14:35:46 +01:00 committed by Carsten Haitzler (Rasterman)
parent fbd3bc6262
commit f04316e3f0
5 changed files with 28 additions and 5 deletions

View File

@ -88,7 +88,6 @@ function_checks = [
['getxattr', ['sys/types.h', 'sys/xattr.h']], ['getxattr', ['sys/types.h', 'sys/xattr.h']],
['iconv', ['iconv.h']], ['iconv', ['iconv.h']],
['listxattr', ['sys/types.h', 'sys/xattr.h']], ['listxattr', ['sys/types.h', 'sys/xattr.h']],
['mallinfo', ['malloc.h']],
['malloc_info', ['malloc.h']], ['malloc_info', ['malloc.h']],
['malloc_usable_size', ['malloc.h']], ['malloc_usable_size', ['malloc.h']],
['mkdirat', ['sys/stat.h']], ['mkdirat', ['sys/stat.h']],
@ -114,6 +113,7 @@ function_checks = [
['dlopen', ['dlfcn.h'], ['dl']], ['dlopen', ['dlfcn.h'], ['dl']],
['dlsym', ['dlfcn.h'], ['dl']], ['dlsym', ['dlfcn.h'], ['dl']],
['lround', ['math.h'], ['m']], ['lround', ['math.h'], ['m']],
['mallinfo', ['malloc.h'], ['malloc']],
['shm_open', ['sys/mman.h', 'sys/stat.h', 'fcntl.h'], ['rt']], ['shm_open', ['sys/mman.h', 'sys/stat.h', 'fcntl.h'], ['rt']],
#from here on we specify arguments #from here on we specify arguments
['splice', ['fcntl.h'], [], '-D_GNU_SOURCE=1'], ['splice', ['fcntl.h'], [], '-D_GNU_SOURCE=1'],
@ -157,6 +157,11 @@ m = cc.find_library('m')
dl = cc.find_library('dl', required: false) dl = cc.find_library('dl', required: false)
rt = cc.find_library('rt', required: false) rt = cc.find_library('rt', required: false)
if sys_sun == true
malloc = cc.find_library('malloc', required: true)
socket = cc.find_library('socket', required: true)
endif
thread_dep = dependency('threads') thread_dep = dependency('threads')
#check for the headers #check for the headers

View File

@ -48,11 +48,13 @@ windows = ['windows', 'cygwin']
bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd', 'openbsd'] bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd', 'openbsd']
linux = ['linux'] linux = ['linux']
osx = ['darwin'] osx = ['darwin']
sun = ['sunos']
sys_linux = linux.contains(host_machine.system()) sys_linux = linux.contains(host_machine.system())
sys_bsd = bsd.contains(host_machine.system()) sys_bsd = bsd.contains(host_machine.system())
sys_windows = windows.contains(host_machine.system()) sys_windows = windows.contains(host_machine.system())
sys_osx = osx.contains(host_machine.system()) sys_osx = osx.contains(host_machine.system())
sys_sun = sun.contains(host_machine.system())
module_files = [] module_files = []
evas_loader_map = [] evas_loader_map = []
@ -126,6 +128,11 @@ foreach lang : ['c', 'objc', 'cpp']
endif endif
endforeach endforeach
if sys_sun == true
# for getpwuid_r()
add_global_arguments('-D_POSIX_PTHREAD_SEMANTICS', language: 'c')
endif
config_h = configuration_data() config_h = configuration_data()
config_h.set_quoted('MODULE_ARCH', version_name) config_h.set_quoted('MODULE_ARCH', version_name)
config_h.set_quoted('PACKAGE', meson.project_name()) config_h.set_quoted('PACKAGE', meson.project_name())
@ -200,7 +207,7 @@ endif
config_dir = [include_directories('.')] config_dir = [include_directories('.')]
eolian_include_directories = [] eolian_include_directories = []
if sys_linux == true or sys_bsd == true if sys_linux == true or sys_bsd == true or sys_sun == true
sys_lib_extension = 'so' sys_lib_extension = 'so'
sys_exe_extension = '' sys_exe_extension = ''
sys_mod_extension = 'so' sys_mod_extension = 'so'

View File

@ -167,12 +167,15 @@ elementary_test_src = [
'test.h' 'test.h'
] ]
link_args = []
if sys_windows == false if sys_windows == false
link_args = ['-rdynamic', '-fPIC', '-pie'] link_args += ['-rdynamic', '-fPIC']
package_c_args = package_c_args + ['-fPIC'] package_c_args = package_c_args + ['-fPIC']
else
link_args = []
endif endif
if sys_windows == false and sys_sun == false
link_args += ['-pie']
endif
elementary_test = executable('elementary_test', elementary_test = executable('elementary_test',
elementary_test_src, elementary_test_src,
dependencies: [elementary, intl] + elementary_deps + elementary_pub_deps, dependencies: [elementary, intl] + elementary_deps + elementary_pub_deps,

View File

@ -2,6 +2,10 @@ ecore_deps = []
ecore_pub_deps = [eina, eo, efl] ecore_pub_deps = [eina, eo, efl]
ecore_ext_deps = [intl, m, buildsystem] ecore_ext_deps = [intl, m, buildsystem]
if sys_sun == true
ecore_deps += [malloc]
endif
pub_legacy_eo_files = [ pub_legacy_eo_files = [
'ecore_event_message.eo', 'ecore_event_message.eo',
'ecore_event_message_handler.eo', 'ecore_event_message_handler.eo',

View File

@ -7,6 +7,10 @@ if sys_windows == true
eina_pub_deps += [evil] eina_pub_deps += [evil]
endif endif
if sys_sun == true
eina_deps += [socket]
endif
public_sub_headers = [ public_sub_headers = [
'eina_promise.h', 'eina_promise.h',
'eina_safety_checks.h', 'eina_safety_checks.h',