Commit 97a793cb authored by Paul Eggert's avatar Paul Eggert

Support ./configure --with-gif=ifavailable etc.

Suggested by Stefan Monnier in:
* INSTALL, etc/NEWS: Document this.
* Implement this.
parent 49188503
Pipeline #1070 failed with stage
in 60 minutes and 1 second
......@@ -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.
......@@ -2941,7 +2941,7 @@ fi
if test "${with_gnutls}" = "yes" ; then
if test "${with_gnutls}" != "no" ; then
EMACS_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.2],
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;;
if test "${with_xpm}" != "no"; then
......@@ -3830,28 +3833,46 @@ AC_SUBST(LIBGIF)
dnl Check for required libraries.
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"
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"
case $with_jpeg,$HAVE_JPEG in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING libjpeg"
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-jpeg=ifavailable";;
case $with_png,$HAVE_PNG in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING libpng"
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-png=ifavailable";;
case $with_gif,$HAVE_GIF in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING libgif/libungif"
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gif=ifavailable";;
case $with_tiff,$HAVE_TIFF in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING libtiff"
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tiff=ifavailable";;
case $with_gnutls,$HAVE_GNUTLS in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING gnutls"
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";;
if test "X${MISSING}" != X; then
AC_MSG_ERROR([The following required libraries were not found:
Maybe some development libraries/packages are missing?
If you don't want to link with them give
as options to configure])
To build anyway, give:
as options to configure.])
### 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment