ifndef WX_CONFIG
 ifeq ($(shell sh -c 'wx-config --cflags' > /dev/null 2>&1 && echo YES),YES)
  WX_CONFIG := wx-config
  WITH_WX	:=	1
 else
  ifeq ($(shell sh -c 'wxgtk2u-2.8-config --cflags' > /dev/null 2>&1 && echo YES),YES)
   WX_CONFIG := wxgtk2u-2.8-config
   WITH_WX	:=	1
  endif
 endif
endif

ifdef WX_CONFIG
 ifeq ($(shell $(WX_CONFIG) --version=2.8 --query-version 2>&1),2.8)
  WITH_WX	:=	1
 endif
endif

ifdef WITH_WX
 WX_CONFFLAGS	+=	--version=2.8 --unicode
 ifdef DEBUG
  WX_CONFFLAGS	+=	--debug
 endif
endif
