--with-litespeed will be added automatically by the GUI tool.
If you want to install PHP to a different directory that cPanel does, you should remove '--prefix=/usr/local'.
All the configuration parameter should work, if it does not, just build PHP in cPanel with similar configuration, cPanel...