summaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
Diffstat (limited to 'less')
-rw-r--r--less/less-381/configure.patch243
-rw-r--r--less/less-382/configure.patch243
2 files changed, 486 insertions, 0 deletions
diff --git a/less/less-381/configure.patch b/less/less-381/configure.patch
index e69de29bb2..2f054ba639 100644
--- a/less/less-381/configure.patch
+++ b/less/less-381/configure.patch
@@ -0,0 +1,243 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- less-381/./configure.ac~configure
++++ less-381/./configure.ac
+@@ -9,7 +9,7 @@
+ # contact the author, see the README file.
+
+ # Autoconf initialization.
+-AC_INIT(less, 1)
++AC_INIT([less],[1])
+ AC_CONFIG_SRCDIR([forwback.c])
+ AC_CONFIG_HEADER([defines.h])
+
+@@ -56,8 +56,7 @@
+ TERMLIBS="-lxcurses"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -69,8 +68,7 @@
+ TERMLIBS="-lncurses"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -82,8 +80,7 @@
+ TERMLIBS="-lcurses"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -96,8 +93,7 @@
+ TERMLIBS="-lcurses -ltermcap"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -111,8 +107,7 @@
+ TERMLIBS="-ltermcap"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -124,8 +119,7 @@
+ TERMLIBS="-lcurses -ltermlib"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -200,14 +194,11 @@
+ # Checks for identifiers.
+ AC_TYPE_OFF_T
+ AC_MSG_CHECKING(for void)
+-AC_TRY_COMPILE(, [void *foo = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void *foo = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)],[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for const)
+-AC_TRY_COMPILE(, [const int foo = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[const int foo = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)],[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for time_t)
+-AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[time_t t = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)],[AC_MSG_RESULT(no)])
+
+ # Checks for library functions.
+ AC_TYPE_SIGNAL
+@@ -217,14 +208,13 @@
+ AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
+
+ AC_MSG_CHECKING(for fileno)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_STDIO_H
+ #include <stdio.h>
+-#endif], [static int x; x = fileno(stdin);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)], [AC_MSG_RESULT(no)])
++#endif]], [[static int x; x = fileno(stdin);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for strerror)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_STDIO_H
+ #include <stdio.h>
+ #endif
+@@ -233,68 +223,56 @@
+ #endif
+ #if HAVE_ERRNO_H
+ #include <errno.h>
+-#endif], [static char *x; x = strerror(0);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)])
++#endif]], [[static char *x; x = strerror(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for sys_errlist)
+-AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *sys_errlist[]; static char **x; x = sys_errlist;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for sigset_t)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <signal.h>
+-], [sigset_t s; s = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)], [AC_MSG_RESULT(no)])
++]], [[sigset_t s; s = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for sigemptyset)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <signal.h>
+-], [sigset_t s; sigemptyset(&s);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)], [AC_MSG_RESULT(no)])
++]], [[sigset_t s; sigemptyset(&s);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)],[AC_MSG_RESULT(no)])
+
+ have_errno=no
+ AC_MSG_CHECKING(for errno)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_ERRNO_H
+ #include <errno.h>
+-#endif], [static int x; x = errno;],
+- [AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes])
++#endif]], [[static int x; x = errno;]])],[AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes],[])
+ if test $have_errno = no; then
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_ERRNO_H
+ #include <errno.h>
+-#endif], [extern int errno; static int x; x = errno;],
+- [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],
+- [AC_MSG_RESULT(no)])
++#endif]], [[extern int errno; static int x; x = errno;]])],[AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],[AC_MSG_RESULT(no)])
+ fi
+
+ AC_MSG_CHECKING(for locale)
+-AC_TRY_LINK([#include <locale.h>
+-#include <ctype.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <locale.h>
++#include <ctype.h>]], [[setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)],[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for ctype functions)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_CTYPE_H
+ #include <ctype.h>
+-#endif], [static int x; x = isupper(x); x = tolower(x); x = toupper(x);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)], [AC_MSG_RESULT(no)])
++#endif]], [[static int x; x = isupper(x); x = tolower(x); x = toupper(x);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)],[AC_MSG_RESULT(no)])
+
+ # Checks for external variable ospeed in the termcap library.
+ have_ospeed=no
+ AC_MSG_CHECKING(termcap for ospeed)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #if HAVE_TERMIOS_H
+ #include <termios.h>
+ #endif
+ #if HAVE_TERMCAP_H
+ #include <termcap.h>
+-#endif], [ospeed = 0;],
+-[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
++#endif]], [[ospeed = 0;]])],[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes],[])
+ if test $have_ospeed = no; then
+-AC_TRY_LINK(, [extern short ospeed; ospeed = 0;],
+- [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],
+- [AC_MSG_RESULT(no)])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern short ospeed; ospeed = 0;]])],[AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],[AC_MSG_RESULT(no)])
+ fi
+
+ # Checks for regular expression functions.
+@@ -311,7 +289,7 @@
+ if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
+ # Some versions of Solaris have a regcomp() function, but it doesn't work!
+ # So we run a test program. If we're cross-compiling, do it the old way.
+-AC_TRY_RUN([
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <regex.h>
+ main() { regex_t r; regmatch_t rm; char *text = "xabcy";
+@@ -322,19 +300,16 @@
+ #else
+ if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */
+ #endif
+-exit(0); }],
+- have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown)
++exit(0); }]])],[have_posix_regex=yes],[have_posix_regex=no],[have_posix_regex=unknown])
+ if test $have_posix_regex = yes; then
+ AC_MSG_RESULT(using POSIX regcomp)
+ AC_DEFINE(HAVE_POSIX_REGCOMP)
+ have_regex=yes
+ elif test $have_posix_regex = unknown; then
+- AC_TRY_LINK([
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <regex.h>],
+- [regex_t *r; regfree(r);],
+- AC_MSG_RESULT(using POSIX regcomp)
+- AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes)
++#include <regex.h>]], [[regex_t *r; regfree(r);]])],[AC_MSG_RESULT(using POSIX regcomp)
++ AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes],[])
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -357,9 +332,8 @@
+
+ if test $have_regex = no; then
+ if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
+-AC_TRY_LINK([
+-#include "regexp.h"], [regcomp("");],
+-AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes)
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++#include "regexp.h"]], [[regcomp("");]])],[AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes],[])
+ fi
+ fi
+
diff --git a/less/less-382/configure.patch b/less/less-382/configure.patch
index e69de29bb2..2f054ba639 100644
--- a/less/less-382/configure.patch
+++ b/less/less-382/configure.patch
@@ -0,0 +1,243 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- less-381/./configure.ac~configure
++++ less-381/./configure.ac
+@@ -9,7 +9,7 @@
+ # contact the author, see the README file.
+
+ # Autoconf initialization.
+-AC_INIT(less, 1)
++AC_INIT([less],[1])
+ AC_CONFIG_SRCDIR([forwback.c])
+ AC_CONFIG_HEADER([defines.h])
+
+@@ -56,8 +56,7 @@
+ TERMLIBS="-lxcurses"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -69,8 +68,7 @@
+ TERMLIBS="-lncurses"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -82,8 +80,7 @@
+ TERMLIBS="-lcurses"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -96,8 +93,7 @@
+ TERMLIBS="-lcurses -ltermcap"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -111,8 +107,7 @@
+ TERMLIBS="-ltermcap"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -124,8 +119,7 @@
+ TERMLIBS="-lcurses -ltermlib"
+ SAVE_LIBS=$LIBS
+ LIBS="$LIBS $TERMLIBS"
+- AC_TRY_LINK(, [tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);],
+- [termok=yes], [termok=no])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[tgetent(0,0); tgetflag(0); tgetnum(0); tgetstr(0,0);]])],[termok=yes],[termok=no])
+ LIBS=$SAVE_LIBS
+ if test $termok = no; then TERMLIBS=""; fi
+ fi
+@@ -200,14 +194,11 @@
+ # Checks for identifiers.
+ AC_TYPE_OFF_T
+ AC_MSG_CHECKING(for void)
+-AC_TRY_COMPILE(, [void *foo = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void *foo = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)],[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for const)
+-AC_TRY_COMPILE(, [const int foo = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[const int foo = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)],[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for time_t)
+-AC_TRY_COMPILE([#include <time.h>], [time_t t = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)], [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[time_t t = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIME_T)],[AC_MSG_RESULT(no)])
+
+ # Checks for library functions.
+ AC_TYPE_SIGNAL
+@@ -217,14 +208,13 @@
+ AC_CHECK_FUNC(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
+
+ AC_MSG_CHECKING(for fileno)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_STDIO_H
+ #include <stdio.h>
+-#endif], [static int x; x = fileno(stdin);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)], [AC_MSG_RESULT(no)])
++#endif]], [[static int x; x = fileno(stdin);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FILENO)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for strerror)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_STDIO_H
+ #include <stdio.h>
+ #endif
+@@ -233,68 +223,56 @@
+ #endif
+ #if HAVE_ERRNO_H
+ #include <errno.h>
+-#endif], [static char *x; x = strerror(0);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)], [AC_MSG_RESULT(no)])
++#endif]], [[static char *x; x = strerror(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRERROR)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for sys_errlist)
+-AC_TRY_LINK(, [extern char *sys_errlist[]; static char **x; x = sys_errlist;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)], [AC_MSG_RESULT(no)])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *sys_errlist[]; static char **x; x = sys_errlist;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_ERRLIST)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for sigset_t)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <signal.h>
+-], [sigset_t s; s = 0;],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)], [AC_MSG_RESULT(no)])
++]], [[sigset_t s; s = 0;]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGSET_T)],[AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING(for sigemptyset)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <signal.h>
+-], [sigset_t s; sigemptyset(&s);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)], [AC_MSG_RESULT(no)])
++]], [[sigset_t s; sigemptyset(&s);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SIGEMPTYSET)],[AC_MSG_RESULT(no)])
+
+ have_errno=no
+ AC_MSG_CHECKING(for errno)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_ERRNO_H
+ #include <errno.h>
+-#endif], [static int x; x = errno;],
+- [AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes])
++#endif]], [[static int x; x = errno;]])],[AC_MSG_RESULT(yes - in errno.h); AC_DEFINE(HAVE_ERRNO) have_errno=yes],[])
+ if test $have_errno = no; then
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_ERRNO_H
+ #include <errno.h>
+-#endif], [extern int errno; static int x; x = errno;],
+- [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],
+- [AC_MSG_RESULT(no)])
++#endif]], [[extern int errno; static int x; x = errno;]])],[AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_ERRNO) AC_DEFINE(MUST_DEFINE_ERRNO)],[AC_MSG_RESULT(no)])
+ fi
+
+ AC_MSG_CHECKING(for locale)
+-AC_TRY_LINK([#include <locale.h>
+-#include <ctype.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)], [AC_MSG_RESULT(no)])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <locale.h>
++#include <ctype.h>]], [[setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_LOCALE)],[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for ctype functions)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #if HAVE_CTYPE_H
+ #include <ctype.h>
+-#endif], [static int x; x = isupper(x); x = tolower(x); x = toupper(x);],
+- [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)], [AC_MSG_RESULT(no)])
++#endif]], [[static int x; x = isupper(x); x = tolower(x); x = toupper(x);]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_UPPER_LOWER)],[AC_MSG_RESULT(no)])
+
+ # Checks for external variable ospeed in the termcap library.
+ have_ospeed=no
+ AC_MSG_CHECKING(termcap for ospeed)
+-AC_TRY_LINK([
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #if HAVE_TERMIOS_H
+ #include <termios.h>
+ #endif
+ #if HAVE_TERMCAP_H
+ #include <termcap.h>
+-#endif], [ospeed = 0;],
+-[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
++#endif]], [[ospeed = 0;]])],[AC_MSG_RESULT(yes - in termcap.h); AC_DEFINE(HAVE_OSPEED) have_ospeed=yes],[])
+ if test $have_ospeed = no; then
+-AC_TRY_LINK(, [extern short ospeed; ospeed = 0;],
+- [AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],
+- [AC_MSG_RESULT(no)])
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern short ospeed; ospeed = 0;]])],[AC_MSG_RESULT(yes - must define); AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)],[AC_MSG_RESULT(no)])
+ fi
+
+ # Checks for regular expression functions.
+@@ -311,7 +289,7 @@
+ if test $WANT_REGEX = auto -o $WANT_REGEX = posix; then
+ # Some versions of Solaris have a regcomp() function, but it doesn't work!
+ # So we run a test program. If we're cross-compiling, do it the old way.
+-AC_TRY_RUN([
++AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <sys/types.h>
+ #include <regex.h>
+ main() { regex_t r; regmatch_t rm; char *text = "xabcy";
+@@ -322,19 +300,16 @@
+ #else
+ if (rm.rm_sp != text + 1) exit(1); /* check for correct offset */
+ #endif
+-exit(0); }],
+- have_posix_regex=yes, have_posix_regex=no, have_posix_regex=unknown)
++exit(0); }]])],[have_posix_regex=yes],[have_posix_regex=no],[have_posix_regex=unknown])
+ if test $have_posix_regex = yes; then
+ AC_MSG_RESULT(using POSIX regcomp)
+ AC_DEFINE(HAVE_POSIX_REGCOMP)
+ have_regex=yes
+ elif test $have_posix_regex = unknown; then
+- AC_TRY_LINK([
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <regex.h>],
+- [regex_t *r; regfree(r);],
+- AC_MSG_RESULT(using POSIX regcomp)
+- AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes)
++#include <regex.h>]], [[regex_t *r; regfree(r);]])],[AC_MSG_RESULT(using POSIX regcomp)
++ AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes],[])
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -357,9 +332,8 @@
+
+ if test $have_regex = no; then
+ if test $WANT_REGEX = auto -o $WANT_REGEX = regcomp; then
+-AC_TRY_LINK([
+-#include "regexp.h"], [regcomp("");],
+-AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes)
++AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++#include "regexp.h"]], [[regcomp("");]])],[AC_MSG_RESULT(using V8 regcomp); AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes],[])
+ fi
+ fi
+