summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-11-19 22:45:57 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-11-19 22:45:57 -0800
commit73941fa2f5e5a71fb36a3b9a9dec8a833898907e (patch)
treeac40b390fea4f78800bcec31cd387956bb6940f5
parent6d8da24e45c124162b06529290366d465f1df499 (diff)
Bug 31645 - xlogo: Doesn't build with libXrender and without libXft
https://bugs.freedesktop.org/show_bug.cgi?id=31645 Add AM_CONDITIONAL to skip building RenderLogo.c without Render support Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am8
-rw-r--r--RenderLogo.c4
-rw-r--r--configure.ac1
3 files changed, 10 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index fa8729e..51bd1dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,11 +27,15 @@ xlogo_SOURCES = \
Logo.c \
Logo.h \
LogoP.h \
- RenderLogo.c \
- RenderLogo.h \
xlogo.c \
xlogo.h
+if USE_RENDER
+xlogo_SOURCES += \
+ RenderLogo.c \
+ RenderLogo.h
+endif
+
appman_PRE = \
xlogo.man
diff --git a/RenderLogo.c b/RenderLogo.c
index a7963fb..bb1361c 100644
--- a/RenderLogo.c
+++ b/RenderLogo.c
@@ -27,6 +27,8 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+
+#ifdef XRENDER
#include <stdio.h>
#include <X11/Xlib.h>
@@ -159,4 +161,4 @@ intersect(XLineDouble *l1, XLineDouble *l2, XPointDouble *intersection)
fprintf(stderr, "intersect: intersection is off by %f\n", check);
}
}
-
+#endif /* XRENDER */
diff --git a/configure.ac b/configure.ac
index a3357ef..4f372f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,7 @@ if test "x$USE_RENDER" = "xyes" ; then
AC_DEFINE(XRENDER, 1, [Define to 1 to use Xrender & Xft2 to draw logo])
fi
+AM_CONDITIONAL([USE_RENDER], [test "x$USE_RENDER" = "xyes"])
PKG_CHECK_MODULES(XLOGO, $XLOGO_DEPS)