From: Steve Youngs Date: Mon, 14 Sep 2015 03:43:56 +0000 (+1000) Subject: TTY + General build chain related updates X-Git-Tag: v22.1.16~16 X-Git-Url: http://cgit.sxemacs.org/?p=sxemacs;a=commitdiff_plain;h=8f74a8dd656155dc7716bd1ce168bb086b44cb8b;hp=6a469751f4562ba7d6104a4db3c05e705801151e TTY + General build chain related updates * merges: Conditional automake init Small configure.ac fix Fix info/Makefile.am for old automake Allow m4 and autostuff to be customized Enforce makeinfo version Improve TTY library detection Improve TTY section of summary Add builtin tty support option Forward compatible info in builddir (when CLEANFILES becomes obsolete) Attempt to provide speed_t Improve term initialization output Provide helper defines Allow for ncurses tinfo as TTY option --- diff --git a/autogen.sh b/autogen.sh index 64d67c2..cdfbbf1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -24,7 +24,10 @@ # Check file headers for more information. # BSD's m4 probably isn't gonna cut it, use gm4 if it is available -type gm4 >/dev/null 2>&1 && M4=gm4 || M4=m4 +if test -z "$M4" +then + type gm4 >/dev/null 2>&1 && M4=gm4 || M4=m4 +fi M4_VERSION=$($M4 --version | head -n1 | sed -e 's/^\(m4 \)\?(\?GNU M4)\? *//g' ) GOOD_M4=$( echo $M4_VERSION | awk -F. '{if( ($1>1) || ( ($1==1) && ($2>4) ) || ( ($1==1) && ($2==4) && ($3>=6) )) print 1 }') @@ -41,7 +44,11 @@ if test -d "/usr/xpg4/bin"; then export PATH fi -type git >/dev/null 2>&1 && GIT=git +if test -z "$GIT" +then + type git >/dev/null 2>&1 && GIT=git +fi + olddir=$(pwd) srcdir=$(dirname $0) cd "$srcdir" @@ -97,12 +104,49 @@ if test "$emacs_full_version" != "$EXPECTED_TREE_VERSION"; then echo "*******************************************" fi -autoconf_ver=$(autoconf --version 2>/dev/null | head -n1) -autoheader_ver=$(autoheader --version 2>/dev/null | head -n1) -automake_ver=$(automake --version 2>/dev/null | head -n1) -aclocal_ver=$(aclocal --version 2>/dev/null | head -n1) -libtool_ver=$(libtool --version 2>/dev/null | head -n1) - +test -z "$AUTOCONF" && type autoconf >/dev/null 2>&1 && AUTOCONF=autoconf +export AUTOCONF +test -z "$AUTORECONF" && type autoreconf >/dev/null 2>&1 && AUTORECONF=autoreconf +export AUTORECONF +test -z "$AUTOHEADER" && type autoheader >/dev/null 2>&1 && AUTOHEADER=autoheader +export AUTOHEADER +test -z "$AUTOMAKE" && type automake >/dev/null 2>&1 && AUTOMAKE=automake +export AUTOMAKE +test -z "$ACLOCAL" && type aclocal >/dev/null 2>&1 && ACLOCAL=aclocal +export ACLOCAL +test -z "$LIBTOOL" && type libtool >/dev/null 2>&1 && LIBTOOL=libtool +export LIBTOOL + +autoconf_ver=$($AUTOCONF --version 2>/dev/null | head -n1) +if test -z "$autoconf_ver"; then + echo Could not determine autoconf + exit 1 +fi +autoreconf_ver=$($AUTORECONF --version 2>/dev/null | head -n1) +if test -z "$autoreconf_ver"; then + echo Could not determine autoreconf + exit 1 +fi +autoheader_ver=$($AUTOHEADER --version 2>/dev/null | head -n1) +if test -z "$autoheader_ver"; then + echo Could not determine autoheader + exit 1 +fi +automake_ver=$($AUTOMAKE --version 2>/dev/null | head -n1) +if test -z "$automake_ver"; then + echo Could not determine automake + exit 1 +fi +aclocal_ver=$($ACLOCAL --version 2>/dev/null | head -n1) +if test -z "$aclocal_ver"; then + echo Could not determine aclocal + exit 1 +fi +libtool_ver=$($LIBTOOL --version 2>/dev/null | head -n1) +if test -z "$libtool_ver"; then + echo Could not determine libtool + exit 1 +fi # When things go wrong... get a bigger hammer! if test -n "$PHAMMER"; then @@ -143,8 +187,8 @@ else fi # using libtoolize as we did before doesn't work anymore, so just mkdir --Horst -mkdir -p libltdl/m4 -autoreconf --force --verbose --install -Wall +test -d libtld/m4 || mkdir -p libltdl/m4 +$AUTORECONF --force --verbose --install -Wall # hack-o-matic. Using gmp's config.{guess,sub} lets us have properer # detected machine configurations --SY. diff --git a/configure.ac b/configure.ac index a680427..dfb737b 100644 --- a/configure.ac +++ b/configure.ac @@ -560,6 +560,11 @@ OG_ARG_WITH([terminfo], [Use the terminfo library for tty support.]), [auto], [Autodetect]) +OG_ARG_WITH([tinfo], + AS_HELP_STRING([--with-tinfo], + [Use the ncurses tinfo library for tty support.]), + [auto], [Autodetect]) + OG_ARG_WITH([termlib], AS_HELP_STRING([--with-termlib], [Use the termlib library for tty support.]), @@ -570,6 +575,13 @@ OG_ARG_WITH([termcap], [Use the termcap library for tty support.]), [auto], [Autodetect]) +OG_ARG_WITH([builtin-tty], + AS_HELP_STRING([--with-builtin-tty], + [Use builtin termcap like code. LEGACY CODE. Please consider + installing ncurses. Requires /etc/termcap or TERMCAP + environment variable to work.]), + [no], [No]) + OG_ARG_WITH([gpm], AS_HELP_STRING([--with-gpm], @@ -759,12 +771,17 @@ AS_IF([test -f "$0.ac" -a "$0.ac" -nt "$0"], # # Turn off core generation. We are already verifying the program fails, no need # poluting the workspace. Of course if you are a SXEmacs developer you may want -# to comemnt this on occasion :-) +# to comment this on occasion :-) ulimit -c 0 ## initialise our nestable msg funs SXE_INIT_MSG_LEVEL +AC_PROG_SED +AC_PROG_AWK + +ECHO=echo + dnl Small snippet to make echo -n work on solaris ECHO_N= ECHO_C= case `echo -n x` in @@ -798,7 +815,19 @@ dnl Check for bogus options dnl ------------------------------------------------------------------------- SXE_CHECK_COMMAND_LINE -AM_INIT_AUTOMAKE([foreign -Wall]) +test -z "$AUTOMAKE" || AUTOMAKE=automake + +AM_INIT_AUTOMAKE(m4_esyscmd([ + automake_ver=`$AUTOMAKE --version 2>/dev/null | head -n1` + automake_major=`echo "$automake_ver" | sed -e 's/^.* \([0-9]*\).*/\1/'` + automake_minor=`echo "$automake_ver" | sed -e 's/^.* [0-9]*\.\([0-9]*\).*/\1/'` + if test "$automake_major" = "1" -a "$automake_minor" -lt "14" + then + echo "foreign -Wall" + else + echo "info-in-builddir foreign -Wall" + fi])) + m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) SXE_CHECK_BUILDCHAIN AC_SUBST(EGREP) @@ -2717,144 +2746,227 @@ AC_CHECK_HEADERS([libintl.h nlist.h sgtty.h termio.h termios.h]) AS_IF([test "$with_tty" != "no"],[ AS_MESSAGE(checking for TTY-related features) dnl Check if needed calls are available at all... - tty_libs="ncurses curses terminfo termlib termcap" - tty_funcs="tgetent tgetstr tgetflag tparm tgoto tputs" - for func in $tty_funcs; do - AC_SEARCH_LIBS($func,$tty_libs) + + with_tty_libs="" + detect_tty_libs="" + for lib in ncurses curses tinfo terminfo termlib termcap + do + eval "with=\$with_${lib}" + if test "$with" = no + then + AC_MSG_WARN(["Ignoring available ${lib} due to --with-${lib}=no"]) + elif test "$with" = "yes" + then + with_tty_libs="$with_tty_libs $lib" + else + detect_tty_libs="$detect_tty_libs $lib" + fi done - AS_IF([test "$ac_cv_search_tgetent" = "no" -a \ - "$ac_cv_search_tgetflag" = "no" -a \ - "$ac_cv_search_tgetstr" = "no" -a \ - "$ac_cv_search_tgoto" = "no" -a \ - "$ac_cv_search_tparm" = "no" -a \ - "$ac_cv_search_tputs" = "no" ], - have_tty=no) - AS_IF([test "$with_tty" = "yes" -a "$have_tty" = "no" ],[ - AC_MSG_ERROR([Your system lacks necessary functions for requested TTY support])]) -],[ - for feature in ncurses curses termcap terminfo termlib gpm; do - if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then - AC_MSG_WARN([--with-${feature} ignored: Not valid without TTY support]) - fi - eval "with_${feature}=no" - done -]) -AS_IF([test "$with_tty" != "no" -a "$have_tty" != "no" ],[ - for lib in $tty_libs; do - SXE_CHECK_LINK_LIB($lib, , eval have_${lib}=no) - with_lib_eval=`eval echo \\$with_$lib` - have_lib_eval=`eval echo \\$have_$lib` - AS_IF([test "$have_lib_eval" = "yes" ], [ - for func in $tty_funcs; do - AC_CHECK_LIB($lib, tgetent) - AC_CHECK_LIB($lib, tgetstr) - AC_CHECK_LIB($lib, tgetflags) - AC_CHECK_LIB($lib, tparm) - AC_CHECK_LIB($lib, tgoto) - AC_CHECK_LIB($lib, tputs) - done - ]) - have_lib_eval=`eval echo \\$have_$lib` - AS_IF([test "$with_lib_eval" = "yes" -a \ - "$have_lib_eval" = "no" ], - AC_MSG_WARN([Errors detected trying to use requested $lib. Continuing with autodetection.])) + # All terminal info functions needed + tty_funcs="tgetent tgetstr tgetflag tgetnum tparm tgoto tputs" + tty_libs="" + # Filter by existing libs, printf is sure to be available with libc, so failure + # would come from lib not find + for lib in $with_tty_libs $detect_tty_libs + do + SXE_CHECK_LINK_LIB($lib) + if eval "test \"\$sxe_cv_c_lib_${lib}\" != yes" + then + if eval "test \"\$with_${lib}\" = yes" + then + AC_MSG_WARN(["Ignoring --with-${lib}=yes due to library not linkable"]) + eval "with_${lib}=no" + fi + continue + fi + + AC_CHECK_LIB([$lib], [$tty_funcs]) + + # Lets verify we have all functions + for func in $tty_func + do + if eval "test \"\$ac_cv_lib_${lib}_${func}\" = no" + then + AS_MESSAGE(["Skipping ${lib}, does not support to all TTY functions"]) + lib="" + break + fi + done + + tty_libs="$tty_libs $lib" done - AS_IF([test "$sxe_cv_c_lib_ncurses" = "no" -a \ - "$sxe_cv_c_lib_curses" = "no" -a \ - "$sxe_cv_c_lib_termcap" = "no" -a \ - "$sxe_cv_c_lib_terminfo" = "no" -a \ - "$sxe_cv_c_lib_termlib" = "no"], - have_tty=no) - AS_IF([test "$with_tty" = "yes" -a "$have_tty" = "no"], - AC_MSG_ERROR([Your system lacks necessary libraries for requested TTY support.])) -]) - -AS_IF([test "$with_tty" != "no" -a "$have_tty" != "no" ],[ - AC_DEFINE([HAVE_NCURSES], [1], [Description here!]) - with_ncurses=yes - AC_CHECK_HEADER(ncurses/ncurses.h, curses_h_file=ncurses/ncurses.h) - if test -z "$curses_h_file"; then - AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h) - fi - if test -n "$curses_h_file"; then - AC_CHECK_HEADER(ncurses/termcap.h, termcap_h_file=ncurses/termcap.h) - AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h) - else - AC_CHECK_HEADER(ncurses.h, curses_h_file=ncurses.h) - AC_CHECK_HEADER(termcap.h, termcap_h_file=termcap.h) - AC_CHECK_HEADER(term.h, term_h_file=term.h) - fi - SXE_ADD_SXEUITTY_OBJS(terminfo.o) - SXE_PREPEND(-lncurses, LIBS) - - if test -z "$curses_h_file" ; then - dnl Try again, and check for the bogus ncurses/ include bug. - dnl (i.e. ncurses/curses.h bogusly includes instead of - dnl ) - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I/usr/include/ncurses" + if test -n "$tty_libs" + then + AS_MESSAGE(["Considering libraries: $tty_libs"]) + + # Check which preferred lib can be used + for func in $tty_funcs + do + # Make sure no flags are harmed during the search + sxe_save_LIBS=$LIBS + AC_SEARCH_LIBS($func, $tty_libs) + LIBS=$sxe_save_LIBS + done + + # Minimize the set of libraries + tty_feature="" + tty_fun="" + for func in $tty_funcs + do + eval lib=\$ac_cv_search_${func} + if test "$lib" != no -a "$lib" != "none required" + then + for feature in $tty_feature + do + if test "$feature" = "$lib" + then + lib="" + func="" + break; + fi + done + tty_feature="$tty_feature $lib" + tty_fun="$tty_fun $func" + fi + done + fi + + if test -n "$tty_feature" + then + # Check all the expected functions still compile with all the added + # libraries + sxe_save_LIBS=$LIBS + LIBS="$LIBS $tty_feature" + AC_CHECK_FUNCS($tty_funcs) + for func in $tty_fun + do + if eval "test \"\$ac_cv_func_${func}\" = no" + then + tty_feature="" + break + fi + done + LIBS=$sxe_save_LIBS + fi + + if test -n "$tty_feature" + then + SXE_PREPEND($tty_feature, LIBS) + for lib in $tty_feature + do + l=`echo $lib | sed -e 's/^-l//g'` + eval "with_${l}=yes" + done + with_builtin_tty=no + have_tty=yes + else + AC_MSG_WARN([Could not link all needed tty functions.] + [Please consider installing ncurses.]) + if test "$with_builtin_tty" = yes + then + AC_MSG_WARN([Using builtin tty support.]) + have_tty=yes + else + AC_MSG_WARN([Use --with-builtin-tty=yes if you cannot use ncurses.]) + have_tty=no + fi + fi + + if test "$with_builtin_tty" = yes + then + # Add our own wrappers using termcap + SXE_ADD_SXEUITTY_OBJS(termcap.o) + SXE_ADD_SXEUITTY_OBJS(tparam.o) + have_tty=yes + elif test "$have_tty" = yes + then + # Terminfo interface, since tgetent etc are available + SXE_ADD_SXEUITTY_OBJS(terminfo.o) + fi + + # Check headers, first generally + AC_CHECK_HEADER(termcap.h, termcap_h_file=termcap.h) + AC_CHECK_HEADER(term.h, term_h_file=term.h) + + if test "$have_ncurses" = yes; then + # Verify how ncurses overrides them AC_CHECK_HEADER(ncurses/ncurses.h, curses_h_file=ncurses/ncurses.h) if test -z "$curses_h_file"; then AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h) fi if test -n "$curses_h_file"; then AC_CHECK_HEADER(ncurses/termcap.h, termcap_h_file=ncurses/termcap.h) - AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h) + AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h) else - AC_CHECK_HEADER(ncurses.h, curses_h_file=ncurses.h) - AC_CHECK_HEADER(termcap.h, curses_h_file=termcap.h) - AC_CHECK_HEADER(term.h, curses_h_file=term.h) + AC_CHECK_HEADER(ncurses.h, curses_h_file=ncurses.h) fi - if test -n "$curses_h_file" - then AC_MSG_WARN([Your system has the bogus ncurses include bug.]) - else c_switch_site="$save_c_switch_site" + + if test -z "$curses_h_file" ; then + dnl Try again, and check for the bogus ncurses/ include bug. + dnl (i.e. ncurses/curses.h bogusly includes instead of + dnl ) + save_c_switch_site="$c_switch_site" + c_switch_site="$c_switch_site -I/usr/include/ncurses" + AC_CHECK_HEADER(ncurses/ncurses.h, curses_h_file=ncurses/ncurses.h) + if test -z "$curses_h_file"; then + AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h) + fi + if test -n "$curses_h_file"; then + AC_CHECK_HEADER(ncurses/termcap.h, termcap_h_file=ncurses/termcap.h) + AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h) + else + AC_CHECK_HEADER(ncurses.h, curses_h_file=ncurses.h) + fi + if test -n "$curses_h_file" + then + AC_MSG_WARN([Your system has the bogus ncurses include bug.]) + AC_CHECK_HEADER(termcap.h, curses_h_file=termcap.h) + AC_CHECK_HEADER(term.h, curses_h_file=term.h) + else c_switch_site="$save_c_switch_site" + fi fi + fi + + if test -n "$curses_h_file"; then + AC_DEFINE_UNQUOTED([HAVE_CURSES_H], [1], + [There is a curses.h header file available]) + fi + + if test -n "$termcap_h_file"; then + AC_DEFINE_UNQUOTED([HAVE_TERMCAP_H], [1], + [There is a termcap.h header available]) + fi + + if test -n "$term_h_file"; then + AC_DEFINE_UNQUOTED([HAVE_TERM_H], [1], + [There is a term.h header available]) + fi + + AC_DEFINE_UNQUOTED([CURSES_H_FILE], ["${curses_h_file-curses.h}"], + [The curses.h header file]) + AC_DEFINE_UNQUOTED([TERMCAP_H_FILE], ["${termcap_h_file-termcap.h}"], + [The termcap.h header file]) + AC_DEFINE_UNQUOTED([TERM_H_FILE], ["${term_h_file-term.h}"], + [The term.h header file]) +],[ + for feature in ncurses curses termcap terminfo termlib gpm; do + if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then + AC_MSG_WARN([--with-${feature} ignored: Not valid without TTY support]) fi -]) - -AS_IF([test "$with_tty" != "no" -a "$have_ncurses" != "no" ],[ - if test "$with_ncurses" = "no" -o -z "$curses_h_file" ; then - - # Check alternate library includes - for lib in curses term terminfo termcap; do - AC_CHECK_HEADER(${lib}.h, [ - eval ${lib}_h_file=${lib}.h - AC_CHECK_LIB($lib, tgetent, eval have_${lib}=yes, eval have_${lib}=no) - AC_CHECK_LIB($lib, tgetstr, , eval have_${lib}=no)]) - done - - for lib in curses terminfo termlib termcap; do - have_lib_eval=`eval echo \\$have_$lib` - if test "$have_lib_eval" = "yes"; then - AC_CHECK_LIB($lib, tparm, - SXE_ADD_SXEUITTY_OBJS(terminfo.o), - SXE_ADD_SXEUITTY_OBJS(tparam.o)) - SXE_PREPEND(-l${lib}, LIBS) - break - fi - done - fi - if test -n "$curses_h_file"; then - AC_DEFINE_UNQUOTED([HAVE_CURSES_H], [1], [There is a curses.h header file available]) - fi - if test -n "$termcap_h_file"; then - AC_DEFINE_UNQUOTED([HAVE_TERMCAP_H], [1], [There is a termcap.h header available]) - fi - if test -n "$term_h_file"; then - AC_DEFINE_UNQUOTED([HAVE_TERM_H], [1], [There is a term.h header available]) - fi - AC_DEFINE_UNQUOTED([CURSES_H_FILE], ["${curses_h_file-curses.h}"], [The curses.h header file]) - AC_DEFINE_UNQUOTED([TERMCAP_H_FILE], ["${termcap_h_file-termcap.h}"], [The termcap.h header file]) - AC_DEFINE_UNQUOTED([TERM_H_FILE], ["${term_h_file-term.h}"], [The term.h header file]) + eval "with_${feature}=\"\"" + done ]) AS_IF([test "$with_tty" != "no" -a "$have_tty" != no], [ - AC_DEFINE([HAVE_TTY], [1], [Include TTY support for SXEmacs]) - AC_DEFINE([HAVE_UNIXOID_EVENT_LOOP], [1], [Include Unixoid event loop - TTY provided]) + AC_DEFINE([HAVE_TTY], [1], + [Include TTY support for SXEmacs]) + AC_DEFINE([HAVE_UNIXOID_EVENT_LOOP], [1], + [Include Unixoid event loop - TTY provided]) SXE_ADD_SXEUITTY_OBJS([console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o]) ]) + AS_IF([test "$with_tty" != "no" -a "$have_tty" != no], [ dnl General Purpose Mouse (libgpm) support AS_IF([test "$with_gpm" != "no"], [ diff --git a/info/Makefile.am b/info/Makefile.am index be48125..34f8a57 100644 --- a/info/Makefile.am +++ b/info/Makefile.am @@ -25,6 +25,12 @@ LANG=C LC_ALL=C +# Since automake does not ignore unknown options, this has to be set in +# a horrible hack in configure.ac until we choose to mandate automake 1.14 +# Since many distros still carry automake 1.13, this is up for debate... +# +# AUTOMAKE_OPTIONS = info-in-builddir + builddir = @builddir@ srcdir = @srcdir@ diff --git a/m4/sxe-bldchain-progs.m4 b/m4/sxe-bldchain-progs.m4 index ebd9adf..3bb5f35 100644 --- a/m4/sxe-bldchain-progs.m4 +++ b/m4/sxe-bldchain-progs.m4 @@ -17,7 +17,20 @@ For more details see the INSTALL and PROBLEMS files. SXEmacs generates the documentation during the build process.]) exit 1 fi + SXE_MSG_CHECKING([makeinfo version]) + makeinfo_ver=`eval "$MAKEINFO" --version 2> /dev/null | head -n 1` + SXE_MSG_RESULT([${makeinfo_ver}]) + AC_DEFINE_UNQUOTED(MAKEINFO_VERSION, "${makeinfo_ver}", + [the makeinfo command version]) + case `echo "$makeinfo_ver" | $SED -e 's/^.* \([[0-9.]]*\).*/\1/'` in + [[1234]].*) + AC_MSG_ERROR([ +Your makeinfo program is too old. Please install 5.x or later.]) + exit 1 + ;; + esac AC_SUBST(MAKEINFO) + AC_SUBST(MAKEINFO_VERSION) ])dnl SXE_PROG_MAKEINFO diff --git a/m4/sxe-summary.m4 b/m4/sxe-summary.m4 index 8aa5f49..2cfe1ba 100644 --- a/m4/sxe-summary.m4 +++ b/m4/sxe-summary.m4 @@ -206,11 +206,18 @@ esac echo " TTY:" -test "$with_ncurses" = yes && echo " Compiling in support for ncurses." -test "$with_curses" = yes && echo " Compiling in support for curses." -test "$with_terminfo" = yes && echo " Compiling in support for terminfo ." -test "$with_termlib" = yes && echo " Compiling in support for termlib." -test "$with_termcap" = yes && echo " Compiling in support for termcap." +test "$with_ncurses" = yes && echo " Compiling in support for ncurses." +test "$with_curses" = yes && echo " Compiling in support for curses." +test "$with_tinfo" = yes && echo " Compiling in support for tinfo." +test "$with_terminfo" = yes && echo " Compiling in support for terminfo." +test "$with_termlib" = yes && echo " WARNING! Compiling in support for termlib." \ + && echo " Consider installing ncurses." +test "$with_termcap" = yes && echo " WARNING! Compiling in support for termcap." \ + && echo " Consider installing ncurses." \ + && echo " You may need to set TERMCAP or have the file /etc/termcap." +test "$with_builtin_tty" = yes && echo " WARNING! Using (brittle) builtin TTY." \ + && echo " Consider installing ncurses." \ + && echo " You WILL need to set TERMCAP or have the file /etc/termcap." test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." echo " diff --git a/src/cmdloop.c b/src/cmdloop.c index a7118d0..b77e2ca 100644 --- a/src/cmdloop.c +++ b/src/cmdloop.c @@ -276,7 +276,10 @@ DOESNT_RETURN initial_command_loop(Lisp_Object load_me) if (!noninteractive && (!CONSOLEP(Vselected_console) || CONSOLE_STREAM_P(XCONSOLE(Vselected_console)))) { - fprintf(stderr, "ni:%d CONSP(Vsel):%d CONSSTRP(XCONS(...)):%d\n", + fprintf(stderr, + "\nFATAL error starting up initial console\n " + "noninteractive:%d CONSP(Vselected_console):%d " + "CONSOLE_STREAM_P(XCONSOLE(...)):%d", noninteractive, CONSOLEP(Vselected_console), CONSOLE_STREAM_P(XCONSOLE(Vselected_console))); diff --git a/src/ui/TTY/termcap.c b/src/ui/TTY/termcap.c index ea8a31e..179f5fd 100644 --- a/src/ui/TTY/termcap.c +++ b/src/ui/TTY/termcap.c @@ -38,6 +38,14 @@ along with this program. If not, see . */ #endif /* not emacs */ +#ifdef HAVE_TERMIO_H +#include +#endif + +#ifdef HAVE_TERMIOS_H +#include +#endif + /* BUFSIZE is the initial size allocated for the buffer for reading the termcap file. It is not a limit.