Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 1/2] autoconf: run autoupdate



This brings us in line with a slightly more modern build system

Signed-off-by: Eitan Adler <lists@xxxxxxxxxxxxxx>
---
 configure.ac | 412 +++++++++++++++++++--------------------------------
 1 file changed, 149 insertions(+), 263 deletions(-)

diff --git a/configure.ac b/configure.ac
index 00c731864..c4d3889a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,8 +25,9 @@ dnl  Zsh Development Group have no obligation to provide maintenance,
 dnl  support, updates, enhancements, or modifications.
 dnl
 
-AC_INIT(Src/zsh.h)
-AC_PREREQ(2.59c)
+AC_INIT
+AC_CONFIG_SRCDIR([Src/zsh.h])
+AC_PREREQ([2.69])
 AC_CONFIG_HEADER(config.h)
 
 dnl What version of zsh are we building ?
@@ -60,7 +61,7 @@ ifdef([zsh-debug],[undefine([zsh-debug])])dnl
 AH_TEMPLATE([DEBUG],
 [Define to 1 if you want to debug zsh.])
 AC_ARG_ENABLE(zsh-debug,
-AC_HELP_STRING([--enable-zsh-debug], [compile with debug code and debugger symbols]),
+AS_HELP_STRING([--enable-zsh-debug],[compile with debug code and debugger symbols]),
 [if test x$enableval = xyes; then
   AC_DEFINE(DEBUG)
 fi])
@@ -70,7 +71,7 @@ ifdef([zsh-mem],[undefine([zsh-mem])])dnl
 AH_TEMPLATE([ZSH_MEM],
 [Define to 1 if you want to use zsh's own memory allocation routines])
 AC_ARG_ENABLE(zsh-mem,
-AC_HELP_STRING([--enable-zsh-mem], [compile with zsh memory allocation routines]),
+AS_HELP_STRING([--enable-zsh-mem],[compile with zsh memory allocation routines]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ZSH_MEM)
 fi])
@@ -80,7 +81,7 @@ ifdef([zsh-mem-debug],[undefine([zsh-mem-debug])])dnl
 AH_TEMPLATE([ZSH_MEM_DEBUG],
 [Define to 1 if you want to debug zsh memory allocation routines.])
 AC_ARG_ENABLE(zsh-mem-debug,
-AC_HELP_STRING([--enable-zsh-mem-debug], [debug zsh memory allocation routines]),
+AS_HELP_STRING([--enable-zsh-mem-debug],[debug zsh memory allocation routines]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ZSH_MEM_DEBUG)
 fi])
@@ -90,7 +91,7 @@ AH_TEMPLATE([ZSH_MEM_WARNING],
 [Define to 1 if you want to turn on warnings of memory allocation errors])
 ifdef([zsh-mem-warning],[undefine([zsh-mem-warning])])dnl
 AC_ARG_ENABLE(zsh-mem-warning,
-AC_HELP_STRING([--enable-zsh-mem-warning], [print warnings for errors in memory allocation]),
+AS_HELP_STRING([--enable-zsh-mem-warning],[print warnings for errors in memory allocation]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ZSH_MEM_WARNING)
 fi])
@@ -100,7 +101,7 @@ ifdef([zsh-secure-free],[undefine([zsh-secure-free])])dnl
 AH_TEMPLATE([ZSH_SECURE_FREE],
 [Define to 1 if you want to turn on memory checking for free().])
 AC_ARG_ENABLE(zsh-secure-free,
-AC_HELP_STRING([--enable-zsh-secure-free], [turn on error checking for free()]),
+AS_HELP_STRING([--enable-zsh-secure-free],[turn on error checking for free()]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ZSH_SECURE_FREE)
 fi])
@@ -111,8 +112,7 @@ ifdef([zsh-heap-debug],[undefine([zsh-heap-debug])])dnl
 AH_TEMPLATE([ZSH_HEAP_DEBUG],
 [Define to 1 if you want to turn on error checking for heap allocation.])
 AC_ARG_ENABLE(zsh-heap-debug,
-AC_HELP_STRING([--enable-zsh-heap-debug],
-[turn on error checking for heap allocation]),
+AS_HELP_STRING([--enable-zsh-heap-debug],[turn on error checking for heap allocation]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ZSH_HEAP_DEBUG)
 fi])
@@ -122,8 +122,7 @@ ifdef([zsh-valgrind],[undefine([zsh-valgrind])])dnl
 AH_TEMPLATE([ZSH_VALGRIND],
 [Define to 1 if you want to add code for valgrind to debug heap memory.])
 AC_ARG_ENABLE(zsh-valgrind,
-AC_HELP_STRING([--enable-zsh-valgrind],
-[turn on support for valgrind debugging of heap memory]),
+AS_HELP_STRING([--enable-zsh-valgrind],[turn on support for valgrind debugging of heap memory]),
 [if test x$enableval = xyes;  then
   AC_DEFINE(ZSH_VALGRIND)
 fi])
