aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/config/cf/Imake.tmpl7
-rw-r--r--nx-X11/config/cf/host.def7
-rw-r--r--nx-X11/config/cf/xorg.cf4
-rw-r--r--nx-X11/programs/Xserver/dix/dixfonts.c6
-rw-r--r--nx-X11/programs/Xserver/include/dixfont.h4
5 files changed, 28 insertions, 0 deletions
diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl
index 85228ae07..44fe2f3c1 100644
--- a/nx-X11/config/cf/Imake.tmpl
+++ b/nx-X11/config/cf/Imake.tmpl
@@ -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
diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def
index 4a11359e2..abacf2c4e 100644
--- a/nx-X11/config/cf/host.def
+++ b/nx-X11/config/cf/host.def
@@ -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.
*
diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf
index 13ccd577c..50a1f4590 100644
--- a/nx-X11/config/cf/xorg.cf
+++ b/nx-X11/config/cf/xorg.cf
@@ -428,6 +428,10 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define HasXfont2 NO
#endif
+#ifndef HasLegacyXfont1
+# define HasLegacyXfont1 NO
+#endif
+
#ifndef BuildScreenSaverExt
# define BuildScreenSaverExt YES
#endif
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c
index 98d2a6439..0d90cd7b0 100644
--- a/nx-X11/programs/Xserver/dix/dixfonts.c
+++ b/nx-X11/programs/Xserver/dix/dixfonts.c
@@ -2139,7 +2139,13 @@ InitFonts ()
ResetFontPrivateIndex();
+#ifdef LEGACY_XFONT1
+ BuiltinRegisterFpeFunctions();
+ FontFileRegisterFpeFunctions();
+ fs_register_fpe_functions();
+#else
register_fpe_functions();
+#endif
}
#endif /* HAS_XFONT2 */
diff --git a/nx-X11/programs/Xserver/include/dixfont.h b/nx-X11/programs/Xserver/include/dixfont.h
index 21d917fe5..9ae55157e 100644
--- a/nx-X11/programs/Xserver/include/dixfont.h
+++ b/nx-X11/programs/Xserver/include/dixfont.h
@@ -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*/,