diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2014-04-17 18:11:19 (GMT) |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2014-04-17 18:11:19 (GMT) |
commit | f27ec3e5515115080b270c5530929d365791c2c1 (patch) | |
tree | 3bce992998de0b556efe2103c64cdbb29d7fa25e /configure | |
parent | dd967efae997b0cc2a616310835d3c4ca3682fc9 (diff) | |
download | cpython-f27ec3e5515115080b270c5530929d365791c2c1.zip cpython-f27ec3e5515115080b270c5530929d365791c2c1.tar.gz cpython-f27ec3e5515115080b270c5530929d365791c2c1.tar.bz2 |
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 62 |
1 files changed, 41 insertions, 21 deletions
@@ -6651,9 +6651,9 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -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 poll.h process.h pthread.h \ +ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \ shadow.h signal.h stdint.h stropts.h termios.h thread.h \ unistd.h utime.h \ sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \ @@ -6884,25 +6884,6 @@ fi fi -# 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 : @@ -14132,6 +14113,43 @@ $as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h fi +# first curses configure 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; } @@ -14285,6 +14303,8 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# last curses configure check +CPPFLAGS=$ac_save_cppflags { $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 $as_echo "$as_me: checking for device files" >&6;} |