conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. ngx_feature="Google perftools"
  4. ngx_feature_name=
  5. ngx_feature_run=no
  6. ngx_feature_incs=
  7. ngx_feature_path=
  8. ngx_feature_libs="-lprofiler"
  9. ngx_feature_test="void ProfilerStop(void);
  10. ProfilerStop()"
  11. . auto/feature
  12. if [ $ngx_found = no ]; then
  13. # FreeBSD port
  14. ngx_feature="Google perftools in /usr/local/"
  15. if [ $NGX_RPATH = YES ]; then
  16. ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lprofiler"
  17. else
  18. ngx_feature_libs="-L/usr/local/lib -lprofiler"
  19. fi
  20. . auto/feature
  21. fi
  22. if [ $ngx_found = no ]; then
  23. # MacPorts
  24. ngx_feature="Google perftools in /opt/local/"
  25. if [ $NGX_RPATH = YES ]; then
  26. ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lprofiler"
  27. else
  28. ngx_feature_libs="-L/opt/local/lib -lprofiler"
  29. fi
  30. . auto/feature
  31. fi
  32. if [ $ngx_found = no ]; then
  33. # Homebrew on Apple Silicon
  34. ngx_feature="Google perftools in /opt/homebrew/"
  35. if [ $NGX_RPATH = YES ]; then
  36. ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lprofiler"
  37. else
  38. ngx_feature_libs="-L/opt/homebrew/lib -lprofiler"
  39. fi
  40. . auto/feature
  41. fi
  42. if [ $ngx_found = yes ]; then
  43. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  44. else
  45. cat << END
  46. $0: error: the Google perftools module requires the Google perftools
  47. library. You can either do not enable the module or install the library.
  48. END
  49. exit 1
  50. fi