--- configure.in.orig   2009-12-18 16:12:43.000000000 -0700
+++ configure.in        2010-01-15 19:59:21.000000000 -0700
@@ -210,6 +210,8 @@
 #
 if test "$use_openssl" = "yes"; then
   AC_MSG_CHECKING([whether d2i_X509() uses a const unsigned char**])
+  saved_cppflags="${CPPFLAGS}"
+  CPPFLAGS="-I/usr/local/include ${CPPFLAGS}"
   AC_LANG_PUSH([C++])
   AC_COMPILE_IFELSE(
     AC_LANG_PROGRAM([[#include <openssl/x509.h>]],
@@ -219,6 +221,7 @@
     AC_MSG_RESULT(yes),
     AC_MSG_RESULT(no))
   AC_LANG_POP([C++])
+  CPPFLAGS="${saved_cppflags}"
 fi
 
 # do we use ssl?

