check_darwin_paths.m4 518 B

123456789101112131415161718192021222324
  1. # CHECK_DARWIN_PATHS
  2. # -------------------
  3. AC_DEFUN([CHECK_DARWIN_PATHS],
  4. [AC_REQUIRE([AC_CANONICAL_TARGET])
  5. case $target_os in
  6. *darwin*)
  7. # Get the homebrew directory, which varies based on arch.
  8. case "$(uname -m)" in
  9. arm64)
  10. homebrew_dir=/opt/homebrew
  11. ;;
  12. *)
  13. homebrew_dir=/usr/local
  14. ;;
  15. esac
  16. # Use the homebrew directory to specify the paths to openssl.
  17. CPPFLAGS="${CPPFLAGS} -I${homebrew_dir}/opt/openssl/include"
  18. LDFLAGS="${LDFLAGS} -L${homebrew_dir}/opt/openssl/lib"
  19. ;;
  20. esac
  21. ])# CHECK_DARWIN_PATHS