Building ncurses with GCC 5 (or more precisely, with its 'cpp') fails with a
syntax error, caused by earlier preprocessing.

(I'm not entirely sure whether it's a GCC bug or rather caused by a new
feature which breaks further processing with 'awk' and 'sed';  I *think*
at least the 'awk' inline script "AW2" simply isn't prepared for the changed
output of 'cpp' w.r.t. line directives [1].  Anyway, the patch fixes the issue.)

[1] https://gcc.gnu.org/gcc-5/porting_to.html


--- ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh	2011-06-04 21:14:08.000000000 +0200
+++ ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh	2015-04-26 00:47:06.911680782 +0200
@@ -62,7 +62,9 @@
 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 if test "${LC_COLLATE+set}"  = set; then LC_COLLATE=C;  export LC_COLLATE;  fi
 
-preprocessor="$1 -DNCURSES_INTERNALS -I../include"
+# Work around "unexpected" output of GCC 5.x's cpp w.r.t. #line directives
+# by simply suppressing them:
+preprocessor="$1 -P -DNCURSES_INTERNALS -I../include"
 AWK="$2"
 USE="$3"
 
