diff options
author | Max Kellermann <max@duempel.org> | 2008-10-02 14:57:42 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-02 14:57:42 +0200 |
commit | df17096f5effbf060e75f87030cea66081e81d4f (patch) | |
tree | 11e72189e9ce43d4d79309facccbe2715097d9a2 | |
parent | 5d852bd60fa12ef257c15f7274116a23aa67caec (diff) | |
download | mpd-df17096f5effbf060e75f87030cea66081e81d4f.tar.gz mpd-df17096f5effbf060e75f87030cea66081e81d4f.tar.xz mpd-df17096f5effbf060e75f87030cea66081e81d4f.zip |
configure.ac: define ENABLE_x_SCREEN instead of DISABLE_x_SCREEN
Everybody who uses the ENABLE_ macros has to include ncmpc.h. We're
better off defining those in config.h via configure.ac.
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | src/ncmpc.h | 13 | ||||
-rw-r--r-- | src/playlist.c | 1 | ||||
-rw-r--r-- | src/screen_list.h | 2 |
4 files changed, 9 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index 4637c2555..8ea3461c8 100644 --- a/configure.ac +++ b/configure.ac @@ -214,8 +214,8 @@ AC_ARG_ENABLE([artist-screen], [artist_screen="$enableval"], [artist_screen=no]) AC_MSG_RESULT([$artist_screen]) -if test "x$artist_screen" != "xyes" ; then - AC_DEFINE(DISABLE_ARTIST_SCREEN, 1, [Disable artist screen]) +if test "x$artist_screen" = "xyes" ; then + AC_DEFINE(ENABLE_ARTIST_SCREEN, 1, [Enable artist screen]) fi AM_CONDITIONAL(ENABLE_ARTIST_SCREEN, test x$artist_screen = xyes) @@ -228,8 +228,8 @@ AC_ARG_ENABLE([search-screen], [search_screen="$enableval"], [search_screen=yes]) AC_MSG_RESULT([$search_screen]) -if test "x$search_screen" != "xyes" ; then - AC_DEFINE(DISABLE_SEARCH_SCREEN, 1, [Disable search screen]) +if test "x$search_screen" = "xyes" ; then + AC_DEFINE(ENABLE_SEARCH_SCREEN, 1, [Enable search screen]) fi AM_CONDITIONAL(ENABLE_SEARCH_SCREEN, test x$search_screen = xyes) @@ -242,8 +242,8 @@ AC_ARG_ENABLE([key-screen], [keydef_screen="$enableval"], [keydef_screen=yes]) AC_MSG_RESULT([$keydef_screen]) -if test "x$keydef_screen" != "xyes" ; then - AC_DEFINE(DISABLE_KEYDEF_SCREEN, 1, [Disable key editor screen]) +if test "x$keydef_screen" = "xyes" ; then + AC_DEFINE(ENABLE_KEYDEF_SCREEN, 1, [Enable key editor screen]) fi AM_CONDITIONAL(ENABLE_KEYDEF_SCREEN, test x$keydef_screen = xyes) @@ -255,9 +255,8 @@ AC_ARG_ENABLE([lyrics-screen], [Enable lyrics screen @<:@default=no@:>@]), [lyrics_screen="$enableval"], [lyrics_screen=no]) -if test "x$lyrics_screen" != "xyes" ; then - AC_DEFINE(DISABLE_LYRICS_SCREEN, 1, [Disable lyrics screen]) - lyrics_screen=no +if test "x$lyrics_screen" = "xyes" ; then + AC_DEFINE(ENABLE_LYRICS_SCREEN, 1, [Enable lyrics screen]) fi AM_CONDITIONAL(ENABLE_LYRICS_SCREEN, test x$lyrics_screen = xyes) diff --git a/src/ncmpc.h b/src/ncmpc.h index c87c84d88..5d4ca8425 100644 --- a/src/ncmpc.h +++ b/src/ncmpc.h @@ -5,19 +5,6 @@ #include "config.h" #endif -#ifndef DISABLE_ARTIST_SCREEN -#define ENABLE_ARTIST_SCREEN 1 -#endif -#ifndef DISABLE_SEARCH_SCREEN -#define ENABLE_SEARCH_SCREEN 1 -#endif -#ifndef DISABLE_KEYDEF_SCREEN -#define ENABLE_KEYDEF_SCREEN 1 -#endif -#ifndef DISABLE_LYRICS_SCREEN -#define ENABLE_LYRICS_SCREEN 1 -#endif - #ifndef NDEBUG void D(const char *format, ...); #else diff --git a/src/playlist.c b/src/playlist.c index 919b4c34f..108c4f51a 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -21,7 +21,6 @@ #include "playlist.h" #include "mpdclient.h" -#include "ncmpc.h" #include <string.h> diff --git a/src/screen_list.h b/src/screen_list.h index 1293b74d9..27c034676 100644 --- a/src/screen_list.h +++ b/src/screen_list.h @@ -20,7 +20,7 @@ #ifndef SCREEN_LIST_H #define SCREEN_LIST_H -#include "ncmpc.h" +#include "config.h" #include <ncurses.h> |