[Box Backup-dev] RC3 Solaris testing

Martin Ebourne boxbackup-dev@fluffy.co.uk
Mon, 20 Feb 2006 00:55:36 +0000


--=-rsx3TsdjFa3S9/l+oM+r
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sat, 2006-02-18 at 15:19 +0000, Chris Wilson wrote:
> Hi all,
> 
> On Sat, 18 Feb 2006, Chris Wilson wrote:
> 
> > If I export LIBS=-ldl first, then it works.
> 
> Same on sparc-sun-solaris2.9.

Can yourself, Gary, and anyone else having any configure problems with
ssl please try the attached patch.

You'll need to rerun ./bootstrap after applying (need autoconf installed
for this).

Cheers,

Martin.

--=-rsx3TsdjFa3S9/l+oM+r
Content-Description: 
Content-Disposition: inline; filename=box-ssl-conf.patch
Content-Type: text/x-patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

Index: infrastructure/m4/ax_check_ssl.m4
===================================================================
--- infrastructure/m4/ax_check_ssl.m4	(revision 474)
+++ infrastructure/m4/ax_check_ssl.m4	(working copy)
@@ -27,7 +27,13 @@
 
   ax_check_ssl_found=yes
   AC_CHECK_HEADERS([openssl/ssl.h],, [ax_check_ssl_found=no])
-  AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])
+  AC_CHECK_LIB([ssl], [SSL_read], [LIBS="-lssl $LIBS"], [
+    AC_CHECK_LIB([ssl],
+                 [SSL_read],
+		 [LIBS="-lssl -lcrypto -ldl $LIBS"],
+                 [ax_check_ssl_found=no],
+		 [-lcrypto -ldl])
+    ],)
 
   if test "x$ax_check_ssl_found" = "xyes"; then
     AC_DEFINE([HAVE_SSL], 1, [Define to 1 if SSL is available])
Index: configure.ac
===================================================================
--- configure.ac	(revision 474)
+++ configure.ac	(working copy)
@@ -59,9 +59,9 @@
   [old-ssl],
   [AC_HELP_STRING([--enable-old-ssl],
                   [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])])
-AC_CHECK_LIB(
-  [crypto],
-  [EVP_CipherInit_ex],, [
+AC_SEARCH_LIBS(
+  [EVP_CipherInit_ex],
+  [crypto],, [
   if test "x$enable_old_ssl" = "xyes"; then
     AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7])
   else
@@ -179,7 +179,6 @@
   [static-bin],
   [AC_HELP_STRING([--enable-static-bin], [Link binaries with static libraries])])
 if test "x$enable_static_bin" = "xyes"; then
-  AC_CHECK_LIB([ssl],[SSL_read],,, [crypto])
   LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic"
 fi
 

--=-rsx3TsdjFa3S9/l+oM+r--