+2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Improve OpenMotif detection on GNU/Linux systems.
+ * configure.ac (MOTIF): Check for /usr/include/openmotif
+ and /usr/(lib|lib64)/openmotif if --with-x-toolkit=motif.
+
2012-07-31 Andreas Schwab <schwab@linux-m68k.org>
* Makefile.in (install-arch-indep): Avoid eval.
LIBXP=
if test "${USE_X_TOOLKIT}" = "MOTIF"; then
- AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
+ # OpenMotif may be installed in such a way on some GNU/Linux systems.
+ if test -d /usr/include/openmotif; then
+ CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
+ emacs_cv_openmotif=yes
+ case "$canonical" in
+ x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
+ test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
+ ;;
+ *)
+ test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
+ esac
+ else
+ emacs_cv_openmotif=no
+ fi
+ AC_CACHE_CHECK(for (Open)Motif version 2.1, emacs_cv_motif_version_2_1,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <Xm/Xm.h>]],
[[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
int x = 5;
emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
if test $emacs_cv_motif_version_2_1 = yes; then
AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp)
+ if test x$emacs_cv_openmotif = xyes; then
+ REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
+ fi
else
AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif,
# We put this in CFLAGS temporarily to precede other -I options
+2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Avoid unused variable warning if --with-x-toolkit=motif.
+ * lwlib-Xm.c (make_menu_in_widget): Remove unused variable.
+
2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
int child_index;
widget_value* cur;
Widget button = 0;
- Widget title = 0;
Widget menu;
Arg al [256];
int ac;
{
ac = 0;
XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
- title = button = XmCreateLabel (widget, cur->name, al, ac);
+ button = XmCreateLabel (widget, cur->name, al, ac);
}
else if (lw_separator_p (cur->name, &separator, 1))
{
+2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Miscellaneous fixes for non-default X toolkits.
+ * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
+ * xterm.c (x_frame_of_widget): Remove redundant prototype.
+ Move under #ifdef USE_LUCID.
+ (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
+ definition and usage to avoid warnings.
+
2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (openFiles): Fix previous checkin.
/* Create the dialog with PROMPT as title, using DIR as initial
directory and using "*" as pattern. */
dir = Fexpand_file_name (dir, Qnil);
- dir_xmstring = XmStringCreateLocalized (SDATA (dir));
+ dir_xmstring = XmStringCreateLocalized (SSDATA (dir));
pattern_xmstring = XmStringCreateLocalized ("*");
XtSetArg (al[ac], XmNtitle, SDATA (prompt)); ++ac;
XmTextPosition last_pos = XmTextFieldGetLastPosition (wtext);
XmTextFieldReplace (wtext, 0, last_pos,
- (SDATA (Ffile_name_nondirectory (default_filename))));
+ (SSDATA (Ffile_name_nondirectory (default_filename))));
/* Select DEFAULT_FILENAME in the files list box. DEFAULT_FILENAME
must include the path for this to work. */
- default_xmstring = XmStringCreateLocalized (SDATA (default_filename));
+ default_xmstring = XmStringCreateLocalized (SSDATA (default_filename));
if (XmListItemExists (list, default_xmstring))
{
#ifdef USE_X_TOOLKIT
-static struct frame *x_frame_of_widget (Widget);
static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
XrmValue *, XrmValue *, XtPointer *);
static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
XrmValue *, Cardinal *);
+#ifdef USE_LUCID
/* Return the frame on which widget WIDGET is used.. Abort if frame
cannot be determined. */
abort ();
}
-
-#ifdef USE_LUCID
-
/* Allocate a color which is lighter or darker than *PIXEL by FACTOR
or DELTA. Try a color with RGB values multiplied by FACTOR first.
If this produces the same color as PIXEL, try a color where all RGB
return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
}
-#endif
+#endif /* USE_LUCID */
/* Structure specifying which arguments should be passed by Xt to
Widget widget;
Arg av[20];
int ac = 0;
- char const *scroll_bar_name = SCROLL_BAR_NAME;
+ const char *scroll_bar_name = SCROLL_BAR_NAME;
unsigned long pixel;
BLOCK_INPUT;
}
widget = XmCreateScrollBar (f->output_data.x->edit_widget,
- scroll_bar_name, av, ac);
+ (char *) scroll_bar_name, av, ac);
/* Add one callback for everything that can happen. */
XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback,