diff -Naur nrpe/configure.in nrpe-patched/configure.in
--- nrpe/configure.in	2007-12-26 12:25:03.000000000 -0700
+++ nrpe-patched/configure.in	2008-02-01 20:14:53.000000000 -0700
@@ -141,6 +141,7 @@
 
 dnl Check for getopt_long (Solaris)
 AC_CHECK_FUNCS([getopt_long],,AC_CHECK_LIB([iberty],[getopt_long],OTHERLIBS="$OTHERLIBS -liberty"))
+AC_CHECK_LIB(dl,dlopen,OTHERLIBS="$OTHERLIBS -ldl")
 AC_SUBST(OTHERLIBS)
 
 dnl Checks for library functions.
@@ -285,11 +286,16 @@
 		dnl Now try and find SSL libraries
 		AC_MSG_CHECKING(for SSL libraries)
 		found_ssl=no
+		ssl_static=no
 		for dir in $ssl_lib_dir $ssl_dir /usr/lib64 /usr/lib /usr/local/lib /usr/lib/ssl /usr/ssl/lib /usr/openssl/lib /usr/pkg/lib  /usr/freeware/lib/openssl; do
 			ssllibdir="$dir"
 			if test -f "$dir/libssl.so"; then
 				found_ssl=yes
 			        break
+			elif test -f "$dir/libssl.a"; then
+				found_ssl=yes
+				ssl_static=yes
+			        break
 			fi
 		done	
 
@@ -303,6 +309,12 @@
 
 			AC_DEFINE_UNQUOTED(HAVE_SSL)
 			AC_SUBST(HAVE_SSL)
+
+			if test x_$ssl_static == x_yes; then
+		        	printf "SSL shared libraries not found; linking statically\n";
+				AC_DEFINE_UNQUOTED(HAVE_SSL_STATIC)
+				AC_SUBST(HAVE_SSL_STATIC)
+			fi
 	
 			dnl Generate DH parameters
 			echo ""
diff -Naur nrpe/include/config.h.in nrpe-patched/include/config.h.in
--- nrpe/include/config.h.in	2007-11-23 10:31:23.000000000 -0700
+++ nrpe-patched/include/config.h.in	2008-02-01 20:04:28.000000000 -0700
@@ -243,6 +243,8 @@
 #include <rand.h>
 #endif
 
+#undef HAVE_SSL_STATIC
+
 #undef HAVE_KRB5_H
 #ifdef HAVE_KRB5_H
 #include <krb5.h>
diff -Naur nrpe/src/nrpe.c nrpe-patched/src/nrpe.c
--- nrpe/src/nrpe.c	2008-01-24 05:45:16.000000000 -0700
+++ nrpe-patched/src/nrpe.c	2008-02-01 16:51:00.000000000 -0700
@@ -113,6 +113,9 @@
 #ifdef HAVE_SSL
 		printf("SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required\n");
 #endif
+#ifdef HAVE_SSL_STATIC
+		printf("SSL/TLS Version %s statically linked\n",OPENSSL_VERSION_TEXT);
+#endif
 #ifdef HAVE_LIBWRAP
 		printf("TCP Wrappers Available\n");
 #endif
