Closed glanham-jr closed 2 years ago
Most of these features are actually enabled by default by Emacs' configure script without having to pass in the relevant --with-*
flag, as long as the required libraries are found on your system. That's why there's a Brewfile
included with the build script so you can easily install most of those libraries with brew bundle
.
You can verify what features are enabled/disabled at the end of the configure script's output. For example, here's the configure output from the most recent nightly build on my emacs-builds project:
Native compilation is one feature that is not on by default yet, hence that it specifically enabled.
The --with-json
option is enabled by default in the configure script if libjansson is available, which is should be if you've run brew bundle
.
Imagemagick was turned off by default as of Emacs 27.1 from what I recall, due to security concerns, and the fact that image display/manipulation was supported using native system APIs on all supported platforms. And on macOS specifically native image APIs are used to display various image formats, so there's no need for libpng and such.
Cairo and Harfbuzz aren't supported on macOS last I checked. Emacs-plus had a patch which made them work for a short period of time, but then removed cause the default renderer on macOS already supports ligatures and stuff from what I gathered.
It's very possible that I'm missing one or two things from the Brewfile
though,
as it has been some time since I paid any attention to the --with-*
/--without-*
options available in the configure script. So I'll double check them again this weekend :)
TL;DR: I'm not sure we need more flags to enable features right now, as most features are enabled by simply having the relevant system libraries available. And some features which are disabled by default, are no longer needed, and you would probably not want to enabled them either.
Thank you for the write up, this is all now very clear and I understand completely! As someone who hasn't built emacs from source too often, this all makes sense :)
Would you be opposed in having a README update with some of these details, so its understood why some features are omitted from this script?
As for the configuration updates, I went ahead and got the config help file for Emacs 28 and 29 (in dev). I attached the two help outputs, and below is the resulting diff between the two for reference.
emacs-configure-28.txt emacs-configure-29.txt
diff emacs-configure-28.txt emacs-configure-29.txt
1c1
< `configure' configures GNU Emacs 28.1.50 to adapt to many kinds of systems.
---
> `configure' configures GNU Emacs 29.0.50 to adapt to many kinds of systems.
150a151,152
> --without-webp don't compile with WebP image support
> --without-sqlite3 don't compile with sqlite3 support
170a173
> --with-pgtk use GTK to support window systems other than X
184a188
> --with-xinput2 use version 2 of the X Input Extension for input
189a194,196
> --with-be-app enable use of Haiku's Application Kit as a window
> system
> --with-be-cairo enable use of cairo under Haiku's Application Kit
227a235,236
> CXX C++ compiler command
> CXXFLAGS C++ compiler flags
229a239,240
> WEBP_CFLAGS C compiler flags for WEBP, overriding pkg-config
> WEBP_LIBS linker flags for WEBP, overriding pkg-config
236,238d246
< WEBKIT_CFLAGS
< C compiler flags for WEBKIT, overriding pkg-config
< WEBKIT_LIBS linker flags for WEBKIT, overriding pkg-config
271a280,290
> CAIRO_XCB_CFLAGS
> C compiler flags for CAIRO_XCB, overriding pkg-config
> CAIRO_XCB_LIBS
> linker flags for CAIRO_XCB, overriding pkg-config
> WEBKIT_CFLAGS
> C compiler flags for WEBKIT, overriding pkg-config
> WEBKIT_LIBS linker flags for WEBKIT, overriding pkg-config
> CAIRO_XLIB_CFLAGS
> C compiler flags for CAIRO_XLIB, overriding pkg-config
> CAIRO_XLIB_LIBS
> linker flags for CAIRO_XLIB, overriding pkg-config
307a327,329
> XINPUT_CFLAGS
> C compiler flags for XINPUT, overriding pkg-config
> XINPUT_LIBS linker flags for XINPUT, overriding pkg-config
It doesn't look like there's any specific new feature flags which are disabled by default, so they shouldn't need explicit support in the build script here :)
Just wanted to say this script is great - worked out well for me!
However, when looking at the the feature list from the emacs-build repository, I notice there really isn't way to add "--with-all". For reference, the feature list includes the following (ignoring mingw):
Locally, I edited the script to include these features, also including imagemagick. I tested to see if this would work, and it appears it can! It would be a nice to have to have the ability to add some of these features. I would also argue that --with-json would be a could default as well.
If you think its a good idea, maybe I could add flags to the script that would could append these options to the build.