Drop usage of test -e in configure as it is not portable.
Fixes #1439538
Will backport to 2.4
Also regenerate pyconfig.h.in.
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 7598504..a3d7f6e 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -85,6 +85,15 @@
 /* Define to 1 if you have the <curses.h> header file. */
 #undef HAVE_CURSES_H
 
+/* Define if you have the 'is_term_resized' function. */
+#undef HAVE_CURSES_IS_TERM_RESIZED
+
+/* Define if you have the 'resizeterm' function. */
+#undef HAVE_CURSES_RESIZETERM
+
+/* Define if you have the 'resize_term' function. */
+#undef HAVE_CURSES_RESIZE_TERM
+
 /* Define to 1 if you have the device macros. */
 #undef HAVE_DEVICE_MACROS
 
@@ -398,15 +407,6 @@
 /* Define to 1 if you have the `realpath' function. */
 #undef HAVE_REALPATH
 
-/* Define to 1 if you have the `is_term_resized' function. */
-#undef HAVE_CURSES_IS_TERM_RESIZED
-
-/* Define to 1 if you have the `resize_term' function. */
-#undef HAVE_CURSES_RESIZE_TERM
-
-/* Define to 1 if you have the `resizeterm' function. */
-#undef HAVE_CURSES_RESIZETERM
-
 /* Define if you have readline 2.1 */
 #undef HAVE_RL_CALLBACK