I had this same problem. The issue was that adding /usr/share/aclocal to ACLOCAL_FLAGS brings in some unwanted cruft. Copy /usr/share/aclocal/wxwin.m4 to your Code::Blocks source directory and run bootstrap like this:
ACLOCAL_FLAGS="-I ." ./bootstrap
Hopefully this will help someone out.