100-add_with-openssl_option.patch 813 B

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