From 71ef22b04d466803076af1da6763fecab95ce5bb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 28 Aug 2013 12:52:55 -0400 Subject: [PATCH] Turn hb-gobject, and introspection off by default Also enable bootstrapping without them. --- configure.ac | 39 ++++++++++++++++++++++++++++++++++----- src/Makefile.am | 5 +++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index e98005a1f..c19e1e88b 100644 --- a/configure.ac +++ b/configure.ac @@ -52,8 +52,16 @@ m4_define([hb_libtool_current], HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age AC_SUBST(HB_LIBTOOL_VERSION_INFO) -GOBJECT_INTROSPECTION_CHECK([1.32.0]) -GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) +# Documentation +have_gtk_doc=false +m4_ifdef([GTK_DOC_CHECK], [ + GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) + if test "x$enable_gtk_doc" = xyes; then + have_gtk_doc=true + fi +], [ + AM_CONDITIONAL([ENABLE_GTK_DOC], false) +]) # Functions and headers AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty) @@ -144,10 +152,12 @@ if $have_glib; then fi AM_CONDITIONAL(HAVE_GLIB, $have_glib) +dnl =========================================================================== + AC_ARG_WITH(gobject, [AS_HELP_STRING([--with-gobject=@<:@yes/no/auto@:>@], [Use gobject @<:@default=auto@:>@])],, - [with_gobject=auto]) + [with_gobject=no]) have_gobject=false if test "x$with_gobject" = "xyes" -o "x$with_gobject" = "xauto"; then PKG_CHECK_MODULES(GOBJECT, gobject-2.0 glib-2.0, have_gobject=true, :) @@ -164,6 +174,25 @@ AM_CONDITIONAL(HAVE_GOBJECT, $have_gobject) dnl =========================================================================== + +dnl =========================================================================== +# Gobject-Introspection +have_introspection=false +m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [ + if $have_gobject; then + GOBJECT_INTROSPECTION_CHECK([1.32.0]) + if test "x$found_introspection" = xyes; then + have_introspection=true + fi + else + AM_CONDITIONAL([HAVE_INTROSPECTION], false) + fi +], [ + AM_CONDITIONAL([HAVE_INTROSPECTION], false) +]) + +dnl =========================================================================== + have_ucdn=true if $have_glib; then have_ucdn=false @@ -417,7 +446,7 @@ Test / platform shapers (not normally needed): Uniscribe: ${have_uniscribe} Other features: - Documentation: ${enable_gtk_doc} + Documentation: ${have_gtk_doc} GObject bindings: ${have_gobject} - Introspection: ${found_introspection} + Introspection: ${have_introspection} ]) diff --git a/src/Makefile.am b/src/Makefile.am index fb7caf3a7..684e415f8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -371,13 +371,13 @@ TESTS_ENVIRONMENT = \ HBHEADERS="$(HBHEADERS) $(HBNODISTHEADERS)" \ $(NULL) +if HAVE_INTROSPECTION + -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = harfbuzz-$(HB_VERSION_MAJOR).0.gir # What does the 0 mean anyway?! INTROSPECTION_SCANNER_ARGS = -I$(srcdir) -n hb --identifier-prefix=hb_ --warn-all INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) -if HAVE_INTROSPECTION - harfbuzz-0.0.gir: libharfbuzz.la libharfbuzz-gobject.la harfbuzz_0_0_gir_INCLUDES = GObject-2.0 harfbuzz_0_0_gir_CFLAGS = \ @@ -408,6 +408,7 @@ typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) $(typelib_DATA) + endif -include $(top_srcdir)/git.mk