Discussion:
[Libstoragemgmt-devel] [PATCH] configure.ac: Correct lib for openssl MD5
Tony Asleson
2014-04-18 20:42:20 UTC
Permalink
-We failed to build on F20 because the MD5 functions are
located in libcrypto, not ssl. Using libssl worked on
EL6. This new way works for both.

Signed-off-by: Tony Asleson <***@redhat.com>
---
configure.ac | 3 ++-
plugin/Makefile.am | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1211794..420fed5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,8 @@ dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([dlfcn.h])

#Check for openssl development libs, we are using in simc_lsmplugin
-AC_CHECK_LIB([ssl], [SSL_library_init], [], AC_MSG_ERROR([Missing openssl libraries]))
+AC_CHECK_LIB([crypto], [MD5_Final], [SSL_LIBS=-lcrypto], AC_MSG_ERROR([Missing openssl-devel libraries]))
+AC_SUBST([SSL_LIBS])

#Check for json parser yajl
AC_CHECK_HEADERS([yajl/yajl_gen.h yajl/yajl_parse.h], [] , AC_MSG_ERROR([Missing yajl development headers]) )
diff --git a/plugin/Makefile.am b/plugin/Makefile.am
index a0b200d..989c641 100644
--- a/plugin/Makefile.am
+++ b/plugin/Makefile.am
@@ -3,6 +3,6 @@ AM_CPPFLAGS= -I$(top_srcdir)/include -***@srcdir@/include \

bin_PROGRAMS = simc_lsmplugin

-simc_lsmplugin_LDADD= ../src/libstoragemgmt.la $(LIBGLIB_LIBS) $(LIBSSL_LIBS)
+simc_lsmplugin_LDADD= ../src/libstoragemgmt.la $(LIBGLIB_LIBS) $(SSL_LIBS)
simc_lsmplugin_SOURCES= \
simc_lsmplugin.c
--
1.8.2.1
Gris Ge
2014-04-21 08:19:25 UTC
Permalink
Post by Tony Asleson
-We failed to build on F20 because the MD5 functions are
located in libcrypto, not ssl. Using libssl worked on
EL6. This new way works for both.
Tested on EL7. Please commit when you have time.

Thanks.
--
Gris Ge
Tony Asleson
2014-04-21 14:58:58 UTC
Permalink
Post by Gris Ge
Post by Tony Asleson
-We failed to build on F20 because the MD5 functions are
located in libcrypto, not ssl. Using libssl worked on
EL6. This new way works for both.
Tested on EL7. Please commit when you have time.
Committed, thanks for the test!

-Tony

Loading...