No need to replace things here

Just use the vars automagically defined by automake.
Remove check on unused argument

Add the casting instead to avoid a warning.