]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix install with NS app bundle
authorAlan Third <alan@idiocy.org>
Fri, 2 Apr 2021 17:06:59 +0000 (18:06 +0100)
committerAlan Third <alan@idiocy.org>
Wed, 7 Apr 2021 08:06:00 +0000 (09:06 +0100)
* configure.ac: Set up CFLAGS and LDFLAGS to find a Homebrew
installation of libgccjit.
* Makefile.in (ELN_DESTDIR): Set to the app bundle resource dir when
required.
(install-eln): macOS install doesn't support the -D flag, so make the
directories separately.

Makefile.in
configure.ac

index e318db746d6496c01c33f956a875827c0088c138..efe89b9b93ea37261ebb7f506135f4e81a7d0f64 100644 (file)
@@ -323,10 +323,11 @@ COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
 
 ifeq (${ns_self_contained},no)
 BIN_DESTDIR='$(DESTDIR)${bindir}/'
+ELN_DESTDIR = $(DESTDIR)${libdir}/emacs/${version}/
 else
 BIN_DESTDIR='${ns_appbindir}/'
+ELN_DESTDIR = ${ns_appresdir}/
 endif
-ELN_DESTDIR = $(DESTDIR)${libdir}/emacs/${version}/
 
 all: ${SUBDIR} info
 
@@ -752,7 +753,8 @@ install-etc:
 ### Install native compiled Lisp files.
 install-eln:
 ifeq ($(HAVE_NATIVE_COMP),yes)
-       find native-lisp -type f -exec ${INSTALL_DATA} -D "{}" "$(ELN_DESTDIR){}" \;
+       find native-lisp -type d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \
+       find native-lisp -type f -exec ${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}" \;
 endif
 
 ### Build Emacs and install it, stripping binaries while installing them.
index 4284c99714152352d407f4d96699ba0484386a96..698e8affb51c1cef2a62017abaaa4723b7f6779d 100644 (file)
@@ -3801,6 +3801,16 @@ if test "${with_native_compilation}" != "no"; then
     if test "${HAVE_ZLIB}" = no; then
        AC_MSG_ERROR(['--with-nativecomp' requires zlib])
     fi
+
+    # 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
+        CFLAGS="$CFLAGS -I${BREW_LIBGCCJIT_PREFIX}/include"
+        LDFLAGS="$LDFLAGS -L${BREW_LIBGCCJIT_PREFIX}/lib/gcc/10 -I${BREW_LIBGCCJIT_PREFIX}/include"
+      fi
+    fi
+
     # Check if libgccjit is available.
     AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, [], [libgccjit_not_found])
     AC_CHECK_HEADERS(libgccjit.h, [], [libgccjit_dev_not_found])