-# Packages to build:
-package_gtk_lib = libwxgtk$(sorelease)
-package_gtk_dev = libwxgtk$(release)-dev
-package_gtk_dbg = libwxgtk$(release)-dbg
-package_gtk_py_lib = python-wxgtk$(sorelease)
-package_gtk_py = wxpython$(sorelease)
-package_common = wx$(release)-common
-package_headers = wx$(release)-headers
-package_i18n = wx$(release)-i18n
-package_doc = wx$(release)-doc
-package_examples = wx$(release)-examples
-
-package_gtk_dbg_py = python-wxgtk$(sorelease)-dbg
-package_msw_dev = libwxmsw$(release)-dev
-package_msw_dbg = libwxmsw$(release)-dbg
-package_headers_msw = wx$(release)-headers-msw
-
-# Build directories:
+
+# build options
+COMMON_CONFIGURE_OPTIONS = \
+ --prefix=/usr \
+ --cache-file=$(config_cache) \
+ --with-flavour=$(DEBIAN_WXFLAVOUR) \
+ --with-zlib=sys \
+ --disable-reserved_virtual \
+
+BASE_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
+ --disable-gui \
+
+GTK_CONFIGURE_OPTIONS = $(COMMON_CONFIGURE_OPTIONS) \
+ --with-gtk \
+ --enable-mediactrl \
+ --enable-sound \
+ --with-sdl \
+ --enable-display \
+ --enable-geometry \
+ --enable-graphics_ctx \
+ --with-libjpeg=sys \
+ --with-libpng=sys \
+ --with-libtiff=sys \
+
+
+pytoolkit := gtk2
+PY_WX_CONFIG_OPTIONS = --version=$(release) --toolkit=$(pytoolkit) --static=no
+
+WX_UNICODE := 1
+WX_OPENGL := 1
+
+ifeq ($(WX_UNICODE),1)
+ COMMON_CONFIGURE_OPTIONS += --enable-unicode
+ PY_WX_CONFIG_OPTIONS += --unicode
+ PY_UNICODE = UNICODE=1
+ wxpydir := wx-$(compatible_release)-$(pytoolkit)-unicode
+
+ # for compatibility with the existing 2.6 packages, we don't use "u" in
+ # the Unicode (default) package names
+ unicode_suffix :=
+else
+ # but we do need to use something for non-Unicode packages to distinguish
+ # them
+ unicode_suffix := -ansi
+ PY_UNICODE = UNICODE=0
+ wxpydir := wx-$(compatible_release)-$(pytoolkit)
+endif
+
+ifeq ($(WX_OPENGL),1)
+ GTK_CONFIGURE_OPTIONS += --with-opengl
+else
+ GTK_CONFIGURE_OPTIONS += --without-opengl
+endif
+
+#---------------------------------------------------------------------------
+# Packages to build
+
+package_wxbase_lib := libwxbase$(sorelease)$(unicode_suffix)
+package_wxbase_dev := libwxbase$(release)$(unicode_suffix)-dev
+package_wxbase_dbg := libwxbase$(release)$(unicode_suffix)-dbg
+
+package_gtk_lib := libwxgtk$(sorelease)$(unicode_suffix)
+package_gtk_dev := libwxgtk$(release)$(unicode_suffix)-dev
+package_gtk_dbg := libwxgtk$(release)$(unicode_suffix)-dbg
+
+package_headers := wx$(release)-headers
+package_i18n := wx$(release)-i18n
+package_doc := wx$(release)-doc
+package_examples := wx$(release)-examples
+package_common = wx-common
+
+package_gtk_py_lib := python-wxgtk$(release)$(unicode_suffix)
+package_gtk_py_ver = python-wxversion
+package_gtk_py_tools = python-wxtools
+package_gtk_py_addons = python-wxaddons
+package_gtk_dbg_py := python-wxgtk$(release)$(unicode_suffix)-dbg
+
+
+# The packages listed here are common to all wx versions, and may be provided
+# by another source package if more than one is in the release simultaneously.
+common_packages := $(package_common) $(package_gtk_py_ver) $(package_gtk_py_tools) $(package_gtk_py_addons)
+
+
+package_msw_dev := libwxmsw$(release)$(unicode_suffix)-dev
+package_msw_dbg := libwxmsw$(release)$(unicode_suffix)-dbg
+package_headers_msw := wx$(release)-headers-msw
+
+# The packages listed here will not be built by default.
+extra_packages := $(package_msw_dev) $(package_msw_dbg) $(package_headers_msw)
+
+ifdef DEBIAN_WX_DEFAULT_VERSION
+ extra_packages += $(common_packages)
+endif
+
+
+#---------------------------------------------------------------------------
+# Build directories
+
+objdir_wxbase_shared = objs_wxbase_sh
+objdir_wxbase_debug = objs_wxbase_d