Run openssl tests with proper flags set.

git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-cpp/trunk@1833608 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index aef96e2..8efa7af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,6 +174,11 @@
 
     # Now try to find out some things about this version of OpenSSL
     
+    old_flags=$CFLAGS
+    old_libs=$LIBS
+    CFLAGS="$CFLAGS $openssl_CFLAGS"
+    LIBS="$LIBS $openssl_LIBS"
+    
     AC_MSG_CHECKING([for const input buffers in OpenSSL])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/rsa.h>]], [[ const unsigned char * buf;
     	  unsigned char * outbuf;
@@ -225,7 +230,10 @@
     	AC_DEFINE([XSEC_OPENSSL_D2IX509_CONST_BUFFER],[1],[Define to 1 if OpenSSL X509 API has const input buffer.])],
     	[AC_MSG_RESULT([no])])
 
-        ],[AS_IF([test "x$with_openssl" != xcheck],[AC_MSG_ERROR([Unable to find OpenSSL])])])
+    CFLAGS="$old_CFLAGS"
+    LIBS="$old_LIBS"
+
+        ],[AS_IF([test "x$with_openssl" != xcheck],[AC_MSG_ERROR([Unable to find OpenSSL])])])       
     ])
 
 AC_ARG_WITH([nss],