Since emacs in 15.0 was updated to 29.3, gpm could not be compiled (same error related to emacs elisp), I look at it a little deeper, and found the previous patch for removing emace/elisp related code is not very clean, still something is left.
After modified it a little, it compiled fine.
This need to remove the gpm.configure.diff.gz patch, and patch the source before calling to "sh autogen.sh" line.
Code:
--- gpm-1.20.7/configure.ac.footer 2012-10-26 14:21:38.000000000 -0700
+++ gpm-new/configure.ac.footer 2024-03-27 10:33:24.990473076 -0700
@@ -49,22 +49,6 @@
AC_PATH_PROG(MAKEINFO,makeinfo,no)
AC_PATH_PROG(DIFF,diff,no)
AC_PATH_PROG(SED,sed,no)
-AC_PATH_PROG(emacs,emacs,no)
-
-if test ${ac_cv_path_emacs} = no ; then
- EMACS=:
- ELISP=
-else
- EMACS=${ac_cv_path_emacs}
- ELISP="emacs/t-mouse.el emacs/t-mouse.elc"
-fi
-
-if test $EMACS != : ; then
- ITZ_PATH_SITE_LISP
- lispdir=${itz_cv_path_site_lisp}
-else
- lispdir='${datadir}/emacs/site-lisp'
-fi
# Header-checks
AC_CHECK_HEADERS(syslog.h linux/input.h linux/joystick.h ncurses.h ncurses/curses.h curses.h)
--- gpm-1.20.7/Makefile.in 2012-10-26 14:21:38.000000000 -0700
+++ gpm-new/Makefile.in 2024-03-27 10:42:51.557448721 -0700
@@ -19,7 +19,7 @@
# user-overridable flags, but it's also all the implicit rule looks at.
# missing ?
-SUBDIRS = src doc contrib
+SUBDIRS = src doc
### simple, but effective rules
Also, according to
Using gpm libe with ncurses, it would be better to compile gpm with "--without-curses".