def METHOD_NAME(self):
    config_args = [
        "--with-png={0}".format(self.spec["libpng"].prefix),
        "CPPFLAGS={0}".format(self.spec["zlib-api"].headers.include_flags),
        "LDFLAGS={0}".format(self.spec["zlib-api"].libs.search_flags),
    ]
    config_args += self.enable_or_disable("x", variant="X")
    if "+X" in self.spec:
        config_args.extend(
            [
                "--x-includes={0}".format(self.spec["libx11"].headers.directories[0]),
                "--x-libraries={0}".format(self.spec["libx11"].libs.directories[0]),
            ]
        )
    return config_args