diff --git a/src/ui.c b/src/ui.c index d641af5..0aa0854 100644 --- a/src/ui.c +++ b/src/ui.c @@ -153,26 +153,26 @@ void ( *init_ui )( int argc, char** argv ); void setup_frontend( void ) { switch ( frontend_type ) { +#if defined(HAS_X11) case FRONTEND_X11: default: -#ifdef HAS_X11 init_ui = init_x11_ui; -#else - fprintf( stderr, "ERROR: x11 frontend disabled at compilation\n" ); - exit( -1 ); -#endif break; +#endif +#if defined(HAS_SDL) case FRONTEND_SDL: -#ifdef HAS_SDL - init_ui = init_sdl_ui; -#else - fprintf( stderr, "ERROR: sdl frontend disabled at compilation\n" ); - exit( -1 ); +#if (!defined(HAS_X11) + default: #endif + init_ui = init_sdl_ui; break; +#endif case FRONTEND_TEXT: +#if (!defined(HAS_X11) && !defined(HAS_SDL)) + default: +#endif init_ui = init_text_ui; break; }