Patch against 2.5.9 for OpenSSL in lib64, pkg-config

ellie timoney ellie at fastmail.com
Mon Jul 25 19:54:18 EDT 2016


Hi Jason,

That sounds pretty reasonable, thanks for the patch.  I'll try to get it
tested and merged this week.

Cheers,

ellie

On Tue, Jul 26, 2016, at 06:25 AM, Jason Englander via Info-cyrus wrote:
> If you have a source installed OpenSSL under /usr/local/ssl on a 64-bit 
> system, you probably have /usr/local/ssl/lib64 instead of 
> /usr/local/ssl/lib
> 
> In order for Cyrus IMAP configure to find the libraries, even passing 
> --with-openssl=/usr/local/ssl to configure, you would need to use 
> LDFLAGS=-L/usr/local/ssl/lib64 and also add /usr/local/ssl/lib64 to LIBS 
> in perl/imap/Makefile.PL and perl/sieve/managesieve/Makefile.PL
> 
> I am no autoconf guru by any means, but I made two changes to
> configure.ac 
> that enable (after 'autoreconf -f -i') you to use either 
> --with-ssl=/usr/local/ssl and have that check both lib and lib64 under 
> there, and also if you use --with-ssl with no path, for it to try 
> pkg-config before system defaults (e.g. /usr/include and /usr/lib).
> 
> If you go the pkg-config way, as long as your PKG_CONFIG_PATH variable 
> (possibly set in /etc/profile) includes /usr/local/ssl/lib64/pkgconfig or 
> wherever yours is, it should work.  I believe they added support for it
> to 
> OpenSSL > 0.9.6
> 
> So far only tested on one Slackware Linux machine with source Cyrus IMAP 
> 2.5.9 and source OpenSSL 1.0.2h
> 
> 
> --- configure.ac.orig   2016-07-21 22:01:21.000000000 -0400
> +++ configure.ac        2016-07-25 14:25:55.432452824 -0400
> @@ -984,10 +984,16 @@
>       ;;
>   x|xyes)
>       # default args or --with-openssl
> -    # try to enable, search in default system directories
>       #
> -    ssl_cppflags=
> -    ssl_ldflags=
> +    # Try pkg-config - OpenSSL >= 0.9.6 has openssl.pc
> +    PKG_CHECK_MODULES(OPENSSL, openssl)
> +    ssl_cppflags="$OPENSSL_CFLAGS"
> +    ssl_ldflags="$OPENSSL_LIBS"
> +    if test -n "$ssl_cppflags" -a -n "$ssl_ldflags"; then
> +      with_ssl=yes
> +    fi
> +    #
> +    # If pkg-config doesn't work, search in default system directories
>       ;;
>   *)
>       # --with-openssl=DIR
> @@ -995,7 +1001,11 @@
>       if test -d "$with_ssl"; then
>          ssl_cppflags="-I${with_ssl}/include"
>          ssl_ldflags=
> -       CMU_ADD_LIBPATH_TO(${with_ssl}/lib, ssl_ldflags)
> +       if test -d "${with_ssl}/lib64"; then
> +           CMU_ADD_LIBPATH_TO(${with_ssl}/lib64, ssl_ldflags)
> +       else
> +           CMU_ADD_LIBPATH_TO(${with_ssl}/lib, ssl_ldflags)
> +       fi
>          with_ssl=yes
>       else
>          AC_WARN([Disabling OpenSSL - no include files found])
> 
> 
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


More information about the Info-cyrus mailing list