diff --git a/src/aclocal.m4 b/src/aclocal.m4 index d8f51a4f68ef6331566adf282ea88ac3fb8bc302..7d2da031666a2c33d9dbb7d17e35cf8a801be791 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -45,15 +45,11 @@ if_autoconf(2,60,,[ ORIG__AC_PROG_CC_STDC # Some C99 compilers default to -Werror,-Wimplicit-function-declaration # Attempt to find a suitable prototype for exit(3C). - _AC_PROG_CXX_EXIT_DECLARATION - if test -n "$ac_declaration"; then - if echo "$ac_declaration" | grep extern >/dev/null; then :; else - # Looks like valid C code. - echo '#ifndef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h - fi - fi + _AC_COMPILE_IFELSE([@%:@ifdef __cplusplus + choke me +@%:@endif], [ + patsubst(_AC_PROG_CXX_EXIT_DECLARATION, [ifdef], [ifndef]) + ]) ]) ])