Add NO_X11 option at compiletime to disable X11 specific stuff with SDL driver
just compile with $ NO_X11=1 make
This commit is contained in:
parent
6ec72f6b71
commit
88430bb92f
11
src/Makefile
11
src/Makefile
@ -511,11 +511,18 @@ endif
|
||||
LOPT = -lm
|
||||
ifeq ($(API),sdl)
|
||||
LOPT += $(shell sdl-config --libs) -lSDL_image
|
||||
LOPT += -lX11
|
||||
ifneq ($(NO_X11),1)
|
||||
LOPT += -lX11
|
||||
endif
|
||||
endif
|
||||
ifeq ($(API),sdl2)
|
||||
LOPT += $(shell sdl2-config --libs) -lSDL2_image
|
||||
LOPT += -lX11
|
||||
ifneq ($(NO_X11),1)
|
||||
LOPT += -lX11
|
||||
endif
|
||||
endif
|
||||
ifeq ($(NO_X11),1)
|
||||
COPT += -DNO_X11
|
||||
endif
|
||||
LOPT += $(TTFLOPT)
|
||||
LOPT += $(shell pkg-config --libs libpng)
|
||||
|
||||
@ -83,7 +83,7 @@ int Snap_axis_origin_Y;
|
||||
|
||||
char * Drop_file_name = NULL;
|
||||
|
||||
#if defined(USE_X11) || defined(SDL_VIDEO_DRIVER_X11)
|
||||
#if defined(USE_X11) || (defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11))
|
||||
char * X11_clipboard = NULL;
|
||||
#endif
|
||||
|
||||
@ -319,7 +319,7 @@ int Move_cursor_with_constraints()
|
||||
|
||||
// WM events management
|
||||
|
||||
#if defined(USE_X11) || defined(SDL_VIDEO_DRIVER_X11)
|
||||
#if defined(USE_X11) || (defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11))
|
||||
static int xdnd_version = 5;
|
||||
static Window xdnd_source = None;
|
||||
|
||||
@ -1295,7 +1295,7 @@ int Get_input(int sleep_time)
|
||||
// Drop of zero files. Thanks for the information, Bill.
|
||||
}
|
||||
}
|
||||
#elif defined(SDL_VIDEO_DRIVER_X11)
|
||||
#elif defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11)
|
||||
#if defined(USE_SDL)
|
||||
#define xevent event.syswm.msg->event.xevent
|
||||
#else
|
||||
|
||||
@ -73,7 +73,7 @@ extern Window X11_window;
|
||||
#elif defined(__macosx__)
|
||||
const char * get_paste_board(void);
|
||||
#endif
|
||||
#if defined(USE_X11) || defined(SDL_VIDEO_DRIVER_X11)
|
||||
#if defined(USE_X11) || (defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11))
|
||||
extern char * X11_clipboard;
|
||||
#endif
|
||||
|
||||
@ -409,7 +409,7 @@ bye:
|
||||
if (unicode)
|
||||
*unicode = NULL;
|
||||
return haiku_get_clipboard();
|
||||
#elif defined(USE_X11) || defined(__macosx__) || defined(USE_SDL2) || (defined(USE_SDL) && defined(SDL_VIDEO_DRIVER_X11))
|
||||
#elif defined(USE_X11) || defined(__macosx__) || defined(USE_SDL2) || (defined(USE_SDL) && defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11))
|
||||
if (unicode)
|
||||
*unicode = NULL;
|
||||
#if defined(USE_SDL2)
|
||||
|
||||
@ -581,7 +581,7 @@ void Allow_drag_and_drop(int flag)
|
||||
#ifdef __WIN32__
|
||||
DragAcceptFiles(GFX2_Get_Window_Handle(), flag?TRUE:FALSE);
|
||||
SDL_EventState (SDL_SYSWMEVENT, flag?SDL_ENABLE:SDL_DISABLE);
|
||||
#elif defined(SDL_VIDEO_DRIVER_X11)
|
||||
#elif defined(SDL_VIDEO_DRIVER_X11) && !defined(NO_X11)
|
||||
Atom version = flag ? 5 : 0;
|
||||
Display * display;
|
||||
Window window;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user