summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2014-04-17 18:13:44 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2014-04-17 18:13:44 (GMT)
commit1a4f561d7c7d28d82e80d7a1c2e4402f081f6f79 (patch)
tree19bb36894210c3b30df7c224afc316c2cbd71185 /configure
parent4a173bc4edfbc731f227a84a26eb24b6aef91dd6 (diff)
downloadcpython-1a4f561d7c7d28d82e80d7a1c2e4402f081f6f79.zip
cpython-1a4f561d7c7d28d82e80d7a1c2e4402f081f6f79.tar.gz
cpython-1a4f561d7c7d28d82e80d7a1c2e4402f081f6f79.tar.bz2
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure62
1 files changed, 37 insertions, 25 deletions
diff --git a/configure b/configure
index 101dd44..78d5446 100755
--- a/configure
+++ b/configure
@@ -6969,11 +6969,9 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
fi
-ac_save_cppflags="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
+for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
fcntl.h grp.h \
-ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
+ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
sched.h shadow.h signal.h stdint.h stropts.h termios.h \
unistd.h utime.h \
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
@@ -6997,7 +6995,6 @@ fi
done
-CPPFLAGS=$ac_save_cppflags
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
@@ -7234,26 +7231,6 @@ fi
done
-
-# On Solaris, term.h requires curses.h
-for ac_header in term.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
-#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-
-"
-if test "x$ac_cv_header_term_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_TERM_H 1
-_ACEOF
-
-fi
-
-done
-
-
# On Linux, netlink.h requires asm/types.h
for ac_header in linux/netlink.h
do :
@@ -14677,8 +14654,43 @@ $as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
fi
+# first curses header check
ac_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
+
+for ac_header in curses.h ncurses.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# On Solaris, term.h requires curses.h
+for ac_header in term.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+
+"
+if test "x$ac_cv_header_term_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TERM_H 1
+_ACEOF
+
+fi
+
+done
+
+
# On HP/UX 11.0, mvwdelch is a block with a return statement
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
$as_echo_n "checking whether mvwdelch is an expression... " >&6; }