diff options
| author | Glenn Morris | 2012-04-30 21:07:14 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-04-30 21:07:14 -0400 |
| commit | a4a18b8bbef0fe4265d675f9c56ea17566566484 (patch) | |
| tree | 7fc675b0a404391024a5e8e6d6cd87005330e523 | |
| parent | 3ba0a545ecf6e8385ffb65033015be0b16e0226f (diff) | |
| download | emacs-a4a18b8bbef0fe4265d675f9c56ea17566566484.tar.gz emacs-a4a18b8bbef0fe4265d675f9c56ea17566566484.zip | |
Use libtinfo in preference to libncurses (bug#9741)
* configure.in: Try libtinfo for tputs.
(LIBS_TERMCAP) [gnu*]: Use libtinfo if it was found.
* etc/NEWS: Mention this.
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | configure.in | 13 | ||||
| -rw-r--r-- | etc/NEWS | 3 |
3 files changed, 16 insertions, 3 deletions
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-05-01 Glenn Morris <rgm@gnu.org> | 1 | 2012-05-01 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * configure.in: Try libtinfo for tputs. | ||
| 4 | (LIBS_TERMCAP) [gnu*]: Use libtinfo if it was found. (Bug#9741) | ||
| 5 | |||
| 3 | * configure.in: Combine adjacent $opsys case blocks. | 6 | * configure.in: Combine adjacent $opsys case blocks. |
| 4 | 7 | ||
| 5 | * configure.in (LIBS_TERMCAP): Remove unreachable branch for sol2. | 8 | * configure.in (LIBS_TERMCAP): Remove unreachable branch for sol2. |
diff --git a/configure.in b/configure.in index 42a6b3364c9..4ad5efbb811 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -2868,7 +2868,7 @@ AC_DEFUN([tputs_link_source], [ | |||
| 2868 | ]) | 2868 | ]) |
| 2869 | # Maybe curses should be tried earlier? | 2869 | # Maybe curses should be tried earlier? |
| 2870 | # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 | 2870 | # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 |
| 2871 | for tputs_library in '' ncurses terminfo termcap curses; do | 2871 | for tputs_library in '' tinfo ncurses terminfo termcap curses; do |
| 2872 | OLIBS=$LIBS | 2872 | OLIBS=$LIBS |
| 2873 | if test -z "$tputs_library"; then | 2873 | if test -z "$tputs_library"; then |
| 2874 | LIBS_TERMCAP= | 2874 | LIBS_TERMCAP= |
| @@ -2888,7 +2888,8 @@ done | |||
| 2888 | AC_MSG_RESULT([$msg]) | 2888 | AC_MSG_RESULT([$msg]) |
| 2889 | if test "X$msg" = Xno; then | 2889 | if test "X$msg" = Xno; then |
| 2890 | AC_MSG_ERROR([The required function `tputs' was not found in any library. | 2890 | AC_MSG_ERROR([The required function `tputs' was not found in any library. |
| 2891 | These libraries were tried: libncurses, libterminfo, libtermcap, libcurses. | 2891 | The following libraries were tried (in order): |
| 2892 | libtinfo, libncurses, libterminfo, libtermcap, libcurses | ||
| 2892 | Please try installing whichever of these libraries is most appropriate | 2893 | Please try installing whichever of these libraries is most appropriate |
| 2893 | for your system, together with its header files. | 2894 | for your system, together with its header files. |
| 2894 | For example, a libncurses-dev(el) or similar package.]) | 2895 | For example, a libncurses-dev(el) or similar package.]) |
| @@ -2897,12 +2898,18 @@ fi | |||
| 2897 | ## Use termcap instead of terminfo? | 2898 | ## Use termcap instead of terminfo? |
| 2898 | ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. | 2899 | ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. |
| 2899 | TERMINFO=yes | 2900 | TERMINFO=yes |
| 2901 | ## FIXME? In the cases below where we unconditionally set | ||
| 2902 | ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, | ||
| 2903 | ## if that was found above to have tputs. | ||
| 2904 | ## Should we use the gnu* logic everywhere? | ||
| 2900 | case "$opsys" in | 2905 | case "$opsys" in |
| 2901 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. | 2906 | ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. |
| 2902 | ## The ncurses library has been moved out of the System framework in | 2907 | ## The ncurses library has been moved out of the System framework in |
| 2903 | ## Mac OS X 10.2. So if configure detects it, set the command-line | 2908 | ## Mac OS X 10.2. So if configure detects it, set the command-line |
| 2904 | ## option to use it. | 2909 | ## option to use it. |
| 2905 | darwin|gnu*) LIBS_TERMCAP="-lncurses" ;; | 2910 | darwin) LIBS_TERMCAP="-lncurses" ;; |
| 2911 | |||
| 2912 | gnu*) [ "x$LIBS_TERMCAP" = x ] && LIBS_TERMCAP="-lncurses" ;; | ||
| 2906 | 2913 | ||
| 2907 | freebsd) | 2914 | freebsd) |
| 2908 | AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo]) | 2915 | AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo]) |
| @@ -29,6 +29,9 @@ possibly-questionable C code. On a recent GNU system there should be | |||
| 29 | no warnings; on older and on non-GNU systems the generated warnings | 29 | no warnings; on older and on non-GNU systems the generated warnings |
| 30 | may be useful. | 30 | may be useful. |
| 31 | 31 | ||
| 32 | --- | ||
| 33 | ** Emacs uses libtinfo in preference to libncurses, if available. | ||
| 34 | |||
| 32 | 35 | ||
| 33 | * Startup Changes in Emacs 24.2 | 36 | * Startup Changes in Emacs 24.2 |
| 34 | 37 | ||