diff options
author | Martin Willi <martin@revosec.ch> | 2013-10-25 17:28:13 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-06-04 15:53:02 +0200 |
commit | b7a4d44bd035eea462b264482a8871a0e26e16ec (patch) | |
tree | 0ae5e83a4b25903d64afe3ae72f2a21300063998 | |
parent | f3c809e615f0e8eb476efcc85a3c8cf2cbe3f7c3 (diff) | |
download | strongswan-b7a4d44bd035eea462b264482a8871a0e26e16ec.tar.bz2 strongswan-b7a4d44bd035eea462b264482a8871a0e26e16ec.tar.xz |
openssl: Check and link against libeay32 instead of libcrypto on Windows
Most Windows OpenSSL builds come with the crypto library named libeay32.
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | src/libstrongswan/plugins/openssl/Makefile.am | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 754b49281..803c7258d 100644 --- a/configure.ac +++ b/configure.ac @@ -733,9 +733,18 @@ AC_COMPILE_IFELSE( # error WIN32 undefined #endif ]])], - [AC_MSG_RESULT([yes]); windows=true ], - [AC_MSG_RESULT([no]); AC_SUBST(PLUGIN_CFLAGS, [-rdynamic])] + [ + AC_MSG_RESULT([yes]) + windows=true + openssl_lib=eay32 + ], + [ + AC_MSG_RESULT([no]) + openssl_lib=crypto + AC_SUBST(PLUGIN_CFLAGS, [-rdynamic]) + ] ) +AC_SUBST(OPENSSL_LIB, [-l$openssl_lib]) AM_CONDITIONAL(USE_WINDOWS, [test "x$windows" = xtrue]) if test x$printf_hooks = xvstr; then @@ -918,7 +927,7 @@ if test x$sqlite = xtrue; then fi if test x$openssl = xtrue; then - AC_CHECK_LIB([crypto],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL crypto library not found])],[]) + AC_CHECK_LIB([$openssl_lib],[main],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL lib$openssl_lib not found])],[]) AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])]) fi diff --git a/src/libstrongswan/plugins/openssl/Makefile.am b/src/libstrongswan/plugins/openssl/Makefile.am index a7ffefd82..9287f788a 100644 --- a/src/libstrongswan/plugins/openssl/Makefile.am +++ b/src/libstrongswan/plugins/openssl/Makefile.am @@ -32,4 +32,4 @@ libstrongswan_openssl_la_SOURCES = \ openssl_gcm.c openssl_gcm.h libstrongswan_openssl_la_LDFLAGS = -module -avoid-version -libstrongswan_openssl_la_LIBADD = -lcrypto +libstrongswan_openssl_la_LIBADD = $(OPENSSL_LIB) |