[Icecast-dev] [PATCH] add with-openssl option

Rosen Penev rosenp at gmail.com
Mon Oct 5 22:42:56 UTC 2020


Useful for embedded systems.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 m4/xiph_openssl.m4 | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/m4/xiph_openssl.m4 b/m4/xiph_openssl.m4
index f62a524..52308ec 100644
--- a/m4/xiph_openssl.m4
+++ b/m4/xiph_openssl.m4
@@ -29,14 +29,16 @@ else
     fi
 fi
 
-# Now try linking to openssl
-xt_save_CFLAGS="$CFLAGS"
-xt_save_LIBS="$LIBS"
-CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
-LIBS="$OPENSSL_LIBS $LIBS"
-AC_TRY_LINK([#include <openssl/ssl.h>], [void *a = SSL_new], [openssl_ok='yes'])
-CFLAGS="$xt_save_CFLAGS"
-LIBS="$xt_save_LIBS"
+if test "x$openssl_prefix" != "xno"; then
+    # Now try linking to openssl
+    xt_save_CFLAGS="$CFLAGS"
+    xt_save_LIBS="$LIBS"
+    CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+    LIBS="$OPENSSL_LIBS $LIBS"
+    AC_TRY_LINK([#include <openssl/ssl.h>], [void *a = SSL_new], [openssl_ok='yes'])
+    CFLAGS="$xt_save_CFLAGS"
+    LIBS="$xt_save_LIBS"
+fi
 
 if test "$openssl_ok" = "yes"; then
     AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.])
-- 
2.26.2



More information about the Icecast-dev mailing list