[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 18/45: Add automake conditional to build without X support
From: |
Bertrand Garrigues |
Subject: |
[groff] 18/45: Add automake conditional to build without X support |
Date: |
Tue, 11 Nov 2014 21:25:55 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit 853560a4efbf603739a9112c84d1d4fb0084df6a
Author: Bertrand Garrigues <address@hidden>
Date: Mon Sep 1 00:54:13 2014 +0200
Add automake conditional to build without X support
---
TESTS | 19 +++++++++++++++++++
configure.ac | 10 ++++++++++
font/devX100-12/devX100-12.am | 2 ++
font/devX100/devX100.am | 2 ++
font/devX75-12/devX75-12.am | 4 ++--
font/devX75/devX75.am | 2 ++
src/devices/xditview/xditview.am | 9 +++++++++
src/libs/libxutil/libxutil.am | 3 ++-
src/utils/xtotroff/xtotroff.am | 4 +++-
9 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/TESTS b/TESTS
index 08f0860..e61f753 100644
--- a/TESTS
+++ b/TESTS
@@ -322,9 +322,28 @@ the install tree).
- All phases now succeed
+3. Additional tests
+
+3.1 Build without X support
+
+ Calling configure with option --without-x doesn't build:
+ - gxidview
+ - libxutil.a
+ - xtotroff
+
+ The following fonts are not installed:
+ - dev/X100
+ - devX100-12
+ - devX75
+ - devX75-12
+
+ 'make distcheck' passes correctly, and the tarball generated by
+ 'make dist' is identical to the one generated with X support.
+
Notes
-----
- Gnulib: some files of src/libs/libgroff could be replaced by their
gnulib equivalent
- Gnulib: git-version-gen could be used
+
diff --git a/configure.ac b/configure.ac
index 5c72c8e..31111b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,16 @@ gl_LOCALCHARSET
AM_CONDITIONAL([BUILD_WINSCRIPTS], [test -n "$make_winscripts"])
+# If X11 is not available, don't build:
+# font/devX75
+# font/devX75-12
+# font/devX100
+# font/devX100-12
+# src/devices/xditview
+# src/utils/xtotroff
+# src/libs/libxutil
+AM_CONDITIONAL([WITHOUT_X11], [test "x$groff_no_x" = "xyes"])
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/font/devX100-12/devX100-12.am b/font/devX100-12/devX100-12.am
index 2681b31..8ab8625 100644
--- a/font/devX100-12/devX100-12.am
+++ b/font/devX100-12/devX100-12.am
@@ -36,7 +36,9 @@ DEVX10012FONTS = \
font/devX100-12/NBI \
font/devX100-12/S
+if !WITHOUT_X11
devX10012fontdir = $(fontdir)/devX100-12
devX10012font_DATA = $(DEVX10012FONTS)
+endif
EXTRA_DIST += $(DEVX10012FONTS)
diff --git a/font/devX100/devX100.am b/font/devX100/devX100.am
index 78a6170..bd41926 100644
--- a/font/devX100/devX100.am
+++ b/font/devX100/devX100.am
@@ -36,7 +36,9 @@ DEVX100FONTS = \
font/devX100/NBI \
font/devX100/S
+if !WITHOUT_X11
devX100fontdir = $(fontdir)/devX100
devX100font_DATA = $(DEVX100FONTS)
+endif
EXTRA_DIST += $(DEVX100FONTS)
diff --git a/font/devX75-12/devX75-12.am b/font/devX75-12/devX75-12.am
index 23a7773..d959e79 100644
--- a/font/devX75-12/devX75-12.am
+++ b/font/devX75-12/devX75-12.am
@@ -35,8 +35,8 @@ DEVX7512FONTS = \
font/devX75-12/NB \
font/devX75-12/NBI \
font/devX75-12/S
-
+if !WITHOUT_X11
devX7512fontdir = $(fontdir)/devX75-12
devX7512font_DATA = $(DEVX7512FONTS)
-
+endif
EXTRA_DIST += $(DEVX7512FONTS)
diff --git a/font/devX75/devX75.am b/font/devX75/devX75.am
index c05dc76..e265ce2 100644
--- a/font/devX75/devX75.am
+++ b/font/devX75/devX75.am
@@ -36,7 +36,9 @@ DEVX75FONTS = \
font/devX75/NBI \
font/devX75/S
+if !WITHOUT_X11
devX75fontdir = $(fontdir)/devX75
devX75font_DATA = $(DEVX75FONTS)
+endif
EXTRA_DIST += $(DEVX75FONTS)
diff --git a/src/devices/xditview/xditview.am b/src/devices/xditview/xditview.am
index 75dda1d..93f291c 100644
--- a/src/devices/xditview/xditview.am
+++ b/src/devices/xditview/xditview.am
@@ -30,6 +30,9 @@ GXDITVIEWSOURCES = \
src/devices/xditview/Menu.h \
src/devices/xditview/Dvi.h
+if WITHOUT_X11
+EXTRA_DIST += $(GXDITVIEWSOURCES)
+else
xditview_srcdir = $(top_srcdir)/src/devices/xditview
bin_PROGRAMS += gxditview
gxditview_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) -Dlint \
@@ -51,6 +54,7 @@ src/devices/xditview/gxditview-xditview.$(OBJEXT):
$(XDITVIEW_GENHDRS)
src/devices/xditview/GXditview-ad.h: $(xditview_srcdir)/GXditview.ad
@echo Making $@
$(SHELL) $(xditview_srcdir)/ad2c $(xditview_srcdir)/GXditview.ad > $@
+endif
EXTRA_DIST += \
src/devices/xditview/ad2c \
@@ -77,6 +81,10 @@ EXTRA_DIST += \
install-data-local: install_xditview
uninstall-local: uninstall_xditview
+if WITHOUT_X11
+install_xditview:
+uninstall_xditview:
+else
install_xditview: $(xditview_srcdir)/GXditview.ad
$(xditview_srcdir)/GXditview-color.ad
-test -d $(DESTDIR)$(appresdir) \
|| $(mkinstalldirs) $(DESTDIR)$(appresdir)
@@ -97,3 +105,4 @@ uninstall_xditview:
rm -f $(DESTDIR)$(appresdir)/GXditview
rm -f $(DESTDIR)$(appresdir)/GXditview-color
+endif
diff --git a/src/libs/libxutil/libxutil.am b/src/libs/libxutil/libxutil.am
index a6760e2..a20b708 100644
--- a/src/libs/libxutil/libxutil.am
+++ b/src/libs/libxutil/libxutil.am
@@ -20,10 +20,11 @@
#
########################################################################
-# TODO: X management
+if !WITHOUT_X11
noinst_LIBRARIES += libxutil.a
libxutil_a_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS)
libxutil_a_SOURCES = \
src/libs/libxutil/DviChar.c \
src/libs/libxutil/XFontName.c \
src/libs/libxutil/xmalloc.c
+endif
diff --git a/src/utils/xtotroff/xtotroff.am b/src/utils/xtotroff/xtotroff.am
index 8fa1be6..07a5e9c 100644
--- a/src/utils/xtotroff/xtotroff.am
+++ b/src/utils/xtotroff/xtotroff.am
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+if !WITHOUT_X11
bin_PROGRAMS += xtotroff
man1_MANS += src/utils/xtotroff/xtotroff.n
-EXTRA_DIST += src/utils/xtotroff/xtotroff.man
xtotroff_SOURCES = src/utils/xtotroff/xtotroff.c
XLIBS=$(LIBXUTIL) $(LIBGROFF)
xtotroff_LDADD = libxutil.a libgroff.a $(X_LIBS) $(X_PRE_LIBS) \
-lXaw -lXt -lX11 $(X_EXTRA_LIBS) $(LIBM)
xtotroff_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS)
+endif
+EXTRA_DIST += src/utils/xtotroff/xtotroff.man
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 18/45: Add automake conditional to build without X support,
Bertrand Garrigues <=