Commit 7e5a23bd authored by Nick Roberts's avatar Nick Roberts

Use HAVE_GPM instead of HAVE_GPM_H.

parent a8099827
2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* configure.in: Use HAVE_GPM instead of HAVE_GPM_H and implement
it like others.
* configure: Regenerate.
2007-05-20 Nick Roberts <nickrob@snap.net.nz> 2007-05-20 Nick Roberts <nickrob@snap.net.nz>
* configure.in (AC_CHECK_HEADERS) Add gpm.h. * configure.in (AC_CHECK_HEADERS) Add gpm.h.
......
...@@ -446,6 +446,14 @@ XFT_LIBS=@XFT_LIBS@ ...@@ -446,6 +446,14 @@ XFT_LIBS=@XFT_LIBS@
#define LIBGIF #define LIBGIF
#endif /* not HAVE_GIF */ #endif /* not HAVE_GIF */
#if HAVE_GPM
#ifndef LIBGPM
#define LIBGPM -lgpm
#endif /* not defined LIBGPM */
#else /* not HAVE_GPM */
#define LIBGPM
#endif /* not HAVE_GPM */
#ifdef HAVE_X11 #ifdef HAVE_X11
/* LD_SWITCH_X_DEFAULT comes after everything else that specifies /* LD_SWITCH_X_DEFAULT comes after everything else that specifies
options for where to find X libraries, but before those libraries. */ options for where to find X libraries, but before those libraries. */
...@@ -460,8 +468,6 @@ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM ...@@ -460,8 +468,6 @@ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM
LIBSOUND= @LIBSOUND@ LIBSOUND= @LIBSOUND@
CFLAGS_SOUND= @CFLAGS_SOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@
LIBGPM= @LIBGPM@
#ifndef ORDINARY_LINK #ifndef ORDINARY_LINK
/* Fix linking if compiled with GCC. */ /* Fix linking if compiled with GCC. */
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -935,7 +941,7 @@ SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \ ...@@ -935,7 +941,7 @@ SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
Note that SunOS needs -lm to come before -lc; otherwise, you get Note that SunOS needs -lm to come before -lc; otherwise, you get
duplicated symbols. If the standard libraries were compiled duplicated symbols. If the standard libraries were compiled
with GCC, we might need gnulib again after them. */ with GCC, we might need gnulib again after them. */
LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(LIBGPM)\ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) LIBGPM\
LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \ LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \
$(GNULIB_VAR) $(GNULIB_VAR)
......
...@@ -231,8 +231,8 @@ Boston, MA 02110-1301, USA. */ ...@@ -231,8 +231,8 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the ungif library (-lungif). */ /* Define to 1 if you have the ungif library (-lungif). */
#undef HAVE_GIF #undef HAVE_GIF
/* Define to 1 if you have the <gpm.h> header file. */ /* Define to 1 if you have the gpm library (-lgpm). */
#undef HAVE_GPM_H #undef HAVE_GPM
/* Define to 1 if you have the `grantpt' function. */ /* Define to 1 if you have the `grantpt' function. */
#undef HAVE_GRANTPT #undef HAVE_GRANTPT
......
...@@ -6008,7 +6008,7 @@ make_lispy_event (event) ...@@ -6008,7 +6008,7 @@ make_lispy_event (event)
} }
#endif #endif
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
case GPM_CLICK_EVENT: case GPM_CLICK_EVENT:
{ {
FRAME_PTR f = XFRAME (event->frame_or_window); FRAME_PTR f = XFRAME (event->frame_or_window);
...@@ -6066,7 +6066,7 @@ make_lispy_event (event) ...@@ -6066,7 +6066,7 @@ make_lispy_event (event)
Fcons (position, Fcons (position,
Qnil)); Qnil));
} }
#endif /* HAVE_GPM_H */ #endif /* HAVE_GPM */
/* The 'kind' field of the event is something we don't recognize. */ /* The 'kind' field of the event is something we don't recognize. */
default: default:
...@@ -6925,7 +6925,7 @@ read_avail_input (expected) ...@@ -6925,7 +6925,7 @@ read_avail_input (expected)
if (n_to_read == 0) if (n_to_read == 0)
return 0; return 0;
#else /* not MSDOS */ #else /* not MSDOS */
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
if (term_gpm) if (term_gpm)
{ {
Gpm_Event event; Gpm_Event event;
...@@ -6943,7 +6943,7 @@ read_avail_input (expected) ...@@ -6943,7 +6943,7 @@ read_avail_input (expected)
if (nread) if (nread)
return nread; return nread;
} }
#endif /* HAVE_GPM_H */ #endif /* HAVE_GPM */
#ifdef FIONREAD #ifdef FIONREAD
/* Find out how much input is available. */ /* Find out how much input is available. */
......
...@@ -1675,14 +1675,14 @@ init_sys_modes () ...@@ -1675,14 +1675,14 @@ init_sys_modes ()
old_fcntl_owner = fcntl (input_fd, F_GETOWN, 0); old_fcntl_owner = fcntl (input_fd, F_GETOWN, 0);
fcntl (input_fd, F_SETOWN, getpid ()); fcntl (input_fd, F_SETOWN, getpid ());
init_sigio (input_fd); init_sigio (input_fd);
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
if (term_gpm) if (term_gpm)
{ {
fcntl (gpm_fd, F_SETOWN, getpid ()); fcntl (gpm_fd, F_SETOWN, getpid ());
fcntl (gpm_fd, F_SETFL, O_NONBLOCK); fcntl (gpm_fd, F_SETFL, O_NONBLOCK);
init_sigio (gpm_fd); init_sigio (gpm_fd);
} }
#endif /* HAVE_GPM_H */ #endif /* HAVE_GPM */
} }
#endif /* F_GETOWN */ #endif /* F_GETOWN */
#endif /* F_SETOWN_BUG */ #endif /* F_SETOWN_BUG */
......
...@@ -410,7 +410,7 @@ static void term_mouse_highlight (struct frame *f, int x, int y); ...@@ -410,7 +410,7 @@ static void term_mouse_highlight (struct frame *f, int x, int y);
#define FRAME_TERMCAP_P(_f_) 0 #define FRAME_TERMCAP_P(_f_) 0
#endif /* WINDOWSNT */ #endif /* WINDOWSNT */
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
#include <sys/fcntl.h> #include <sys/fcntl.h>
#include "buffer.h" #include "buffer.h"
...@@ -435,7 +435,7 @@ int mouse_face_mouse_x, mouse_face_mouse_y; ...@@ -435,7 +435,7 @@ int mouse_face_mouse_x, mouse_face_mouse_y;
static int pos_x, pos_y; static int pos_x, pos_y;
static int last_mouse_x, last_mouse_y; static int last_mouse_x, last_mouse_y;
#endif /* HAVE_GPM_H */ #endif /* HAVE_GPM */
void void
ring_bell () ring_bell ()
...@@ -2381,7 +2381,7 @@ set_tty_color_mode (f, val) ...@@ -2381,7 +2381,7 @@ set_tty_color_mode (f, val)
Mouse Mouse
***********************************************************************/ ***********************************************************************/
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
static void static void
term_show_mouse_face (enum draw_glyphs_face draw) term_show_mouse_face (enum draw_glyphs_face draw)
{ {
...@@ -3024,7 +3024,7 @@ DEFUN ("term-close-connection", Fterm_close_connection, Sterm_close_connection, ...@@ -3024,7 +3024,7 @@ DEFUN ("term-close-connection", Fterm_close_connection, Sterm_close_connection,
term_gpm = 0; term_gpm = 0;
return Qnil; return Qnil;
} }
#endif /* HAVE_GPM_H */ #endif /* HAVE_GPM */
/*********************************************************************** /***********************************************************************
...@@ -3045,7 +3045,7 @@ term_init (terminal_type) ...@@ -3045,7 +3045,7 @@ term_init (terminal_type)
encode_terminal_bufsize = 0; encode_terminal_bufsize = 0;
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
/* TODO: Can't get Gpm_Snapshot in term_mouse_position to work: test with /* TODO: Can't get Gpm_Snapshot in term_mouse_position to work: test with
(mouse-position). Also set-mouse-position won't work as is. */ (mouse-position). Also set-mouse-position won't work as is. */
/* mouse_position_hook = term_mouse_position; */ /* mouse_position_hook = term_mouse_position; */
...@@ -3500,10 +3500,10 @@ bigger, or it may make it blink, or it may do nothing at all. */); ...@@ -3500,10 +3500,10 @@ bigger, or it may make it blink, or it may do nothing at all. */);
defsubr (&Stty_display_color_p); defsubr (&Stty_display_color_p);
defsubr (&Stty_display_color_cells); defsubr (&Stty_display_color_cells);
defsubr (&Stty_no_underline); defsubr (&Stty_no_underline);
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
defsubr (&Sterm_open_connection); defsubr (&Sterm_open_connection);
defsubr (&Sterm_close_connection); defsubr (&Sterm_close_connection);
#endif /* HAVE_GPM_H */ #endif /* HAVE_GPM */
fullscreen_hook = NULL; fullscreen_hook = NULL;
} }
......
...@@ -343,7 +343,7 @@ enum event_kind ...@@ -343,7 +343,7 @@ enum event_kind
MAC_APPLE_EVENT, MAC_APPLE_EVENT,
#endif #endif
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
GPM_CLICK_EVENT GPM_CLICK_EVENT
#endif #endif
}; };
...@@ -450,7 +450,7 @@ enum { ...@@ -450,7 +450,7 @@ enum {
meta_modifier = CHAR_META /* Under X, the XK_Meta_[LR] keysyms. */ meta_modifier = CHAR_META /* Under X, the XK_Meta_[LR] keysyms. */
}; };
#ifdef HAVE_GPM_H #ifdef HAVE_GPM
#include <gpm.h> #include <gpm.h>
extern int handle_one_term_event (Gpm_Event *, struct input_event *); extern int handle_one_term_event (Gpm_Event *, struct input_event *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment