Skip to content

Commit 34e8b1b

Browse files
committed
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)
1 parent 58d130a commit 34e8b1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ AC_DEFINE_UNQUOTED([PACKAGE_STATUS], ["$PACKAGE_STATUS"], [Status of this build]
3939
AS_IF([test "x$PLATFORM" = xcygwin],
4040
[AC_DEFINE([PLATFORM_CYGWIN], [1], [Cygwin])])
4141
AS_IF([test "x$PLATFORM" = xosx],
42-
[AC_DEFINE([PLATFORM_OSX], [1], [OSx])])
42+
[AC_DEFINE([PLATFORM_OSX], [1], [OSx])
43+
# Apple silicon homebrew flags
44+
AC_CHECK_FILE([/opt/homebrew/include],
45+
[AM_CFLAGS="$AM_CFLAGS -I/opt/homebrew/include"
46+
AM_LDFLAGS="$AM_LDFLAGS -L/opt/homebrew/lib"])])
4347

4448
## Environment variables
4549
AC_ARG_VAR([PYTHON_FRAMEWORK], [Set base directory for Python Framework])

0 commit comments

Comments
 (0)