Update compiler flags for homebrew packages on Apple silicon

Add /opt/homebrew/{include,lib} flags for apple silicon macs, which are not included as default search paths by Clang/GCC. (Homebrew uses /usr/local/{include,lib} on intel macs)
This commit is contained in:
Michael
2025-10-25 13:42:27 +01:00
parent 58d130a0a9
commit 34e8b1b2f0

View File

@@ -39,7 +39,11 @@ AC_DEFINE_UNQUOTED([PACKAGE_STATUS], ["$PACKAGE_STATUS"], [Status of this build]
AS_IF([test "x$PLATFORM" = xcygwin],
[AC_DEFINE([PLATFORM_CYGWIN], [1], [Cygwin])])
AS_IF([test "x$PLATFORM" = xosx],
[AC_DEFINE([PLATFORM_OSX], [1], [OSx])])
[AC_DEFINE([PLATFORM_OSX], [1], [OSx])
# Apple silicon homebrew flags
AC_CHECK_FILE([/opt/homebrew/include],
[AM_CFLAGS="$AM_CFLAGS -I/opt/homebrew/include"
AM_LDFLAGS="$AM_LDFLAGS -L/opt/homebrew/lib"])])
## Environment variables
AC_ARG_VAR([PYTHON_FRAMEWORK], [Set base directory for Python Framework])