- disable shared lib support on Solaris 10 and older (fixes #4973)
[ghc-hetmet.git] / configure.ac
index a8d535f..21e965b 100644 (file)
@@ -222,6 +222,21 @@ x86_64-apple-darwin)
     ;;
 esac
 
+# Testing if we shall enable shared libs support on Solaris.
+# Anything older than SunOS 5.11 aka Solaris 11 (Express) is broken.
+
+SOLARIS_BROKEN_SHLD=NO
+
+case $host in
+     i386-*-solaris2)
+     # here we go with the test
+     MINOR=`uname -r|cut -d '.' -f 2-`
+     if test "$MINOR" -lt "11"; then
+       SOLARIS_BROKEN_SHLD=YES
+     fi
+     ;;
+esac
+
 # Sync this with cTargetArch in compiler/ghc.mk
 checkArch() {
     case $1 in
@@ -322,6 +337,8 @@ AC_SUBST(TargetVendor_CPP)
 AC_SUBST(exeext)
 AC_SUBST(soext)
 
+AC_SUBST(SOLARIS_BROKEN_SHLD)
+
 AC_ARG_WITH(hc,
 [AC_HELP_STRING([--with-hc=ARG],
         [Use ARG as the path to the compiler for compiling ordinary