@@ -135,7 +134,7 @@ AH_TEMPLATE([ZSH_HASH_DEBUG],
 [Define to 1 if you want to get debugging information on internal
  hash tables.  This turns on the `hashinfo' builtin.])
 AC_ARG_ENABLE(zsh-hash-debug,
-AC_HELP_STRING([--enable-zsh-hash-debug], [turn on debugging of internal hash tables]),
+AS_HELP_STRING([--enable-zsh-hash-debug],[turn on debugging of internal hash tables]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ZSH_HASH_DEBUG)
 fi])
@@ -145,7 +144,7 @@ ifdef([stack-allocation],[undefine([stack-allocation])])dnl
 AH_TEMPLATE([USE_STACK_ALLOCATION],
 [Define to 1 if you want to allocate stack memory e.g. with `alloca'.])
 AC_ARG_ENABLE(stack-allocation,
-AC_HELP_STRING([--enable-stack-allocation], [allocate stack memory e.g. with `alloca']),
+AS_HELP_STRING([--enable-stack-allocation],[allocate stack memory e.g. with `alloca']),
 [if test x$enableval = xyes; then
   AC_DEFINE(USE_STACK_ALLOCATION)
 fi])
@@ -153,12 +152,12 @@ fi])
 dnl Pathnames for global zsh scripts
 ifdef([etcdir],[undefine([etcdir])])dnl
 AC_ARG_ENABLE(etcdir,
-AC_HELP_STRING([--enable-etcdir=DIR], [the default directory for global zsh scripts]),
+AS_HELP_STRING([--enable-etcdir=DIR],[the default directory for global zsh scripts]),
 [etcdir="$enableval"], [etcdir=/etc])
 
 ifdef([zshenv],[undefine([zshenv])])dnl
 AC_ARG_ENABLE(zshenv,
-AC_HELP_STRING([--enable-zshenv=FILE], [the full pathname of the global zshenv script]),
+AS_HELP_STRING([--enable-zshenv=FILE],[the full pathname of the global zshenv script]),
 [zshenv="$enableval"],
 [if test "x$etcdir" = xno; then
   zshenv=no
@@ -174,7 +173,7 @@ fi
 
 ifdef([zshrc],[undefine([zshrc])])dnl
 AC_ARG_ENABLE(zshrc,
-AC_HELP_STRING([--enable-zshrc=FILE], [the full pathname of the global zshrc script]),
+AS_HELP_STRING([--enable-zshrc=FILE],[the full pathname of the global zshrc script]),
 [zshrc="$enableval"],
 [if test "x$etcdir" = xno; then
   zshrc=no
@@ -190,7 +189,7 @@ fi
 
 ifdef([zprofile],[undefine([zprofile])])dnl
 AC_ARG_ENABLE(zprofile,
-AC_HELP_STRING([--enable-zprofile=FILE], [the full pathname of the global zprofile script]),
+AS_HELP_STRING([--enable-zprofile=FILE],[the full pathname of the global zprofile script]),
 [zprofile="$enableval"],
 [if test "x$etcdir" = xno; then
   zprofile=no
@@ -206,7 +205,7 @@ fi
 
 ifdef([zlogin],[undefine([zlogin])])dnl
 AC_ARG_ENABLE(zlogin,
-AC_HELP_STRING([--enable-zlogin=FILE], [the full pathname of the global zlogin script]),
+AS_HELP_STRING([--enable-zlogin=FILE],[the full pathname of the global zlogin script]),
 [zlogin="$enableval"],
 [if test "x$etcdir" = xno; then
   zlogin=no
@@ -222,7 +221,7 @@ fi
 
 ifdef([zlogout],[undefine([zlogout])])dnl
 AC_ARG_ENABLE(zlogout,
-AC_HELP_STRING([--enable-zlogout=FILE], [the full pathname of the global zlogout script]),
+AS_HELP_STRING([--enable-zlogout=FILE],[the full pathname of the global zlogout script]),
 [zlogout="$enableval"],
 [if test "x$etcdir" = xno; then
   zlogout=no
@@ -246,7 +245,7 @@ AC_SUBST(zlogout)dnl
 dnl Do you want dynamically loaded binary modules.
 ifdef([dynamic],[undefine([dynamic])])dnl
 AC_ARG_ENABLE(dynamic,
-AC_HELP_STRING([--disable-dynamic], [turn off dynamically loaded binary modules]),
+AS_HELP_STRING([--disable-dynamic],[turn off dynamically loaded binary modules]),
 [dynamic="$enableval"], [dynamic=yes])
 
 dnl Do you want to disable restricted on r* commands
@@ -256,7 +255,7 @@ AH_TEMPLATE([RESTRICTED_R],
  when zsh is exec'd with basename that starts with r.
  By default this is defined.])
 AC_ARG_ENABLE(restricted-r,
-AC_HELP_STRING([--disable-restricted-r], [turn off r* invocation for restricted shell]),
+AS_HELP_STRING([--disable-restricted-r],[turn off r* invocation for restricted shell]),
 [if test x$enableval = xyes; then
   AC_DEFINE(RESTRICTED_R)
 fi],
@@ -267,7 +266,7 @@ dnl Do you want to disable use of locale functions
 AH_TEMPLATE([CONFIG_LOCALE],
 [Undefine if you don't want local features.  By default this is defined.])
 AC_ARG_ENABLE([locale],
-AC_HELP_STRING([--disable-locale], [turn off locale features]),
+AS_HELP_STRING([--disable-locale],[turn off locale features]),
 [if test x$enableval = xyes; then
   AC_DEFINE(CONFIG_LOCALE)
 fi],
@@ -276,12 +275,12 @@ AC_DEFINE(CONFIG_LOCALE)
 
 dnl Do you want to compile as K&R C.
 AC_ARG_ENABLE(ansi2knr,
-AC_HELP_STRING([--enable-ansi2knr], [translate source to K&R C before compiling]),
+AS_HELP_STRING([--enable-ansi2knr],[translate source to K&R C before compiling]),
 [ansi2knr="$enableval"], [ansi2knr=default])
 
 ifdef([runhelpdir],[undefine([runhelpdir])])dnl
 AC_ARG_ENABLE(runhelpdir,
-AC_HELP_STRING([--enable-runhelpdir=DIR], [the directory in which to install run-help files]),
+AS_HELP_STRING([--enable-runhelpdir=DIR],[the directory in which to install run-help files]),
 [if test x"$enableval" = xno; then
   runhelpdir=
 else
@@ -298,7 +297,7 @@ fi
 
 ifdef([fndir],[undefine([fndir])])dnl
 AC_ARG_ENABLE(fndir,
-AC_HELP_STRING([--enable-fndir=DIR], [the directory in which to install functions]),
+AS_HELP_STRING([--enable-fndir=DIR],[the directory in which to install functions]),
 dnl ${VERSION} to be determined at compile time.
 [if test x$enableval = xyes; then
   fndir=${datadir}/${tzsh_name}/'${VERSION}'/functions
@@ -308,7 +307,7 @@ fi], [fndir=${datadir}/${tzsh_name}/'${VERSION}'/functions])
 
 ifdef([sitefndir],[undefine([sitefndir])])dnl
 AC_ARG_ENABLE(site-fndir,
-AC_HELP_STRING([--enable-site-fndir=DIR], [same for site functions (not version specific)]),
+AS_HELP_STRING([--enable-site-fndir=DIR],[same for site functions (not version specific)]),
 [if test x$enableval = xyes; then
   sitefndir=${datadir}/${tzsh_name}/site-functions
 else
@@ -336,7 +335,7 @@ fi
 
 ifdef([function_subdirs],[undefine([function_subdirs])])
 AC_ARG_ENABLE(function-subdirs,
-AC_HELP_STRING([--enable-function-subdirs], [install functions in subdirectories]))
+AS_HELP_STRING([--enable-function-subdirs],[install functions in subdirectories]))
 
 if test "x${enable_function_subdirs}" != x &&
   test "x${enable_function_subdirs}" != xno; then
@@ -347,7 +346,7 @@ fi
 
 ifdef([additionalfpath],[undefine([additionalfpath])])dnl
 AC_ARG_ENABLE(additional-fpath,
-AC_HELP_STRING([--enable-additional-fpath=DIR], [add directories to default function path]),
+AS_HELP_STRING([--enable-additional-fpath=DIR],[add directories to default function path]),
 [if test x$enableval = xyes; then
   additionalfpath=""
 else
@@ -366,7 +365,7 @@ dnl Directories for scripts such as newuser.
 
 ifdef([scriptdir],[undefine([scriptdir])])dnl
 AC_ARG_ENABLE(scriptdir,
-AC_HELP_STRING([--enable-scriptdir=DIR], [the directory in which to install scripts]),
+AS_HELP_STRING([--enable-scriptdir=DIR],[the directory in which to install scripts]),
 dnl ${VERSION} to be determined at compile time.
 [if test x$enableval = xyes; then
   scriptdir=${datadir}/${tzsh_name}/'${VERSION}'/scripts
@@ -376,7 +375,7 @@ fi], [scriptdir=${datadir}/${tzsh_name}/'${VERSION}'/scripts])
 
 ifdef([sitescriptdir],[undefine([sitescriptdir])])dnl
 AC_ARG_ENABLE(site-scriptdir,
-AC_HELP_STRING([--enable-site-scriptdir=DIR], [same for site scripts (not version specific)]),
+AS_HELP_STRING([--enable-site-scriptdir=DIR],[same for site scripts (not version specific)]),
 [if test x$enableval = xyes; then
   sitescriptdir=${datadir}/${tzsh_name}/scripts
 else
@@ -395,7 +394,7 @@ fi
 AH_TEMPLATE([CUSTOM_PATCHLEVEL],
 [Define to a custom value for the ZSH_PATCHLEVEL parameter])
 AC_ARG_ENABLE(custom-patchlevel,
-AC_HELP_STRING([--enable-custom-patchlevel], [set a custom ZSH_PATCHLEVEL value]),
+AS_HELP_STRING([--enable-custom-patchlevel],[set a custom ZSH_PATCHLEVEL value]),
 [if test x$enableval != x && test x$enableval != xno; then
   AC_DEFINE_UNQUOTED([CUSTOM_PATCHLEVEL], ["$enableval"])
 fi])
@@ -405,7 +404,7 @@ ifdef([maildir_support],[undefine([maildir_support])])dnl
 AH_TEMPLATE([MAILDIR_SUPPORT],
 [Define for Maildir support])
 AC_ARG_ENABLE(maildir-support,
-AC_HELP_STRING([--enable-maildir-support], [enable maildir support in MAIL and MAILPATH]),
+AS_HELP_STRING([--enable-maildir-support],[enable maildir support in MAIL and MAILPATH]),
 [if test x$enableval = xyes; then
   AC_DEFINE(MAILDIR_SUPPORT)
 fi])
@@ -415,7 +414,7 @@ ifdef([max_function_depth],[undefine([max_function_depth])])dnl
 AH_TEMPLATE([MAX_FUNCTION_DEPTH],
 [Define for function depth limits])
 AC_ARG_ENABLE(max-function-depth,
-AC_HELP_STRING([--enable-max-function-depth=MAX], [limit function depth to MAX, default 500]),
+AS_HELP_STRING([--enable-max-function-depth=MAX],[limit function depth to MAX, default 500]),
 [if test x$enableval = xyes; then
   AC_DEFINE(MAX_FUNCTION_DEPTH, 500)
 elif test x$enableval != xno; then
@@ -428,7 +427,7 @@ ifdef([default_readnullcmd],[undefine([default_readnullcmd])])dnl
 AH_TEMPLATE([DEFAULT_READNULLCMD],
 [Define default pager used by readnullcmd])
 AC_ARG_ENABLE(readnullcmd,
-AC_HELP_STRING([--enable-readnullcmd=PAGER], [pager used when READNULLCMD is not set]),
+AS_HELP_STRING([--enable-readnullcmd=PAGER],[pager used when READNULLCMD is not set]),
 [if test x$enableval = xyes; then
   AC_DEFINE(DEFAULT_READNULLCMD,"more")
 elif test x$enableval != xno; then
@@ -439,16 +438,14 @@ fi],
 
 dnl Do you want to look for pcre support?
 AC_ARG_ENABLE(pcre,
-AC_HELP_STRING([--enable-pcre],
-[enable the search for the pcre library (may create run-time library dependencies)]))
+AS_HELP_STRING([--enable-pcre],[enable the search for the pcre library (may create run-time library dependencies)]))
 
 dnl Do you want to look for capability support?
 AC_ARG_ENABLE(cap,
-AC_HELP_STRING([--enable-cap],
-[enable the search for POSIX capabilities (may require additional headers to be added by hand)]))
+AS_HELP_STRING([--enable-cap],[enable the search for POSIX capabilities (may require additional headers to be added by hand)]))
 
 AC_ARG_ENABLE(gdbm,
-AC_HELP_STRING([--disable-gdbm], [turn off search for gdbm library]),
+AS_HELP_STRING([--disable-gdbm],[turn off search for gdbm library]),
 [gdbm="$enableval"], [gdbm=yes])
 
 dnl ------------------
@@ -578,9 +575,7 @@ AC_FUNC_ALLOCA              dnl Check how to get `alloca'.
 dnl If the compiler supports union initialisation
 AC_CACHE_CHECK(if the compiler supports union initialisation,
 zsh_cv_c_have_union_init,
-[AC_TRY_COMPILE([union{void *p;long l;}u={0};], [u.l=1;],
-  zsh_cv_c_have_union_init=yes,
-  zsh_cv_c_have_union_init=no)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[union{void *p;long l;}u={0};]], [[u.l=1;]])],[zsh_cv_c_have_union_init=yes],[zsh_cv_c_have_union_init=no])])
 AH_TEMPLATE([HAVE_UNION_INIT],
 [Define to 1 if the compiler can initialise a union.])
 if test x$zsh_cv_c_have_union_init = xyes; then
@@ -590,10 +585,7 @@ fi
 dnl  Checking if compiler correctly cast signed to unsigned.
 AC_CACHE_CHECK(if signed to unsigned casting is broken,
 zsh_cv_c_broken_signed_to_unsigned_casting,
-[AC_TRY_RUN([main(){return((int)(unsigned char)((char) -1) == 255);}],
-  zsh_cv_c_broken_signed_to_unsigned_casting=yes,
-  zsh_cv_c_broken_signed_to_unsigned_casting=no,
-  zsh_cv_c_broken_signed_to_unsigned_casting=no)])
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[main(){return((int)(unsigned char)((char) -1) == 255);}]])],[zsh_cv_c_broken_signed_to_unsigned_casting=yes],[zsh_cv_c_broken_signed_to_unsigned_casting=no],[zsh_cv_c_broken_signed_to_unsigned_casting=no])])
 AH_TEMPLATE([BROKEN_SIGNED_TO_UNSIGNED_CASTING],
 [Define to 1 if compiler incorrectly cast signed to unsigned.])
 if test x$zsh_cv_c_broken_signed_to_unsigned_casting = xyes; then
@@ -603,9 +595,7 @@ fi
 dnl Checking if the compiler supports variable-length arrays
 AC_CACHE_CHECK(if the compiler supports variable-length arrays,
 zsh_cv_c_variable_length_arrays,
-[AC_TRY_COMPILE([int foo(), n;], [int i[foo()], a[n+1];],
-  zsh_cv_c_variable_length_arrays=yes,
-  zsh_cv_c_variable_length_arrays=no)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(), n;]], [[int i[foo()], a[n+1];]])],[zsh_cv_c_variable_length_arrays=yes],[zsh_cv_c_variable_length_arrays=no])])
 AH_TEMPLATE([HAVE_VARIABLE_LENGTH_ARRAYS],
 [Define to 1 if compiler supports variable-length arrays])
 if test x$zsh_cv_c_variable_length_arrays = xyes; then
@@ -704,10 +694,8 @@ AH_TEMPLATE([TIME_H_SELECT_H_CONFLICTS],
 if test x$ac_cv_header_sys_time_h = xyes && test x$ac_cv_header_sys_select_h = xyes; then
   AC_CACHE_CHECK(for conflicts in sys/time.h and sys/select.h,
   zsh_cv_header_time_h_select_h_conflicts,
-  [AC_TRY_COMPILE([#include <sys/time.h>
-#include <sys/select.h>], [int i;],
-  zsh_cv_header_time_h_select_h_conflicts=no,
-  zsh_cv_header_time_h_select_h_conflicts=yes)])
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>
+#include <sys/select.h>]], [[int i;]])],[zsh_cv_header_time_h_select_h_conflicts=no],[zsh_cv_header_time_h_select_h_conflicts=yes])])
   if test x$zsh_cv_header_time_h_select_h_conflicts = xyes; then
     AC_DEFINE(TIME_H_SELECT_H_CONFLICTS)
   fi
@@ -718,28 +706,22 @@ AH_TEMPLATE([GWINSZ_IN_SYS_IOCTL],
 if test x$ac_cv_header_termios_h = xyes; then
   AC_CACHE_CHECK(TIOCGWINSZ in termios.h,
   zsh_cv_header_termios_h_tiocgwinsz,
-  [AC_TRY_LINK([
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#include <termios.h>],
-  [int x = TIOCGWINSZ;],
-  zsh_cv_header_termios_h_tiocgwinsz=yes,
-  zsh_cv_header_termios_h_tiocgwinsz=no)])
+#include <termios.h>]], [[int x = TIOCGWINSZ;]])],[zsh_cv_header_termios_h_tiocgwinsz=yes],[zsh_cv_header_termios_h_tiocgwinsz=no])])
 else
   zsh_cv_header_termios_h_tiocgwinsz=no
 fi
 if test x$zsh_cv_header_termios_h_tiocgwinsz = xno; then
   AC_CACHE_CHECK(TIOCGWINSZ in sys/ioctl.h,
   zsh_cv_header_sys_ioctl_h_tiocgwinsz,
-  [AC_TRY_LINK([
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#include <sys/ioctl.h>],
-  [int x = TIOCGWINSZ;],
-  zsh_cv_header_sys_ioctl_h_tiocgwinsz=yes,
-  zsh_cv_header_sys_ioctl_h_tiocgwinsz=no)])
+#include <sys/ioctl.h>]], [[int x = TIOCGWINSZ;]])],[zsh_cv_header_sys_ioctl_h_tiocgwinsz=yes],[zsh_cv_header_sys_ioctl_h_tiocgwinsz=no])])
   if test x$zsh_cv_header_sys_ioctl_h_tiocgwinsz = xyes; then
     AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
   fi
@@ -749,11 +731,8 @@ AH_TEMPLATE([WINSIZE_IN_PTEM],
 [Define if your should include sys/stream.h and sys/ptem.h.])
 AC_CACHE_CHECK(for streams headers including struct winsize,
 ac_cv_winsize_in_ptem,
-[AC_TRY_COMPILE([#include <sys/stream.h>
-#include <sys/ptem.h>],
-[struct winsize wsz],
-ac_cv_winsize_in_ptem=yes,
-ac_cv_winsize_in_ptem=no)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stream.h>
+#include <sys/ptem.h>]], [[struct winsize wsz]])],[ac_cv_winsize_in_ptem=yes],[ac_cv_winsize_in_ptem=no])])
 if test x$ac_cv_winsize_in_ptem = xyes; then
   AC_DEFINE(WINSIZE_IN_PTEM)
 fi
@@ -791,7 +770,7 @@ dnl is ncurses or curses.
 dnl On pre-11.11 HPUX, Hcurses is reported to work better than curses.
 dnl Prefer ncurses to curses on all systems.  tinfo isn't very common now.
 AC_ARG_WITH(term-lib,
-AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]),
+AS_HELP_STRING([--with-term-lib=LIBS],[search space-separated LIBS for terminal handling]),
 [if test "x$withval" != xno && test "x$withval" != x ; then
   termcap_curses_order="$withval"
   AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order])
@@ -838,11 +817,9 @@ need to install a package called 'curses-devel' or 'ncurses-devel' on your
 system."], 255))
 AC_CHECK_HEADERS(curses.h, [],
 [AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris,
-AC_TRY_COMPILE([#include <curses.h>], [],
-[ac_cv_header_curses_h=yes
-ac_cv_header_curses_solaris=yes],
-ac_cv_header_curses_h=no
-ac_cv_header_curses_solaris=no))
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[]])],[ac_cv_header_curses_h=yes
+ac_cv_header_curses_solaris=yes],[ac_cv_header_curses_h=no
+ac_cv_header_curses_solaris=no]))
 if test x$ac_cv_header_curses_solaris = xyes; then
 AC_DEFINE(HAVE_CURSES_H)
 fi])
@@ -909,9 +886,7 @@ AH_TEMPLATE([ICONV_FROM_LIBICONV],
 [Define to 1 if iconv() is linked from libiconv])
 if test "x$ac_found_iconv" = xyes; then
   AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
-  AC_TRY_LINK([#include <iconv.h>],
-    [int myversion = _libiconv_version],
-    AC_DEFINE(ICONV_FROM_LIBICONV), )
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iconv.h>]], [[int myversion = _libiconv_version]])],[AC_DEFINE(ICONV_FROM_LIBICONV)],[])
 fi
 
 dnl Check if iconv uses const in prototype declaration
@@ -945,23 +920,18 @@ dnl ---------------------
 dnl Checks for external variable ospeed in the termcap library.
 AC_CACHE_CHECK(if an include file defines ospeed,
 zsh_cv_decl_ospeed_include_defines,
-[AC_TRY_LINK(
-[#include <sys/types.h>
+[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;],
-zsh_cv_decl_ospeed_include_defines=yes,
-zsh_cv_decl_ospeed_include_defines=no)])
+#endif]], [[ospeed = 0;]])],[zsh_cv_decl_ospeed_include_defines=yes],[zsh_cv_decl_ospeed_include_defines=no])])
 
 if test x$zsh_cv_decl_ospeed_include_defines = xno; then
   AC_CACHE_CHECK(if you must define ospeed,
   zsh_cv_decl_ospeed_must_define,
-  [AC_TRY_LINK( ,[extern short ospeed; ospeed = 0;],
-  zsh_cv_decl_ospeed_must_define=yes,
-  zsh_cv_decl_ospeed_must_define=no)])
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern short ospeed; ospeed = 0;]])],[zsh_cv_decl_ospeed_must_define=yes],[zsh_cv_decl_ospeed_must_define=no])])
 fi
 
 AH_TEMPLATE([HAVE_OSPEED],
@@ -986,7 +956,18 @@ dnl --------------
 dnl CHECK TYPEDEFS
 dnl --------------
 
-AC_TYPE_SIGNAL
+AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
+Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
+AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([#include <sys/types.h>
+#include <signal.h>
+],
+		 [return *(signal (0, 0)) (0) == 1;])],
+		   [ac_cv_type_signal=int],
+		   [ac_cv_type_signal=void])])
+AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
+		    (`int' or `void').])
+
 AC_TYPE_PID_T
 AC_TYPE_OFF_T
 AC_CHECK_TYPE(ino_t, unsigned long)
@@ -1000,10 +981,7 @@ dnl ------------------------------------------------
 dnl AC_CHECK_SIZEOF is no good, because we need the result here,
 dnl and that doesn't seem to define a shell parameter.
 AC_CACHE_CHECK(if long is 64 bits, zsh_cv_long_is_64_bit,
-[AC_TRY_RUN([int main() { return sizeof(long) < 8; }],
-zsh_cv_long_is_64_bit=yes,
-zsh_cv_long_is_64_bit=no,
-zsh_cv_long_is_64_bit=no)])
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return sizeof(long) < 8; }]])],[zsh_cv_long_is_64_bit=yes],[zsh_cv_long_is_64_bit=no],[zsh_cv_long_is_64_bit=no])])
 
 AH_TEMPLATE([ino_t],
 [Define to `unsigned long' if <sys/types.h> doesn't define.])
@@ -1028,27 +1006,21 @@ if test x$zsh_cv_long_is_64_bit = xyes; then
   AC_DEFINE(LONG_IS_64_BIT)
 else
   AC_CACHE_CHECK(if off_t is 64 bit, zsh_cv_off_t_is_64_bit,
-  [AC_TRY_RUN([
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 
 main() { return sizeof(off_t) < 8; }
-],
-  zsh_cv_off_t_is_64_bit=yes,
-  zsh_cv_off_t_is_64_bit=no,
-  zsh_cv_off_t_is_64_bit=no)])
+]])],[zsh_cv_off_t_is_64_bit=yes],[zsh_cv_off_t_is_64_bit=no],[zsh_cv_off_t_is_64_bit=no])])
   if test x$zsh_cv_off_t_is_64_bit = xyes; then
     AC_DEFINE(OFF_T_IS_64_BIT)
   fi
 
   AC_CACHE_CHECK(if ino_t is 64 bit, zsh_cv_ino_t_is_64_bit,
-  [AC_TRY_RUN([
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 
 main() { return sizeof(ino_t) < 8; }
-],
-  zsh_cv_ino_t_is_64_bit=yes,
-  zsh_cv_ino_t_is_64_bit=no,
-  zsh_cv_ino_t_is_64_bit=no)])
+]])],[zsh_cv_ino_t_is_64_bit=yes],[zsh_cv_ino_t_is_64_bit=no],[zsh_cv_ino_t_is_64_bit=no])])
   if test x$zsh_cv_ino_t_is_64_bit = xyes; then
     AC_DEFINE(INO_T_IS_64_BIT)
   fi
@@ -1103,8 +1075,7 @@ fi
 
 dnl We'll blithely assume (f)printf supports the same types as sprintf.
 AC_CACHE_CHECK(for %lld printf support, zsh_cv_printf_has_lld,
-[AC_TRY_RUN(
-[#include <stdio.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
 #include <string.h>
 int main(int argc, char **argv)
 {
@@ -1116,10 +1087,7 @@ int main(int argc, char **argv)
    }
    return 1;
 }
-],
-zsh_cv_printf_has_lld=yes,
-zsh_cv_printf_has_lld=no,
-zsh_cv_printf_has_lld=no)])
+]])],[zsh_cv_printf_has_lld=yes],[zsh_cv_printf_has_lld=no],[zsh_cv_printf_has_lld=no])])
 AH_TEMPLATE(PRINTF_HAS_LLD,
 [Define to 1 if printf and sprintf support %lld for long long.])
 if test x$zsh_cv_printf_has_lld = xyes; then
@@ -1130,11 +1098,9 @@ dnl Check for sigset_t.  Currently I'm looking in
 dnl <sys/types.h> and <signal.h>.  Others might need
 dnl to be added.
 AC_CACHE_CHECK(for sigset_t, zsh_cv_type_sigset_t,
-[AC_TRY_COMPILE(
-[#define _POSIX_C_SOURCE 200809L
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_C_SOURCE 200809L
 #include <sys/types.h>
-#include <signal.h>], [sigset_t tempsigset;],
-  zsh_cv_type_sigset_t=yes, zsh_cv_type_sigset_t=no)])
+#include <signal.h>]], [[sigset_t tempsigset;]])],[zsh_cv_type_sigset_t=yes],[zsh_cv_type_sigset_t=no])])
 AH_TEMPLATE([sigset_t],
 [Define to `unsigned int' if <sys/types.h> or <signal.h> doesn't define])
 if test x$zsh_cv_type_sigset_t = xno; then
@@ -1271,9 +1237,7 @@ AH_TEMPLATE([USE_LOCAL_H_ERRNO],
 [Define to 1 if h_errno is not defined by the system.])
 AC_CACHE_CHECK(if we need our own h_errno,
   zsh_cv_decl_h_errno_use_local,
-  [AC_TRY_LINK( ,[extern int h_errno; h_errno = 0;],
-  zsh_cv_decl_h_errno_use_local=no,
-  zsh_cv_decl_h_errno_use_local=yes)])
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern int h_errno; h_errno = 0;]])],[zsh_cv_decl_h_errno_use_local=no],[zsh_cv_decl_h_errno_use_local=yes])])
 
 if test x$zsh_cv_decl_h_errno_use_local = xyes; then
   AC_DEFINE(USE_LOCAL_H_ERRNO)
@@ -1361,7 +1325,7 @@ AH_TEMPLATE([TGETENT_ACCEPTS_NULL],
 [Define to 1 if tgetent() accepts NULL as a buffer.])
 AC_CACHE_CHECK(if tgetent accepts NULL,
 zsh_cv_func_tgetent_accepts_null,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 main()
 {
     char buf[4096];
@@ -1375,20 +1339,17 @@ main()
     }
     exit((r1 != r2) || r2 == -1);
 }
-],
-  if test -f conftest.tgetent; then
+]])],[if test -f conftest.tgetent; then
     zsh_cv_func_tgetent_accepts_null=yes
   else
     zsh_cv_func_tgetent_accepts_null=no
-  fi,
-  zsh_cv_func_tgetent_accepts_null=no,
-  zsh_cv_func_tgetent_accepts_null=no)])
+  fi],[zsh_cv_func_tgetent_accepts_null=no],[zsh_cv_func_tgetent_accepts_null=no])])
 if test x$zsh_cv_func_tgetent_accepts_null = xyes; then
   AC_DEFINE(TGETENT_ACCEPTS_NULL)
 fi
 AC_CACHE_CHECK(if tgetent returns 0 on success,
 zsh_cv_func_tgetent_zero_success,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 main()
 {
     char buf[4096];
@@ -1402,14 +1363,11 @@ main()
     }
     exit(r1 == r2);
 }
