On Thu, Jul 14, 2005 at 12:23:21PM -0400, Sam Steingold wrote: > when I pass a function with a wrong signature as a callback, I get just > a warning from gcc, so the compile succeeds and the test is wrong: > > AC_CACHE_CHECK([whether DB_ENV->set_errcall() accepts DBE], > ac_cv_dbe_set_errcall_accept_dbe,[ > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <db.h> > void my_callback (const DB_ENV* dbe, const char *errpfx, const char *msg) {}], > [[DB_ENV dbe; dbe.set_errcall(&dbe,&my_callback);]])], > ac_cv_dbe_set_errcall_accept_dbe=yes,ac_cv_dbe_set_errcall_accept_dbe=no)]) > if test "$ac_cv_dbe_set_errcall_accept_dbe" = "yes"; then > AC_DEFINE(HAVE_DBE_SET_ERRCALL_ACCEPT_DBE,1, > [Define to 1 if DB_ENV->set_errcall() accepts DBE]) > fi How about testing if conftest.err is non-empty (warnings should be included in it)? -- albert chin (china@xxxxxxxxxxxxxxxxxx) _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf