[PATCH libXfont] Omit catalogue support on systems without symlinks

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Mon Oct 29 08:03:33 PDT 2012


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
 configure.ac             |    2 +-
 src/fontfile/catalogue.c |    4 ++++
 src/fontfile/register.c  |    2 ++
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index b274a8f..ee3f7af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,7 +47,7 @@ XORG_CHECK_SGML_DOCTOOLS(1.7)
 AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
 
 # Checks for library functions.
-AC_CHECK_FUNCS([poll])
+AC_CHECK_FUNCS([poll readlink])
 
 # If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
 # must first be located explicitly.
diff --git a/src/fontfile/catalogue.c b/src/fontfile/catalogue.c
index 8029b28..7e7e477 100644
--- a/src/fontfile/catalogue.c
+++ b/src/fontfile/catalogue.c
@@ -27,6 +27,8 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
+
+#ifdef HAVE_READLINK
 #include <X11/fonts/fntfilst.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -474,3 +476,5 @@ CatalogueRegisterLocalFpeFunctions (void)
 			 CatalogueListNextFontOrAlias,
 			 FontFileEmptyBitmapSource);
 }
+
+#endif /* HAVE_READLINK */
diff --git a/src/fontfile/register.c b/src/fontfile/register.c
index 8d7229e..4faeb8f 100644
--- a/src/fontfile/register.c
+++ b/src/fontfile/register.c
@@ -57,6 +57,8 @@ FontFileRegisterFpeFunctions(void)
 #endif
 
     FontFileRegisterLocalFpeFunctions ();
+#ifdef HAVE_READLINK
     CatalogueRegisterLocalFpeFunctions ();
+#endif
 }
 
-- 
1.7.9



More information about the xorg-devel mailing list