-],
-  if test -f conftest.tgetent0; then
+]])],[if test -f conftest.tgetent0; then
     zsh_cv_func_tgetent_zero_success=yes
   else
     zsh_cv_func_tgetent_zero_success=no
-  fi,
-  zsh_cv_func_tgetent_zero_success=no,
-  zsh_cv_func_tgetent_zero_success=no)])
+  fi],[zsh_cv_func_tgetent_zero_success=no],[zsh_cv_func_tgetent_zero_success=no])])
 AH_TEMPLATE([TGETENT_SUCCESS],
 [Define to what tgetent() returns on success (0 on HP-UX X/Open curses).])
 if test x$zsh_cv_func_tgetent_zero_success = xyes; then
@@ -1729,33 +1687,27 @@ if test x$zsh_cv_path_term_header != xnone; then
   fi
 
   AC_MSG_CHECKING(if boolcodes is available)
-  AC_TRY_LINK($term_includes, [char **test = boolcodes; puts(*test);],
-  AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
   AC_MSG_RESULT($boolcodes)
 
   AC_MSG_CHECKING(if numcodes is available)
-  AC_TRY_LINK($term_includes, [char **test = numcodes; puts(*test);],
-  AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
   AC_MSG_RESULT($numcodes)
 
   AC_MSG_CHECKING(if strcodes is available)
-  AC_TRY_LINK($term_includes, [char **test = strcodes; puts(*test);],
-  AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
   AC_MSG_RESULT($strcodes)
 
   AC_MSG_CHECKING(if boolnames is available)
-  AC_TRY_LINK($term_includes, [char **test = boolnames; puts(*test);],
-  AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
   AC_MSG_RESULT($boolnames)
 
   AC_MSG_CHECKING(if numnames is available)
-  AC_TRY_LINK($term_includes, [char **test = numnames; puts(*test);],
-  AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
   AC_MSG_RESULT($numnames)
 
   AC_MSG_CHECKING(if strnames is available)
-  AC_TRY_LINK($term_includes, [char **test = strnames; puts(*test);],
-  AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
   AC_MSG_RESULT($strnames)
 
   dnl There are apparently defective terminal library headers on some
@@ -1764,9 +1716,7 @@ if test x$zsh_cv_path_term_header != xnone; then
   tgoto_includes="$term_includes
 /* guaranteed to clash with any valid tgoto prototype */
 extern void tgoto(int **stuff, float **more_stuff);"
-  AC_TRY_LINK($tgoto_includes,
-  [int *stuff; float *more_stuff; tgoto(&stuff, &more_stuff);],
-  AC_DEFINE(TGOTO_PROTO_MISSING) tgotoprotomissing=yes, tgotoprotomissing=no)
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[$tgoto_includes]], [[int *stuff; float *more_stuff; tgoto(&stuff, &more_stuff);]])],[AC_DEFINE(TGOTO_PROTO_MISSING) tgotoprotomissing=yes],[tgotoprotomissing=no])
   AC_MSG_RESULT($tgotoprotomissing)
 else
   ZSH_TERM_H=
@@ -1832,19 +1782,16 @@ AH_TEMPLATE([rlim_t],
 DEFAULT_RLIM_T=long
 AC_CACHE_CHECK(if rlim_t is longer than a long,
 zsh_cv_rlim_t_is_longer,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 #include <sys/resource.h>
-main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}],
-zsh_cv_rlim_t_is_longer=yes,
-zsh_cv_rlim_t_is_longer=no,
-zsh_cv_rlim_t_is_longer=yes)])
+main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])])
 if test x$zsh_cv_rlim_t_is_longer = xyes; then
   AC_CACHE_CHECK(if rlim_t is a quad,
   zsh_cv_rlim_t_is_quad_t,
-  [AC_TRY_RUN([
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
@@ -1856,10 +1803,7 @@ main() {
   r.rlim_cur = 0;
   sprintf(buf, "%qd", r.rlim_cur);
   exit(strcmp(buf, "0"));
-}],
-  zsh_cv_rlim_t_is_quad_t=yes,
-  zsh_cv_rlim_t_is_quad_t=no,
-  zsh_cv_rlim_t_is_quad_t=no)])
+}]])],[zsh_cv_rlim_t_is_quad_t=yes],[zsh_cv_rlim_t_is_quad_t=no],[zsh_cv_rlim_t_is_quad_t=no])])
   if test x$zsh_cv_rlim_t_is_quad_t = xyes; then
     AC_DEFINE(RLIM_T_IS_QUAD_T)
     DEFAULT_RLIM_T=quad_t
