Code

configure.ac: added --disable-help-screen
authorMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 07:27:14 +0000 (08:27 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 07:27:14 +0000 (08:27 +0100)
configure.ac
src/Makefile.am
src/screen.c
src/screen_list.c

index 212b618e5c9667d6c5c7136aa99c39b9dac8ad5a..18aa36191d33851a7b8b43adbdf632f9a96e280c 100644 (file)
@@ -248,16 +248,18 @@ CHECK_CFLAG([-Wcast-qual])
 CHECK_CFLAG([-Wwrite-strings])
 
 dnl Optional screen - help screen
-#AC_MSG_CHECKING([whether to include the help screen])
-#AC_ARG_ENABLE([help-screen], 
-#              AC_HELP_STRING([--enable-help-screen],
-#                           [Enable the help screen @<:@default=yes@:>@]),
-#            [help_screen="$enableval"],
-#            [help_screen=yes])
-#AC_MSG_RESULT([$help_screen])
-#if test "x$help_screen" = "xyes" ; then
-#   AC_DEFINE(ENABLE_HELP_SCREEN, 1, [Enable the help screen])
-#fi
+AC_MSG_CHECKING([whether to include the help screen])
+AC_ARG_ENABLE([help-screen],
+       AS_HELP_STRING([--enable-help-screen],
+               [Enable the help screen @<:@default=yes@:>@]),
+       [help_screen="$enableval"],
+       [help_screen=$disable_mini])
+AC_MSG_RESULT([$help_screen])
+if test "x$help_screen" = "xyes" ; then
+       AC_DEFINE(ENABLE_HELP_SCREEN, 1, [Enable the help screen])
+fi
+
+AM_CONDITIONAL(ENABLE_HELP_SCREEN, test x$help_screen = xyes)
 
 dnl Optional screen - browse screen
 #AC_MSG_CHECKING([whether to include the browse screen])r
index af91939b146cfc22d7cb521abab25d7d05eb711d..e03f645f80ca6d4e812686725e8ae962e405614e 100644 (file)
@@ -66,7 +66,6 @@ ncmpc_SOURCES = \
   screen_play.c\
        screen_browser.c\
   screen_file.c\
-  screen_help.c\
   list_window.c\
   colors.c\
   support.c\
@@ -76,6 +75,10 @@ ncmpc_SOURCES = \
   utils.c\
        str_pool.c
 
+if ENABLE_HELP_SCREEN
+ncmpc_SOURCES += screen_help.c
+endif
+
 if ENABLE_ARTIST_SCREEN
 ncmpc_SOURCES += screen_artist.c
 endif
index 648d07a86b4a733bd84763f0b4dcd3ff8f0602ad..c333529fd21afd9a6a91b196e054b6cef7673c9f 100644 (file)
@@ -792,9 +792,11 @@ screen_cmd(mpdclient_t *c, command_t cmd)
        case CMD_SCREEN_FILE:
                screen_switch(&screen_browse, c);
                break;
+#ifdef ENABLE_HELP_SCREEN
        case CMD_SCREEN_HELP:
                screen_switch(&screen_help, c);
                break;
+#endif
 #ifdef ENABLE_SEARCH_SCREEN
        case CMD_SCREEN_SEARCH:
                screen_switch(&screen_search, c);
index 31e8adaf1f8cf58f20c1e24cc78b38b4f2eb8fbf..39ec8e9f36f5b3f9afcf15f407bc74ff57566e57 100644 (file)
@@ -32,7 +32,9 @@ static const struct
 #ifdef ENABLE_ARTIST_SCREEN
        { "artist", &screen_artist },
 #endif
+#ifdef ENABLE_HELP_SCREEN
        { "help", &screen_help },
+#endif
 #ifdef ENABLE_SEARCH_SCREEN
        { "search", &screen_search },
 #endif