]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac: Make homebrew check for libgccjit match macports.
authorAlan Third <alan@idiocy.org>
Tue, 17 Aug 2021 19:38:55 +0000 (20:38 +0100)
committerAlan Third <alan@idiocy.org>
Sat, 21 Aug 2021 12:12:56 +0000 (13:12 +0100)
configure.ac

index eff55915436348e0833d998a891a68fef81e1c11..76f608ffb0681cbfd4be2a70fe48d63032f08491 100644 (file)
@@ -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