From c30d4aef5419be1c054219e0bf3168dec7c84e22 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Tue, 7 Aug 2012 08:16:47 +0400 Subject: [PATCH] * configure.ac: New option --disable-features. (OPTION_DEFAULT_ON): Change to use enable_features. * INSTALL: Explain --disable-features. --- ChangeLog | 6 ++++++ INSTALL | 14 ++++++++++++++ configure.ac | 14 +++++++++++--- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61e749907c..b44b0a95a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-08-07 Dmitry Antipov + + * configure.ac: New option --disable-features. + (OPTION_DEFAULT_ON): Change to use enable_features. + * INSTALL: Explain --disable-features. + 2012-08-07 Glenn Morris * configure.ac: Require automake 1.11 (fairly arbitrarily). diff --git a/INSTALL b/INSTALL index 892ee5e451..7679a1966e 100644 --- a/INSTALL +++ b/INSTALL @@ -319,6 +319,20 @@ systems which support that. Use --without-sound to disable sound support. +Use --disable-features if you want to build small executable with +the minimal dependencies from an external libraries, at the cost +of disabling most of the features which are enabled by default. +Using --disable-features is equivalent to --without-sound --without-dbus +--without-libotf --without-selinux --without-xft --without-gsettings +--without-gnutls --without-rsvg --without-xml2 --without-gconf +--without-imagemagick --without-m17n-flt --without-jpeg --without-tiff +--without-gif --without-png --without-gpm. Note that --disable-features +leaves X support enabled, and using GTK2 or GTK3 toolkit creates a lot +of library dependencies. So if you want to build small executable with +the very basic X support, use --disable-features --with-x-toolkit=no. +For the smallest possible executable without X, use --disable-features +--without-x. + 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 60a2620758..1741513d05 100644 --- a/configure.ac +++ b/configure.ac @@ -48,6 +48,14 @@ archlibdir='${libexecdir}/emacs/${version}/${configuration}' docdir='${datadir}/emacs/${version}/etc' gamedir='${localstatedir}/games/emacs' +dnl Do not omit a lot of the nice features by default. +AC_ARG_ENABLE(features, +[AS_HELP_STRING([--disable-features], + [omit almost all features and build + small executable with minimal dependencies])], + enable_features=$enableval, + enable_features=yes) + dnl OPTION_DEFAULT_OFF(NAME, HELP-STRING) dnl Create a new --with option that defaults to being disabled. dnl NAME is the base name of the option. The shell variable with_NAME @@ -63,8 +71,8 @@ AC_DEFUN([OPTION_DEFAULT_OFF], [dnl ])dnl dnl OPTION_DEFAULT_ON(NAME, HELP-STRING) -dnl Create a new --with option that defaults to being enabled. NAME -dnl is the base name of the option. The shell variable with_NAME +dnl Create a new --with option that defaults to $enable_features. +dnl NAME is the base name of the option. The shell variable with_NAME dnl will be set either to 'no' (for a plain --without-NAME) or to dnl 'yes' (if the option is not specified). Note that the shell dnl variable name is constructed as autoconf does, by replacing @@ -72,7 +80,7 @@ dnl non-alphanumeric characters with "_". dnl HELP-STRING is the help text for the option. AC_DEFUN([OPTION_DEFAULT_ON], [dnl AC_ARG_WITH([$1],[AS_HELP_STRING([--without-$1],[$2])],[],[dnl - m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=yes])dnl + m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=$enable_features])dnl ])dnl OPTION_DEFAULT_ON([pop],[don't support POP mail retrieval with movemail]) -- 2.39.2