diff options
author | Eric Anholt <anholt@FreeBSD.org> | 2006-07-21 17:14:04 -0400 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2006-07-21 17:14:04 -0400 |
commit | c4803a6bc8d606f0fb48cae90b46d417c04d1cad (patch) | |
tree | df4bfac59c6b0d9697d331b40150b28649a4e454 | |
parent | 2030a957812efeb28cf0899d857a72cd846759c3 (diff) |
Bug #6172: Fix build with --disable-xprint, and disable xprint by default.
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 21 | ||||
-rw-r--r-- | xdbedizzy.c | 4 |
3 files changed, 13 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index 974ae81..85c74a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,10 +24,6 @@ bin_PROGRAMS = xdbedizzy xdbedizzy_CFLAGS = $(XDBEDIZZY_CFLAGS) $(EXTRA) xdbedizzy_LDADD = $(XDBEDIZZY_LIBS) -lm -if USE_XPRINT -xdbedizzy_CFLAGS += -DUSE_XPRINT -endif - xdbedizzy_SOURCES = \ xdbedizzy.c diff --git a/configure.ac b/configure.ac index f5ad3e3..9b1a4aa 100644 --- a/configure.ac +++ b/configure.ac @@ -33,24 +33,21 @@ AC_PROG_INSTALL # Boiler plate xprint checks -AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], [Enable XPrint support]), - [use_xprint=$enableval],[use_xprint=auto]) -if test "x$use_xprint" = "xauto"; then - PKG_CHECK_MODULES(XPRINT, xp, use_xprint=yes, use_xprint=no) -fi - -echo use xprint: $use_xprint - -AM_CONDITIONAL([USE_XPRINT], [test "$use_xprint" = yes]) +AC_ARG_ENABLE(xprint, AC_HELP_STRING([--enable-xprint], + [Enable XPrint support]), + [use_xprint=$enableval],[use_xprint=no]) # Checks for pkg-config packages -if test x$use_xprint = xyes ; then - PKG_CHECK_MODULES(XDBEDIZZY, xext xprintutil xp xau) +if test "x$use_xprint" = "xyes"; then + xprintmodules="xprintutil xp xau" + AC_DEFINE(USE_XPRINT, 1, [Define to enable Xprint]) else - PKG_CHECK_MODULES(XDBEDIZZY, xext) + xprintmodules="" fi +PKG_CHECK_MODULES(XDBEDIZZY, xext $xprintmodules) + AC_SUBST(XDBEDIZZY_CFLAGS) AC_SUBST(XDBEDIZZY_LIBS) diff --git a/xdbedizzy.c b/xdbedizzy.c index 4195e73..6be2e7c 100644 --- a/xdbedizzy.c +++ b/xdbedizzy.c @@ -37,6 +37,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/Xdbe.h> |