@@ -1870,15 +1814,12 @@ main() {
 else
   AC_CACHE_CHECK(if the rlim_t is unsigned,
   zsh_cv_type_rlim_t_is_unsigned,
-  [AC_TRY_RUN([
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 #include <sys/resource.h>
-  main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}],
-  zsh_cv_type_rlim_t_is_unsigned=yes,
-  zsh_cv_type_rlim_t_is_unsigned=no,
-  zsh_cv_type_rlim_t_is_unsigned=no)])
+  main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])])
   if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then
     AC_DEFINE(RLIM_T_IS_UNSIGNED)
     DEFAULT_RLIM_T="unsigned $DEFAULT_RLIM_T"
@@ -1886,15 +1827,12 @@ else
 fi
 
 AC_CACHE_CHECK(for rlim_t, zsh_cv_type_rlim_t,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-#include <sys/resource.h>],
-[rlim_t l;],
-zsh_cv_type_rlim_t=yes,
-zsh_cv_type_rlim_t=no)])
+#include <sys/resource.h>]], [[rlim_t l;]])],[zsh_cv_type_rlim_t=yes],[zsh_cv_type_rlim_t=no])])
 if test x$zsh_cv_type_rlim_t = xno; then
   AC_DEFINE_UNQUOTED(rlim_t, $DEFAULT_RLIM_T)
 fi
