From: Max Kellermann Date: Fri, 7 Nov 2008 07:27:14 +0000 (+0100) Subject: configure.ac: added --disable-help-screen X-Git-Tag: v0.12_alpha1~35 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ab3876d4c059d4a076c49d1700067fe7b3696d54;p=ncmpc.git configure.ac: added --disable-help-screen --- diff --git a/configure.ac b/configure.ac index 212b618..18aa361 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index af91939..e03f645 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/screen.c b/src/screen.c index 648d07a..c333529 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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); diff --git a/src/screen_list.c b/src/screen_list.c index 31e8ada..39ec8e9 100644 --- a/src/screen_list.c +++ b/src/screen_list.c @@ -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