Skip to content

Commit 3e2238f

Browse files
committed
add optional libXfont2 support
1 parent feab72c commit 3e2238f

File tree

12 files changed

+317
-56
lines changed

12 files changed

+317
-56
lines changed

Xext/xf86bigfont.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#include "gcstruct.h"
6565
#include "dixfontstr.h"
6666
#include "extnsionst.h"
67+
#include "xfont2_compat.h"
6768

6869
#define _XF86BIGFONT_SERVER_
6970
#include <X11/extensions/xf86bigfproto.h>

configure.ac

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/"
248248
AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
249249
[ FONTPATH="$withval" ],
250250
[ FONTPATH="${DEFAULT_FONT_PATH}" ])
251+
AC_ARG_ENABLE(libXfont2, AS_HELP_STRING([--enable-libXfont2],
252+
[Build with libXfont2 (default: disabled)]),
253+
[XFONT2=$enableval], [XFONT2=no])
251254

252255
dnl Extensions.
253256
AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
@@ -319,9 +322,18 @@ XEXT_INC='-I$(top_srcdir)/Xext'
319322
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
320323
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
321324

325+
AM_CONDITIONAL(DEBUG, test "x$DEBUGGING" = xyes)
326+
327+
if test "x$XFONT2" = xyes; then
328+
AC_DEFINE(XFONT2, 1, [Build with libXfont2])
329+
XFONT_LIB="xfont2"
330+
else
331+
XFONT_LIB="xfont"
332+
fi
333+
322334
dnl Core modules for most extensions, et al.
323335
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]"
324-
REQUIRED_LIBS="xfont fontenc"
336+
REQUIRED_LIBS="$XFONT_LIB fontenc"
325337

326338
AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes])
327339
if test "x$SCREENSAVER" = xyes; then

dix/dispatch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Equipment Corporation.
9494
#include "dispatch.h"
9595
#include "swaprep.h"
9696
#include "swapreq.h"
97+
#include "xfont2_compat.h"
9798

9899
#define mskcnt ((MAXCLIENTS + 31) / 32)
99100
#define BITMASK(i) (1U << ((i) & 31))

0 commit comments

Comments
 (0)