@@ -1931,7 +1869,7 @@ AH_TEMPLATE([RLIMIT_VMEM_IS_RSS],
 [Define to 1 if RLIMIT_VMEM and RLIMIT_RSS both exist and are equal.])
 AC_CACHE_CHECK(if RLIMIT_VMEM and RLIMIT_RSS are the same,
 zsh_cv_rlimit_vmem_is_rss,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -1944,10 +1882,7 @@ int ret = 1;
 if (RLIMIT_RSS == RLIMIT_VMEM) ret = 0;
 #endif
 return ret;
-}],
-  zsh_cv_rlimit_vmem_is_rss=yes,
-  zsh_cv_rlimit_vmem_is_rss=no,
-  zsh_cv_rlimit_vmem_is_rss=no)])
+}]])],[zsh_cv_rlimit_vmem_is_rss=yes],[zsh_cv_rlimit_vmem_is_rss=no],[zsh_cv_rlimit_vmem_is_rss=no])])
 
 if test x$zsh_cv_rlimit_vmem_is_rss = xyes; then
   AC_DEFINE(RLIMIT_VMEM_IS_RSS)
@@ -1958,7 +1893,7 @@ AH_TEMPLATE([RLIMIT_VMEM_IS_AS],
 [Define to 1 if RLIMIT_VMEM and RLIMIT_AS both exist and are equal.])
 AC_CACHE_CHECK(if RLIMIT_VMEM and RLIMIT_AS are the same,
 zsh_cv_rlimit_vmem_is_as,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -1971,10 +1906,7 @@ int ret = 1;
 if (RLIMIT_AS == RLIMIT_VMEM) ret = 0;
 #endif
 return ret;
-}],
-  zsh_cv_rlimit_vmem_is_as=yes,
-  zsh_cv_rlimit_vmem_is_as=no,
-  zsh_cv_rlimit_vmem_is_as=no)])
+}]])],[zsh_cv_rlimit_vmem_is_as=yes],[zsh_cv_rlimit_vmem_is_as=no],[zsh_cv_rlimit_vmem_is_as=no])])
 
 if test x$zsh_cv_rlimit_vmem_is_as = xyes; then
   AC_DEFINE(RLIMIT_VMEM_IS_AS)
