emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/gnus-cloud 41628a7 13/15: Merge branch 'master' of


From: Teodor Zlatanov
Subject: [Emacs-diffs] scratch/gnus-cloud 41628a7 13/15: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Date: Tue, 5 Jul 2016 02:22:48 +0000 (UTC)

branch: scratch/gnus-cloud
commit 41628a74f0522bd80f3b2dba193a27de564daabf
Merge: 5950ff5 e3ae3c4
Author: Ted Zlatanov <address@hidden>
Commit: Ted Zlatanov <address@hidden>

    Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
 configure.ac |   41 +++++++++++++++++++++++++----------------
 src/xfns.c   |    7 +------
 src/xterm.c  |    8 ++------
 src/xterm.h  |    4 ++++
 4 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2674806..aaddfcd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4287,23 +4287,32 @@ else
     [Returns true if character is any form of separator.])
 fi
 
-AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.])
-
-case $opsys in
-  aix4-2)
-    dnl Unfortunately without libXmu we cannot support EditRes.
-    if test "x$ac_cv_search_XmuConvertStandardSelection" = xno; then
-      AC_DEFINE(NO_EDITRES, 1)
-    fi
-    ;;
-
-  hpux*)
-    dnl Assar Westerlund <address@hidden> says this is necessary for
-    dnl HP-UX 10.20, and that it works for HP-UX 0 as well.
-    AC_DEFINE(NO_EDITRES, 1)
+if test "$USE_X_TOOLKIT" != "none"; then
+  have_editres=yes
+  case $opsys in
+    hpux*)
+      dnl Assar Westerlund <address@hidden> says this is necessary
+      dnl for HP-UX 10.20, and that it works for HP-UX 0 as well.
+      have_editres=no
     ;;
-esac
-
+  esac
+  if test "$have_editres" != no && test ! -z "$LIBXMU"; then
+    OLDLIBS="$LIBS"
+    dnl See libXmu.a check above.
+    if test x$HAVE_X11XTR6 = xyes; then
+      LIBS="-lXt -lSM -lICE $LIBXMU"
+    else
+      OTHERLIBS="-lXt -$LIBXMU"
+    fi
+    AC_TRY_LINK(
+      [#include <X11/Intrinsic.h>
+       #include <X11/Xmu/Editres.h>],
+      [_XEditResCheckMessages (0, 0, 0, 0);],
+      [AC_DEFINE([X_TOOLKIT_EDITRES], 1,
+        [Define to 1 if we should use XEditRes.])])
+    LIBS=$OLDLIBS
+  fi
+fi
 
 case $opsys in
   sol2* | unixware )
diff --git a/src/xfns.c b/src/xfns.c
index 265eb6c..798dc49 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -91,11 +91,6 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include "../lwlib/xlwmenu.h"
 #endif
 
-#if !defined (NO_EDITRES)
-#define HACK_EDITRES
-extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
-#endif /* not defined NO_EDITRES */
-
 /* Unique id counter for widgets created by the Lucid Widget Library.  */
 
 extern LWLIB_ID widget_id_tick;
@@ -2662,7 +2657,7 @@ x_window (struct frame *f, long window_prompting)
 
   hack_wm_protocols (f, shell_widget);
 
-#ifdef HACK_EDITRES
+#ifdef X_TOOLKIT_EDITRES
   XtAddEventHandler (shell_widget, 0, True, _XEditResCheckMessages, 0);
 #endif
 
diff --git a/src/xterm.c b/src/xterm.c
index 76b92df..cd1d712 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -95,10 +95,6 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #endif
 
 #ifdef USE_X_TOOLKIT
-#if !defined (NO_EDITRES)
-#define HACK_EDITRES
-extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
-#endif /* not NO_EDITRES */
 
 /* Include toolkit specific headers for the scroll bar widget.  */
 
@@ -7610,7 +7606,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            goto done;
           }
 
-#ifdef HACK_EDITRES
+#ifdef X_TOOLKIT_EDITRES
         if (event->xclient.message_type == dpyinfo->Xatom_editres)
           {
            f = any;
@@ -7619,7 +7615,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                      NULL, (XEvent *) event, NULL);
            goto done;
           }
-#endif /* HACK_EDITRES */
+#endif /* X_TOOLKIT_EDITRES */
 
         if (event->xclient.message_type == dpyinfo->Xatom_DONE
            || event->xclient.message_type == dpyinfo->Xatom_PAGE)
diff --git a/src/xterm.h b/src/xterm.h
index 8e1fc78..675a484 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -38,6 +38,10 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include <X11/CoreP.h>         /* foul, but we need this to use our own
                                   window inside a widget instead of one
                                   that Xt creates... */
+#ifdef X_TOOLKIT_EDITRES
+#include <X11/Xmu/Editres.h>
+#endif
+
 typedef Widget xt_or_gtk_widget;
 #endif
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]