-# Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,mgl,mac,dfb]
-WX_PORT := $(shell $(WX_CONFIG) --selected-config | cut -d '-' -f 1)
+# Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,osx_cocoa,osx_carbon,dfb]
+WX_PORT ?= $(shell $(WX_CONFIG) --query-toolkit)