mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[meson] Allow to find zlib and libcurl without pkgconfig
This commit is contained in:
parent
8164715d0f
commit
eb602605c5
26
meson.build
26
meson.build
@ -326,8 +326,13 @@ st = get_option('static')
|
|||||||
|
|
||||||
deps = []
|
deps = []
|
||||||
if conf_data.get('CONFIG_GZIP')
|
if conf_data.get('CONFIG_GZIP')
|
||||||
zdeps = dependency('zlib', static: st)
|
zdeps = dependency('zlib', static: st, required: false)
|
||||||
deps += zdeps
|
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
|
endif
|
||||||
|
|
||||||
if conf_data.get('CONFIG_TRE')
|
if conf_data.get('CONFIG_TRE')
|
||||||
@ -429,9 +434,14 @@ endif
|
|||||||
conf_data.set('CONFIG_LIBCURL', false)
|
conf_data.set('CONFIG_LIBCURL', false)
|
||||||
curldeps = false
|
curldeps = false
|
||||||
if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or conf_data.get('CONFIG_MUJS')
|
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)
|
||||||
deps += curldeps
|
if not curldeps.found()
|
||||||
conf_data.set('CONFIG_LIBCURL', true)
|
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
|
endif
|
||||||
|
|
||||||
if not conf_data.get('CONFIG_LIBCURL') and get_option('libcurl')
|
if not conf_data.get('CONFIG_LIBCURL') and get_option('libcurl')
|
||||||
@ -439,8 +449,10 @@ if not conf_data.get('CONFIG_LIBCURL') and get_option('libcurl')
|
|||||||
if not curldeps.found()
|
if not curldeps.found()
|
||||||
curldeps = compiler.find_library('curl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
|
curldeps = compiler.find_library('curl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
|
||||||
endif
|
endif
|
||||||
deps += curldeps
|
if curldeps.found()
|
||||||
conf_data.set('CONFIG_LIBCURL', true)
|
deps += curldeps
|
||||||
|
conf_data.set('CONFIG_LIBCURL', true)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
conf_data.set('CONFIG_LIBCSS', false)
|
conf_data.set('CONFIG_LIBCSS', false)
|
||||||
|
Loading…
Reference in New Issue
Block a user