conf 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. if [ $SHA1 != NONE ]; then
  4. have=NGX_HAVE_SHA1 . auto/have
  5. CORE_INCS="$CORE_INCS $SHA1"
  6. case "$NGX_CC_NAME" in
  7. msvc | owc | bcc)
  8. LINK_DEPS="$LINK_DEPS $SHA1/sha1.lib"
  9. CORE_LIBS="$CORE_LIBS $SHA1/sha1.lib"
  10. ;;
  11. icc)
  12. LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
  13. # to allow -ipo optimization we link with the *.o but not library
  14. CORE_LIBS="$CORE_LIBS $SHA1/sha1_dgst.o"
  15. if [ $SHA1_ASM = YES ]; then
  16. CORE_LIBS="$CORE_LIBS $SHA1/asm/sx86-elf.o"
  17. fi
  18. ;;
  19. *)
  20. LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
  21. CORE_LIBS="$CORE_LIBS $SHA1/libsha.a"
  22. #CORE_LIBS="$CORE_LIBS -L $SHA1 -lsha"
  23. ;;
  24. esac
  25. else
  26. if [ "$NGX_PLATFORM" != win32 ]; then
  27. SHA1=NO
  28. # FreeBSD
  29. ngx_feature="sha1 in system md library"
  30. ngx_feature_name=NGX_HAVE_SHA1
  31. ngx_feature_run=no
  32. ngx_feature_incs="#include <sha.h>"
  33. ngx_feature_path=
  34. ngx_feature_libs="-lmd"
  35. ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)"
  36. . auto/feature
  37. ngx_sha1_lib="system md"
  38. if [ $ngx_found = no ]; then
  39. # OpenSSL crypto library
  40. ngx_feature="sha1 in system OpenSSL crypto library"
  41. ngx_feature_incs="#include <openssl/sha.h>"
  42. ngx_feature_libs="-lcrypto"
  43. . auto/feature
  44. ngx_sha1_lib="system crypto"
  45. if [ $ngx_found = yes ]; then
  46. have=NGX_HAVE_OPENSSL_SHA1_H . auto/have
  47. fi
  48. fi
  49. if [ $ngx_found = yes ]; then
  50. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  51. SHA1=YES
  52. SHA1_LIB=$ngx_sha1_lib
  53. fi
  54. fi
  55. fi