Replace the custom Makefile by automake. In addition drop the hacky libwidgetextra-uninstalled.pc and configure the library like every other optional library, but check if the library is not disabled.