You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

253 lines
5.9 KiB

Index: configure.ac
--- configure.ac.orig 2017-09-12 02:33:51.000000000 +0200
+++ configure.ac 2017-09-25 20:10:15.583307000 +0200
@@ -51,10 +51,10 @@
if test $curses_broken = 0; then
-# -- Try tinfo.
+# -- Try termcap.
if test "x$TERMLIBS" = x; then
- if test $have_tinfo = yes; then
- TERMLIBS="-ltinfo"
+ if test $have_termcap = yes; then
+ TERMLIBS="-ltermcap"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -64,10 +64,10 @@
fi
fi
-# -- Try xcurses.
+# -- Try termlib.
if test "x$TERMLIBS" = x; then
- if test $have_xcurses = yes; then
- TERMLIBS="-lxcurses"
+ if test $have_termlib = yes; then
+ TERMLIBS="-lcurses -ltermlib"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -77,10 +77,10 @@
fi
fi
-# -- Try ncursesw.
+# -- Try tinfo.
if test "x$TERMLIBS" = x; then
- if test $have_ncursesw = yes; then
- TERMLIBS="-lncursesw"
+ if test $have_tinfo = yes; then
+ TERMLIBS="-ltinfo"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -90,10 +90,10 @@
fi
fi
-# -- Try ncurses.
+# -- Try ncursesw.
if test "x$TERMLIBS" = x; then
- if test $have_ncurses = yes; then
- TERMLIBS="-lncurses"
+ if test $have_ncursesw = yes; then
+ TERMLIBS="-lncursesw"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -103,10 +103,10 @@
fi
fi
-# -- Try curses.
+# -- Try ncurses.
if test "x$TERMLIBS" = x; then
- if test $have_curses = yes; then
- TERMLIBS="-lcurses"
+ if test $have_ncurses = yes; then
+ TERMLIBS="-lncurses"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -130,12 +130,11 @@
fi
fi
fi
-fi
-# -- Try termcap.
+# -- Try curses.
if test "x$TERMLIBS" = x; then
- if test $have_termcap = yes; then
- TERMLIBS="-ltermcap"
+ if test $have_curses = yes; then
+ TERMLIBS="-lcurses"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -145,10 +144,10 @@
fi
fi
-# -- Try termlib.
+# -- Try xcurses.
if test "x$TERMLIBS" = x; then
- if test $have_termlib = yes; then
- TERMLIBS="-lcurses -ltermlib"
+ if test $have_xcurses = yes; then
+ TERMLIBS="-lxcurses"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
@@ -158,6 +157,8 @@
fi
fi
+fi
+
if test "x$TERMLIBS" = x; then
AC_MSG_RESULT(Cannot find terminal libraries - configure failed)
exit 1
Index: configure
--- configure.orig 2017-09-12 02:33:51.000000000 +0200
+++ configure 2017-09-25 20:10:15.584091000 +0200
@@ -4011,10 +4011,10 @@
if test $curses_broken = 0; then
-# -- Try tinfo.
+# -- Try termcap.
if test "x$TERMLIBS" = x; then
- if test $have_tinfo = yes; then
- TERMLIBS="-ltinfo"
+ if test $have_termcap = yes; then
+ TERMLIBS="-ltermcap"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4040,10 +4040,10 @@
fi
fi
-# -- Try xcurses.
+# -- Try termlib.
if test "x$TERMLIBS" = x; then
- if test $have_xcurses = yes; then
- TERMLIBS="-lxcurses"
+ if test $have_termlib = yes; then
+ TERMLIBS="-lcurses -ltermlib"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4069,10 +4069,10 @@
fi
fi
-# -- Try ncursesw.
+# -- Try tinfo.
if test "x$TERMLIBS" = x; then
- if test $have_ncursesw = yes; then
- TERMLIBS="-lncursesw"
+ if test $have_tinfo = yes; then
+ TERMLIBS="-ltinfo"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4098,10 +4098,10 @@
fi
fi
-# -- Try ncurses.
+# -- Try ncursesw.
if test "x$TERMLIBS" = x; then
- if test $have_ncurses = yes; then
- TERMLIBS="-lncurses"
+ if test $have_ncursesw = yes; then
+ TERMLIBS="-lncursesw"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4127,10 +4127,10 @@
fi
fi
-# -- Try curses.
+# -- Try ncurses.
if test "x$TERMLIBS" = x; then
- if test $have_curses = yes; then
- TERMLIBS="-lcurses"
+ if test $have_ncurses = yes; then
+ TERMLIBS="-lncurses"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4186,12 +4186,11 @@
fi
fi
fi
-fi
-# -- Try termcap.
+# -- Try curses.
if test "x$TERMLIBS" = x; then
- if test $have_termcap = yes; then
- TERMLIBS="-ltermcap"
+ if test $have_curses = yes; then
+ TERMLIBS="-lcurses"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4217,10 +4216,10 @@
fi
fi
-# -- Try termlib.
+# -- Try xcurses.
if test "x$TERMLIBS" = x; then
- if test $have_termlib = yes; then
- TERMLIBS="-lcurses -ltermlib"
+ if test $have_xcurses = yes; then
+ TERMLIBS="-lxcurses"
SAVE_LIBS=$LIBS
LIBS="$LIBS $TERMLIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4246,6 +4245,8 @@
fi
fi
+fi
+
if test "x$TERMLIBS" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot find terminal libraries - configure failed" >&5
$as_echo "Cannot find terminal libraries - configure failed" >&6; }
Index: main.c
--- main.c.orig 2017-09-12 02:33:50.000000000 +0200
+++ main.c 2017-09-25 20:11:59.259295000 +0200
@@ -60,6 +60,7 @@
extern int know_dumb;
extern int pr_type;
extern int quit_if_one_screen;
+extern int no_init;
/*
@@ -133,6 +134,8 @@
}
if (strcmp(s, "more") == 0)
less_is_more = 1;
+ if (less_is_more)
+ no_init = TRUE;
init_prompt();
@@ -171,7 +174,7 @@
}
editproto = lgetenv("LESSEDIT");
if (editproto == NULL || *editproto == '\0')
- editproto = "%E ?lm+%lm. %f";
+ editproto = "%E ?lm+%lm. '%f'";
#endif
/*