From: Alan Third <alan@idiocy.org>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Autodetect imagemagick on macOS + Homebrew
Date: Wed, 10 Jan 2018 21:37:50 +0000 [thread overview]
Message-ID: <20180110213750.GA16679@breton.holly.idiocy.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
When imagemagick 6 is installed on macOS using Homebrew it can be a
bit of a faff to get Emacs built with it. The attached patch
automatically adds it to PKG_CONFIG_PATH if Homebrew is detected.
--
Alan Third
[-- Attachment #2: 0001-Allow-configure-to-find-Homebrew-installed-imagemagi.patch --]
[-- Type: text/plain, Size: 1672 bytes --]
From d5d4fdf1478acb87dc046ec367e4f8ad1e095e76 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Tue, 9 Jan 2018 23:47:56 +0000
Subject: [PATCH] Allow configure to find Homebrew installed imagemagick
* configure.ac: Add the imagemagick pkgconfig dir to pkg-config's
search path.
---
configure.ac | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index c574d7dd0d..32ade3e95c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1269,10 +1269,10 @@ AC_DEFUN
# Makeinfo on macOS is ancient, check whether there is a more recent
# version installed by Homebrew.
-AC_CHECK_PROG(HAVE_BREW, [brew], [yes])
-if test -n "$HAVE_BREW"; then
+AC_CHECK_PROGS(BREW, [brew])
+if test -n "$BREW"; then
AC_PATH_PROG([MAKEINFO], [makeinfo], [],
- [`brew --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH])
+ [`$BREW --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH])
fi
## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals.
@@ -2529,6 +2529,12 @@ AC_DEFUN
HAVE_IMAGEMAGICK=no
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then
if test "${with_imagemagick}" != "no"; then
+ if test -n "$BREW"; then
+ # Homebrew doesn't link ImageMagick 6 by default, so make sure
+ # pkgconfig can find it.
+ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix imagemagick@6 2>/dev/null`/lib/pkgconfig"
+ fi
+
## 6.3.5 is the earliest version known to work; see Bug#17339.
## 6.8.2 makes Emacs crash; see Bug#13867.
## 7 and later have not been ported to; See Bug#25967.
--
2.14.3
next reply other threads:[~2018-01-10 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 21:37 Alan Third [this message]
2018-01-15 19:42 ` Autodetect imagemagick on macOS + Homebrew Charles A. Roelli
2018-01-15 23:09 ` Alan Third
2018-01-28 18:35 ` Philipp Stephani
2018-01-28 23:50 ` Alan Third
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180110213750.GA16679@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.