[PECL-CVS] [pecl-networking-gearman] fix-homebrew-apple-silicon-search-path: detect homebrew prefix
[email protected] (Rasmus Lerdorf) Sat, 4 Apr 2026 18:08:58 +0000
| Newsgroups | php.pecl.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Rasmus Lerdorf (rlerdorf)
Date: 2026-04-04T14:08:50-04:00
Commit: https://github.com/php/pecl-networking-gearman/commit/2ad69a6afeb199d8cfe5986ad1ab17eaf3c4879e
Raw diff: https://github.com/php/pecl-networking-gearman/commit/2ad69a6afeb199d8cfe5986ad1ab17eaf3c4879e.diff
detect homebrew prefix
Changed paths:
M config.m4
Diff:
diff --git a/config.m4 b/config.m4
index bfaa79d..5f427c7 100644
--- a/config.m4
+++ b/config.m4
@@ -13,7 +13,11 @@ PHP_ARG_WITH(gearman, whether to enable gearman support,
[[ --with-gearman[=PATH] Include gearman support]])
if test "$PHP_GEARMAN" != "no"; then
- for i in $PHP_GEARMAN /usr/local /usr /opt/local /opt/homebrew/opt/gearman; do
+ HOMEBREW_PREFIX=""
+ if command -v brew >/dev/null 2>&1; then
+ HOMEBREW_PREFIX=$(brew --prefix gearman 2>/dev/null)
+ fi
+ for i in $PHP_GEARMAN /usr/local /usr /opt/local $HOMEBREW_PREFIX; do
if test -r $i/include/libgearman-1.0/gearman.h; then
GEARMAN_LIB_DIR=$i/$PHP_LIBDIR
GEARMAN_INC_DIR=$i/include