# HG changeset patch # User Nick Roberts # Date 1179637773 0 # Node ID 62b6aa7f8c3738853f98cca7cddd3dea7f271b3e # Parent ed90d23a3543c35b15e258b25210f2d35efb7d3e Use HAVE_GPM instead of HAVE_GPM_H. diff -r ed90d23a3543 -r 62b6aa7f8c37 src/Makefile.in --- a/src/Makefile.in Sun May 20 05:07:36 2007 +0000 +++ b/src/Makefile.in Sun May 20 05:09:33 2007 +0000 @@ -446,6 +446,14 @@ #define LIBGIF #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 /* LD_SWITCH_X_DEFAULT comes after everything else that specifies options for where to find X libraries, but before those libraries. */ @@ -460,8 +468,6 @@ LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ -LIBGPM= @LIBGPM@ - #ifndef ORDINARY_LINK /* Fix linking if compiled with GCC. */ #ifdef __GNUC__ @@ -935,7 +941,7 @@ Note that SunOS needs -lm to come before -lc; otherwise, you get duplicated symbols. If the standard libraries were compiled 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_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \ $(GNULIB_VAR) diff -r ed90d23a3543 -r 62b6aa7f8c37 src/config.in --- a/src/config.in Sun May 20 05:07:36 2007 +0000 +++ b/src/config.in Sun May 20 05:09:33 2007 +0000 @@ -231,8 +231,8 @@ /* Define to 1 if you have the ungif library (-lungif). */ #undef HAVE_GIF -/* Define to 1 if you have the header file. */ -#undef HAVE_GPM_H +/* Define to 1 if you have the gpm library (-lgpm). */ +#undef HAVE_GPM /* Define to 1 if you have the `grantpt' function. */ #undef HAVE_GRANTPT diff -r ed90d23a3543 -r 62b6aa7f8c37 src/keyboard.c --- a/src/keyboard.c Sun May 20 05:07:36 2007 +0000 +++ b/src/keyboard.c Sun May 20 05:09:33 2007 +0000 @@ -6008,7 +6008,7 @@ } #endif -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM case GPM_CLICK_EVENT: { FRAME_PTR f = XFRAME (event->frame_or_window); @@ -6066,7 +6066,7 @@ Fcons (position, Qnil)); } -#endif /* HAVE_GPM_H */ +#endif /* HAVE_GPM */ /* The 'kind' field of the event is something we don't recognize. */ default: @@ -6925,7 +6925,7 @@ if (n_to_read == 0) return 0; #else /* not MSDOS */ -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM if (term_gpm) { Gpm_Event event; @@ -6943,7 +6943,7 @@ if (nread) return nread; } -#endif /* HAVE_GPM_H */ +#endif /* HAVE_GPM */ #ifdef FIONREAD /* Find out how much input is available. */ diff -r ed90d23a3543 -r 62b6aa7f8c37 src/sysdep.c --- a/src/sysdep.c Sun May 20 05:07:36 2007 +0000 +++ b/src/sysdep.c Sun May 20 05:09:33 2007 +0000 @@ -1675,14 +1675,14 @@ old_fcntl_owner = fcntl (input_fd, F_GETOWN, 0); fcntl (input_fd, F_SETOWN, getpid ()); init_sigio (input_fd); -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM if (term_gpm) { fcntl (gpm_fd, F_SETOWN, getpid ()); fcntl (gpm_fd, F_SETFL, O_NONBLOCK); init_sigio (gpm_fd); } -#endif /* HAVE_GPM_H */ +#endif /* HAVE_GPM */ } #endif /* F_GETOWN */ #endif /* F_SETOWN_BUG */ diff -r ed90d23a3543 -r 62b6aa7f8c37 src/term.c --- a/src/term.c Sun May 20 05:07:36 2007 +0000 +++ b/src/term.c Sun May 20 05:09:33 2007 +0000 @@ -410,7 +410,7 @@ #define FRAME_TERMCAP_P(_f_) 0 #endif /* WINDOWSNT */ -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM #include #include "buffer.h" @@ -435,7 +435,7 @@ static int pos_x, pos_y; static int last_mouse_x, last_mouse_y; -#endif /* HAVE_GPM_H */ +#endif /* HAVE_GPM */ void ring_bell () @@ -2381,7 +2381,7 @@ Mouse ***********************************************************************/ -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM static void term_show_mouse_face (enum draw_glyphs_face draw) { @@ -3024,7 +3024,7 @@ term_gpm = 0; return Qnil; } -#endif /* HAVE_GPM_H */ +#endif /* HAVE_GPM */ /*********************************************************************** @@ -3045,7 +3045,7 @@ 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 (mouse-position). Also set-mouse-position won't work as is. */ /* mouse_position_hook = term_mouse_position; */ @@ -3500,10 +3500,10 @@ defsubr (&Stty_display_color_p); defsubr (&Stty_display_color_cells); defsubr (&Stty_no_underline); -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM defsubr (&Sterm_open_connection); defsubr (&Sterm_close_connection); -#endif /* HAVE_GPM_H */ +#endif /* HAVE_GPM */ fullscreen_hook = NULL; } diff -r ed90d23a3543 -r 62b6aa7f8c37 src/termhooks.h --- a/src/termhooks.h Sun May 20 05:07:36 2007 +0000 +++ b/src/termhooks.h Sun May 20 05:09:33 2007 +0000 @@ -343,7 +343,7 @@ MAC_APPLE_EVENT, #endif -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM GPM_CLICK_EVENT #endif }; @@ -450,7 +450,7 @@ meta_modifier = CHAR_META /* Under X, the XK_Meta_[LR] keysyms. */ }; -#ifdef HAVE_GPM_H +#ifdef HAVE_GPM #include extern int handle_one_term_event (Gpm_Event *, struct input_event *);