Code

configure.ac: define ENABLE_x_SCREEN instead of DISABLE_x_SCREEN
authorMax Kellermann <max@duempel.org>
Thu, 2 Oct 2008 12:57:42 +0000 (14:57 +0200)
committerMax Kellermann <max@duempel.org>
Thu, 2 Oct 2008 12:57:42 +0000 (14:57 +0200)
Everybody who uses the ENABLE_ macros has to include ncmpc.h.  We're
better off defining those in config.h via configure.ac.

configure.ac
src/ncmpc.h
src/playlist.c
src/screen_list.h

index 4637c2555f87ad0f3a93dec7bc7a15ab3849004a..8ea3461c8b28c6f2cf8d2324bd88904fd3a27044 100644 (file)
@@ -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)
index c87c84d88fe270777abde35b538854c15f2e3f48..5d4ca8425e586eec77454cc3f913df096bcf5550 100644 (file)
@@ -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
index 919b4c34f8e045b2e9994f2cb1f8102a81662f8f..108c4f51a343039b624c8ddf2476f4566784546e 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "playlist.h"
 #include "mpdclient.h"
-#include "ncmpc.h"
 
 #include <string.h>
 
index 1293b74d95347cef489fe208bae3589bea6f7aec..27c034676d3c6742d2d0ee06f71ccf0f64d9c0ed 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef SCREEN_LIST_H
 #define SCREEN_LIST_H
 
-#include "ncmpc.h"
+#include "config.h"
 
 #include <ncurses.h>