summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2021-08-17 20:38:55 +0100
committerAlan Third <alan@idiocy.org>2021-08-21 13:12:56 +0100
commit5eab7c3f70a048dab708512e8ef8114fbe85992e (patch)
treecb4323d54f0f8fae5ba01b5032a9c6e75987e57b /configure.ac
parentf4159568a1682fe8a659bf68614a31406ffe1817 (diff)
downloademacs-5eab7c3f70a048dab708512e8ef8114fbe85992e.tar.gz
* configure.ac: Make homebrew check for libgccjit match macports.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index eff55915436..76f608ffb06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3822,12 +3822,13 @@ if test "${with_native_compilation}" != "no"; then
# Ensure libgccjit installed by Homebrew can be found.
if test -n "$BREW"; then
- BREW_LIBGCCJIT_PREFIX=`$BREW --prefix --installed libgccjit 2>/dev/null`
- if test "$BREW_LIBGCCJIT_PREFIX"; then
- brew_libdir=`find ${BREW_LIBGCCJIT_PREFIX}/ -name \*.so \
- | sed -e '1!d;s|/[[^/]]*\.so$||'`
- CFLAGS="$CFLAGS -I${BREW_LIBGCCJIT_PREFIX}/include"
- LDFLAGS="$LDFLAGS -L${brew_libdir} -I${BREW_LIBGCCJIT_PREFIX}/include"
+ if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then
+ BREW_LIBGCCJIT_INCLUDE=$(dirname $($BREW ls -v libgccjit | \
+ grep libgccjit.h))
+ BREW_LIBGCCJIT_LIB=$(dirname $($BREW ls -v libgccjit| \
+ grep libgccjit.so\$))
+ CFLAGS="$CFLAGS -I${BREW_LIBGCCJIT_INCLUDE}"
+ LDFLAGS="$LDFLAGS -L${BREW_LIBGCCJIT_LIB}"
fi
fi