diff --git a/ChangeLog b/ChangeLog index fd93352..78046ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-06 Adam Fedor + + * configure.ac (BUILD_SERVER): Set to predefined define + * Source/GSBackend.m: Use it. + 2002-05-05 Adam Fedor * configure.ac: Simplify backend selection using --enable-server diff --git a/Source/GSBackend.m b/Source/GSBackend.m index b51d1b0..84e2b0c 100644 --- a/Source/GSBackend.m +++ b/Source/GSBackend.m @@ -34,9 +34,9 @@ + (void) initializeBackend; @end -#if BUILD_SERVER == x11 +#if BUILD_SERVER == SERVER_x11 #include -#elif BUILD_SERVER == win32 +#elif BUILD_SERVER == SERVER_win32 #include #endif @@ -52,9 +52,9 @@ NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; /* Load in only one server */ -#if BUILD_SERVER == x11 +#if BUILD_SERVER == SERVER_x11 [XGServer initializeBackend]; -#elif BUILD_SERVER == win32 +#elif BUILD_SERVER == SERVER_win32 [WIN32Server initializeBackend]; #else [NSException raise: NSInternalInconsistencyException diff --git a/config.h.in b/config.h.in index 4c79b49..efc99c2 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,10 @@ /* config.h.in. Generated from configure.ac by autoheader. */ + +#define SERVER_x11 1 +#define SERVER_win32 2 + + /* Define to type of graphics context to build */ #undef BUILD_GRAPHICS diff --git a/configure b/configure index 9569ab8..3227d4a 100755 --- a/configure +++ b/configure @@ -5301,7 +5301,7 @@ echo $ECHO_N "checking Backend Server... $ECHO_C" >&6 cat >>confdefs.h <<_ACEOF -#define BUILD_SERVER $BUILD_SERVER +#define BUILD_SERVER SERVER_$BUILD_SERVER _ACEOF echo "$as_me:$LINENO: result: $BUILD_SERVER" >&5 @@ -5325,6 +5325,9 @@ elif test x"$BUILD_GRAPHICS" = "xart"; then GRAPHIC_LIBS="$LIBART_LIBS $GRAPHIC_LIBS" fi + + + #-------------------------------------------------------------------- # Set the name of the backend #-------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 9c5913a..44ea4d1 100644 --- a/configure.ac +++ b/configure.ac @@ -407,7 +407,7 @@ BUILD_SERVER=$enable_server BUILD_GRAPHICS="$enable_graphics" AC_MSG_CHECKING(Backend Server) AC_SUBST(BUILD_SERVER) -AC_DEFINE_UNQUOTED(BUILD_SERVER,$BUILD_SERVER, +AC_DEFINE_UNQUOTED(BUILD_SERVER,SERVER_$BUILD_SERVER, [Define to type of window server to build]) AC_MSG_RESULT($BUILD_SERVER) @@ -424,6 +424,11 @@ elif test x"$BUILD_GRAPHICS" = "xart"; then GRAPHIC_LIBS="$LIBART_LIBS $GRAPHIC_LIBS" fi +AH_TOP([ +#define SERVER_x11 1 +#define SERVER_win32 2 +]) + #-------------------------------------------------------------------- # Set the name of the backend #--------------------------------------------------------------------