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

[PATCH 3/3] autoconf: prepare for 2.70



Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 aclocal.m4 |   8 ++---
 aczsh.m4   | 104 ++++++++++++++++++++++++++---------------------------
 2 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index e91be3c0d..c26e2d834 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -35,14 +35,14 @@ ac_save_CFLAGS="$CFLAGS"
 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" -Xc
 do
   CFLAGS="$ac_save_CFLAGS $ac_arg"
-  AC_TRY_COMPILE(
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 [#ifndef __STDC__
 choke me
 #endif	
-], [int test (int i, double x);
+]], [[int test (int i, double x);
 struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};],
-[fp_cv_prog_cc_stdc="$ac_arg"; break])
+struct s2 {int (*f) (double a);};]])],
+[fp_cv_prog_cc_stdc="$ac_arg"; break],[])
 done
 CFLAGS="$ac_save_CFLAGS"
 ])
diff --git a/aczsh.m4 b/aczsh.m4
index 40d3b04f2..c04bf9190 100644
--- a/aczsh.m4
+++ b/aczsh.m4
@@ -39,7 +39,7 @@ dnl   before finding the right type.
 dnl
 
 AC_DEFUN(zsh_64_BIT_TYPE,
-[AC_TRY_RUN([
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -50,7 +50,7 @@ main()
   int bar = (int) foo;
   return sizeof($1) != 8;
 }
-], $2="$1", $2=no,
+]])],[$2="$1"],[$2=no],
   [if test x$3 != x ; then
     $2="$1"
   else
@@ -113,11 +113,11 @@ void *zsh_getaddr1()
 };
 ' > conftest1.c
 sed 's/zsh_getaddr1/zsh_getaddr2/' < conftest1.c > conftest2.c
-if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then
-    AC_TRY_RUN([
+if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -170,7 +170,7 @@ main()
     if(sym1 != sym2) exit(1);
     exit(0);
 }
-], [zsh_cv_shared_$1=yes],
+]])],[zsh_cv_shared_$1=yes],
 [zsh_cv_shared_$1=no],
 [zsh_cv_shared_$1=no]
 )
@@ -195,11 +195,11 @@ else
 fi
 echo 'int fred () { return 42; }' > conftest1.c
 echo 'int fred () { return 69; }' > conftest2.c
-if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then
-    AC_TRY_RUN([
+if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -242,7 +242,7 @@ main()
     if(!fred1 || !fred2) exit(1);
     exit((*fred1)() != 42 || (*fred2)() != 69);
 }
-], [zsh_cv_sys_dynamic_clash_ok=yes],
+]])],[zsh_cv_sys_dynamic_clash_ok=yes],
 [zsh_cv_sys_dynamic_clash_ok=no],
 [zsh_cv_sys_dynamic_clash_ok=no]
 )
@@ -271,11 +271,11 @@ else
 fi
 echo 'int fred () { return 42; }' > conftest1.c
 echo 'extern int fred(); int barney () { return fred() + 27; }' > conftest2.c
-if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AC_FD_CC); then
-    AC_TRY_RUN([
+if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -316,7 +316,7 @@ main()
     if(!barneysym) exit(1);
     exit((*barneysym)() != 69);
 }
-], [zsh_cv_sys_dynamic_rtld_global=yes],
+]])],[zsh_cv_sys_dynamic_rtld_global=yes],
 [zsh_cv_sys_dynamic_rtld_global=no],
 [zsh_cv_sys_dynamic_rtld_global=no]
 )
@@ -341,11 +341,11 @@ else
     us=
 fi
 echo 'extern int fred(); int barney () { return fred() + 27; }' > conftest1.c
-if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC); then
+if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
     save_ldflags=$LDFLAGS
     LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
-    AC_TRY_RUN([
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -386,7 +386,7 @@ main()
 }
 
 int fred () { return 42; }
-], [zsh_cv_sys_dynamic_execsyms=yes],
+]])],[zsh_cv_sys_dynamic_execsyms=yes],
 [zsh_cv_sys_dynamic_execsyms=no],
 [zsh_cv_sys_dynamic_execsyms=no]
 )
@@ -415,11 +415,11 @@ elif
 	us=
     fi
     echo 'extern int fred(); int barney() { return fred() + 27; }' > conftest1.c
-    AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
-    AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AC_FD_CC); then
+    AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
+    AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
     save_ldflags=$LDFLAGS
     LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s"
-    AC_TRY_RUN([
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -460,7 +460,7 @@ main()
 }
 
 int fred () { return 42; }
-], [zsh_cv_sys_dynamic_strip_exe=yes],
+]])],[zsh_cv_sys_dynamic_strip_exe=yes],
 [zsh_cv_sys_dynamic_strip_exe=no],
 [zsh_cv_sys_dynamic_strip_exe=no]
 )
@@ -485,9 +485,9 @@ else
     us=
 fi
 echo 'int fred () { return 42; }' > conftest1.c
-if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) &&
-AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AC_FD_CC); then
-    AC_TRY_RUN([
+if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) &&
+AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD); then
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
@@ -526,7 +526,7 @@ main()
     if(!fredsym) exit(1);
     exit((*fredsym)() != 42);
 }
