dont build xftlsfonts when no xft found or xft2 found
authorDana Jansens <danakj@orodu.net>
Mon, 11 Nov 2002 03:09:26 +0000 (03:09 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 11 Nov 2002 03:09:26 +0000 (03:09 +0000)
configure.in
util/Makefile.am
util/xftlsfonts.cc

index 758757c5e3cb6b098e402dedc82028b9ccf04a25..5e699972b7df424e26a36ecb59b841fcce0a4109 100644 (file)
@@ -138,7 +138,6 @@ fi
 dnl Check for Xft extension support and proper library files.
 XFT=""
 XFT2=""
-OLDLIBS=${LIBS}
 dnl XFT_UTF8=""
 AC_MSG_CHECKING([whether to build support for the Xft extension])
 AC_ARG_ENABLE(
@@ -183,10 +182,10 @@ if test "$XFT" = "yes"; then
   dnl if test "$XFT_UTF8" = "yes"; then
     dnl AC_DEFINE(XFT_UTF8,1,[Support for Utf8 text in the Xft extension])
   dnl fi
-else
-  LIBS=${OLDLIBS}
 fi
-
+AM_CONDITIONAL(XFT, test "$XFT" = "yes")
+AM_CONDITIONAL(XFT2, test "$XFT2" = "yes");
+       
 dnl Check for ordered 8bpp dithering
 ORDEREDPSEUDO=""
 AC_MSG_CHECKING([whether to include Pseudocolor ordered dithering code])
index 118c56fc8a76a1e9d4f6013c081f9449a982a463..a855954db1da3568aece59de56572051db91b101 100644 (file)
@@ -2,15 +2,21 @@
 
 CPPFLAGS= @CPPFLAGS@ @DEBUG@
 
-SUBDIRS =                      epist
+SUBDIRS =              epist
 bin_SCRIPTS =          bsetbg
-bin_PROGRAMS =         bsetroot xftlsfonts
+
+if XFT
+if XFT2
+else
+TMP_PROGS =    xftlsfonts
+endif
+endif
+
+bin_PROGRAMS =         bsetroot $(TMP_PROGS)
 
 bsetroot_SOURCES =     bsetroot.cc
 bsetroot_LDADD =       ../src/BaseDisplay.o ../src/Color.o ../src/GCCache.o ../src/Texture.o ../src/Timer.o ../src/Image.o ../src/ImageControl.o ../src/i18n.o ../src/Util.o
 
-xftlsfonts_SOURCES = xftlsfonts.cc
-
 MAINTAINERCLEANFILES = Makefile.in
 
 distclean-local:
index bc55bdc35f34f114d5c2d5978f5a75b9d4d93d8d..932ffc74d3d14354e2d45150c281b4e3f5f19e5d 100644 (file)
@@ -5,20 +5,6 @@ const char *VERSION = "1.0";
 #include "../config.h"
 #endif // HAVE_CONFIG_H
 
-#ifndef   XFT
-#include <iostream>
-using std::cout;
-using std::endl;
-
-int main(int, char **) {
-  cout << NAME << " version " << VERSION << endl;
-  cout << "Copyright (c) 2002, Ben Jansens <ben@orodu.net>" << endl;
-  cout << endl;
-  cout << "Openbox was built without support for Xft fonts. This utility must"
-    << endl;
-  cout << "must be built with Xft support in order to function." << endl;
-}
-#else  // XFT
 extern "C" {
 #include <X11/Xlib.h>
 #include <X11/Xft/Xft.h>
@@ -144,5 +130,3 @@ int main(int argc, char **argv) {
   XCloseDisplay(display);
   return 0;
 }
-#endif // XFT
-