1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

Fix: make sure compiling without X11 works

This commit is contained in:
Nikolas Garofil 2009-03-17 18:36:46 +01:00
parent 293f6ad7e2
commit 37c460ed05
3 changed files with 8 additions and 1 deletions

View File

@ -26,7 +26,9 @@
*/ */
#include "conky.h" #include "conky.h"
#include "logging.h" #include "logging.h"
#ifdef X11
#include "x11.h" #include "x11.h"
#endif
/* precalculated: 31/255, and 63/255 */ /* precalculated: 31/255, and 63/255 */
#define CONST_8_TO_5_BITS 0.12156862745098 #define CONST_8_TO_5_BITS 0.12156862745098

View File

@ -64,7 +64,9 @@
#include "build.h" #include "build.h"
#include "colours.h" #include "colours.h"
#include "diskio.h" #include "diskio.h"
#ifdef X11
#include "fonts.h" #include "fonts.h"
#endif
#include "fs.h" #include "fs.h"
#include "logging.h" #include "logging.h"
#include "mixer.h" #include "mixer.h"
@ -7225,10 +7227,11 @@ static void load_config_file(const char *f)
} }
} }
CONF("text") { CONF("text") {
#ifdef X11
//initialize X11 if nothing X11-related is mentioned before TEXT (and if X11 is the default outputmethod) //initialize X11 if nothing X11-related is mentioned before TEXT (and if X11 is the default outputmethod)
if(output_methods & TO_X) if(output_methods & TO_X)
X11_initialisation(); X11_initialisation();
#endif
if (global_text) { if (global_text) {
free(global_text); free(global_text);
global_text = 0; global_text = 0;

View File

@ -26,7 +26,9 @@
*/ */
#include "conky.h" #include "conky.h"
#include "colours.h" #include "colours.h"
#ifdef X11
#include "fonts.h" #include "fonts.h"
#endif
#include "logging.h" #include "logging.h"
#include "specials.h" #include "specials.h"
#include <math.h> #include <math.h>