]> diplodocus.org Git - nmh/blobdiff - configure.ac
Removed --posix from awk invocation in test-anno.
[nmh] / configure.ac
index 271cd09aedd0b15d90f8d7e0a6741686d259a4b5..bb42a6ac44456e68cd9f54a3dc960c29c6660733 100644 (file)
@@ -97,15 +97,15 @@ if test x"$enable_debug" = x"yes"; then
   test -z "$LDFLAGS" && LDFLAGS=-g
 fi
 
-dnl Use SunStudio cc on Solaris.
-if test -d /opt/solarisstudio12.3/bin; then
-  PATH=/opt/solarisstudio12.3/bin:$PATH
-  CC='/opt/solarisstudio12.3/bin/cc +w2'; export CC
-fi
-
-AC_PROG_CC([cc clang gcc])
+AC_PROG_CC(cc gcc)
 AM_PROG_CC_C_O
 
+dnl Use -v and some other options with SunStudio cc.
+case `${CC} -V 2>&1` in
+  cc:\ Sun\ C*) CFLAGS="${CFLAGS:+$CFLAGS }-v -errtags=yes"
+                CFLAGS="${CFLAGS} -erroff=E_STATEMENT_NOT_REACHED" ;;
+esac
+
 AC_CACHE_CHECK([whether compiler supports -Wextra], [nmh_cv_has_wextra],
 [nmh_saved_cflags="$CFLAGS"
  CFLAGS="$CFLAGS -Wextra -Werror"