]> granicus.if.org Git - python/commitdiff
Patch #1012280: Include curses.h for term.h check. Fixes #933795.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Sep 2004 09:54:52 +0000 (09:54 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Sep 2004 09:54:52 +0000 (09:54 +0000)
Will backport to 2.3.

configure
configure.in
pyconfig.h.in

index f95c291d3d8f8944db387c2525609401d8a73284..e32fb195aff250d14426f5ced026b03c202e8aa4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.468 .
+# From configure.in Revision: 1.469 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for python 2.4.
 #
@@ -4532,13 +4532,13 @@ done
 
 
 
-for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
+for ac_header in curses.h dlfcn.h fcntl.h grp.h langinfo.h \
 libintl.h ncurses.h poll.h pthread.h \
 stropts.h termios.h thread.h \
 unistd.h utime.h \
 sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
 sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
-sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
+sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h
 do
@@ -5374,6 +5374,69 @@ fi
 fi
 
 
+# On Solaris, term.h requires curses.h
+
+for ac_header in term.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <curses.h>
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
 # checks for typedefs
 was_it_defined=no
 echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
index 59a7c267891e7d0c44a05cfec0eab702aed4cade..5c9fa3d5483355304f570b543c8ea55cb957036b 100644 (file)
@@ -955,18 +955,21 @@ dnl AC_MSG_RESULT($cpp_type)
 
 # checks for header files
 AC_HEADER_STDC
-AC_CHECK_HEADERS(dlfcn.h fcntl.h grp.h langinfo.h \
+AC_CHECK_HEADERS(curses.h dlfcn.h fcntl.h grp.h langinfo.h \
 libintl.h ncurses.h poll.h pthread.h \
 stropts.h termios.h thread.h \
 unistd.h utime.h \
 sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
 sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
-sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
+sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h)
 AC_HEADER_DIRENT
 AC_HEADER_MAJOR
 
+# On Solaris, term.h requires curses.h
+AC_CHECK_HEADERS(term.h,,,[#include <curses.h>])
+
 # checks for typedefs
 was_it_defined=no
 AC_MSG_CHECKING(for clock_t in time.h)
index 7c45736f483006c3cd738c0e632a50e9e5b25740..a9f3d203cae16221b033ada3369d31cf091aac43 100644 (file)
@@ -76,6 +76,9 @@
 /* Define if you have the 'ctermid_r' function. */
 #undef HAVE_CTERMID_R
 
+/* Define to 1 if you have the <curses.h> header file. */
+#undef HAVE_CURSES_H
+
 /* Define to 1 if you have the device macros. */
 #undef HAVE_DEVICE_MACROS