From 9fc310db63f5310160c94e130db8d80c6acc7c2b Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 11 Jun 2020 02:37:26 +0200 Subject: [PATCH] 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. --- meson.build | 3 +++ src/bin/meson.build | 1 + 2 files changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 7c7e65383..57e7da821 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/src/bin/meson.build b/src/bin/meson.build index a3173eb6d..a3c451360 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -15,6 +15,7 @@ deps_e = [ dep_rt, dep_m, dep_dl, + dep_execinfo, dep_eina, dep_eet, dep_eeze,