You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.8 KiB

  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -31,8 +31,6 @@ AC_CHECK_LIB([pthread], [pthread_create]
  4. # with it, but don't consider it an error.
  5. # PKG_CHECK_MODULES only validates that pkg-config returns stuff; it doesn't
  6. # validate that these are correct, so check lib to make sure they're right.
  7. -PKG_CHECK_MODULES([gnutls], [gnutls],,
  8. - [AC_MSG_WARN([No pkg-config for libgnutls])])
  9. PKG_CHECK_MODULES([ao], [ao],,
  10. [AC_MSG_WARN([No pkg-config for libao])])
  11. PKG_CHECK_MODULES([mad], [mad],,
  12. @@ -42,12 +40,28 @@ PKG_CHECK_MODULES([json], [json-c],,
  13. [PKG_CHECK_MODULES([json], [json0],,
  14. [AC_MSG_WARN([No pkg-config for json-c (aka libjson0, libjson)])])])])
  15. +
  16. # Network communication stuff:
  17. AC_CHECK_LIB([gcrypt], [gcry_cipher_open],,
  18. [AC_MSG_ERROR([Cannot find required library: libgcrypt],1)])
  19. -AC_CHECK_LIB([gnutls], [gnutls_record_recv],,
  20. +# Check for SSL option
  21. +AC_ARG_WITH(polarssl, [ --with-polarssl Build waitress with PolarSSL (default GNUTLS)], [
  22. + AC_MSG_RESULT(>>Using PolarSSL)
  23. + HAS_POLARSSL=1
  24. + AC_DEFINE([USE_POLARSSL], 1, [Build for PolarSSL])
  25. + PKG_CHECK_MODULES([polarssl], [polarssl],,
  26. + [AC_MSG_WARN([No pkg-config for libpolarssl])])
  27. + AC_CHECK_LIB([polarssl], [ssl_set_session],,
  28. + [AC_MSG_ERROR([Cannot find required library: libpolarssl (aka polarssl)],1)])] )
  29. +AM_CONDITIONAL([USE_POLARSSL],[test "x$HAS_POLARSSL" = "x1"])
  30. +
  31. +if test "x$HAS_POLARSSL" != x1 ; then
  32. + PKG_CHECK_MODULES([gnutls], [gnutls],,
  33. + [AC_MSG_WARN([No pkg-config for libgnutls])])
  34. + AC_CHECK_LIB([gnutls], [gnutls_record_recv],,
  35. [AC_MSG_ERROR([Cannot find required library: libgnutls (aka gnutls)],1)])
  36. -AC_CHECK_FUNCS(gnutls_transport_set_int2 gnutls_sec_param_to_pk_bits)
  37. + AC_CHECK_FUNCS(gnutls_transport_set_int2 gnutls_sec_param_to_pk_bits)
  38. +fi
  39. # Bloody json library may be linked via -ljson, or -ljson-c depending on
  40. # the platform. Try both.