autotools: do not add warnings that is included into -Wall already Plus remove duplicates (cherry picked from commit 006c528a21f8beec8993134c12610bd16cde7fff)