emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100373: Distinguish between termi


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100373: Distinguish between terminfo and termcap on NetBSD (Bug#7642).
Date: Tue, 11 Jan 2011 21:29:23 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100373
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Tue 2011-01-11 21:29:23 -0500
message:
  Distinguish between terminfo and termcap on NetBSD (Bug#7642).
  
  * configure.in [netbsd systems]: Check for tputs definition.
  
  * src/config.in (TERMINFO): New definition.
  
  * src/s/netbsd.h: Use it to choose between terminfo and termcap.
modified:
  ChangeLog
  configure
  configure.in
  src/ChangeLog
  src/config.in
  src/s/netbsd.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2011-01-02 23:50:46 +0000
+++ b/ChangeLog 2011-01-12 02:29:23 +0000
@@ -1,3 +1,8 @@
+2011-01-12  Chong Yidong  <address@hidden>
+
+       * configure.in [netbsd systems]: Check for tputs definition
+       (Bug#7642).
+
 2010-12-11  Glenn Morris  <address@hidden>
 
        * make-dist: Exclude etc/*.pyc.  [Backport from trunk]

=== modified file 'configure'
--- a/configure 2010-12-10 17:46:40 +0000
+++ b/configure 2011-01-12 02:29:23 +0000
@@ -11833,6 +11833,72 @@
 fi
 
 
+case "$opsys" in
+  netbsd)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing 
tputs" >&5
+$as_echo_n "checking for library containing tputs... " >&6; }
+if test "${ac_cv_search_tputs+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tputs ();
+int
+main ()
+{
+return tputs ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' ncurses terminfo termcap; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_tputs=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_tputs+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_tputs+set}" = set; then :
+
+else
+  ac_cv_search_tputs=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
+$as_echo "$ac_cv_search_tputs" >&6; }
+ac_res=$ac_cv_search_tputs
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+    if test $ac_cv_search_tputs = -lterminfo; then
+
+$as_echo "#define TERMINFO 1" >>confdefs.h
+
+    fi
+    ;;
+esac
+
 # Do we have res_init, for detecting changes in /etc/resolv.conf?
 
 resolv=no

=== modified file 'configure.in'
--- a/configure.in      2011-01-02 23:50:46 +0000
+++ b/configure.in      2011-01-12 02:29:23 +0000
@@ -2372,6 +2372,15 @@
 # than to expect to find it in ncurses.
 AC_CHECK_LIB(ncurses, tparm)
 
+case "$opsys" in
+  netbsd)
+    AC_SEARCH_LIBS(tputs, [ncurses terminfo termcap])
+    if test $ac_cv_search_tputs = -lterminfo; then
+      AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of 
termcap.])
+    fi
+    ;;
+esac
+
 # Do we have res_init, for detecting changes in /etc/resolv.conf?
 
 resolv=no

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-01-03 21:26:22 +0000
+++ b/src/ChangeLog     2011-01-12 02:29:23 +0000
@@ -1,3 +1,10 @@
+2011-01-12  Chong Yidong  <address@hidden>
+
+       * config.in (TERMINFO): New definition.
+
+       * s/netbsd.h: Use it to choose between terminfo and termcap
+       (Bug#7642).
+
 2011-01-03  Jan Djärv  <address@hidden>
 
        * coding.h (ENCODE_UTF_8): Remove "Used by ..." comment.

=== modified file 'src/config.in'
--- a/src/config.in     2011-01-02 23:50:46 +0000
+++ b/src/config.in     2011-01-12 02:29:23 +0000
@@ -895,6 +895,9 @@
 /* Process async input synchronously. */
 #undef SYNC_INPUT
 
+/* Define to 1 if you use terminfo instead of termcap. */
+#undef TERMINFO
+
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #undef TIME_WITH_SYS_TIME
 

=== modified file 'src/s/netbsd.h'
--- a/src/s/netbsd.h    2011-01-02 23:50:46 +0000
+++ b/src/s/netbsd.h    2011-01-12 02:29:23 +0000
@@ -45,8 +45,7 @@
 #define LIBS_DEBUG
 /* -lutil is not needed for NetBSD >0.9.  */
 /* #define LIBS_SYSTEM -lutil */
-#ifdef HAVE_TERM_H
-#define TERMINFO
+#ifdef TERMINFO
 #define LIBS_TERMCAP -lterminfo
 #else
 #define LIBS_TERMCAP -ltermcap


reply via email to

[Prev in Thread] Current Thread [Next in Thread]