[gimp] Fix #6979 meson build fails link libexecinfo on Alpine



commit 37593d6da3fdb41e539aaaa478b580da4ee807cf
Author: lloyd konneker <konnekerl gmail com>
Date:   Fri Jun 18 11:41:18 2021 -0400

    Fix #6979 meson build fails link libexecinfo on Alpine

 app/core/gimp-utils.c   | 7 -------
 libgimpbase/meson.build | 3 ++-
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c
index 7580056c64..d36ce0af91 100644
--- a/app/core/gimp-utils.c
+++ b/app/core/gimp-utils.c
@@ -38,13 +38,6 @@
 #include <process.h>
 #endif
 
-#if defined(G_OS_UNIX) && defined(HAVE_EXECINFO_H)
-/* For get_backtrace() */
-#include <stdlib.h>
-#include <string.h>
-#include <execinfo.h>
-#endif
-
 #include <cairo.h>
 #include <gegl.h>
 #include <gobject/gvaluecollector.h>
diff --git a/libgimpbase/meson.build b/libgimpbase/meson.build
index a688785df2..b1c6d9c7eb 100644
--- a/libgimpbase/meson.build
+++ b/libgimpbase/meson.build
@@ -100,12 +100,13 @@ libgimpbase_introspectable = [
   libgimpbase_headers_introspectable,
 ]
 
+optional_libexecinfo = cc.find_library('execinfo', required: false)
 
 libgimpbase = library('gimpbase-' + gimp_api_version,
   libgimpbase_sources,
   include_directories: rootInclude,
   dependencies: [
-    gexiv2, gio, math,
+    gexiv2, gio, math, optional_libexecinfo
   ],
   c_args: [
     '-DG_LOG_DOMAIN="LibGimpBase"',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]