Ver Fonte

add specific compiler order for Darwin

Waldemar Brodkorb há 7 anos atrás
pai
commit
ac9ec140fb
1 ficheiros alterados com 10 adições e 2 exclusões
  1. 10 2
      scripts/prereq.sh

+ 10 - 2
scripts/prereq.sh

@@ -108,7 +108,11 @@ if [ ! -d $topdir/dl ]; then
 fi
 fi
 
 
 # check for c compiler
 # check for c compiler
-compilerbins="cc gcc clang"
+if [ $os = "Darwin" ]; then
+  compilerbins="clang cc gcc"
+else
+  compilerbins="cc gcc clang"
+fi
 for compilerbin in $compilerbins; do
 for compilerbin in $compilerbins; do
   printf " --->  checking if $compilerbin is installed.. "
   printf " --->  checking if $compilerbin is installed.. "
   if which $compilerbin >/dev/null; then
   if which $compilerbin >/dev/null; then
@@ -127,7 +131,11 @@ if [ -z "$CCFOUND" ]; then
 fi
 fi
 
 
 # check for c++ compiler
 # check for c++ compiler
-compilerbins="c++ g++ clang++"
+if [ $os = "Darwin" ]; then
+  compilerbins="clang++ c++ g++"
+else
+  compilerbins="c++ g++ clang++"
+fi
 for compilerbin in $compilerbins; do
 for compilerbin in $compilerbins; do
   printf " --->  checking if $compilerbin is installed.. "
   printf " --->  checking if $compilerbin is installed.. "
   if which $compilerbin >/dev/null; then
   if which $compilerbin >/dev/null; then