Cleaning up dependencies and build files. Provide with_egl or with_x11 for flexibility.