Merge pull request #42 from qmfrederik/features/headless-pr

Add headless backend
This commit is contained in:
Fred Kiefer 2023-10-01 23:30:01 +02:00 committed by GitHub
commit 9ab65edd14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 3403 additions and 2182 deletions

View file

@ -14,6 +14,16 @@ jobs:
# don't run pull requests from local branches twice
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
include:
- server: x11
graphics: cairo
- server: x11
graphics: xlib
- server: headless
graphics: headless
env:
DEBIAN_FRONTEND: noninteractive
@ -28,7 +38,7 @@ jobs:
- name: Build source
run: |
. /usr/share/GNUstep/Makefiles/GNUstep.sh
./configure
./configure --enable-server=${{ matrix.server }} --enable-graphics=${{ matrix.graphics }}
make && make install
- name: Run tests

View file

@ -0,0 +1,33 @@
/*
HeadlessContext.h
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef HeadlessContext_h
#define HeadlessContext_h
#include "gsc/GSContext.h"
@interface HeadlessContext : GSContext
@end
#endif /* HeadlessContext_h */

View file

@ -0,0 +1,42 @@
/*
HeadlessFaceInfo.h
Copyright (C) 2003, 2023 Free Software Foundation, Inc.
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
Based on work by: Alexander Malmberg <alexander@malmberg.org>
Based on work by: Fred Kiefer <fredkiefer@gmx.de>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef HeadlessFaceInfo_h
#define HeadlessFaceInfo_h
#include <Foundation/NSObject.h>
@interface HeadlessFaceInfo : NSObject
{
void *_fontFace;
}
- (void *)fontFace;
@end
#endif /* HeadlessFaceInfo_h */

View file

@ -0,0 +1,41 @@
/*
HeadlessFontEnumeartorInfo.h
Copyright (C) 2003 Free Software Foundation, Inc.
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef HeadlessFontEnumerator_h
#define HeadlessFontEnumerator_h
#include <GNUstepGUI/GSFontInfo.h>
#include "headless/HeadlessFaceInfo.h"
@interface HeadlessFontEnumerator : GSFontEnumerator
{
}
+ (Class) faceInfoClass;
+ (HeadlessFaceInfo *) fontWithName: (NSString *)name;
@end
#endif /* HeadlessFontEnumerator_h */

View file

@ -0,0 +1,35 @@
/*
HeadlessFontInfo.h
Copyright (C) 2003 Free Software Foundation, Inc.
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef HeadlessFontInfo_h
#define HeadlessFontInfo_h
#include <GNUstepGUI/GSFontInfo.h>
@interface HeadlessFontInfo : GSFontInfo
@end
#endif /* HeadlessFontInfo_h */

View file

@ -0,0 +1,37 @@
/*
HeadlessGState.h
Copyright (C) 2004 Free Software Foundation, Inc.
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef HeadlessGState_h
#define HeadlessGState_h
#include "gsc/GSGState.h"
@interface HeadlessGState : GSGState
{
}
@end
#endif /* HeadlessGState_h */

View file

@ -0,0 +1,37 @@
/*
HeadlessServer.h
Copyright (C) 2002-2015 Free Software Foundation, Inc.
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef HeadlessServer_h
#define HeadlessServer_h
#include "config.h"
#include <GNUstepGUI/GSDisplayServer.h>
@interface HeadlessServer : GSDisplayServer
{
}
@end
#endif /* HeadlessServer_h */

View file

@ -43,7 +43,7 @@ endif
#
# The list of subproject directories
#
SUBPROJECTS = gsc $(BUILD_SERVER) $(BUILD_GRAPHICS)
SUBPROJECTS = $(sort gsc $(BUILD_SERVER) $(BUILD_GRAPHICS))
libgnustep-$(BACKEND_FULL)_SUBPROJECTS=$(SUBPROJECTS)

View file

