Browse CVS Repository
Contents of /satellite/satellite4/macros/termcap.m4
Parent Directory
| Revision Log
| Revision Graph
Revision 1.3 -
( show annotations)
( download)
Mon Oct 24 15:03:12 2005 UTC
(18 years, 5 months ago)
by orrisroot
Branch: MAIN
CVS Tags: RELEASE_4_2_3, HEAD
Changes since 1.2: +1 -1 lines
updated autotools versions.
supported 'make dist' command.
| 1 |
# Configure paths for termcap lib |
| 2 |
# Yoshihiro OKUMURA |
| 3 |
# |
| 4 |
|
| 5 |
dnl AM_PATH_TERMCAP() |
| 6 |
dnl test for termcap, and define TERMCAP_LIBS |
| 7 |
dnl |
| 8 |
AC_DEFUN([AM_PATH_TERMCAP], |
| 9 |
[dnl |
| 10 |
TERMCAP_LIBS="" |
| 11 |
|
| 12 |
# checking headers |
| 13 |
AC_CHECK_HEADERS([ncurses.h termcap.h curses.h term.h]) |
| 14 |
if test $ac_cv_header_ncurses_h = no && test $ac_cv_header_termcap_h = no && test $ac_cv_header_curses_h = no && test $ac_cv_header_term_h = no ; then |
| 15 |
AC_MSG_ERROR([*** curses or termcap header not installed - please install first ***]) |
| 16 |
fi |
| 17 |
|
| 18 |
# checking libs |
| 19 |
AC_CHECK_LIB(ncurses, tgetent, have_ncurses=yes, have_ncurses=no) |
| 20 |
AC_CHECK_LIB(curses, tgetent, have_curses=yes, have_curses=no) |
| 21 |
AC_CHECK_LIB(termcap, tgetent, have_termcap=yes, have_termcap=no) |
| 22 |
|
| 23 |
if test x$have_ncurses = xyes; then |
| 24 |
TERMCAP_LIBS="-lncurses" |
| 25 |
elif test x$have_curses = xyes; then |
| 26 |
TERMCAP_LIBS="-lcurses" |
| 27 |
elif test x$have_termcap = xyes; then |
| 28 |
TERMCAP_LIBS="-ltermcap" |
| 29 |
else |
| 30 |
AC_MSG_ERROR([*** curses or termcap lib not installed - please install first ***]) |
| 31 |
fi |
| 32 |
|
| 33 |
AC_SUBST(TERMCAP_LIBS) |
| 34 |
]) |
| |