conf 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright (C) Igor Sysoev
  2. if [ $OPENSSL != NONE ]; then
  3. case "$CC" in
  4. cl | bcc32)
  5. have=NGX_OPENSSL . auto/have
  6. have=NGX_SSL . auto/have
  7. CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
  8. CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
  9. CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
  10. CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/ssleay32.lib"
  11. CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libeay32.lib"
  12. # libeay32.lib requires gdi32.lib
  13. CORE_LIBS="$CORE_LIBS gdi32.lib"
  14. # OpenSSL 1.0.0 requires crypt32.lib
  15. CORE_LIBS="$CORE_LIBS crypt32.lib"
  16. ;;
  17. *)
  18. have=NGX_OPENSSL . auto/have
  19. have=NGX_SSL . auto/have
  20. CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
  21. CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
  22. CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
  23. CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
  24. CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
  25. ;;
  26. esac
  27. else
  28. case "$NGX_PLATFORM" in
  29. win32)
  30. have=NGX_OPENSSL . auto/have
  31. have=NGX_SSL . auto/have
  32. OPENSSL=YES
  33. CORE_INCS="$CORE_INCS c:/openssl/include"
  34. CORE_LIBS="$CORE_LIBS c:/openssl/ssleay32.lib"
  35. CORE_LIBS="$CORE_LIBS c:/openssl/libeay32.lib"
  36. # libeay32.lib requires gdi32.lib
  37. CORE_LIBS="$CORE_LIBS gdi32.lib"
  38. ;;
  39. *)
  40. OPENSSL=NO
  41. ngx_feature="OpenSSL library"
  42. ngx_feature_name="NGX_OPENSSL"
  43. ngx_feature_run=no
  44. ngx_feature_incs="#include <openssl/ssl.h>"
  45. ngx_feature_path=
  46. ngx_feature_libs="-lssl -lcrypto"
  47. ngx_feature_test="SSL_library_init()"
  48. . auto/feature
  49. if [ $ngx_found = yes ]; then
  50. have=NGX_SSL . auto/have
  51. CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
  52. OPENSSL=YES
  53. else
  54. cat << END
  55. $0: error: SSL modules require the OpenSSL library.
  56. You can either do not enable the modules, or install the OpenSSL library
  57. into the system, or build the OpenSSL library statically from the source
  58. with nginx by using --with-openssl=<path> option.
  59. END
  60. exit 1
  61. fi
  62. ;;
  63. esac
  64. fi