Commit fe011b55 authored by Mihai Moldovan's avatar Mihai Moldovan

Support building with legacy (pre-1.4.2) libXfont(1) versions.

Partly reverts ec30a857, but in a forward-compatible manner. Legacy libXfont1 versions are automatically detected by the main Makefile.
parent fb2e9a8b
......@@ -26,7 +26,7 @@ INCLUDEDIR ?= $(PREFIX)/include
CONFIGURE ?= ./configure --prefix=$(PREFIX)
# use Xfont2 if available in the build env
FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/null && echo "-DHAS_XFONT2")
FONT_DEFINES ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/null && echo "-DHAS_XFONT2") $(shell pkg-config --exists 'xfont < 1.4.2' 1>/dev/null 2>/dev/null && echo "-DLEGACY_XFONT1")
XFONTLIB ?= $(shell pkg-config --modversion xfont2 1>/dev/null 2>/dev/null && echo "-lXfont2" || echo "-lXfont")
NX_VERSION_MAJOR=$(shell ./version.sh 1)
......
......@@ -555,6 +555,9 @@ X_BYTE_ORDER = ByteOrder
#ifndef HasXfont2
#define HasXfont2 NO
#endif
#ifndef HasLegacyXfont1
#define HasLegacyXfont1 NO
#endif
#ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */
#define GzipLibrary -lz
#endif
......@@ -1871,7 +1874,11 @@ SETITIMER_DEFINES = HasSetitimerDefines
FONT_DEFINES = -DHAS_XFONT2
XFONTLIB = -lXfont2
#else
#if HasLegacyXfont1
FONT_DEFINES = -DLEGACY_XFONT1
#else
FONT_DEFINES =
#endif
XFONTLIB = -lXfont
#endif
......
......@@ -396,6 +396,13 @@
*/
/*
* If building against libXfont(1) and using a legacy version (lower than 1.4.2),
* uncomment this.
*
#define HasLegacyXfont1 YES
*/
/*
* If you are running NetBSD 0.9C or later, and have the aperture driver
* installed, uncomment this.
*
......
......@@ -428,6 +428,10 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define HasXfont2 NO
#endif
#ifndef HasLegacyXfont1
# define HasLegacyXfont1 NO
#endif
#ifndef BuildScreenSaverExt
# define BuildScreenSaverExt YES
#endif
......
......@@ -2139,7 +2139,13 @@ InitFonts ()
ResetFontPrivateIndex();
#ifdef LEGACY_XFONT1
BuiltinRegisterFpeFunctions();
FontFileRegisterFpeFunctions();
fs_register_fpe_functions();
#else
register_fpe_functions();
#endif
}
#endif /* HAS_XFONT2 */
......
......@@ -152,7 +152,11 @@ extern void dixGetGlyphs(FontPtr /*font*/,
unsigned long * /*glyphcount*/,
CharInfoPtr * /*glyphs*/);
#ifdef LEGACY_XFONT1
extern void BuiltinRegisterFpeFunctions(void);
#else
extern void register_fpe_functions(void);
#endif
extern void QueryGlyphExtents(FontPtr /*pFont*/,
CharInfoPtr * /*charinfo*/,
......
......@@ -82,7 +82,7 @@ BuildRequires: pixman-devel >= 0.13.2
BuildRequires: xorg-x11-libX11-devel
BuildRequires: xorg-x11-libXext-devel
BuildRequires: xorg-x11-libXpm-devel
BuildRequires: xorg-x11-libXfont-devel >= 1.4.2
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-libXdmcp-devel
BuildRequires: xorg-x11-libXdamage-devel
BuildRequires: xorg-x11-libXcomposite-devel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment