Index: src/aados.c
--- src/aados.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aados.c	2004-05-11 13:48:51.000000000 +0200
@@ -5,7 +5,7 @@
 #include <go32.h>
 #include <dpmi.h>
 #include <sys/nearptr.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include "aalib.h"
 #include "aaint.h"
 int __use_nearptr_hack;
Index: src/aadoskbd.c
--- src/aadoskbd.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aadoskbd.c	2004-05-11 13:48:51.000000000 +0200
@@ -4,7 +4,7 @@
 #include <go32.h>
 #include <dpmi.h>
 #include <sys/nearptr.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdlib.h>
 #include <dos.h>
 #include <dpmi.h>
Index: src/aaedit.c
--- src/aaedit.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aaedit.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,6 +1,6 @@
 #include <string.h>
 #include <ctype.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include "aalib.h"
 #include "aaint.h"
 static void aa_editdisplay(struct aa_edit *e)
Index: src/aakbdreg.c
--- src/aakbdreg.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aakbdreg.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include "config.h"
 #include "aalib.h"
 #include "aaint.h"
Index: src/aalib.c
--- src/aalib.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aalib.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include "aalib.h"
 #include "aaint.h"
 
Index: src/aalinux.c
--- src/aalinux.c.orig	2001-04-26 16:43:56.000000000 +0200
+++ src/aalinux.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,7 +1,7 @@
 #include "config.h"
 #ifdef LINUX_DRIVER
 #include <sys/stat.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <sys/ioctl.h>
 #include <linux/kd.h>
 #ifdef GPM_MOUSEDRIVER
Index: src/aamoureg.c
--- src/aamoureg.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aamoureg.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include "config.h"
 #include "aalib.h"
 #include "aaint.h"
Index: src/aarec.c
--- src/aarec.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aarec.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,5 +1,5 @@
 #include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include "aalib.h"
 #include "aaint.h"
 aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL,
Index: src/aaregist.c
--- src/aaregist.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aaregist.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include "config.h"
 #include "aalib.h"
 #include "aaint.h"
Index: src/aax.c
--- src/aax.c.orig	2001-04-26 16:37:54.000000000 +0200
+++ src/aax.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
Index: src/aaxkbd.c
--- src/aaxkbd.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aaxkbd.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
Index: src/aaxmouse.c
--- src/aaxmouse.c.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/aaxmouse.c	2004-05-11 13:48:51.000000000 +0200
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
Index: src/config.h.in
--- src/config.h.in.orig	2001-04-26 16:37:31.000000000 +0200
+++ src/config.h.in	2005-05-01 14:59:05.583820992 +0200
@@ -24,7 +24,7 @@
 #undef SLANG_KBDDRIVER
 #undef LINUX_KBDDRIVER
 #undef CURSES_MOUSEDRIVER
-#undef GPM_MOUSEDRIVER
+#undef GPM_MOUSEDRIVER_THIS_IS_BROKEN
 #undef X11_MOUSEDRIVER
 #undef PACKAGE
 #undef VERSION
Index: configure
--- configure.orig	2001-04-26 16:44:54 +0200
+++ configure	2005-05-03 16:28:58 +0200
@@ -1963,7 +1963,7 @@
   if test x$withval = xyes
 	then 
 		echo "configure: warning: Usage is: --with-gpm-mouse=base-dir" 1>&2
-	else
+	elif test x$withval != xno; then
 		LIBS="$LIBS -L$withval/lib -lgpm"
                 cat >> confdefs.h <<\EOF
 #define GPM_MOUSEDRIVER 1

Index: aalib.m4
--- aalib.m4.orig	2001-04-26 16:37:31 +0200
+++ aalib.m4	2007-06-11 18:05:51 +0200
@@ -9,7 +9,7 @@
 dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS
 dnl
-AC_DEFUN(AM_PATH_AALIB,
+AC_DEFUN([AM_PATH_AALIB],
 [dnl 
 dnl Get the cflags and libraries from the aalib-config script
 dnl

