Once you get wx-config so it returns the correct location with which.
Then, using this to select the correct wxWidgets installation can be done. Edit: Also see link http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux (http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux)
update-alternatives --config wx-config
Tim S.