Skip to content

Commit

Permalink
Configure: added support for Homebrew on Apple Silicon.
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora committed Feb 26, 2024
1 parent 6b1bb99 commit 2deded3
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 0 deletions.
17 changes: 17 additions & 0 deletions auto/lib/geoip/conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="GeoIP library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lGeoIP"
else
ngx_feature_libs="-L/opt/homebrew/lib -lGeoIP"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then

CORE_INCS="$CORE_INCS $ngx_feature_path"
Expand Down
16 changes: 16 additions & 0 deletions auto/lib/google-perftools/conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="Google perftools in /opt/homebrew/"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lprofiler"
else
ngx_feature_libs="-L/opt/homebrew/lib -lprofiler"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"

Expand Down
17 changes: 17 additions & 0 deletions auto/lib/libgd/conf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ if [ $ngx_found = no ]; then
fi


if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="GD library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lgd"
else
ngx_feature_libs="-L/opt/homebrew/lib -lgd"
fi

. auto/feature
fi


if [ $ngx_found = yes ]; then

CORE_INCS="$CORE_INCS $ngx_feature_path"
Expand Down
18 changes: 18 additions & 0 deletions auto/lib/openssl/conf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,24 @@ else
. auto/feature
fi

if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="OpenSSL library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lssl -lcrypto"
else
ngx_feature_libs="-L/opt/homebrew/lib -lssl -lcrypto"
fi

ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"

. auto/feature
fi

if [ $ngx_found = yes ]; then
have=NGX_SSL . auto/have
CORE_INCS="$CORE_INCS $ngx_feature_path"
Expand Down
16 changes: 16 additions & 0 deletions auto/lib/pcre/conf
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,22 @@ else
. auto/feature
fi

if [ $ngx_found = no ]; then

# Homebrew on Apple Silicon

ngx_feature="PCRE library in /opt/homebrew/"
ngx_feature_path="/opt/homebrew/include"

if [ $NGX_RPATH = YES ]; then
ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lpcre"
else
ngx_feature_libs="-L/opt/homebrew/lib -lpcre"
fi

. auto/feature
fi

if [ $ngx_found = yes ]; then
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
Expand Down

0 comments on commit 2deded3

Please sign in to comment.