From 1db6de4c256233864986b4bfa92396ae43320f6d Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Fri, 4 Apr 2014 13:54:05 +0000
Subject: [PATCH] Allowing other enablers to override --enable-tiny too.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    |  1 +
 configure.ac | 36 ++++++++++++++++++++++++++----------
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3d6be250..b1d38743 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
 	* src/nano.h: Comment tweaks.
 	* configure.ac: Move the enabling stuff to after the disablers.
 	* configure.ac: Add submissive colour disabling to --enable-tiny.
+	* configure.ac: Allow other enablers to override --enable-tiny too.
 
 2014-04-03  Benno Schulenberg  <bensberg@justemail.net>
 	* configure.ac: Remove unused '*_support' variables.
diff --git a/configure.ac b/configure.ac
index 33259a3a..3adf759b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,24 +168,40 @@ AC_ARG_ENABLE(tiny,
 AS_HELP_STRING([--enable-tiny], [Disable features for the sake of size]))
 if test "x$enable_tiny" = xyes; then
     AC_DEFINE(NANO_TINY, 1, [Define this to make the nano executable as small as possible.])
-    AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
+    if test "x$enable_browser" != xyes; then
+	AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
+    fi
     if test "x$enable_color" != xyes; then
 	AC_DEFINE(DISABLE_COLOR, 1, [Define this to disable syntax highlighting.])
 	color_support=no
     fi
-    if test "x$enable_extra" = xno; then
+    if test "x$enable_extra" != xyes; then
 	AC_DEFINE(DISABLE_EXTRA, 1, [Define this to disable extra stuff.])
     fi
-    AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
-    AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
-    AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
-    if test "x$enable_multibuffer" = xno; then
+    if test "x$enable_help" != xyes; then
+	AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
+    fi
+    if test "x$enable_justify" != xyes; then
+	AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
+    fi
+    if test "x$enable_mouse" != xyes; then
+	AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
+    fi
+    if test "x$enable_multibuffer" != xyes; then
 	AC_DEFINE(DISABLE_MULTIBUFFER, 1, [Define this to disable multiple file buffers.])
     fi
-    AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
-    AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
-    AC_DEFINE(DISABLE_TABCOMP, 1, [Define this to disable the tab completion functions for files and search strings.])
-    AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
+    if test "x$enable_operatingdir" != xyes; then
+	AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
+    fi
+    if test "x$enable_speller" != xyes; then
+	AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
+    fi
+    if test "x$enable_tabcomp" != xyes; then
+	AC_DEFINE(DISABLE_TABCOMP, 1, [Define this to disable the tab completion functions for files and search strings.])
+    fi
+    if test "x$enable_wrapping" != xyes; then
+	AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
+    fi
 fi
 
 AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes)
-- 
GitLab