summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-09-08 20:00:22 +0200
committerBram Moolenaar <Bram@vim.org>2015-09-08 20:00:22 +0200
commit3cbe0c01ad71875bd662edb629f9e792a734f292 (patch)
treeb22088b5131151e038dbe253966750ead0ab1a5c
parenta122b5e98afe18c9cfdab31b77d2a9fbb8e36416 (diff)
downloadvim-git-3cbe0c01ad71875bd662edb629f9e792a734f292.tar.gz
patch 7.4.861v7.4.861
Problem: pango_shape_full() is not always available. Solution: Add a configure check.
-rwxr-xr-xsrc/auto/configure31
-rw-r--r--src/config.h.in3
-rw-r--r--src/configure.in16
-rw-r--r--src/gui_gtk_x11.c5
-rw-r--r--src/version.c2
5 files changed, 57 insertions, 0 deletions
diff --git a/src/auto/configure b/src/auto/configure
index cdefc9c29..3bd5685f5 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -12181,6 +12181,37 @@ else
$as_echo "yes" >&6; }
fi
+if test "x$GTK_CFLAGS" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
+$as_echo_n "checking for pango_shape_full... " >&6; }
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <gtk/gtk.h>
+int
+main ()
+{
+ pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }; $as_echo "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gpm argument" >&5
$as_echo_n "checking --disable-gpm argument... " >&6; }
# Check whether --enable-gpm was given.
diff --git a/src/config.h.in b/src/config.h.in
index b8168a55f..e8d61831a 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -369,6 +369,9 @@
#undef HAVE_SOLARIS_ACL
#undef HAVE_AIX_ACL
+/* Define if pango_shape_full() is available. */
+#undef HAVE_PANGO_SHAPE_FULL
+
/* Define if you want to add support of GPM (Linux console mouse daemon) */
#undef HAVE_GPM
diff --git a/src/configure.in b/src/configure.in
index 80d70b0e5..f17fcb9aa 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -3539,6 +3539,22 @@ else
AC_MSG_RESULT(yes)
fi
+if test "x$GTK_CFLAGS" != "x"; then
+ dnl pango_shape_full() is new, fall back to pango_shape().
+ AC_MSG_CHECKING(for pango_shape_full)
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
+ AC_TRY_COMPILE(
+ [#include <gtk/gtk.h>],
+ [ pango_shape_full(NULL, 0, NULL, 0, NULL, NULL); ],
+ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_PANGO_SHAPE_FULL),
+ AC_MSG_RESULT(no))
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+fi
+
AC_MSG_CHECKING(--disable-gpm argument)
AC_ARG_ENABLE(gpm,
[ --disable-gpm Don't use gpm (Linux mouse daemon).], ,
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 5c4abce65..bcd05c43e 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -5063,8 +5063,13 @@ not_ascii:
* done, because drawing the cursor would change the display. */
item->analysis.shape_engine = default_shape_engine;
+#ifdef HAVE_PANGO_SHAPE_FULL
pango_shape_full((const char *)s + item->offset, item->length,
(const char *)s, len, &item->analysis, glyphs);
+#else
+ pango_shape((const char *)s + item->offset, item->length,
+ &item->analysis, glyphs);
+#endif
/*
* Fixed-width hack: iterate over the array and assign a fixed
* width to each glyph, thus overriding the choice made by the
diff --git a/src/version.c b/src/version.c
index 7ffdd1815..78d061c8d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 861,
+/**/
860,
/**/
859,