mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-29 19:48:19 +00:00
Port to platforms with gtk3 but not webkitgtk3
I ran into this problem on my Fedora 23 installation; Emacs configured but did not build when --with-xwidgets was specified. * configure.ac (HAVE_WEBKIT, HAVE_GIR): Omit unnecessary initializations. (DOES_XWIDGETS_USE_GIR): New var. If --with-xwidgets is specified, report an error if not doable, to be consistent with the other --with options. Require webkitgtk3 to use Xwidgets, as the Xwidgets code does not work at all without webkitgtk3. Simplify use of EMACS_CHECK_MODULES. Output message about gobject introspection only if xwidgets are used. * etc/NEWS: Users need webkitgtk3, not merely webkit. * src/xwidget.c (syms_of_xwidget): Don’t worry about HAVE_WEBKIT_OSR, since this file is no longer compiled if webkitgtk3 is not available.
This commit is contained in:
parent
65575c24aa
commit
2388fa7498
35
configure.ac
35
configure.ac
@ -2566,35 +2566,32 @@ if test "${HAVE_GTK}" = "yes"; then
|
||||
fi
|
||||
|
||||
|
||||
dnl Enable xwidgets if GTK3 and WebKitGTK+ are available.
|
||||
HAVE_XWIDGETS=no
|
||||
HAVE_WEBKIT=no
|
||||
HAVE_GIR=no
|
||||
XWIDGETS_OBJ=
|
||||
if test "$with_xwidgets" != "no" && test "$USE_GTK_TOOLKIT" = "GTK3" &&
|
||||
test "$window_system" != "none"
|
||||
then
|
||||
HAVE_XWIDGETS=yes
|
||||
AC_DEFINE([HAVE_XWIDGETS], 1, [Define to 1 if you have xwidgets support.])
|
||||
DOES_XWIDGETS_USE_GIR=
|
||||
if test "$with_xwidgets" != "no"; then
|
||||
test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none" ||
|
||||
AC_MSG_ERROR([xwidgets requested but gtk3 not used.])
|
||||
|
||||
dnl xwidgets
|
||||
dnl - enable only if GTK3 is enabled, and we have a window system
|
||||
dnl - check for webkit and gobject introspection
|
||||
dnl webkit version for gtk3.
|
||||
WEBKIT_REQUIRED=1.4.0
|
||||
WEBKIT_MODULES="webkitgtk-3.0 >= $WEBKIT_REQUIRED"
|
||||
EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
|
||||
HAVE_XWIDGETS=$HAVE_WEBKIT
|
||||
test $HAVE_XWIDGETS = yes ||
|
||||
AC_MSG_ERROR([xwidgets requested but WebKitGTK+ not found.])
|
||||
|
||||
EMACS_CHECK_MODULES(WEBKIT, $WEBKIT_MODULES, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
|
||||
if test $HAVE_WEBKIT = yes; then
|
||||
AC_DEFINE([HAVE_WEBKIT_OSR], 1, [Define to 1 if you have webkit_osr support.])
|
||||
fi
|
||||
XWIDGETS_OBJ=xwidget.o
|
||||
AC_DEFINE([HAVE_XWIDGETS], 1, [Define to 1 if you have xwidgets support.])
|
||||
|
||||
GIR_REQUIRED=1.32.1
|
||||
GIR_MODULES="gobject-introspection-1.0 >= $GIR_REQUIRED"
|
||||
EMACS_CHECK_MODULES(GIR, $GIR_MODULES, HAVE_GIR=yes, HAVE_GIR=no)
|
||||
EMACS_CHECK_MODULES([GIR], [$GIR_MODULES])
|
||||
if test $HAVE_GIR = yes; then
|
||||
AC_DEFINE([HAVE_GIR], 1, [Define to 1 if you have GIR support.])
|
||||
fi
|
||||
XWIDGETS_OBJ=xwidget.o
|
||||
DOES_XWIDGETS_USE_GIR="\
|
||||
Does Xwidgets use gobject introspection? $HAVE_GIR"
|
||||
fi
|
||||
AC_SUBST(XWIDGETS_OBJ)
|
||||
|
||||
@ -5305,9 +5302,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
|
||||
Does Emacs have dynamic modules support? ${HAVE_MODULES}
|
||||
Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}
|
||||
Does Emacs support Xwidgets (requires gtk3)? ${HAVE_XWIDGETS}
|
||||
Does xwidgets support webkit? ${HAVE_WEBKIT}
|
||||
Does xwidgets support gobject introspection? ${HAVE_GIR}
|
||||
"])
|
||||
${DOES_XWIDGETS_USE_GIR}"])
|
||||
|
||||
if test -n "${EMACSDATA}"; then
|
||||
AS_ECHO([" Environment variable EMACSDATA set to: $EMACSDATA"])
|
||||
|
2
etc/NEWS
2
etc/NEWS
@ -121,7 +121,7 @@ and can contain escape sequences for command keys, quotes, and the like.
|
||||
* Changes in Emacs 25.1
|
||||
|
||||
** Xwidgets: a new feature for embedding native widgets inside Emacs buffers.
|
||||
If you have gtk3 and webkit-devel installed, you can access the
|
||||
If you have gtk3 and webkitgtk3 installed, you can access the
|
||||
embedded webkit browser with `M-x xwidget-webkit-browse-url'. This
|
||||
opens a new buffer with the embedded browser. The buffer will
|
||||
have a new mode, `xwidget-webkit-mode' (similar to `image-mode'),
|
||||
|
@ -1077,12 +1077,10 @@ syms_of_xwidget (void)
|
||||
defsubr (&Sxwidget_query_on_exit_flag);
|
||||
defsubr (&Sset_xwidget_query_on_exit_flag);
|
||||
|
||||
#ifdef HAVE_WEBKIT_OSR
|
||||
defsubr (&Sxwidget_webkit_goto_uri);
|
||||
defsubr (&Sxwidget_webkit_execute_script);
|
||||
defsubr (&Sxwidget_webkit_get_title);
|
||||
DEFSYM (Qwebkit_osr, "webkit-osr");
|
||||
#endif
|
||||
|
||||
defsubr (&Sxwidget_size_request);
|
||||
defsubr (&Sdelete_xwidget_view);
|
||||
|
Loading…
Reference in New Issue
Block a user