Thta's the configure-line to build wx:
../../wxwidgets.dev/configure --with-zlib=sys --disable-reserved_virtual --enable-debug --enable-debug_info --enable-debug_gdb --enable-unicode --with-gtk=2 --enable-sound --with-sdl --enable-display --enable-geometry --enable-graphics_ctx --with-libjpeg=builtin --with-libpng=sys --with-libtiff=sys  --with-opengl
Running configure ends with:
Configured wxWidgets 3.1.0 for `x86_64-unknown-linux-gnu'
  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for GTK+ printing libnotify
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets support Unicode?                       yes (using wchar_t)
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.8      no
                                       wxWidgets 3.0      yes
  Which libraries should wxWidgets use?
                                       STL                no
                                       jpeg               builtin
                                       png                sys
                                       regex              builtin
                                       tiff               sys
                                       zlib               sys
                                       expat              sys
                                       libmspack          no
                                       sdl                yes
I build wx in an own directory and I do not install it.
That makes it easier to clean the build-folder before a new build, just delete and recreate it or delete everything in it, including the hidden-folders (very important, pch's go there !!).
I use the wx-config inside the build-folder. Either by setting C::B's "--with-wx-config"-parameter (when using automake) or by using manipulated versions of C::B's  wx30-project-files, which use it in the "Custom variables" tab.
As I wrote, lots of deprecated warnings (without my opatch for it), but build works (nore or less) fine (C::B still has issues with wx >= 2.9) .