From: Khaled Hosny Date: Tue, 5 Jun 2018 10:12:26 +0000 (+0200) Subject: Add support for building with HarfBuzz X-Git-Tag: emacs-27.0.90~2671^2~59 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ab93444cbbd06096cdf33a7a76d8e6ee6c37c04a;p=emacs.git Add support for building with HarfBuzz Not used yet. --- diff --git a/configure.ac b/configure.ac index 8b34c3b6581..3c671b546a8 100644 --- a/configure.ac +++ b/configure.ac @@ -358,6 +358,7 @@ OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support]) OPTION_DEFAULT_ON([json], [don't compile with native JSON support]) OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) +OPTION_DEFAULT_OFF([harfbuzz],[use HarfBuzz for text shaping (experimental)]) OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support]) OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping]) @@ -3307,10 +3308,24 @@ if test "${HAVE_X11}" = "yes"; then test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype) fi + HAVE_HARFBUZZ=no HAVE_LIBOTF=no if test "${HAVE_FREETYPE}" = "yes"; then AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if using the freetype and fontconfig libraries.]) + if test "${with_harfbuzz}" != "no"; then + EMACS_CHECK_MODULES([HARFBUZZ], [harfbuzz]) + if test "$HAVE_HARFBUZZ" = "yes"; then + AC_DEFINE(HAVE_HARFBUZZ, 1, [Define to 1 if using HarfBuzz.]) + AC_CHECK_LIB(harfbuzz, hb_ft_font_create_referenced, + HAVE_HB_FT_FONT_CREATE_REFERENCED=yes, + HAVE_HB_FT_FONT_CREATE_REFERENCED=no) + if test "${HAVE_HB_FT_FONT_CREATE_REFERENCED}" = "yes"; then + AC_DEFINE(HAVE_HB_FT_FONT_CREATE_REFERENCED, 1, + [Define to 1 if HarfBuzz has hb_ft_font_create_referenced.]) + fi + fi + fi if test "${with_libotf}" != "no"; then EMACS_CHECK_MODULES([LIBOTF], [libotf]) if test "$HAVE_LIBOTF" = "yes"; then @@ -3344,6 +3359,7 @@ if test "${HAVE_X11}" = "yes"; then else HAVE_XFT=no HAVE_FREETYPE=no + HAVE_HARFBUZZ=no HAVE_LIBOTF=no HAVE_M17N_FLT=no fi @@ -3354,6 +3370,8 @@ AC_SUBST(FREETYPE_CFLAGS) AC_SUBST(FREETYPE_LIBS) AC_SUBST(FONTCONFIG_CFLAGS) AC_SUBST(FONTCONFIG_LIBS) +AC_SUBST(HARFBUZZ_CFLAGS) +AC_SUBST(HARFBUZZ_LIBS) AC_SUBST(LIBOTF_CFLAGS) AC_SUBST(LIBOTF_LIBS) AC_SUBST(M17N_FLT_CFLAGS) @@ -5461,7 +5479,7 @@ Configured for '${canonical}'. optsep= emacs_config_features= for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \ - GCONF GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \ + GCONF GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT \ LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 XDBE XIM \ NS MODULES THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2 GMP; do @@ -5520,6 +5538,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D Does Emacs use -lgnutls? ${HAVE_GNUTLS} Does Emacs use -lxml2? ${HAVE_LIBXML2} Does Emacs use -lfreetype? ${HAVE_FREETYPE} + Does Emacs use HarfBuzz? ${HAVE_HARFBUZZ} Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT} Does Emacs use -lotf? ${HAVE_LIBOTF} Does Emacs use -lxft? ${HAVE_XFT} diff --git a/src/Makefile.in b/src/Makefile.in index 6b2e54a1602..a8fa5c372f4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -133,6 +133,8 @@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ +HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ +HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ LIBOTF_CFLAGS = @LIBOTF_CFLAGS@ LIBOTF_LIBS = @LIBOTF_LIBS@ M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ @@ -370,7 +372,7 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \ $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ - $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ + $(HARFBUZZ_CFLAGS) $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) \ $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ $(WERROR_CFLAGS) @@ -500,7 +502,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(XDBE_LIBS) \ $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ - $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ + $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(HARFBUZZ_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \ $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \ $(JSON_LIBS) $(GMP_LIB)