diff -Naur ncurses-5.6.orig/aclocal.m4 ncurses-5.6/aclocal.m4 --- ncurses-5.6.orig/aclocal.m4 2008-03-24 23:43:52.000000000 -0700 +++ ncurses-5.6/aclocal.m4 2008-03-24 23:47:11.000000000 -0700 @@ -368,9 +368,9 @@ # defaults that we might want to override : ${BUILD_CFLAGS:=''} - : ${BUILD_CPPFLAGS:='ifelse([$1],,,[$1])'} + : ${BUILD_CPPFLAGS:='${CPPFLAGS} ifelse([$1],,,[$1])'} : ${BUILD_LDFLAGS:=''} - : ${BUILD_LIBS:='ifelse([$2],,,[$2])'} + : ${BUILD_LIBS:='${LIBS} ifelse([$2],,,[$2])'} : ${BUILD_EXEEXT:='$x'} : ${BUILD_OBJEXT:='o'} diff -Naur ncurses-5.6.orig/configure ncurses-5.6/configure --- ncurses-5.6.orig/configure 2008-03-24 23:43:53.000000000 -0700 +++ ncurses-5.6/configure 2008-03-24 23:46:54.000000000 -0700 @@ -3868,9 +3868,9 @@ # defaults that we might want to override : ${BUILD_CFLAGS:=''} - : ${BUILD_CPPFLAGS:=''} + : ${BUILD_CPPFLAGS:='${CPPFLAGS} '} : ${BUILD_LDFLAGS:=''} - : ${BUILD_LIBS:=''} + : ${BUILD_LIBS:='${LIBS} '} : ${BUILD_EXEEXT:='$x'} : ${BUILD_OBJEXT:='o'}