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.

89 lines
2.7 KiB

  1. From 233a218ab3cf449a0667438cf0b1830eeb33471b Mon Sep 17 00:00:00 2001
  2. From: Glenn Strauss <gstrauss@gluelogic.com>
  3. Date: Thu, 3 Dec 2020 17:16:52 -0500
  4. Subject: [PATCH] [build] fix meson.build when building all TLS mods
  5. x-ref:
  6. "[lighttpd] -mod-openssl fails"
  7. https://github.com/openwrt/packages/issues/14121
  8. "[lighttpd] -mod-wolfssl fails"
  9. https://github.com/openwrt/packages/issues/14122
  10. Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
  11. ---
  12. src/meson.build | 20 +++++++++++++-------
  13. 1 file changed, 13 insertions(+), 7 deletions(-)
  14. diff --git a/src/meson.build b/src/meson.build
  15. index 71e4ec90..2d6ee2df 100644
  16. --- a/src/meson.build
  17. +++ b/src/meson.build
  18. @@ -432,15 +432,20 @@ if get_option('with_mysql')
  19. endif
  20. libssl = []
  21. -libx509 = []
  22. libcrypto = []
  23. +libsslcrypto = []
  24. libgnutls = []
  25. +libmbedtls = []
  26. +libmbedcrypto = []
  27. +libmbedx509 = []
  28. +libwolfssl = []
  29. if get_option('with_openssl')
  30. # manual search:
  31. # header: openssl/ssl.h
  32. # function: SSL_new (-lssl)
  33. # function: BIO_f_base64 (-lcrypto)
  34. libssl = [ dependency('libssl') ]
  35. + libsslcrypto = [ dependency('libcrypto') ]
  36. libcrypto = [ dependency('libcrypto') ]
  37. conf_data.set('HAVE_OPENSSL_SSL_H', true)
  38. conf_data.set('HAVE_LIBSSL', true)
  39. @@ -449,7 +454,7 @@ if get_option('with_wolfssl')
  40. # manual search:
  41. # header: wolfssl/ssl.h
  42. # function: wolfSSL_Init (-lwolfssl)
  43. - libssl = [ dependency('wolfssl') ]
  44. + libwolfssl = [ dependency('wolfssl') ]
  45. libcrypto = [ dependency('wolfssl') ]
  46. conf_data.set('HAVE_WOLFSSL_SSL_H', true)
  47. endif
  48. @@ -459,8 +464,9 @@ if get_option('with_mbedtls')
  49. # function: mbedtls_cipher_info_from_type (-lmbedtls)
  50. # function: mbedtls_x509_get_name (-lmbedx509)
  51. # function: mbedtls_base64_encode (-lmbedcrypto)
  52. - libssl = [ compiler.find_library('mbedtls') ]
  53. - libx509 = [ compiler.find_library('mbedx509') ]
  54. + libmbedtls = [ compiler.find_library('mbedtls') ]
  55. + libmbedx509 = [ compiler.find_library('mbedx509') ]
  56. + libmbedcrypto = [ compiler.find_library('mbedcrypto') ]
  57. libcrypto = [ compiler.find_library('mbedcrypto') ]
  58. conf_data.set('HAVE_LIBMBEDCRYPTO', true)
  59. endif
  60. @@ -1070,19 +1076,19 @@ endif
  61. if get_option('with_openssl')
  62. modules += [
  63. - [ 'mod_openssl', [ 'mod_openssl.c' ], libssl + libcrypto ],
  64. + [ 'mod_openssl', [ 'mod_openssl.c' ], libssl + libsslcrypto ],
  65. ]
  66. endif
  67. if get_option('with_wolfssl')
  68. modules += [
  69. - [ 'mod_wolfssl', [ 'mod_wolfssl.c' ], libcrypto ],
  70. + [ 'mod_wolfssl', [ 'mod_wolfssl.c' ], libwolfssl ],
  71. ]
  72. endif
  73. if get_option('with_mbedtls')
  74. modules += [
  75. - [ 'mod_mbedtls', [ 'mod_mbedtls.c' ], libssl + libx509 + libcrypto ],
  76. + [ 'mod_mbedtls', [ 'mod_mbedtls.c' ], libmbedtls + libmbedx509 + libmbedcrypto ],
  77. ]
  78. endif
  79. --
  80. 2.28.0