@ -50,6 +50,11 @@
@interface WaylandServer (Initialize)
+ (void) initializeBackend;
@end
#elif BUILD_SERVER == SERVER_headless
#include <headless/HeadlessServer.h>
@interface HeadlessServer (Initialize)
+ (void) initializeBackend;
@end
#endif
/* Call the correct initalization routines for the choosen
@ -70,6 +75,8 @@
[WIN32Server initializeBackend];
#elif BUILD_SERVER == SERVER_wayland
[WaylandServer initializeBackend];
#elif BUILD_SERVER == SERVER_headless
[HeadlessServer initializeBackend];
#else
[NSException raise: NSInternalInconsistencyException
format: @"No Window Server configured in backend"];
@ -96,6 +103,8 @@
context = @"CairoContext";
#elif (BUILD_GRAPHICS==GRAPHICS_opal)
context = @"OpalContext";
#elif (BUILD_GRAPHICS==GRAPHICS_headless)
context = @"HeadlessContext";
#else
#error INVALID build graphics type
#endif

View file

@ -0,0 +1,48 @@
#
# Main makefile for GNUstep Headless Backend
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
PACKAGE_NAME = gnustep-back
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../../back.make
include $(GNUSTEP_MAKEFILES)/common.make
include ../../config.make
# The library to be compiled, as a library or as a bundle
SUBPROJECT_NAME=headless
# The Objective-C source files to be compiled
headless_OBJC_FILES = \
HeadlessContext.m \
HeadlessServer.m \
HeadlessFontInfo.m \
HeadlessFontEnumerator.m \
HeadlessFaceInfo.m \
HeadlessGState.m
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/subproject.make
-include GNUmakefile.postamble

View file

@ -0,0 +1,51 @@
#
# GNUmakefile.preamble
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# Flags dealing with compiling and linking
#
# Additional flags to pass to the preprocessor
ADDITIONAL_CPPFLAGS += -Wall $(CONFIG_SYSTEM_DEFS)
# Additional flags to pass to the Objective-C compiler
ADDITIONAL_OBJCFLAGS =
# Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS += -I../../Headers \
-I../$(GNUSTEP_TARGET_DIR) $(GRAPHIC_CFLAGS)
# Additional LDFLAGS to pass to the linker
ADDITIONAL_LDFLAGS =
# Additional library directories the linker should search
ADDITIONAL_LIB_DIRS =
#
# Flags dealing with installing and uninstalling
#

View file

@ -0,0 +1,45 @@
/*
HeadlessContext.m
Copyright (C) 2003, 2023 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "headless/HeadlessContext.h"
#include "headless/HeadlessFontInfo.h"
#include "headless/HeadlessFontEnumerator.h"
#include "headless/HeadlessGState.h"
@implementation HeadlessContext
+ (void) initializeBackend
{
[NSGraphicsContext setDefaultContextClass: self];
[GSFontEnumerator setDefaultClass: [HeadlessFontEnumerator class]];
[GSFontInfo setDefaultClass: [HeadlessFontInfo class]];
}
+ (Class) GStateClass
{
return [HeadlessGState class];
}
@end

View file

@ -0,0 +1,44 @@
/*
HeadlessFaceInfo.m
Copyright (C) 2003, 2023 Free Software Foundation, Inc.
Based on work by: Marcian Lytwyn <gnustep@advcsi.com> for Keysight
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
Based on work by: Alex Malmberg
Based on work by: Fred Kiefer <fredkiefer@gmx.de>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "headless/HeadlessFaceInfo.h"
@implementation HeadlessFaceInfo
- (void) dealloc
{
[super dealloc];
}
- (void *)fontFace
{
return _fontFace;
}
@end

View file

@ -0,0 +1,47 @@
/*
HeadlessFontEnumerator.m
Copyright (C) 2003, 2023 Free Software Foundation, Inc.
Based on work by: Marcian Lytwyn <gnustep@advcsi.com> for Keysight
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
Based on work by: Alex Malmberg
Based on work by: Fred Kiefer <fredkiefer@gmx.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "headless/HeadlessFontEnumerator.h"
#include "headless/HeadlessFontInfo.h"
@implementation HeadlessFontEnumerator
+ (Class) faceInfoClass
{
return [HeadlessFaceInfo class];
}
+ (HeadlessFaceInfo *) fontWithName: (NSString *) name
{
return (HeadlessFaceInfo *) [super fontWithName: name];
}
- (void)enumerateFontsAndFamilies
{
}
@end

View file

@ -0,0 +1,87 @@
/*
HeadlessFontInfo.m
Copyright (C) 2003, 2023 Free Software Foundation, Inc.
Based on work by: Marcian Lytwyn <gnustep@advcsi.com> for Keysight
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
Based on work by: Alex Malmberg
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "GNUstepBase/Unicode.h"
#include <AppKit/NSAffineTransform.h>
#include <AppKit/NSBezierPath.h>
#include "headless/HeadlessFontInfo.h"
#include "headless/HeadlessFontEnumerator.h"
#include <math.h>
@implementation HeadlessFontInfo
- (id) initWithFontName: (NSString *)name
matrix: (const CGFloat *)fmatrix
screenFont: (BOOL)p_screenFont
{
self = [super init];
if (!self)
return nil;
#ifndef _MSC_VER
// Accessing instance variables across module boundaries is not supported by the Visual Studio
// toolchain; this could be implemented using e.g. setFontName: and setMatrix: method on the
// base case.
fontName = [name copy];
memcpy(matrix, fmatrix, sizeof(matrix));
#endif
return self;
}
- (void) dealloc
{
[super dealloc];
}
- (BOOL) glyphIsEncoded: (NSGlyph)glyph
{
return NO;
}
- (NSSize) advancementForGlyph: (NSGlyph)glyph
{
return NSZeroSize;
}
- (NSRect) boundingRectForGlyph: (NSGlyph)glyph
{
return NSZeroRect;
}
- (CGFloat) widthOfString: (NSString *)string
{
return 0.0;
}
- (void) appendBezierPathWithGlyphs: (NSGlyph *)glyphs
count: (int)length
toBezierPath: (NSBezierPath *)path
{
}
@end

View file

@ -0,0 +1,72 @@
/*
HeadlessGState.m
Copyright (C) 2003, 2023 Free Software Foundation, Inc.
Based on work by: Marcian Lytwyn <gnustep@advcsi.com> for Keysight
Based on work by: Banlu Kemiyatorn <object at gmail dot com>
Based on work by: Fred Kiefer <fredkiefer@gmx.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "headless/HeadlessGState.h"
@implementation HeadlessGState
- (void) DPSclip
{
}
- (void) DPSfill
{
}
- (void) DPSsetlinewidth: (CGFloat)width
{
}
- (void) DPSsetdash: (const CGFloat *)pat : (NSInteger)size : (CGFloat)foffset
{
}
- (void) DPSimage: (NSAffineTransform *)matrix : (NSInteger)pixelsWide
: (NSInteger)pixelsHigh : (NSInteger)bitsPerSample
: (NSInteger)samplesPerPixel : (NSInteger)bitsPerPixel
: (NSInteger)bytesPerRow : (BOOL)isPlanar
: (BOOL)hasAlpha : (NSString *)colorSpaceName
: (const unsigned char *const[5])data
{
}
- (void) DPSstroke
{
}
- (void) compositerect: (NSRect)aRect op: (NSCompositingOperation)op
{
}
- (void) compositeGState: (HeadlessGState *)source
fromRect: (NSRect)srcRect
toPoint: (NSPoint)destPoint
op: (NSCompositingOperation)op
fraction: (CGFloat)delta
{
}
@end

View file

@ -0,0 +1,115 @@
/*
HeadlessServer.m
Copyright (C) 1998,2002,2023 Free Software Foundation, Inc.
Based on work by: Marcian Lytwyn <gnustep@advcsi.com> for Keysight
Based on work by: Adam Fedor <fedor@gnu.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include <AppKit/NSApplication.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSValue.h>
#include "headless/HeadlessServer.h"
/* Terminate cleanly if we get a signal to do so */
static void
terminate(int sig)
{
if (nil != NSApp)
{
[NSApp terminate: NSApp];
}
else
{
exit(1);
}
}
@implementation HeadlessServer
/* Initialize AppKit backend */
+ (void) initializeBackend
{
NSDebugLog(@"Initializing GNUstep headless backend.\n");
[GSDisplayServer setDefaultServerClass: [HeadlessServer class]];
signal(SIGTERM, terminate);
signal(SIGINT, terminate);
}
- (NSArray *)screenList
{
NSDebugLog(@"GNUstep headless - fetching screen list");
NSMutableArray *screens = [NSMutableArray arrayWithCapacity: 1];
[screens addObject: [NSNumber numberWithInt: 1]];
return screens;
}
- (NSRect) boundsForScreen: (int)screen
{
return NSMakeRect(0, 0, 400, 400);
}
- (NSWindowDepth) windowDepthForScreen: (int) screen_num
{
return 0;
}
- (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b
: (unsigned int) style
{
}
- (void) standardcursor: (int)style : (void **)cid
{
}
- (int) window: (NSRect)frame
: (NSBackingStoreType)type
: (unsigned int)style
: (int)screen
{
return 1;
}
- (void) setwindowlevel: (int)level : (int)win
{
}
- (void) setWindowdevice: (int)win forContext: (NSGraphicsContext *)ctxt
{
}
- (void) orderwindow: (int)op : (int)otherWin : (int)winNum
{
}
- (void) setinputfocus: (int)win
{
}
- (void) imagecursor: (NSPoint)hotp : (NSImage *)image : (void **)cid
{
}
@end

View file

@ -1,15 +1,17 @@
/* config.h.in. Generated from configure.ac by autoheader. */
#define SERVER_x11 1
#define SERVER_win32 2
#define SERVER_wayland 3
#define GRAPHICS_xdps 0
#define GRAPHICS_art 1
#define GRAPHICS_xlib 2
#define GRAPHICS_winlib 3
#define GRAPHICS_cairo 4
#define GRAPHICS_opal 5
#define SERVER_x11 1
#define SERVER_win32 2
#define SERVER_wayland 3
#define SERVER_headless 4
#define GRAPHICS_xdps 0
#define GRAPHICS_art 1
#define GRAPHICS_xlib 2
#define GRAPHICS_winlib 3
#define GRAPHICS_cairo 4
#define GRAPHICS_opal 5
#define GRAPHICS_headless 6
/* Define to type of graphics context to build */
@ -42,27 +44,33 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `wayland-client' library (-lwayland-client). */
#undef HAVE_LIBWAYLAND_CLIENT
/* Define to 1 if you have the `Xext' library (-lXext). */
#undef HAVE_LIBXEXT
/* Define to 1 if you have the `Xft' library (-lXft). */
#undef HAVE_LIBXFT
/* Define to 1 if you have the `xkbcommon' library (-lxkbcommon). */
#undef HAVE_LIBXKBCOMMON
/* Define to 1 if you have the `Xmu' library (-lXmu). */
#undef HAVE_LIBXMU
/* Define to 1 if you have the `Xt' library (-lXt). */
#undef HAVE_LIBXT
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `shmctl' function. */
#undef HAVE_SHMCTL
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@ -93,6 +101,9 @@
/* Define if you have XftDrawStringUtf8 */
#undef HAVE_UTF8
/* Define to 1 if you have the <wayland-util.h> header file. */
#undef HAVE_WAYLAND_UTIL_H
/* Define if you have the wgl library */
#undef HAVE_WGL
@ -102,6 +113,9 @@
/* Define to 1 if you have the <X11/extensions/sync.h> header file. */
#undef HAVE_X11_EXTENSIONS_SYNC_H
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
#undef HAVE_X11_EXTENSIONS_XRANDR_H
/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
#undef HAVE_X11_EXTENSIONS_XSHM_H
@ -118,15 +132,18 @@
/* Define to 1 if you have 'XInternAtoms' function. */
#undef HAVE_XINTERNATOMS
/* Define to 1 if you have the <xkbcommon/xkbcommon.h> header file. */
#undef HAVE_XKBCOMMON_XKBCOMMON_H
/* Define to enable Xrandr support */
#undef HAVE_XRANDR
/* Define to enable Xshape support */
#undef HAVE_XSHAPE
/* Define to 1 if you have the `Xutf8LookupString' function. */
#undef HAVE_XUTF8LOOKUPSTRING
/* Define to enable Xrandr support */
#undef HAVE_XRANDR
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@ -145,7 +162,9 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS
/* Define to enable glitz support */

4749
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -565,10 +565,10 @@ case $target_os in
esac
AC_ARG_ENABLE(server,
[ --enable-server=SRV Build server type: x11, win32, wayland],,
[ --enable-server=SRV Build server type: x11, win32, wayland, headless],,
enable_server=$BUILD_SERVER)
AC_ARG_ENABLE(graphics,
[ --enable-graphics=GPH Build graphics: xlib, xdps, winlib, art, cairo, opal],,
[ --enable-graphics=GPH Build graphics: xlib, xdps, winlib, art, cairo, opal, headless],,
enable_graphics="$BUILD_GRAPHICS")
BUILD_SERVER=$enable_server
@ -658,8 +658,6 @@ if test x"$BUILD_GRAPHICS" = "xcairo"; then
CAIRO_LIBS="$CAIRO_LIBS $XFT_LIBS"
CAIRO_CFLAGS="$CAIRO_CFLAGS"
LIBS="-lwayland-client -lwayland-cursor -lxkbcommon $LIBS"
else
AC_MSG_ERROR([Invalid Cairo installation])
fi
LIBS="$CAIRO_LIBS $LIBS"
CPPFLAGS="$CAIRO_CFLAGS $CPPFLAGS"
@ -717,6 +715,8 @@ elif test x"$BUILD_GRAPHICS" = "xopal"; then
fi
AC_MSG_NOTICE([Switching to $BUILD_GRAPHICS])
fi
elif test x"$BUILD_GRAPHICS" = "xheadless"; then
: # Nothing to do
else
AC_MSG_ERROR([Invalid graphics backend $BUILD_GRAPHICS])
fi
@ -757,15 +757,17 @@ if test $BUILD_SERVER = win32; then
fi
AH_TOP([
#define SERVER_x11 1
#define SERVER_win32 2
#define SERVER_wayland 3
#define GRAPHICS_xdps 0
#define GRAPHICS_art 1
#define GRAPHICS_xlib 2
#define GRAPHICS_winlib 3
#define GRAPHICS_cairo 4
#define GRAPHICS_opal 5
#define SERVER_x11 1
#define SERVER_win32 2
#define SERVER_wayland 3
#define SERVER_headless 4
#define GRAPHICS_xdps 0
#define GRAPHICS_art 1
#define GRAPHICS_xlib 2
#define GRAPHICS_winlib 3
#define GRAPHICS_cairo 4
#define GRAPHICS_opal 5
#define GRAPHICS_headless 6
])
AC_DEFINE_UNQUOTED(BUILD_SERVER,SERVER_$BUILD_SERVER,
[Define to type of window server to build])