Index: /trunk/psLib/configure.ac
===================================================================
--- /trunk/psLib/configure.ac	(revision 12429)
+++ /trunk/psLib/configure.ac	(revision 12430)
@@ -134,4 +134,8 @@
 CFLAGS=${CFLAGS} ${CFITSIO_CFLAGS}
 LDFLAGS=${LDFLAGS} ${CFITSIO_LDFLAGS}
+
+dnl Solaris needs to suck in these symbols from unusual locations
+AC_SEARCH_LIBS([gethostbyname], [nsl])
+AC_SEARCH_LIBS([socket], [socket])
 
 AC_CHECK_HEADERS([fitsio.h],[],
@@ -431,5 +435,7 @@
 
 AC_CHECK_HEADERS([openssl/md5.h],[],
-  [AC_MSG_ERROR([SSL headers not found.  Obtain it at http://www.openssl.org/ or use --with-ssl to specify location.])]
+	[AC_CHECK_HEADERS([sys/md5.h],[],
+		[AC_MSG_ERROR([SSL headers not found.  Obtain it at http://www.openssl.org/ or use --with-ssl to specify location.])]
+	)]
 )
 AC_CHECK_LIB(crypto,MD5,[],
Index: /trunk/psLib/src/math/psMD5.c
===================================================================
--- /trunk/psLib/src/math/psMD5.c	(revision 12429)
+++ /trunk/psLib/src/math/psMD5.c	(revision 12430)
@@ -5,5 +5,13 @@
 #include <stdio.h>
 #include <string.h>
+
+#ifdef HAVE_SYS_MD5_H
+// Seems to be the case for Solaris
+#include <sys/md5.h>
+#else
+// Seems to be the case for most others
 #include <openssl/md5.h>
+#endif // HAVE_SYS_MD5_H
+
 
 #include "psAssert.h"
