diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-25 10:46:04 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-25 10:47:20 -0700 |
commit | 97a793cba9fc68a9df67622d8d82c443fe10dd9b (patch) | |
tree | cbd2d0dc38c3a15583a43520aeaed7d029af0012 | |
parent | 491885030c29f46d688c9b0325f95feccd8d653e (diff) | |
download | emacs-97a793cba9fc68a9df67622d8d82c443fe10dd9b.tar.gz |
Support ./configure --with-gif=ifavailable etc.
Suggested by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg00789.html
* INSTALL, etc/NEWS: Document this.
* configure.ac: Implement this.
-rw-r--r-- | INSTALL | 6 | ||||
-rw-r--r-- | configure.ac | 59 | ||||
-rw-r--r-- | etc/NEWS | 6 |
3 files changed, 52 insertions, 19 deletions
@@ -318,6 +318,12 @@ features enabled, you can combine --without-all with --with-FEATURE. For example, you can use --without-all --without-x --with-dbus to build with D-Bus support and nothing more. +Use --with-gnutls=ifavailable to use GnuTLS if available but go ahead +and build without it if not available. This overrides Emacs's default +behavior of refusing to build if GnuTLS is absent. When X11 support +is enabled, the libraries for gif, jpeg, png, tiff, and xpm are in the +same strongly-recommended category as GnuTLS, and have similar options. + Use --with-wide-int to implement Emacs values with the type 'long long', even on hosts where a narrower type would do. With this option, on a typical 32-bit host, Emacs integers have 62 bits instead of 30. diff --git a/configure.ac b/configure.ac index 110ea2909a9..c93cfbbb59c 100644 --- a/configure.ac +++ b/configure.ac @@ -2941,7 +2941,7 @@ fi AC_SUBST(LIBSELINUX_LIBS) HAVE_GNUTLS=no -if test "${with_gnutls}" = "yes" ; then +if test "${with_gnutls}" != "no" ; then EMACS_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.2], [HAVE_GNUTLS=yes], [HAVE_GNUTLS=no]) if test "${HAVE_GNUTLS}" = "yes"; then @@ -3512,7 +3512,10 @@ fi if test "${HAVE_X11}" = "yes"; then dnl Avoid Xpm on AIX unless requested, as it crashes; see Bug#17598. - test "$opsys$with_xpm_set" = aix4-2 && with_xpm=no + case $opsys,$with_xpm_set,$with_xpm in + aix4-2,set,yes) ;; + aix4-2,*) with_xpm=no;; + esac if test "${with_xpm}" != "no"; then AC_CHECK_HEADER(X11/xpm.h, @@ -3830,28 +3833,46 @@ AC_SUBST(LIBGIF) dnl Check for required libraries. MISSING= -WITH_NO= +WITH_IFAVAILABLE= if test "${HAVE_X11}" = "yes"; then - test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && - MISSING="libXpm" && WITH_NO="--with-xpm=no" - test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && - MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" - test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && - MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" - test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && - MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" - test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && - MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" -fi -test "${with_gnutls}" != "no" && test "${HAVE_GNUTLS}" != "yes" && - MISSING="$MISSING gnutls" && WITH_NO="$WITH_NO --with-gnutls=no" + case $with_xpm,$HAVE_XPM in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="libXpm" + WITH_IFAVAILABLE="--with-xpm=ifavailable";; + esac + case $with_jpeg,$HAVE_JPEG in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="$MISSING libjpeg" + WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-jpeg=ifavailable";; + esac + case $with_png,$HAVE_PNG in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="$MISSING libpng" + WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-png=ifavailable";; + esac + case $with_gif,$HAVE_GIF in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="$MISSING libgif/libungif" + WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gif=ifavailable";; + esac + case $with_tiff,$HAVE_TIFF in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="$MISSING libtiff" + WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tiff=ifavailable";; + esac +fi +case $with_gnutls,$HAVE_GNUTLS in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="$MISSING gnutls" + WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";; +esac if test "X${MISSING}" != X; then AC_MSG_ERROR([The following required libraries were not found: $MISSING Maybe some development libraries/packages are missing? -If you don't want to link with them give - $WITH_NO -as options to configure]) +To build anyway, give: + $WITH_IFAVAILABLE +as options to configure.]) fi ### Use -lgpm if available, unless '--with-gpm=no'. @@ -37,6 +37,12 @@ functions 'json-serialize', 'json-insert', 'json-parse-string', and 'json-parse-buffer' are typically much faster than their Lisp counterparts from json.el. +** Several configure options now accept an option-argument 'ifavailable'. +For example, './configure --with-xpm=ifavailable' now configures Emacs +to attempt to use libxpm but to continue building even if libxpm is absent. +The other affected options are --with-gif, --with-gnutls, --with-jpeg, +--with-png, and --with-tiff. + ** The etags program now uses the C library's regular expression matcher when possible, and a compatible regex substitute otherwise. This will let developers maintain Emacs's own regex code without having to also |