You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2009/01/02 14:54:54 UTC

svn commit: r730717 - /httpd/httpd/trunk/modules/session/config.m4

Author: rjung
Date: Fri Jan  2 05:54:54 2009
New Revision: 730717

URL: http://svn.apache.org/viewvc?rev=730717&view=rev
Log:
Add a header check for apr_ssl.h to mod_session_crypto.

The modules needs the header which is at the moment
only part of the ssl-evp branch of APR.

Modified:
    httpd/httpd/trunk/modules/session/config.m4

Modified: httpd/httpd/trunk/modules/session/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/config.m4?rev=730717&r1=730716&r2=730717&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/config.m4 (original)
+++ httpd/httpd/trunk/modules/session/config.m4 Fri Jan  2 05:54:54 2009
@@ -17,7 +17,13 @@
 dnl
 APACHE_MODULE(session, session module, , , most)
 APACHE_MODULE(session_cookie, session cookie module, , , $session_mods_enable)
-APACHE_MODULE(session_crypto, session crypto module, , , no)
+APACHE_MODULE(session_crypto, session crypto module, , , no, [
+  AC_CHECK_HEADERS(apr_ssl.h, [], [ap_HAVE_APR_SSL_H="no"])
+  if test $ap_HAVE_APR_SSL_H = "no"; then
+    AC_MSG_WARN([Your APR does not include SSL/EVP support.])
+    enable_session_crypto="no"
+  fi
+])
 APACHE_MODULE(session_dbd, session dbd module, , , $session_mods_enable)
 dnl APACHE_MODULE(session_ldap, session ldap module, , , $session_mods_enable)
 



Re: svn commit: r730717 - /httpd/httpd/trunk/modules/session/config.m4

Posted by Rainer Jung <ra...@kippdata.de>.
On 03.01.2009 16:02, Graham Leggett wrote:
> rjung@apache.org wrote:
>
>> URL: http://svn.apache.org/viewvc?rev=730717&view=rev
>> Log:
>> Add a header check for apr_ssl.h to mod_session_crypto.
>>
>> The modules needs the header which is at the moment
>> only part of the ssl-evp branch of APR.
>
> I have just finished updating session_crypto to depend on the
> apr_crypto.h API instead of the deprecated apr_ssl.h API, however the
> check below, once changed to apr_crypto.h, doesn't seem to detect the
> header properly.
>
> Can you verify whether this works for you against apr_crypto.h?

I see, I forgot to add the APR and APU include paths to CPPFLAGS before 
testing the header. Autoconf does not only look for the file, it also 
processes it via CPP and compiles it.

I tested it now with apr_ssl.h and apr_crypto.h. The following change 
should do it for you:

1) Cleanup of apu_errno.h
-------------------------

--- apu_errno.h 2009-01-03 16:52:53.000000000 +0100
+++ apu_errno.h 2009-01-03 16:49:53.000000000 +0100
@@ -22,8 +22,8 @@
   * @brief APR-Util Error Codes
   */

-#include <apr.h>
-#include <apr_errno.h>
+#include "apr.h"
+#include "apr_errno.h"

  #ifdef __cplusplus
  extern "C" {

2) Changing the feature test
----------------------------

--- modules/session/config.m4   (revision 730878)
+++ modules/session/config.m4   (working copy)
@@ -18,8 +18,11 @@
  APACHE_MODULE(session, session module, , , most)
  APACHE_MODULE(session_cookie, session cookie module, , , 
$session_mods_enable)
  APACHE_MODULE(session_crypto, session crypto module, , , no, [
-  AC_CHECK_HEADERS(apr_ssl.h, [ap_HAVE_APR_SSL_H="yes"], 
[ap_HAVE_APR_SSL_H="no"])
-  if test $ap_HAVE_APR_SSL_H = "no"; then
+  saved_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS -I$APR_INCLUDEDIR -I$APU_INCLUDEDIR"
+  AC_CHECK_HEADERS(apr_crypto.h, [ap_HAVE_APR_CRYPTO="yes"], 
[ap_HAVE_APR_CRYPTO="no"])
+  CPPFLAGS="$saved_CPPFLAGS"
+  if test $ap_HAVE_APR_CRYPTO = "no"; then
      AC_MSG_WARN([Your APR does not include SSL/EVP support.])
      enable_session_crypto="no"
    fi

As you can see I switched to apr_crypto.h, but also added paths 
temporarily to CPPFLAGS.

3) Resulting changes to configure
---------------------------------

The resulting changes to configure are:

--- configure.kpdt_orig 2009-01-03 13:59:32.000000000 +0100
+++ configure   2009-01-03 16:58:24.000000000 +0100
@@ -18946,8 +18946,10 @@
              { echo "$as_me:$LINENO: result: checking dependencies" >&5
  echo "${ECHO_T}checking dependencies" >&6; }

+  saved_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS -I$APR_INCLUDEDIR -I$APU_INCLUDEDIR"

-for ac_header in apr_ssl.h
+for ac_header in apr_crypto.h
  do
  as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
  if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -19081,14 +19083,15 @@
    cat >>confdefs.h <<_ACEOF
  #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
  _ACEOF
- ap_HAVE_APR_SSL_H="yes"
+ ap_HAVE_APR_CRYPTO="yes"
  else
-  ap_HAVE_APR_SSL_H="no"
+  ap_HAVE_APR_CRYPTO="no"
  fi

  done

-  if test $ap_HAVE_APR_SSL_H = "no"; then
+  CPPFLAGS="$saved_CPPFLAGS"
+  if test $ap_HAVE_APR_CRYPTO = "no"; then
      { echo "$as_me:$LINENO: WARNING: Your APR does not include SSL/EVP 
support." >&5
  echo "$as_me: WARNING: Your APR does not include SSL/EVP support." >&2;}
      enable_session_crypto="no"


If the feature test worked for your with apr_ssl.h, then it's possible, 
that you can fix it with 1). I will apply 2), because that's cleaner, 
but you might nevertheless add 1) to apr-util.

If it doesn't work for you, look inside config.log. You'll find some 
more info there, which part of the test failed, and why.

Regards,

Rainer

Re: svn commit: r730717 - /httpd/httpd/trunk/modules/session/config.m4

Posted by Graham Leggett <mi...@sharp.fm>.
rjung@apache.org wrote:

> URL: http://svn.apache.org/viewvc?rev=730717&view=rev
> Log:
> Add a header check for apr_ssl.h to mod_session_crypto.
> 
> The modules needs the header which is at the moment
> only part of the ssl-evp branch of APR.

I have just finished updating session_crypto to depend on the 
apr_crypto.h API instead of the deprecated apr_ssl.h API, however the 
check below, once changed to apr_crypto.h, doesn't seem to detect the 
header properly.

Can you verify whether this works for you against apr_crypto.h?

Regards,
Graham
--