summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-24 22:55:18 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-24 22:56:51 -0800
commit3c9e50cb0bf42f42f0be460e89045257c7efc480 (patch)
tree728928e8473fc778f9c6f0149e35c0063ae30803
parentcff32361b4a901a131b23c01f7592779358f4141 (diff)
Remove dependency on libXaw
The only thing from libXaw that isn't in #ifdef NOTDEF is a reference to the ZERO #define, which is trivially replaced - no point requiring an entire library for a single constant #define. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--Makefile.am2
-rw-r--r--b4light.c6
-rw-r--r--configure.ac1
3 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index a9b3d63..cf7459f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@
SUBDIRS = man
bin_PROGRAMS = beforelight
-AM_CFLAGS = $(BEFORELIGHT_CFLAGS) $(XAW_CFLAGS) $(CWARNFLAGS)
+AM_CFLAGS = $(BEFORELIGHT_CFLAGS) $(CWARNFLAGS)
beforelight_LDADD = $(BEFORELIGHT_LIBS)
beforelight_SOURCES = \
diff --git a/b4light.c b/b4light.c
index 735742d..6298db3 100644
--- a/b4light.c
+++ b/b4light.c
@@ -34,13 +34,17 @@ in this Software without prior written authorization from the X Consortium.
#include <X11/Shell.h>
#ifdef NOTDEF
#include <X11/Xaw/Label.h>
-#endif
#include <X11/Xaw/Cardinals.h>
+#endif
#include <X11/extensions/scrnsaver.h>
#include <X11/Xcms.h>
#include <stdlib.h>
#include <time.h>
+#ifndef ZERO
+# define ZERO ((Cardinal)0)
+#endif
+
#ifdef NOTDEF
static void quit (Widget w, XEvent *event,
String *params, Cardinal *num_params);
diff --git a/configure.ac b/configure.ac
index 6276ff6..269f9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,6 @@ AC_CONFIG_HEADERS([config.h])
# Checks for pkg-config packages
PKG_CHECK_MODULES(BEFORELIGHT, x11 xscrnsaver xt)
-PKG_CHECK_MODULES(XAW, xaw7)
PKG_CHECK_MODULES(APPDEFS, xt)
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`