changeset 170:ee0de14d5da0

- fixed configure on SunOS * fixed use of which(1), more straightforward and on older versions we can't rely on return val * CCC was not set correctly b/c of escape mistake
author cslag
date Sun, 08 Jan 2017 14:21:41 +0100
parents 2fa600ea50e7
children 011b5e3a8548
files configure
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Jan 08 03:07:57 2017 +0100
+++ b/configure	Sun Jan 08 14:21:41 2017 +0100
@@ -168,9 +168,9 @@
     ;;
   SunOS)
     # open distributions often don't come with default cc and CC, check for common alternatives.
-    printf "CC=` (which cc || which gcc || which clang  ) | grep -v '^no '`\n" >>$C
-    printf "CXX=`(which CC || which g++ || which clang++) | grep -v '^no '`\n" >>$C # C++ compiler traditionally named CC
-    printf "CCC=${CXX}\n" >>$C # Sun make's rules use CCC for c++ compiler
+    printf "CC=` (which cc gcc clang  ) | grep -v '^no ' | head -1`\n" >>$C
+    printf "CXX=`(which CC g++ clang++) | grep -v '^no ' | head -1`\n" >>$C # C++ compiler traditionally named CC
+    printf "CCC=\${CXX}\n" >>$C # Sun make's rules use CCC for c++ compiler
     printf "LDLIBS=-lm\n" >>$C
     ;;
   Minix)