aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2019-03-25 10:46:04 -0700
committerPaul Eggert2019-03-25 10:47:20 -0700
commit97a793cba9fc68a9df67622d8d82c443fe10dd9b (patch)
treecbd2d0dc38c3a15583a43520aeaed7d029af0012
parent491885030c29f46d688c9b0325f95feccd8d653e (diff)
downloademacs-97a793cba9fc68a9df67622d8d82c443fe10dd9b.tar.gz
emacs-97a793cba9fc68a9df67622d8d82c443fe10dd9b.zip
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--INSTALL6
-rw-r--r--configure.ac59
-rw-r--r--etc/NEWS6
3 files changed, 52 insertions, 19 deletions
diff --git a/INSTALL b/INSTALL
index 72bba25df81..80223850100 100644
--- a/INSTALL
+++ b/INSTALL
@@ -318,6 +318,12 @@ features enabled, you can combine --without-all with --with-FEATURE.
318For example, you can use --without-all --without-x --with-dbus to 318For example, you can use --without-all --without-x --with-dbus to
319build with D-Bus support and nothing more. 319build with D-Bus support and nothing more.
320 320
321Use --with-gnutls=ifavailable to use GnuTLS if available but go ahead
322and build without it if not available. This overrides Emacs's default
323behavior of refusing to build if GnuTLS is absent. When X11 support
324is enabled, the libraries for gif, jpeg, png, tiff, and xpm are in the
325same strongly-recommended category as GnuTLS, and have similar options.
326
321Use --with-wide-int to implement Emacs values with the type 'long long', 327Use --with-wide-int to implement Emacs values with the type 'long long',
322even on hosts where a narrower type would do. With this option, on a 328even on hosts where a narrower type would do. With this option, on a
323typical 32-bit host, Emacs integers have 62 bits instead of 30. 329typical 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
2941AC_SUBST(LIBSELINUX_LIBS) 2941AC_SUBST(LIBSELINUX_LIBS)
2942 2942
2943HAVE_GNUTLS=no 2943HAVE_GNUTLS=no
2944if test "${with_gnutls}" = "yes" ; then 2944if test "${with_gnutls}" != "no" ; then
2945 EMACS_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.2], 2945 EMACS_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.2],
2946 [HAVE_GNUTLS=yes], [HAVE_GNUTLS=no]) 2946 [HAVE_GNUTLS=yes], [HAVE_GNUTLS=no])
2947 if test "${HAVE_GNUTLS}" = "yes"; then 2947 if test "${HAVE_GNUTLS}" = "yes"; then
@@ -3512,7 +3512,10 @@ fi
3512 3512
3513if test "${HAVE_X11}" = "yes"; then 3513if test "${HAVE_X11}" = "yes"; then
3514 dnl Avoid Xpm on AIX unless requested, as it crashes; see Bug#17598. 3514 dnl Avoid Xpm on AIX unless requested, as it crashes; see Bug#17598.
3515 test "$opsys$with_xpm_set" = aix4-2 && with_xpm=no 3515 case $opsys,$with_xpm_set,$with_xpm in
3516 aix4-2,set,yes) ;;
3517 aix4-2,*) with_xpm=no;;
3518 esac
3516 3519
3517 if test "${with_xpm}" != "no"; then 3520 if test "${with_xpm}" != "no"; then
3518 AC_CHECK_HEADER(X11/xpm.h, 3521 AC_CHECK_HEADER(X11/xpm.h,
@@ -3830,28 +3833,46 @@ AC_SUBST(LIBGIF)
3830 3833
3831dnl Check for required libraries. 3834dnl Check for required libraries.
3832MISSING= 3835MISSING=
3833WITH_NO= 3836WITH_IFAVAILABLE=
3834if test "${HAVE_X11}" = "yes"; then 3837if test "${HAVE_X11}" = "yes"; then
3835 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" && 3838 case $with_xpm,$HAVE_XPM in
3836 MISSING="libXpm" && WITH_NO="--with-xpm=no" 3839 no,* | ifavailable,* | *,yes) ;;
3837 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" && 3840 *) MISSING="libXpm"
3838 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no" 3841 WITH_IFAVAILABLE="--with-xpm=ifavailable";;
3839 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" && 3842 esac
3840 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no" 3843 case $with_jpeg,$HAVE_JPEG in
3841 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" && 3844 no,* | ifavailable,* | *,yes) ;;
3842 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no" 3845 *) MISSING="$MISSING libjpeg"
3843 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" && 3846 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-jpeg=ifavailable";;
3844 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" 3847 esac
3845fi 3848 case $with_png,$HAVE_PNG in
3846test "${with_gnutls}" != "no" && test "${HAVE_GNUTLS}" != "yes" && 3849 no,* | ifavailable,* | *,yes) ;;
3847 MISSING="$MISSING gnutls" && WITH_NO="$WITH_NO --with-gnutls=no" 3850 *) MISSING="$MISSING libpng"
3851 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-png=ifavailable";;
3852 esac
3853 case $with_gif,$HAVE_GIF in
3854 no,* | ifavailable,* | *,yes) ;;
3855 *) MISSING="$MISSING libgif/libungif"
3856 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gif=ifavailable";;
3857 esac
3858 case $with_tiff,$HAVE_TIFF in
3859 no,* | ifavailable,* | *,yes) ;;
3860 *) MISSING="$MISSING libtiff"
3861 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tiff=ifavailable";;
3862 esac
3863fi
3864case $with_gnutls,$HAVE_GNUTLS in
3865 no,* | ifavailable,* | *,yes) ;;
3866 *) MISSING="$MISSING gnutls"
3867 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";;
3868esac
3848if test "X${MISSING}" != X; then 3869if test "X${MISSING}" != X; then
3849 AC_MSG_ERROR([The following required libraries were not found: 3870 AC_MSG_ERROR([The following required libraries were not found:
3850 $MISSING 3871 $MISSING
3851Maybe some development libraries/packages are missing? 3872Maybe some development libraries/packages are missing?
3852If you don't want to link with them give 3873To build anyway, give:
3853 $WITH_NO 3874 $WITH_IFAVAILABLE
3854as options to configure]) 3875as options to configure.])
3855fi 3876fi
3856 3877
3857### Use -lgpm if available, unless '--with-gpm=no'. 3878### Use -lgpm if available, unless '--with-gpm=no'.
diff --git a/etc/NEWS b/etc/NEWS
index bbba59c5490..ad01bd8516b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -37,6 +37,12 @@ functions 'json-serialize', 'json-insert', 'json-parse-string', and
37'json-parse-buffer' are typically much faster than their Lisp 37'json-parse-buffer' are typically much faster than their Lisp
38counterparts from json.el. 38counterparts from json.el.
39 39
40** Several configure options now accept an option-argument 'ifavailable'.
41For example, './configure --with-xpm=ifavailable' now configures Emacs
42to attempt to use libxpm but to continue building even if libxpm is absent.
43The other affected options are --with-gif, --with-gnutls, --with-jpeg,
44--with-png, and --with-tiff.
45
40** The etags program now uses the C library's regular expression matcher 46** The etags program now uses the C library's regular expression matcher
41when possible, and a compatible regex substitute otherwise. This will 47when possible, and a compatible regex substitute otherwise. This will
42let developers maintain Emacs's own regex code without having to also 48let developers maintain Emacs's own regex code without having to also