summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-01-01 15:49:05 -0800
committerKevin McCarthy <kevin@8t8.us>2021-01-03 13:00:29 -0800
commita01316d918d469c1f2637f00439443146d1d41ca (patch)
tree067b9e86f01000d376b615e7372beabf40f51afe /m4
parent9bb70dbce4bd99f05a61babb378f60bc65736150 (diff)
Convert AC_TRY_COMPILE to AC_COMPILE_IFELSE.
Diffstat (limited to 'm4')
-rw-r--r--m4/funcdecl.m412
-rw-r--r--m4/iconv.m44
2 files changed, 8 insertions, 8 deletions
diff --git a/m4/funcdecl.m4 b/m4/funcdecl.m4
index f46be2ef..1976af07 100644
--- a/m4/funcdecl.m4
+++ b/m4/funcdecl.m4
@@ -11,14 +11,14 @@ AC_DEFUN([CF_CHECK_FUNCDECL],
[
AC_MSG_CHECKING([for $2 declaration])
AC_CACHE_VAL(ac_cv_func_decl_$2,
-[AC_TRY_COMPILE([$1],
-[#ifndef ${ac_func}
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],
+[[#ifndef ${ac_func}
extern int ${ac_func}();
-#endif],[
-AC_TRY_COMPILE([$1],
-[#ifndef ${ac_func}
+#endif]])],[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]],
+[[#ifndef ${ac_func}
int (*p)() = ${ac_func};
-#endif],[
+#endif]])],[
eval "ac_cv_func_decl_$2=yes"],[
eval "ac_cv_func_decl_$2=no"])],[
eval "ac_cv_func_decl_$2=yes"])])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index f3ea4fe2..cb4fb508 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -41,7 +41,7 @@ AS_HELP_STRING([--with-libiconv-prefix@<:@=DIR@:>@], [Search for libiconv in DIR
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <iconv.h>
extern
@@ -53,7 +53,7 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
#else
size_t iconv();
#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-