I am compiling Emacs from source and can't figure out what libraries I need to enable imagemagick and m17n. I have imagemagick and libm17n-dev installed (I am on Debian).

My ./configure script says:

  Does Emacs use imagemagick?                             no
  Does Emacs use -lm17n-flt?                              no
  • We need more information. You should look at the config.log file that contains details and results about the tests that the configure script ran. Search for imagemagick and m17n-flt. Post details on the failing tests or the cut out sections of the log.
    – dfeich
    Oct 26, 2014 at 10:20
  • I have installed libmagickcore-dev and libmagick++-dev, and now configure finds imagemagick. Still no luck with m17n-flt (no such package on debian). Oct 26, 2014 at 15:01
  • 1
    What Debian version are you on? m17n-flt is part of libm17n and the headers are included in libm17n-dev.
    – user2005
    Oct 30, 2014 at 9:15
  • 4
    The safest procedure to solve dependency issues when compiling from source (including Git) is to run apt-get build-dep emacs24, or if you're using Wheezy, apt-get build-dep emacs23. That should install all dependency packages and solve the issue. If you're planning to compile Emacs 24.4 or higher, check that the libacl1-dev package has been installed, otherwise you'll need to install it manually.
    – undostres
    Nov 18, 2014 at 17:57

3 Answers 3


After crawling the configure script, I think I have found your missing packet: libmagickwand-dev. On my machine, after installing this packet, ./configure finally says:

  Does Emacs use imagemagick?                             yes

NB1: as with other features (eg libxml2-dev for eww), I do not get the purpose of --with-feature:

  • If the libraries and development headers are on your system, configure will enable the feature even if you do not explicitly ask --with-feature;
  • If the libraries and development headers are not on your system, configure will ignore --with-feature and exit with status 0.

NB2: This has been tested on Ubuntu 14.04; libmagickwand-dev seems to exist in Debian too.

NB3: A general "methodology" to figure out the necessary packages from the configure script:

  • search configure for "imagemagick"
  • find these snippets:

    IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
    if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE"...
  • apt-cache search Wand

    • libmagickwand-dev - image manipulation library - development files

To avoid having to track down the packages that are required to build Emacs, use apt-get to install them for you.

apt-get build-dep emacs

Actually this may not be enough, as this just installs the libraries the Debian maintainer has chosen to link Emacs against. I think you need:

apt-get install libm17n-dev libmagickcore-dev

However after this I still got use -lm17n-flt? no even when I explicitly used --with-m17n-flt. And I did not actually install libmagickcore-dev` because it resulted in a conflict.

  • This just turns a comment from above into an answer.
    – tarsius
    Jan 18, 2015 at 13:09

As the existing answer leaves out how to compile with m17n support, I add this to answer that. In my system m17n is not used and otf is also not used. To build with m17n support, install libraries needed for m17n and also for otf. Then Emacs will be compiled with both of them.

I don't know why compiling with m17n requires otf but this works :)

  • 1
    What libraries are needed for m17n and otf?
    – Caleb Jay
    Jan 21, 2022 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.