015-add_with-openssl_option.patch 771 B

12345678910111213141516171819202122232425
  1. --- a/m4/xiph_openssl.m4
  2. +++ b/m4/xiph_openssl.m4
  3. @@ -30,13 +30,15 @@ else
  4. fi
  5. # Now try linking to openssl
  6. -xt_save_CFLAGS="$CFLAGS"
  7. -xt_save_LIBS="$LIBS"
  8. -CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
  9. -LIBS="$OPENSSL_LIBS $LIBS"
  10. -AC_TRY_LINK([#include <openssl/ssl.h>], [void *a = SSL_new], [openssl_ok='yes'])
  11. -CFLAGS="$xt_save_CFLAGS"
  12. -LIBS="$xt_save_LIBS"
  13. +if test "x$openssl_prefix" != "xno"; then
  14. + xt_save_CFLAGS="$CFLAGS"
  15. + xt_save_LIBS="$LIBS"
  16. + CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
  17. + LIBS="$OPENSSL_LIBS $LIBS"
  18. + AC_TRY_LINK([#include <openssl/ssl.h>], [void *a = SSL_new], [openssl_ok='yes'])
  19. + CFLAGS="$xt_save_CFLAGS"
  20. + LIBS="$xt_save_LIBS"
  21. +fi
  22. if test "$openssl_ok" = "yes"; then
  23. AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have libopenssl.])