-], [zsh_cv_sys_dynamic_strip_lib=yes],
+]])],[zsh_cv_sys_dynamic_strip_lib=yes],
 [zsh_cv_sys_dynamic_strip_lib=no],
 [zsh_cv_sys_dynamic_strip_lib=no]
 )
@@ -564,7 +564,7 @@ dnl
 
 AC_DEFUN(zsh_TYPE_EXISTS,
 [AC_CACHE_CHECK([for $2], [zsh_cv_type_exists_[]translit($2, [ ], [_])],
-[AC_TRY_COMPILE([$1], [$2 testvar;],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2 testvar;]])],
 [zsh_cv_type_exists_[]translit($2, [ ], [_])=yes],
 [zsh_cv_type_exists_[]translit($2, [ ], [_])=no])
 ])
@@ -583,7 +583,7 @@ dnl
 
 AC_DEFUN(zsh_STRUCT_MEMBER,
 [AC_CACHE_CHECK([for $3 in $2], [zsh_cv_struct_member_[]translit($2, [ ], [_])_$3],
-[AC_TRY_COMPILE([$1], [$2 testvar; testvar.$3;],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2 testvar; testvar.$3;]])],
 [zsh_cv_struct_member_[]translit($2, [ ], [_])_$3=yes],
 [zsh_cv_struct_member_[]translit($2, [ ], [_])_$3=no])
 ])
@@ -621,25 +621,25 @@ AC_SUBST(tzsh)dnl
 
 AC_DEFUN(zsh_COMPILE_FLAGS,
     [AC_ARG_ENABLE(cppflags,
-	AC_HELP_STRING([--enable-cppflags=...], [specify C preprocessor flags]),
+	AS_HELP_STRING([--enable-cppflags=...], [specify C preprocessor flags]),
 	if test "$enableval" = "yes"
 	then CPPFLAGS="$1"
 	else CPPFLAGS="$enable_cppflags"
 	fi)
     AC_ARG_ENABLE(cflags,
-	AC_HELP_STRING([--enable-cflags=...], [specify C compiler flags]),
+	AS_HELP_STRING([--enable-cflags=...], [specify C compiler flags]),
 	if test "$enableval" = "yes"
 	then CFLAGS="$2"
 	else CFLAGS="$enable_cflags"
 	fi)
     AC_ARG_ENABLE(ldflags,
-	AC_HELP_STRING([--enable-ldflags=...], [specify linker flags]),
+	AS_HELP_STRING([--enable-ldflags=...], [specify linker flags]),
 	if test "$enableval" = "yes"
 	then LDFLAGS="$3"
 	else LDFLAGS="$enable_ldflags"
 	fi)
     AC_ARG_ENABLE(libs,
-	AC_HELP_STRING([--enable-libs=...], [specify link libraries]),
+	AS_HELP_STRING([--enable-libs=...], [specify link libraries]),
 	if test "$enableval" = "yes"
 	then LIBS="$4"
 	else LIBS="$enable_libs"
@@ -658,10 +658,10 @@ AC_DEFUN([zsh_CHECK_SOCKLEN_T],[
     [zsh_cv_type_socklen_t],
     [zsh_cv_type_socklen_t=
     for zsh_type in socklen_t int "unsigned long" size_t ; do
-      AC_TRY_COMPILE(
-        [#include <sys/types.h>
-         #include <sys/socket.h>],
-        [extern int accept (int, struct sockaddr *, $zsh_type *);],
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+        [[#include <sys/types.h>
+          #include <sys/socket.h>]],
+        [[extern int accept (int, struct sockaddr *, $zsh_type *);]])],
         [zsh_cv_type_socklen_t="$zsh_type"; break],
         []
       )
@@ -680,15 +680,15 @@ AC_DEFUN(zsh_LIMIT_PRESENT,
 [Define to 1 if ]$1[ is present (whether or not as a macro).])
 AC_CACHE_CHECK([for limit $1],
 zsh_cv_have_$1,
-[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>],
-[$1],
-  zsh_cv_have_$1=yes,
-  zsh_cv_have_$1=no)])
+#include <sys/resource.h>]],
+[[$1]])],
+  [zsh_cv_have_$1=yes],
+  [zsh_cv_have_$1=no])])
 
 if test $zsh_cv_have_$1 = yes; then
   AC_DEFINE(HAVE_$1)
@@ -701,15 +701,15 @@ AC_DEFUN(zsh_LIMITS_EQUAL,
 [Define to 1 if RLIMIT_]$1[ and RLIMIT_]$3[ both exist and are equal.])
 AC_CACHE_CHECK([if RLIMIT_]$1[ and RLIMIT_]$3[ are the same],
 zsh_cv_rlimit_$2_is_$4,
-[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>],
-[static char x[(RLIMIT_$1 == RLIMIT_$3)? 1 : -1]],
-  zsh_cv_rlimit_$2_is_$4=yes,
-  zsh_cv_rlimit_$2_is_$4=no)])
+#include <sys/resource.h>]],
+[[static char x[(RLIMIT_$1 == RLIMIT_$3)? 1 : -1]]])],
+  [zsh_cv_rlimit_$2_is_$4=yes],
+  [zsh_cv_rlimit_$2_is_$4=no])])
 if test x$zsh_cv_rlimit_$2_is_$4 = xyes; then
   AC_DEFINE(RLIMIT_$1_IS_$3)
 fi])
-- 
2.30.0





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