changeset 18025:7c0f59b688fc stable

configure.ac: Check for Xft library before building native graphics. * configure.ac: Check for Xft library before building native graphics.
author Rik <rik@octave.org>
date Tue, 26 Nov 2013 20:59:00 -0800
parents 989ff97a7e8c
children 50bce63dbb04
files configure.ac
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Tue Nov 26 21:51:17 2013 -0500
+++ b/configure.ac	Tue Nov 26 20:59:00 2013 -0800
@@ -1141,7 +1141,7 @@
   ## Check for fontconfig library
 
   warn_fontconfig=""
-  if test -z "$warn_freetype"; then
+  if test $native_graphics = yes; then
     PKG_CHECK_MODULES(FONTCONFIG, [fontconfig],
       [have_fontconfig=yes
        OPENGL_LIBS="$FONTCONFIG_LIBS $OPENGL_LIBS"
@@ -1155,6 +1155,20 @@
     OCTAVE_CONFIGURE_WARNING([warn_fontconfig])
   fi
 
+  ## Check for Xft library (when using X11)
+
+  warn_xft=""
+  if test $native_graphics = yes && test "$have_x" = yes; then
+    PKG_CHECK_MODULES(XFT, [xft],
+      [AC_DEFINE(HAVE_XFT, 1, [Define to 1 if Xft is present.])],
+      [warn_xft="Xft library not found.  Native graphics will be disabled."])
+  fi
+
+  if test -n "$warn_xft"; then
+    native_graphics=no
+    OCTAVE_CONFIGURE_WARNING([warn_xft])
+  fi
+
   ## Check for FLTK (www.fltk.org) library
 
   AC_ARG_WITH([fltk-prefix], [