Oh, yes, Thank you very much.
it is because of the PATH. What confused me is that "/etc/profile" has no effect on root! I must do "source" manually and then root can find wx-config, and ./configure can work. Or I should add the path to "/root/.bashrc".
If I don't use sudo for configure, it will give an error, which is "permission denied".
Because I use some early version of ubuntu 10.04, there is only CB v8.02 and wxWidget v2.8.0 in Synaptic Package Manage. While I'd like to install CB v13.12 and the source files downloaded from SourceForge need wxWidget V2.8.12, so I have to install the wxWidget by myself. Although the wiki says all version above 2.8.0 are OK (except 2.8.3), in fact configure will output errors if the version is under 2.8.12.