725064
--- gpm-1.20.1/src/lib/libcurses.c.weak-wgetch	2002-12-24 17:57:16.000000000 -0500
725064
+++ gpm-1.20.1/src/lib/libcurses.c	2004-03-22 15:51:24.000000000 -0500
725064
@@ -41,7 +41,12 @@
725064
 #endif /* HAVE_NCURSES_CURSES_H */
725064
 #endif /* HAVE_NCURSES_H */
725064
 
725064
-#define GET(win) ((win) ? wgetch(win) : getch())
725064
+/* If win != NULL, it must have been created by ncurses anyway.
725064
+   Avoid circular library dependencies.  */
725064
+#pragma weak wgetch
725064
+#pragma weak stdscr
725064
+
725064
+#define GET(win) ((win && wgetch) ? wgetch(win) : getch())
725064
 
725064
 int Gpm_Wgetch(WINDOW *win)
725064
 {
725064
--- gpm-1.20.1/configure.ac.weak-wgetch	2004-03-22 15:49:51.000000000 -0500
725064
+++ gpm-1.20.1/configure.ac.footer	2004-03-22 15:51:24.000000000 -0500
725064
@@ -115,7 +115,7 @@
725064
             AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
725064
         else :; fi
725064
     done
725064
-    SHARED_LIBS="$LIBS $TERMLIBS -lc"
725064
+    SHARED_LIBS="-lc"
725064
     LIBS=$SAVELIBS ;;
725064
 esac