]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Add some additional support to configure.inc added for new feature check in configure...
authorAdam Sutton <dev@adamsutton.me.uk>
Thu, 6 Sep 2012 14:35:33 +0000 (15:35 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 6 Sep 2012 14:35:33 +0000 (15:35 +0100)
support/configure.inc

index d3cd6d8e5feabf6fc0efab297962949e675091a6..21606f28bd1dbd5f4d9389f5c0347ab5bf5b4737 100644 (file)
@@ -119,6 +119,13 @@ function enabled
   [ "$val" == "yes" ] && return 0 || return 1
 }
 
+# Check if disabled
+function disabled
+{
+  local val=$(_enabled $1)
+  [ "$val" == "no" ] && return 0 || return 1
+}
+
 # Check if enabled (or auto)
 function enabled_or_auto
 {
@@ -126,6 +133,13 @@ function enabled_or_auto
   [ "$val" == "yes" -o "$val" == "auto" ] && return 0 || return 1
 }
 
+# Check if disabled (or auto)
+function disabled_or_auto
+{
+  local val=$(_enabled $1)
+  [ "$val" == "no" -o "$val" == "auto" ] && return 0 || return 1
+}
+
 # ###########################################################################
 # Command Line
 # ###########################################################################
@@ -266,6 +280,25 @@ function check_cc_header
   fi
 }
 
+# Check some compiler snippet
+function check_cc_snippet
+{
+  local nam=$1
+  local snp=$2
+  local opt=$3
+
+  echo -ne "checking for cc $nam ...${TAB}"
+
+  # Check if supported
+  if check_cc "$snp" "$opt"; then
+    echo "ok"
+    enable $nam
+  else
+    echo "fail"
+    return 1
+  fi
+}
+
 # Check compiler option
 function check_cc_option
 {