improved warnings for autolibs, fix #1655, fix #1716