@@ -1985,7 +1917,7 @@ AH_TEMPLATE([RLIMIT_RSS_IS_AS],
 [Define to 1 if RLIMIT_RSS and RLIMIT_AS both exist and are equal.])
 AC_CACHE_CHECK(if RLIMIT_RSS and RLIMIT_AS are the same,
 zsh_cv_rlimit_rss_is_as,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -1998,10 +1930,7 @@ int ret = 1;
 if (RLIMIT_AS == RLIMIT_RSS) ret = 0;
 #endif
 return ret;
-}],
-  zsh_cv_rlimit_rss_is_as=yes,
-  zsh_cv_rlimit_rss_is_as=no,
-  zsh_cv_rlimit_rss_is_as=no)])
+}]])],[zsh_cv_rlimit_rss_is_as=yes],[zsh_cv_rlimit_rss_is_as=no],[zsh_cv_rlimit_rss_is_as=no])])
 
 if test x$zsh_cv_rlimit_rss_is_as = xyes; then
   AC_DEFINE(RLIMIT_RSS_IS_AS)
@@ -2108,7 +2037,7 @@ AH_TEMPLATE([GETCWD_CALLS_MALLOC],
 if test x$ac_cv_func_getcwd = xyes; then
   AC_CACHE_CHECK(whether getcwd calls malloc to allocate memory,
   zsh_cv_getcwd_malloc,
-  [AC_TRY_RUN([
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <string.h>
 int main() {
@@ -2120,10 +2049,7 @@ int main() {
     }
     return 1;
 }
-],
-  zsh_cv_getcwd_malloc=yes,
-  zsh_cv_getcwd_malloc=no,
-  zsh_cv_getcwd_malloc=no)])
+]])],[zsh_cv_getcwd_malloc=yes],[zsh_cv_getcwd_malloc=no],[zsh_cv_getcwd_malloc=no])])
   if test x$zsh_cv_getcwd_malloc = xyes; then
     AC_DEFINE(GETCWD_CALLS_MALLOC)
   fi
@@ -2176,9 +2102,8 @@ dnl brk/sbrk PROTOTYPES
 dnl -------------------
 AC_CACHE_CHECK(for brk() prototype in <unistd.h>,
 zsh_cv_header_unistd_h_brk_proto,
-[AC_TRY_COMPILE([#include <unistd.h>
-double brk();], [int i;],
-zsh_cv_header_unistd_h_brk_proto=no, zsh_cv_header_unistd_h_brk_proto=yes)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
+double brk();]], [[int i;]])],[zsh_cv_header_unistd_h_brk_proto=no],[zsh_cv_header_unistd_h_brk_proto=yes])])
 AH_TEMPLATE([HAVE_BRK_PROTO],
 [Define to 1 if there is a prototype defined for brk() on your system.])
 if test x$zsh_cv_header_unistd_h_brk_proto = xyes; then
@@ -2187,9 +2112,8 @@ fi
 
 AC_CACHE_CHECK(for sbrk() prototype in <unistd.h>,
 zsh_cv_header_unistd_h_sbrk_proto,
-[AC_TRY_COMPILE([#include <unistd.h>
-double sbrk();], [int i;],
-zsh_cv_header_unistd_h_sbrk_proto=no, zsh_cv_header_unistd_h_sbrk_proto=yes)])
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
+double sbrk();]], [[int i;]])],[zsh_cv_header_unistd_h_sbrk_proto=no],[zsh_cv_header_unistd_h_sbrk_proto=yes])])
 AH_TEMPLATE([HAVE_SBRK_PROTO],
 [Define to 1 if there is a prototype defined for sbrk() on your system.])
 if test x$zsh_cv_header_unistd_h_sbrk_proto = xyes; then
@@ -2204,10 +2128,8 @@ AH_TEMPLATE([HAVE_MKNOD_PROTO],
 if test "$ac_cv_prog_cc_stdc" != no; then
   AC_CACHE_CHECK(for mknod prototype in <sys/stat.h>,
   zsh_cv_header_sys_stat_h_mknod_proto,
-  [AC_TRY_COMPILE([#include <sys/stat.h>
-   int mknod(double x);], [int i;],
-  zsh_cv_header_sys_stat_h_mknod_proto=no,
-  zsh_cv_header_sys_stat_h_mknod_proto=yes)])
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>
+   int mknod(double x);]], [[int i;]])],[zsh_cv_header_sys_stat_h_mknod_proto=no],[zsh_cv_header_sys_stat_h_mknod_proto=yes])])
   if test x$zsh_cv_header_sys_stat_h_mknod_proto = xyes; then
     AC_DEFINE(HAVE_MKNOD_PROTO)
   fi
