]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure: add execinfo option
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 1 Jan 2022 15:53:29 +0000 (16:53 +0100)
committerFlole998 <Flole998@users.noreply.github.com>
Sun, 2 Jan 2022 14:07:39 +0000 (15:07 +0100)
Add execinfo option to allow the user to disable the feature even if
execinfo.h is found on the system

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
configure

index 4dad024c4ead4dc6fe3c98fa6ac39a9abc5d5531..c087502bf38b58715c0fbf4c0bce658d8f1d02e3 100755 (executable)
--- a/configure
+++ b/configure
@@ -75,6 +75,7 @@ OPTIONS=(
   "ddci:yes"
   "cclang_threadsan:no"
   "gperftools:no"
+  "execinfo:auto"
 )
 
 #
@@ -150,11 +151,23 @@ if [ ${PLATFORM} = "freebsd" ]; then
     # If we don't have libunwind then fallback to execinfo.
     if ! enabled libunwind
     then
-        check_cc_header execinfo
+        if enabled_or_auto execinfo; then
+            if check_cc_header execinfo; then
+                enable execinfo
+            else
+                die "execinfo.h not found (use --disable-execinfo)"
+           fi
+        fi
     fi
 
 else
-    check_cc_header execinfo
+    if enabled_or_auto execinfo; then
+        if check_cc_header execinfo; then
+            enable execinfo
+        else
+            die "execinfo.h not found (use --disable-execinfo)"
+        fi
+    fi
 fi
 check_cc_option mmx
 check_cc_option sse2