diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/funcdecl.m4 | 12 | ||||
-rw-r--r-- | m4/iconv.m4 | 4 |
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:- |