@@ -2218,24 +2140,20 @@ dnl presence and location of ioctl prototype
 dnl ----------------------------------------
 AC_CACHE_CHECK(for ioctl prototype in <unistd.h> or <termios.h>,
 zsh_cv_header_unistd_h_termios_h_ioctl_proto,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 #ifdef HAVE_TERMIOS_H
 # include <termios.h>
 #endif
-double ioctl();], [int i;],
-zsh_cv_header_unistd_h_termios_h_ioctl_proto=no,
-zsh_cv_header_unistd_h_termios_h_ioctl_proto=yes)])
+double ioctl();]], [[int i;]])],[zsh_cv_header_unistd_h_termios_h_ioctl_proto=no],[zsh_cv_header_unistd_h_termios_h_ioctl_proto=yes])])
 
 if test x$zsh_cv_header_unistd_h_termios_h_ioctl_proto = xno; then
   AC_CACHE_CHECK(for ioctl prototype in <sys/ioctl.h>,
   zsh_cv_header_sys_ioctl_h_ioctl_proto,
-  [AC_TRY_COMPILE([#include <sys/ioctl.h>
-  double ioctl();], [int i;],
-  zsh_cv_header_sys_ioctl_h_ioctl_proto=no,
-  zsh_cv_header_sys_ioctl_h_ioctl_proto=yes)])
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>
+  double ioctl();]], [[int i;]])],[zsh_cv_header_sys_ioctl_h_ioctl_proto=no],[zsh_cv_header_sys_ioctl_h_ioctl_proto=yes])])
 else
   zsh_cv_header_sys_ioctl_h_ioctl_proto=no
 fi
@@ -2260,9 +2178,7 @@ AH_TEMPLATE([SELECT_IN_SYS_SOCKET_H],
 if test x$ac_cv_header_sys_select_h != xyes; then
   AC_CACHE_CHECK(for select() in <sys/socket.h>,
   zsh_cv_header_socket_h_select_proto,
-  [AC_TRY_COMPILE([#include <sys/socket.h>], [fd_set fd;],
-  zsh_cv_header_socket_h_select_proto=yes, 
-  zsh_cv_header_socket_h_select_proto=no)])
+  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[fd_set fd;]])],[zsh_cv_header_socket_h_select_proto=yes],[zsh_cv_header_socket_h_select_proto=no])])
   if test x$zsh_cv_header_socket_h_select_proto = xyes; then
     AC_DEFINE(SELECT_IN_SYS_SOCKET_H)
   fi
@@ -2279,7 +2195,7 @@ zsh_cv_sys_fifo,
 [if test "$host_os" = cygwin; then
 zsh_cv_sys_fifo=yes
 else
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <fcntl.h>
 #include <signal.h>
 main()
@@ -2306,10 +2222,7 @@ main()
     unlink("/tmp/fifo$$");
     exit(ret);
 }
-],
-  zsh_cv_sys_fifo=yes,
-  zsh_cv_sys_fifo=no,
-  zsh_cv_sys_fifo=yes)
+]])],[zsh_cv_sys_fifo=yes],[zsh_cv_sys_fifo=no],[zsh_cv_sys_fifo=yes])
 fi])
 AH_TEMPLATE([HAVE_FIFOS],
 [Define to 1 if system has working FIFOs.])
@@ -2323,7 +2236,7 @@ dnl for instance, BeOS R4.51 doesn't support hard links yet
 dnl -----------
 AC_CACHE_CHECK(if link() works,
 zsh_cv_sys_link,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <fcntl.h>
 main()
@@ -2341,10 +2254,7 @@ main()
     unlink(newfile);
     exit(ret<0);
 }
-],
-  zsh_cv_sys_link=yes,
-  zsh_cv_sys_link=no,
-  zsh_cv_sys_link=yes)])
+]])],[zsh_cv_sys_link=yes],[zsh_cv_sys_link=no],[zsh_cv_sys_link=yes])])
 AH_TEMPLATE([HAVE_LINK],
 [Define to 1 if system has working link().])
 if test x$zsh_cv_sys_link = xyes; then
@@ -2357,7 +2267,7 @@ dnl should set errno to ESRCH, but some like BeOS R4.51 set to EINVAL
 dnl -----------
 AC_CACHE_CHECK(if kill(pid, 0) returns ESRCH correctly,
 zsh_cv_sys_killesrch,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
@@ -2367,10 +2277,7 @@ main()
     while (pid && (kill(pid, 0) == 0 || errno != ESRCH)) pid >>= 1;
     exit(errno!=ESRCH);
 }
-],
-  zsh_cv_sys_killesrch=yes,
-  zsh_cv_sys_killesrch=no,
-  zsh_cv_sys_killesrch=yes)])
+]])],[zsh_cv_sys_killesrch=yes],[zsh_cv_sys_killesrch=no],[zsh_cv_sys_killesrch=yes])])
 AH_TEMPLATE([BROKEN_KILL_ESRCH],
 [Define to 1 if kill(pid, 0) doesn't return ESRCH, ie BeOS R4.51.])
 if test x$zsh_cv_sys_killesrch = xno; then
@@ -2386,7 +2293,7 @@ Define to 1 if sigsuspend() is broken, ie BeOS R4.51.])
 if test x$signals_style = xPOSIX_SIGNALS; then
     AC_CACHE_CHECK(if POSIX sigsuspend() works,
     zsh_cv_sys_sigsuspend,
-    [AC_TRY_RUN([
+    [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <signal.h>
 #include <unistd.h>
 int child=0;
@@ -2411,10 +2318,7 @@ main() {
         exit(child==0);
     }
 }
-],
-      zsh_cv_sys_sigsuspend=yes,
-      zsh_cv_sys_sigsuspend=no,
-      zsh_cv_sys_sigsuspend=yes)])
+]])],[zsh_cv_sys_sigsuspend=yes],[zsh_cv_sys_sigsuspend=no],[zsh_cv_sys_sigsuspend=yes])])
     if test x$zsh_cv_sys_sigsuspend = xno; then
       AC_DEFINE(BROKEN_POSIX_SIGSUSPEND)
     fi
@@ -2427,11 +2331,11 @@ dnl -----------
 AH_TEMPLATE([BROKEN_TCSETPGRP],
 [Define to 1 if tcsetpgrp() doesn't work, ie BeOS R4.51.])
 AC_ARG_WITH(tcsetpgrp,
-AC_HELP_STRING([--with-tcsetpgrp], [assumes that tcsetpgrp() exists and works correctly]),[
+AS_HELP_STRING([--with-tcsetpgrp],[assumes that tcsetpgrp() exists and works correctly]),[
 case "x$withval" in
     xyes) zsh_working_tcsetpgrp=yes;;
     xno)  zsh_working_tcsetpgrp=no;;
-    *)    AC_ERROR([please use --with-tcsetpgrp=yes or --with-tcsetpgrp=no]);;
+    *)    AC_MSG_ERROR(please use --with-tcsetpgrp=yes or --with-tcsetpgrp=no);;
 esac],[zsh_working_tcsetpgrp=check])
 if test "x$ac_cv_func_tcsetpgrp" = xyes; then
 case "x$zsh_working_tcsetpgrp" in
@@ -2439,7 +2343,7 @@ case "x$zsh_working_tcsetpgrp" in
     trap "" TTOU > /dev/null 2>&1 || :
     AC_CACHE_CHECK(if tcsetpgrp() actually works,
     zsh_cv_sys_tcsetpgrp,
-    [AC_TRY_RUN([
+    [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -2452,14 +2356,13 @@ main() {
     if (ret < 0) exit(1);
     exit(0);
 }
-],
-      zsh_cv_sys_tcsetpgrp=yes, [
+]])],[zsh_cv_sys_tcsetpgrp=yes],[
 case $? in
     1) zsh_cv_sys_tcsetpgrp=no;;
     2) zsh_cv_sys_tcsetpgrp=notty;;
     *) zsh_cv_sys_tcsetpgrp=error;;
 esac
-      ], zsh_cv_sys_tcsetpgrp=yes)])
+      ],[zsh_cv_sys_tcsetpgrp=yes])])
     case "x$zsh_cv_sys_tcsetpgrp" in
       xno)    AC_DEFINE(BROKEN_TCSETPGRP);;
       xyes)   :;;
@@ -2485,7 +2388,7 @@ AH_TEMPLATE([GETPWNAM_FAKED],
 if test x$ac_cv_func_getpwnam = xyes; then
     AC_CACHE_CHECK(if getpwnam() is faked,
     zsh_cv_sys_getpwnam_faked,
-    [AC_TRY_RUN([
+    [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <pwd.h>
 main() {
     struct passwd *pw1, *pw2;
@@ -2497,10 +2400,7 @@ main() {
     pw2=getpwnam(buf);
     exit(pw1!=0 && pw2!=0 && !strcmp(name, pw2->pw_name));
 }
-],
-      zsh_cv_sys_getpwnam_faked=no,
-      zsh_cv_sys_getpwnam_faked=yes,
-      zsh_cv_sys_getpwnam_faked=no)])
+]])],[zsh_cv_sys_getpwnam_faked=no],[zsh_cv_sys_getpwnam_faked=yes],[zsh_cv_sys_getpwnam_faked=no])])
     if test x$zsh_cv_sys_getpwnam_faked = xyes; then
       AC_DEFINE(GETPWNAM_FAKED)
     fi
