I was wondering if it is possible (and whether it is a good idea in
general) autoconf to print warnings for extra macro arguments instead
of silently ignoring them.

Minimalistic example (from
https://savannah.gnu.org/bugs/index.php?30766):

AC_INIT
AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([Unable to find pthread.h.])])
AC_CHECK_ALIGNOF(pthread_mutex_t,,[AC_INCLUDES_DEFAULT
#include <pthread.h>])
AS_IF([test -z $ac_cv_alignof_pthread_mutex_t],
      [AC_MSG_ERROR([Unable to determine alignment of pthread_mutex_t.])])
AC_OUTPUT

The generated configure script fails on OpenBSD and Woe32, because
<pthread.h> is not #include'd in the test program.

It took me some time to spot where the problem is :-)

Reply via email to