try linking against execinfo when execinfo.h is present

This should fix build on systems where execinfo.h is present
but the APIs are implemented in a separate library - commonly
a case on the BSDs as well as on non-glibc libcs and so on.
This commit is contained in:
q66 2020-06-11 02:37:26 +02:00
parent 6e87988071
commit 9fc310db63
2 changed files with 4 additions and 0 deletions

View File

@ -184,6 +184,9 @@ if cc.has_header('netinet/in.h') == true
endif
if cc.has_header('execinfo.h') == true
config_h.set('HAVE_EXECINFO_H' , '1')
dep_execinfo = cc.find_library('execinfo', required: false)
else
dep_execinfo = dependency('', required: false)
endif
if cc.has_function('explicit_bzero') == true
config_h.set('HAVE_EXPLICIT_BZERO' , '1')

View File

@ -15,6 +15,7 @@ deps_e = [
dep_rt,
dep_m,
dep_dl,
dep_execinfo,
dep_eina,
dep_eet,
dep_eeze,