@@ -2544,13 +2444,11 @@ if test x$ac_cv_have_dev_ptmx = xyes -o x$ac_cv_func_posix_openpt = xyes && \
    test x$ac_cv_func_ptsname = xyes; then
    AC_CACHE_CHECK([if /dev/ptmx is usable],
    ac_cv_use_dev_ptmx,
-   [AC_TRY_COMPILE([#ifdef __linux
+   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef __linux
 #define _GNU_SOURCE 1
 #endif
 #include <stdlib.h>
-int ptsname();], ,
-   ac_cv_use_dev_ptmx=no,
-   ac_cv_use_dev_ptmx=yes)])
+int ptsname();]], [[]])],[ac_cv_use_dev_ptmx=no],[ac_cv_use_dev_ptmx=yes])])
    if test x$ac_cv_use_dev_ptmx = xyes; then
      AC_DEFINE(USE_DEV_PTMX)
    fi
@@ -2560,7 +2458,7 @@ dnl -----------------
 dnl multibyte support
 dnl -----------------
 AC_ARG_ENABLE(multibyte,
-AC_HELP_STRING([--enable-multibyte], [support multibyte characters]),
+AS_HELP_STRING([--enable-multibyte],[support multibyte characters]),
 [zsh_cv_c_unicode_support=$enableval],
 [AC_CACHE_VAL(zsh_cv_c_unicode_support,
   AC_MSG_NOTICE([checking for functions supporting multibyte characters])
@@ -2596,7 +2494,7 @@ dnl
 AH_TEMPLATE([ENABLE_UNICODE9],
 [Define to 1 if you want use unicode9 character widths.])
 AC_ARG_ENABLE(unicode9,
-AC_HELP_STRING([--enable-unicode9], [compile with unicode9 character widths]),
+AS_HELP_STRING([--enable-unicode9],[compile with unicode9 character widths]),
 [if test x$enableval = xyes; then
   AC_DEFINE(ENABLE_UNICODE9)
 fi])
@@ -2663,10 +2561,7 @@ if test x$zsh_cv_c_unicode_support = xyes; then
 
   AC_CACHE_CHECK(if the wcwidth() and/or iswprint() functions are broken,
   zsh_cv_c_broken_wcwidth,
-  [AC_TRY_RUN([$locale_prog],
-  zsh_cv_c_broken_wcwidth=yes,
-  zsh_cv_c_broken_wcwidth=no,
-  zsh_cv_c_broken_wcwidth=no)])
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[$locale_prog]])],[zsh_cv_c_broken_wcwidth=yes],[zsh_cv_c_broken_wcwidth=no],[zsh_cv_c_broken_wcwidth=no])])
   if test x$zsh_cv_c_broken_wcwidth = xyes; then
     AC_DEFINE(ENABLE_UNICODE9)
   fi
@@ -2695,10 +2590,7 @@ if test x$zsh_cv_c_unicode_support = xyes; then
 
   AC_CACHE_CHECK(if the isprint() function is broken,
   zsh_cv_c_broken_isprint,
-  [AC_TRY_RUN([$locale_prog],
-  zsh_cv_c_broken_isprint=yes,
-  zsh_cv_c_broken_isprint=no,
-  zsh_cv_c_broken_isprint=no)])
+  [AC_RUN_IFELSE([AC_LANG_SOURCE([[$locale_prog]])],[zsh_cv_c_broken_isprint=yes],[zsh_cv_c_broken_isprint=no],[zsh_cv_c_broken_isprint=no])])
   if test x$zsh_cv_c_broken_isprint = xyes; then
     AC_DEFINE(BROKEN_ISPRINT)
   fi
@@ -2710,7 +2602,7 @@ dnl
 AH_TEMPLATE([LIBC_MUSL],
 [Define to 1 if musl is being used as the C library])
 AC_ARG_ENABLE(libc-musl,
-AC_HELP_STRING([--enable-libc-musl], [compile with musl as the C library]),
+AS_HELP_STRING([--enable-libc-musl],[compile with musl as the C library]),
 [if test x$enableval = xyes; then
   AC_DEFINE(LIBC_MUSL)
 fi])
@@ -2719,7 +2611,7 @@ dnl
 dnl static user lookup
 dnl
 AC_ARG_ENABLE(dynamic-nss,
-	      AC_HELP_STRING([--disable-dynamic-nss], [do not call
+	      AS_HELP_STRING([--disable-dynamic-nss],[do not call
 			      functions that will require dynamic NSS
 			      modules]),
 [zsh_cv_c_dynamic_nss=$enableval],
@@ -2822,7 +2714,7 @@ elif test "$host_os" = cygwin; then
 elif test "x$dynamic" = xyes; then
   AC_CACHE_CHECK(if your system uses ELF binaries,
    zsh_cv_sys_elf,
-   [AC_TRY_RUN([/* Test for whether ELF binaries are produced */
+   [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Test for whether ELF binaries are produced */
 #include <fcntl.h>
 #include <stdlib.h>
 main(argc, argv)
@@ -2837,10 +2729,7 @@ char *argv[];
 		exit(0); /* succeed (yes, it's ELF) */
 	else
 		exit(1); /* fail */
-}],
-  zsh_cv_sys_elf=yes,
-  zsh_cv_sys_elf=no,
-  zsh_cv_sys_elf=yes)])
+}]])],[zsh_cv_sys_elf=yes],[zsh_cv_sys_elf=no],[zsh_cv_sys_elf=yes])])
 
   # We use [0-9]* in case statements, so need to change quoting
   changequote(, )
@@ -2969,18 +2858,17 @@ char *argv[];
 AC_CACHE_CHECK(if we can use -rdynamic, zsh_cv_rdynamic_available,
 old_LDFLAGS="$LDFLAGS"
 LDFLAGS="$LDFLAGS -rdynamic"
-AC_TRY_LINK([], [], [zsh_cv_rdynamic_available=yes
-EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}"],
-[zsh_cvs_rdynamic_available=no])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[zsh_cv_rdynamic_available=yes
+EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}"],[zsh_cvs_rdynamic_available=no])
 LDFLAGS="$old_LDFLAGS")
   AC_CACHE_CHECK(if your dlsym() needs a leading underscore,
    zsh_cv_func_dlsym_needs_underscore,
    [echo failed >conftestval && cat >conftest.c <<EOM
 fred () { }
 EOM
-    AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&AC_FD_CC) &&
-    AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AC_FD_CC) &&
-    AC_TRY_RUN([
+    AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest.c 1>&AS_MESSAGE_LOG_FD) &&
+    AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AS_MESSAGE_LOG_FD) &&
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdio.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -3032,10 +2920,8 @@ main()
     else
         fprintf (f, "no") ;
     exit(0);
-}], zsh_cv_func_dlsym_needs_underscore=`cat conftestval`,
-    zsh_cv_func_dlsym_needs_underscore=failed
-    dynamic=no,
-    zsh_cv_func_dlsym_needs_underscore=no)])
+}]])],[zsh_cv_func_dlsym_needs_underscore=`cat conftestval`],[zsh_cv_func_dlsym_needs_underscore=failed
+    dynamic=no],[zsh_cv_func_dlsym_needs_underscore=no])])
   if test "x$zsh_cv_func_dlsym_needs_underscore" = xyes; then
     AC_DEFINE(DLSYM_NEEDS_UNDERSCORE)
   elif test "x$zsh_cv_func_dlsym_needs_underscore" != xno; then
-- 
2.17.0



Messages sorted by: Reverse Date, Date, Thread, Author