Browse Source

detect BSD bc and use our own to avoid linux kernel compile breakage

Waldemar Brodkorb 9 years ago
parent
commit
96d6ad8559
1 changed files with 8 additions and 4 deletions
  1. 8 4
      scripts/scan-tools.sh

+ 8 - 4
scripts/scan-tools.sh

@@ -215,11 +215,15 @@ fi
 # always required, but can be provided by host
 host_build_bc=0
 if which bc >/dev/null 2>&1; then
-	if ! echo quit|bc -q 2>/dev/null >/dev/null;then
-		host_build_bc=1
-	fi
+  if ! echo quit|bc -q 2>/dev/null >/dev/null; then
+    host_build_bc=1
+  else 
+    if bc -v 2>&1| grep -q BSD >/dev/null 2>&1; then
+      host_build_bc=1
+    fi 
+  fi
 else
-	host_build_bc=1
+  host_build_bc=1
 fi
 
 host_build_bison=0