Add autoconf macro for a dependency's dependency