mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[meson] Allow to find zlib and libcurl without pkgconfig
This commit is contained in:
parent
8164715d0f
commit
eb602605c5
16
meson.build
16
meson.build
@ -326,9 +326,14 @@ st = get_option('static')
|
||||
|
||||
deps = []
|
||||
if conf_data.get('CONFIG_GZIP')
|
||||
zdeps = dependency('zlib', static: st)
|
||||
zdeps = dependency('zlib', static: st, required: false)
|
||||
if not zdeps.found()
|
||||
zdeps = compiler.find_library('z', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
|
||||
endif
|
||||
if zdeps.found()
|
||||
deps += zdeps
|
||||
endif
|
||||
endif
|
||||
|
||||
if conf_data.get('CONFIG_TRE')
|
||||
tredeps = dependency('tre', static: st)
|
||||
@ -429,19 +434,26 @@ endif
|
||||
conf_data.set('CONFIG_LIBCURL', false)
|
||||
curldeps = false
|
||||
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
||||
curldeps = dependency('libcurl', static: st)
|
||||
curldeps = dependency('libcurl', static: st, required: false)
|
||||
if not curldeps.found()
|
||||
curldeps = compiler.find_library('curl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
|
||||
endif
|
||||
if curldeps.found()
|
||||
deps += curldeps
|
||||
conf_data.set('CONFIG_LIBCURL', true)
|
||||
endif
|
||||
endif
|
||||
|
||||
if not conf_data.get('CONFIG_LIBCURL') and get_option('libcurl')
|
||||
curldeps = dependency('libcurl', static: st, required: false)
|
||||
if not curldeps.found()
|
||||
curldeps = compiler.find_library('curl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
|
||||
endif
|
||||
if curldeps.found()
|
||||
deps += curldeps
|
||||
conf_data.set('CONFIG_LIBCURL', true)
|
||||
endif
|
||||
endif
|
||||
|
||||
conf_data.set('CONFIG_LIBCSS', false)
|
||||
cssdeps = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user