use AS_IF and test to check if the DIST file is present

AC_CHECK_FILE doesn't work when cross compiling