add optional libraries and options to enable the optional libraries