summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-14 17:58:03 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-15 10:54:38 -0800
commit982c9d064fc05740374ae6fed02045527adb7d6a (patch)
tree1e8dd60c8b58e1595d4d333cfd5964d226b8feed
parentdf1c5c7755441c32e26eec37d1b3d0fa0dbeceb3 (diff)
configure: Add --with-xft and --without-xft flags to control USE_XFT
USE_XFT ifdefs have been in since the import from XFree86, but never enabled by the autoconf build, oops! Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--.gitlab-ci.yml18
-rw-r--r--DviChar.c3
-rw-r--r--Makefile.am4
-rw-r--r--XFontName.c3
-rw-r--r--configure.ac18
-rw-r--r--draw.c3
-rw-r--r--font.c3
-rw-r--r--lex.c4
-rw-r--r--page.c4
-rw-r--r--parse.c4
-rw-r--r--xditview.c4
11 files changed, 61 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bf10e91..790fddf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,8 +30,8 @@ variables:
# The tag should be updated each time the list of packages is updated.
# Changing a tag forces the associated image to be rebuilt.
# Note: the tag has no meaning, we use a date format purely for readability
- FDO_DISTRIBUTION_TAG: '2021-12-04.0'
- FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake make xorg-util-macros xorgproto libxaw libxmu libxt libx11'
+ FDO_DISTRIBUTION_TAG: '2023-01-14.0'
+ FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake make xorg-util-macros xorgproto libxaw libxmu libxt libx11 libxft libxrender fontconfig'
#
@@ -83,7 +83,7 @@ container-prep:
#
# The default build, runs on the image built above.
#
-build:
+.default_build:
stage: build
extends:
- .fdo.distribution-image@arch
@@ -91,8 +91,16 @@ build:
- autoreconf -ivf
- mkdir _builddir
- pushd _builddir > /dev/null
- - ../configure --disable-silent-rules
+ - ../configure --disable-silent-rules ${WITH_XFT_FLAG}
- make
- make check
- - make distcheck
+ - make distcheck DISTCHECK_CONFIGURE_FLAGS="${WITH_XFT_FLAG}"
- popd > /dev/null
+
+# Run default build with all the different db options
+build:
+ extends:
+ - .default_build
+ parallel:
+ matrix:
+ - WITH_XFT_FLAG: ["--with-xft", "--without-xft"]
diff --git a/DviChar.c b/DviChar.c
index 526b640..ceb9844 100644
--- a/DviChar.c
+++ b/DviChar.c
@@ -4,6 +4,9 @@
* Map DVI (ditrof output) character names to
* font indexes and back
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <X11/Intrinsic.h>
#include "DviChar.h"
diff --git a/Makefile.am b/Makefile.am
index c82388b..bf58a68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,8 +23,8 @@ SUBDIRS = man
bin_PROGRAMS = xditview
AM_CPPFLAGS = -D_CONST_X_STRING
-AM_CFLAGS = $(XDITVIEW_CFLAGS)
-xditview_LDADD = $(XDITVIEW_LIBS) -lm
+AM_CFLAGS = $(XDITVIEW_CFLAGS) $(XFT_CFLAGS)
+xditview_LDADD = $(XDITVIEW_LIBS) $(XFT_LIBS) -lm
xditview_SOURCES = \
draw.c \
diff --git a/XFontName.c b/XFontName.c
index fc5d819..203cc60 100644
--- a/XFontName.c
+++ b/XFontName.c
@@ -3,6 +3,9 @@
*
* build/parse X Font name strings
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
diff --git a/configure.ac b/configure.ac
index 994369e..12134ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,8 +57,26 @@ AC_ARG_WITH(appdefaultdir,
[appdefaultdir="$withval"], [appdefaultdir="${xt_appdefaultdir}"])
AC_SUBST(appdefaultdir)
+# Check whether to use Xft to draw text
+AC_ARG_WITH(xft,
+ AS_HELP_STRING([--with-xft],
+ [Use Xft to draw text (default is YES if installed)]),
+ [USE_XFT="$withval"],
+ PKG_CHECK_EXISTS([xft xrender fontconfig],
+ [USE_XFT="yes"], [USE_XFT="no"]))
+
+if test "x$USE_XFT" = "xyes" ; then
+ PKG_CHECK_MODULES(XFT, [xft xrender fontconfig])
+ AC_DEFINE([USE_XFT], 1,
+ [Define to 1 to use Xft for text rendering])
+fi
+
AC_CONFIG_FILES([
Makefile
man/Makefile])
AC_OUTPUT
+
+echo ""
+echo "$PACKAGE_STRING will be built with the following settings:"
+echo " XFT: "$USE_XFT
diff --git a/draw.c b/draw.c
index 877d7bf..11d0bec 100644
--- a/draw.c
+++ b/draw.c
@@ -38,6 +38,9 @@ in this Software without prior written authorization from the X Consortium.
David Evans <dre@cs.nott.ac.uk>, 14th March, 1990
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <X11/Xos.h>
#include <X11/IntrinsicP.h>
diff --git a/font.c b/font.c
index afd4ab7..3cbb454 100644
--- a/font.c
+++ b/font.c
@@ -3,6 +3,9 @@
*
* map dvi fonts to X fonts
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <X11/Xos.h>
#include <X11/IntrinsicP.h>
diff --git a/lex.c b/lex.c
index a93faab..9f11a15 100644
--- a/lex.c
+++ b/lex.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/Xos.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
diff --git a/page.c b/page.c
index 6318f55..67fe247 100644
--- a/page.c
+++ b/page.c
@@ -4,6 +4,10 @@
* map page numbers to file position
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include <X11/Xos.h>
diff --git a/parse.c b/parse.c
index 26a222e..cb00d65 100644
--- a/parse.c
+++ b/parse.c
@@ -34,6 +34,10 @@ from the X Consortium.
* parse dvi input
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/Xos.h>
#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
diff --git a/xditview.c b/xditview.c
index f02ee6a..675706b 100644
--- a/xditview.c
+++ b/xditview.c
@@ -33,6 +33,10 @@ from the X Consortium.
* Display ditroff output in an X window
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xatom.h>