diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-01-18 15:35:37 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-02-05 19:34:01 -0600 |
commit | 9d8d10cecc02c42ab1472023657423c8acbc7eac (patch) | |
tree | 55b8b6cce972bbb63761b606ff8c6edd060f0d2a | |
parent | 63fd78954dfa1a47331523a1296409cb46de6e55 (diff) |
move SunOS compiler detection up so that COMPATH is settled earlier
-rw-r--r-- | configure.in | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/configure.in b/configure.in index f6cd82577f5f..78071344bf42 100644 --- a/configure.in +++ b/configure.in @@ -2109,6 +2109,32 @@ if test "$COMPATH" = "." ; then fi COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`; +dnl =================================================================== +dnl Test the Solaris compiler version +dnl =================================================================== +if test "$_os" = "SunOS"; then + if test "$CC" = "cc"; then + AC_PATH_PROGS(_cc, cc) + COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` + AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) + dnl cc -V outputs to standard error!!!! + _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'` + _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` + _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` + if test "$_sunstudio_major" != "5"; then + AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) + else + _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` + if test "$_sunstudio_minor" = "false"; then + AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) + else + dnl compiler will do + AC_MSG_RESULT([checked]) + fi + fi + fi +fi + @@ -3435,32 +3461,6 @@ if test "z$_make_ver_check" = "z"; then fi AC_SUBST(STALE_MAKE) -dnl =================================================================== -dnl Test the Solaris compiler version -dnl =================================================================== -if test "$_os" = "SunOS"; then - if test "$CC" = "cc"; then - AC_PATH_PROGS(_cc, cc) - COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) - dnl cc -V outputs to standard error!!!! - _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'` - _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` - _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` - if test "$_sunstudio_major" != "5"; then - AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) - else - _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` - if test "$_sunstudio_minor" = "false"; then - AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) - else - dnl compiler will do - AC_MSG_RESULT([checked]) - fi - fi - fi -fi - HAVE_LD_HASH_STYLE=FALSE WITH_LINKER_HASH_STYLE= AC_MSG_CHECKING( for --hash-style gcc linker support ) |