On Tue, Jul 15, 2014 at 4:41 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Magnus Hagander <mag...@hagander.net> writes:
>> Out of curiosity, since one of those boxes seems to be yours, which
>> version of OpenSSL does it actually have?
>
> Claims to be 0.9.7:
>
> cube:~ tgl$ ls -l /usr/lib/*ssl*
> -rwxr-xr-x   1 root  wheel  266940 Nov  7  2010 /usr/lib/libssl.0.9.7.dylib*
> -rwxr-xr-x   1 root  wheel  257700 Nov  7  2010 /usr/lib/libssl.0.9.dylib*
> lrwxr-xr-x   1 root  wheel      18 Jul  1  2009 /usr/lib/libssl.dylib@ -> 
> libssl.0.9.7.dylib
>
> The box evidently has "0.9" installed as well, but our build should be
> seizing on the symlink and finding 0.9.7.

Weird. It should bei n that version.

Either way, we clearly need a configure check for it.

Being a completely newbie when it comes to writing configure checks -
does this seem correct?


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/
*** a/configure
--- b/configure
***************
*** 8509,8514 **** else
--- 8509,8525 ----
    as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
  fi
  
+      for ac_func in SSL_get_current_compression
+ do :
+   ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
+ if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
+ _ACEOF
+ 
+ fi
+ done
+ 
    else
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
  $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
*** a/configure.in
--- b/configure.in
***************
*** 950,955 **** if test "$with_openssl" = yes ; then
--- 950,956 ----
    if test "$PORTNAME" != "win32"; then
       AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
       AC_CHECK_LIB(ssl,    SSL_library_init, [], [AC_MSG_ERROR([library 'ssl' is required for OpenSSL])])
+      AC_CHECK_FUNCS([SSL_get_current_compression])
    else
       AC_SEARCH_LIBS(CRYPTO_new_ex_data, eay32 crypto, [], [AC_MSG_ERROR([library 'eay32' or 'crypto' is required for OpenSSL])])
       AC_SEARCH_LIBS(SSL_library_init, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])])
*** a/src/include/pg_config.h.in
--- b/src/include/pg_config.h.in
***************
*** 430,435 ****
--- 430,438 ----
  /* Define to 1 if you have the `srandom' function. */
  #undef HAVE_SRANDOM
  
+ /* Define to 1 if you have the `SSL_get_current_compression' function. */
+ #undef HAVE_SSL_GET_CURRENT_COMPRESSION
+ 
  /* Define to 1 if you have the <stdint.h> header file. */
  #undef HAVE_STDINT_H
  
*** a/src/include/pg_config.h.win32
--- b/src/include/pg_config.h.win32
***************
*** 337,342 ****
--- 337,345 ----
  /* Define to 1 if you have the `srandom' function. */
  /* #undef HAVE_SRANDOM */
  
+ /* Define to 1 if you have the `SSL_get_current_compression' function. */
+ #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
+ 
  /* Define to 1 if you have the <stdint.h> header file. */
  /* #undef HAVE_STDINT_H */
  
*** a/src/include/port.h
--- b/src/include/port.h
***************
*** 420,425 **** extern void unsetenv(const char *name);
--- 420,429 ----
  extern void srandom(unsigned int seed);
  #endif
  
+ #ifndef HAVE_SSL_GET_CURRENT_COMPRESSION
+ #define SSL_get_current_compression(x) 0
+ #endif
+ 
  /* thread.h */
  extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
  
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to