changeset: 90387:635817da596d branch: 3.4 parent: 90384:ca2edbefca35 user: doko@ubuntu.com date: Thu Apr 17 20:13:44 2014 +0200 files: Misc/NEWS configure configure.ac description: - Issue #21285: Refactor and fix curses configure check to always search in a ncursesw directory. diff -r ca2edbefca35 -r 635817da596d Misc/NEWS --- a/Misc/NEWS Thu Apr 17 19:47:16 2014 +0200 +++ b/Misc/NEWS Thu Apr 17 20:13:44 2014 +0200 @@ -174,6 +174,9 @@ Build ----- +- Issue #21285: Refactor and fix curses configure check to always search + in a ncursesw directory. + - Issue #15234: For BerkelyDB and Sqlite, only add the found library and include directories if they aren't already being searched. This avoids an explicit runtime library dependency. diff -r ca2edbefca35 -r 635817da596d configure --- a/configure Thu Apr 17 19:47:16 2014 +0200 +++ b/configure Thu Apr 17 20:13:44 2014 +0200 @@ -6969,11 +6969,9 @@ 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 @@ 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 @@ 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 -#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 @@ 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 +#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; } diff -r ca2edbefca35 -r 635817da596d configure.ac --- a/configure.ac Thu Apr 17 19:47:16 2014 +0200 +++ b/configure.ac Thu Apr 17 20:13:44 2014 +0200 @@ -1546,11 +1546,9 @@ # checks for header files AC_HEADER_STDC -ac_save_cppflags="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" -AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ +AC_CHECK_HEADERS(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 \ @@ -1562,7 +1560,6 @@ libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \ sys/endian.h) -CPPFLAGS=$ac_save_cppflags AC_HEADER_DIRENT AC_HEADER_MAJOR @@ -1582,14 +1579,6 @@ #endif ]) - -# On Solaris, term.h requires curses.h -AC_CHECK_HEADERS(term.h,,,[ -#ifdef HAVE_CURSES_H -#include -#endif -]) - # On Linux, netlink.h requires asm/types.h AC_CHECK_HEADERS(linux/netlink.h,,,[ #ifdef HAVE_ASM_TYPES_H @@ -4391,8 +4380,19 @@ [Define if you have struct stat.st_mtimensec]) fi +# first curses header check ac_save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" + +AC_CHECK_HEADERS(curses.h ncurses.h) + +# On Solaris, term.h requires curses.h +AC_CHECK_HEADERS(term.h,,,[ +#ifdef HAVE_CURSES_H +#include +#endif +]) + # On HP/UX 11.0, mvwdelch is a block with a return statement AC_MSG_CHECKING(whether mvwdelch is an expression) AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,