summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugh McMaster <hugh.mcmaster@outlook.com>2018-03-07 22:23:54 +1100
committerWerner Lemberg <wl@gnu.org>2018-03-08 06:25:13 +0100
commita7833f26c4ac45cafe1dffdcd7f7dcfd6493161c (patch)
treec64dece2c67e3ad91cacc31a0b0258254c413207
parentccec8892291f556a44cecba6efac568a03e4ff12 (diff)
downloadfreetype2-a7833f26c4ac45cafe1dffdcd7f7dcfd6493161c.tar.gz
Make installation of `freetype-config' optional (#53093).
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
-rw-r--r--ChangeLog9
-rw-r--r--builds/unix/configure.raw9
-rw-r--r--builds/unix/install.mk20
-rw-r--r--builds/unix/unix-def.in3
4 files changed, 33 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index ee0732015..1711e723a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2018-03-08 Hugh McMaster <hugh.mcmaster@outlook.com>
+
+ Make installation of `freetype-config' optional (#53093).
+
+ * bulds/unix/configure.raw: Add option `--enable-freetype-config'
+ and set `INSTALL_FT2_CONFIG'.
+ * builds/unix/unix-def.in (INSTALL_FT2_CONFIG): Define.
+ * builds/unix/install.mk (install): Handle it.
+
2018-03-05 Werner Lemberg <wl@gnu.org>
Make `ftlcdfil.c' part of the `base' module.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 48e0f40d5..1b4aa2cad 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -177,6 +177,15 @@ fi
CPPFLAGS="${orig_CPPFLAGS}"
+AC_ARG_ENABLE([freetype-config],
+ AS_HELP_STRING([--enable-freetype-config], [install freetype-config]),
+ [case "${enableval}" in
+ yes) enable_freetype_config="TRUE" ;;
+ no) enable_freetype_config="FALSE" ;;
+ *) AC_MSG_ERROR([unknown value '${enableval}' passed with --enable-freetype-config]) ;;
+ esac], [enable_freetype_config="FALSE"])
+
+AC_SUBST(INSTALL_FT2_CONFIG, [$enable_freetype_config])
# checks for library functions
diff --git a/builds/unix/install.mk b/builds/unix/install.mk
index d89064e44..89424514f 100644
--- a/builds/unix/install.mk
+++ b/builds/unix/install.mk
@@ -39,9 +39,11 @@ install: $(PROJECT_LIBRARY)
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
$(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
- $(DESTDIR)$(bindir) \
- $(DESTDIR)$(datadir)/aclocal \
+ $(DESTDIR)$(datadir)/aclocal
+ifeq ($(INSTALL_FT2_CONFIG),TRUE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) \
$(DESTDIR)$(mandir)/man1
+endif
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
-for P in $(PUBLIC_H) ; do \
@@ -52,7 +54,7 @@ install: $(PROJECT_LIBRARY)
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/config ; \
done
- $(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
+ $(INSTALL_DATA) $(TOP_DIR)/include/ft2build.h \
$(DESTDIR)$(includedir)/freetype2/ft2build.h
$(INSTALL_DATA) $(OBJ_BUILD)/ftconfig.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
@@ -60,14 +62,16 @@ install: $(PROJECT_LIBRARY)
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h
$(INSTALL_DATA) $(OBJ_BUILD)/ftoption.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftoption.h
- $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
- $(DESTDIR)$(bindir)/freetype-config
- $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
+ $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
- $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
+ $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
- $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
+ifeq ($(INSTALL_FT2_CONFIG),TRUE)
+ $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
+ $(DESTDIR)$(bindir)/freetype-config
+ $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
$(DESTDIR)$(mandir)/man1/freetype-config.1
+endif
uninstall:
diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in
index 059a06159..6957053ab 100644
--- a/builds/unix/unix-def.in
+++ b/builds/unix/unix-def.in
@@ -145,6 +145,9 @@ $(OBJ_BUILD)/freetype2.pc: $(TOP_DIR)/builds/unix/freetype2.in
chmod a-w $@.tmp
mv $@.tmp $@
+# defines whether we should install `freetype-config' or not
+INSTALL_FT2_CONFIG = @INSTALL_FT2_CONFIG@
+
all install: $(OBJ_BUILD)/freetype-config \
$(OBJ_BUILD)/freetype2.pc