diff --git a/support/configure b/support/configure index a6a58ded..c375a6b7 100755 --- a/support/configure +++ b/support/configure @@ -5526,10 +5526,20 @@ LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char inflate(void); int -main () +main (void) { -inflate() +return inflate(); ; return 0; } diff --git a/support/configure.in b/support/configure.in index a90ccd20..053d2065 100644 --- a/support/configure.in +++ b/support/configure.in @@ -82,7 +82,7 @@ irc_zlib_include=],[for irc_dir in "$irc_zlib_include" \ ]) irc_save_LIBS="$LIBS" LIBS="-lz $LIBS" -AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[inflate()]])],[no_zlib_library= +AC_LINK_IFELSE([AC_LANG_CALL([], [inflate])],[no_zlib_library= irc_zlib_library= LIBS="$irc_save_LIBS"],[LIBS="$irc_save_LIBS" for irc_dir in "$irc_zlib_library" \