]> git.eshelyaron.com Git - emacs.git/commitdiff
Set GPM part of MOUSE_SUPPORT with configure, not cpp.
authorGlenn Morris <rgm@gnu.org>
Wed, 28 Apr 2010 07:15:10 +0000 (00:15 -0700)
committerGlenn Morris <rgm@gnu.org>
Wed, 28 Apr 2010 07:15:10 +0000 (00:15 -0700)
* configure.in (GPM_MOUSE_SUPPORT): New output variable.
* src/Makefile.in (GPM_MOUSE_SUPPORT): New, set by configure.
(MOUSE_SUPPORT) [!HAVE_MOUSE]: Use $GPM_MOUSE_SUPPORT.

ChangeLog
configure.in
src/ChangeLog
src/Makefile.in

index 639ba623e913a1871cb788ea1af78c1a1ac88ed9..f3dff8794913606d282c1c8b567157ef6303eac6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2010-04-28  Glenn Morris  <rgm@gnu.org>
 
+       * configure.in (GPM_MOUSE_SUPPORT): New output variable.
+
        * configure.in (FONT_OBJ): New output variable.
 
        * configure.in (LIBXMU): New output variable.
index 89f2b47ff8fece43137349108e841bd6c3ad50d3..f283290f5807718986eec2f2cde4aa9bb3610174 100644 (file)
@@ -2291,6 +2291,7 @@ fi
 ### Use -lgpm if available, unless `--with-gpm=no'.
 HAVE_GPM=no
 LIBGPM=
+GPM_MOUSE_SUPPORT=
 if test "${with_gpm}" != "no"; then
   AC_CHECK_HEADER(gpm.h,
     [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)])
@@ -2298,9 +2299,11 @@ if test "${with_gpm}" != "no"; then
   if test "${HAVE_GPM}" = "yes"; then
     AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).])
     LIBGPM=-lgpm
+    GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc"
   fi
 fi
 AC_SUBST(LIBGPM)
+AC_SUBST(GPM_MOUSE_SUPPORT)
 
 dnl Check for malloc/malloc.h on darwin
 AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
index 53eab88cc393b84433438f7815cd04aadd185463..4c974495a2f8b2c81c4e741f2b6ec41ae7cc20d1 100644 (file)
@@ -1,5 +1,8 @@
 2010-04-28  Glenn Morris  <rgm@gnu.org>
 
+       * Makefile.in (GPM_MOUSE_SUPPORT): New, set by configure.
+       (MOUSE_SUPPORT) [!HAVE_MOUSE]: Use $GPM_MOUSE_SUPPORT.
+
        * Makefile.in (FONT_OBJ): New, set by configure.
        (FONT_DRIVERS): Use $FONT_OBJ.
 
index a90b0ef862d8ca5f5e510a92bb1f79908a245326..ca6a6acd955e5a606125e3f6e0ba6f03e1f99ef8 100644 (file)
@@ -112,6 +112,10 @@ NS_SUPPORT=@NS_SUPPORT@
 ## Only used if HAVE_X_WINDOWS and HAVE_WINDOW_SYSTEM.
 FONT_OBJ=@FONT_OBJ@
 
+## ${lispsource}mouse.elc if HAVE_GPM, otherwise empty.
+## Not used if HAVE_MOUSE.
+GPM_MOUSE_SUPPORT=@GPM_MOUSE_SUPPORT@
+
 LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
 
 INTERVALS_H = dispextern.h intervals.h composite.h
@@ -452,11 +456,7 @@ otherobj= $(termcapobj) lastfile.o $(mallocobj) $(WIDGET_OBJ) $(LIBOBJS)
 #define MOUSE_SUPPORT ${lispsource}mouse.elc \
   ${lispsource}select.elc ${lispsource}scroll-bar.elc
 #else
-#ifdef HAVE_GPM
-#define MOUSE_SUPPORT ${lispsource}mouse.elc
-#else
-#define MOUSE_SUPPORT
-#endif
+#define MOUSE_SUPPORT $(GPM_MOUSE_SUPPORT)
 #endif
 
 #ifdef MSDOS