Detect an infinite loop in ./configure in AC_DEFINE_DIR