Add m4 variable to check_flags function