From 28a7b900273a2bc3dc87e535ac2e414dd182ab85 Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 24 Jul 2026 17:05:00 +0700 Subject: [PATCH] take PHP_CONFIG env var into account for go.sh --- go.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/go.sh b/go.sh index a1172206aa..d468e43aff 100755 --- a/go.sh +++ b/go.sh @@ -1,7 +1,9 @@ #!/bin/sh # Runs the go command with the proper Go and cgo flags. +PHP_CONFIG=${PHP_CONFIG:-php-config} + GOFLAGS="$GOFLAGS -tags=nobadger,nomysql,nopgx" \ - CGO_CFLAGS="$CGO_CFLAGS $(php-config --includes) $(sh "$(dirname "$0")/mtls-cflags.sh")" \ - CGO_LDFLAGS="$CGO_LDFLAGS $(php-config --ldflags) $(php-config --libs)" \ + CGO_CFLAGS="$CGO_CFLAGS $(${PHP_CONFIG} --includes) $(sh "$(dirname "$0")/mtls-cflags.sh")" \ + CGO_LDFLAGS="$CGO_LDFLAGS $(${PHP_CONFIG} --ldflags) $(${PHP_CONFIG} --libs)" \ go "$@"