Enable POSIX signatures on Solaris, and fix Unix directory parsing.
[shibboleth/cpp-opensaml.git] / configure.ac
index 8ed1f41..1f22150 100644 (file)
@@ -49,17 +49,20 @@ if test "$GCC" = "yes" ; then
 #        ])
     CFLAGS="$GCC_CFLAGS"
     CXXFLAGS="$GCC_CXXFLAGS"
-else
-# Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993
-       case "${host_cpu}-${host_os}" in
-               *solaris*)
-                       if test "$CXX" = "CC" ; then
-                               CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
-                       fi
-               ;;
-       esac
 fi
 
+# Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993
+# Also enables POSIX semantics for some functions.
+case "${host_cpu}-${host_os}" in
+    *solaris*)
+       CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+       CXXFLAGS="$CXXFLAGS -D_POSIX_PTHREAD_SEMANTICS"
+       if test "$CXX" = "CC" ; then
+               CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
+       fi
+    ;;
+esac
+
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_TYPE_SIZE_T