[support XInput extension if available [default=yes]])],,
[enable_xinput="yes"])
-if test "$platform_win32" = yes; then
- gdktarget=win32
-else
- gdktarget=x11
+AC_ARG_ENABLE(x11-backend,
+ [AC_HELP_STRING([--enable-x11-backend],
+ [enable the X11 gdk backend])],
+ [backend_set=yes])
+AC_ARG_ENABLE(win32-backend,
+ [AC_HELP_STRING([--enable-win32-backend],
+ [enable the Win32 gdk backend])],
+ [backend_set=yes])
+AC_ARG_ENABLE(quartz-backend,
+ [AC_HELP_STRING([--enable-quartz-backend],
+ [enable the quartz gdk backend])],
+ [backend_set=yes])
+
+if test -z "$backend_set"; then
+ if test "$platform_win32" = yes; then
+ enable_win32_backend=yes
+ else
+ enable_x11_backend=yes
+ fi
+fi
+
+cairo_backends=
+GDK_BACKENDS=
+
+if test "x$enable_x11_backend" == xyes; then
+ # GDK calls the xlib backend "x11," cairo calls it "xlib." Other
+ # backend names are identical.
+ cairo_backends="$cairo_backends cairo-xlib"
+ GDK_BACKENDS="$GDK_BACKENDS x11"
+ # Pull in gio-unix for GDesktopAppInfo usage, see at least
+ # gdkapplaunchcontext-x11.c
+ GIO_PACKAGE=gio-unix-2.0
fi
-AC_ARG_WITH(gdktarget,
- AC_HELP_STRING([--with-gdktarget=@<:@x11/win32/quartz@:>@],
- [select non-default GDK target]),
- gdktarget=$with_gdktarget)
+if test "x$enable_win32_backend" == xyes; then
+ cairo_backends="$cairo_backends cairo-win32"
+ GDK_BACKENDS="$GDK_BACKENDS win32"
+ GIO_PACKAGE=gio-2.0
+fi
-AC_SUBST(gdktarget)
-case $gdktarget in
- x11|win32|quartz) ;;
- *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz or win32.]);;
-esac
+if test "x$enable_quartz_backend" == xyes; then
+ cairo_backends="$cairo_backends cairo-quartz"
+ GDK_BACKENDS="$GDK_BACKENDS quartz"
+ GIO_PACKAGE=gio-2.0
+fi
+
+AC_SUBST(GDK_BACKENDS)
+
+if test -z "$GDK_BACKENDS"; then
+ AC_MSG_ERROR([No GDK backends selected.])
+fi
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
cairo-gobject >= cairo_required_version dnl
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
-## In addition to checking that cairo is present, we also need to
-## check that the correct cairo backend is there. E.g. if the GDK
-## target is win32 we need the cairo-win32 backend and so on.
-cairo_backend=$gdktarget
-
-# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
-# backend names are identical.
-if test "x$cairo_backend" = "xx11"; then
- cairo_backend=xlib
-fi
-PKG_CHECK_MODULES(CAIRO_BACKEND,
- [cairo-$cairo_backend >= cairo_required_version])
+PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
if test "$os_win32" != yes; then
# libtool option to control which symbols are exported
fi
all_immodules="am-et,cedilla,cyrillic-translit"
-if test "$gdktarget" = "win32"; then
+if test "x$enable_win32_backend" == xyes; then
all_immodules="${all_immodules},ime"
fi
all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
-if test "$gdktarget" = "x11"; then
+if test "x$enable_x11_backend" == xyes; then
all_immodules="${all_immodules},xim"
fi
GTK_DEP_PACKAGES_FOR_X=
GTK_DEP_LIBS_FOR_X=
-if test "x$gdktarget" = "xx11"; then
+if test "x$enable_x11_backend" == xyes; then
X_PACKAGES=fontconfig
#
AM_CONDITIONAL(HAVE_X11R6, false)
fi
-if test "x$gdktarget" = "xwin32"; then
+
+if test "x$enable_win32_backend" == xyes; then
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
AM_CONDITIONAL(USE_WIN32, true)
else
AM_CONDITIONAL(USE_WIN32, false)
fi
-if test "x$gdktarget" = "xquartz"; then
+if test "x$enable_quartz_backend" == xyes; then
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
AM_CONDITIONAL(USE_QUARTZ, true)
else
# Check for Pango flags
-if test "x$gdktarget" = "xwin32"; then
+if test "x$enable_win32_backend" == xyes; then
PANGO_PACKAGES="pangowin32 pangocairo"
else
PANGO_PACKAGES="pango pangocairo"
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
-# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
-if test "x$gdktarget" = "xx11"; then
- GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
-else
- GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend cairo-gobject"
-fi
+GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
fi
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
-if test "x$gdktarget" = "xx11"; then
+if test "x$enable_x11_backend" == xyes; then
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
fi
GTK_EXTRA_LIBS=
fi
],[
gdk_windowing=''
-if expr "$gdktarget" : ".*x11.*" > /dev/null ; then
- gdk_windowing='$gdk_windowing
-#define GDK_WINDOWING_X11'
+if test "x$enable_x11_backend" == xyes; then
+ gdk_windowing="\$gdk_windowing
+#define GDK_WINDOWING_X11"
fi
-if expr "$gdktarget" : ".*win32.*" > /dev/null ; then
- gdk_windowing='$gdk_windowing
+if test "x$enable_win32_backend" == xyes; then
+ gdk_windowing="\$gdk_windowing
#define GDK_NATIVE_WINDOW_POINTER
-#define GDK_WINDOWING_WIN32'
+#define GDK_WINDOWING_WIN32"
fi
-if expr "$gdktarget" : ".*quartz.*" > /dev/null ; then
- gdk_windowing='$gdk_windowing
-#define GDK_WINDOWING_QUARTZ'
+if test "x$enable_quartz_backend" == xyes; then
+ gdk_windowing="\$gdk_windowing
+#define GDK_WINDOWING_QUARTZ"
fi
])
AC_OUTPUT
echo "configuration:
- target: $gdktarget"
+ backends: $GDK_BACKENDS"
<group>
<arg>--enable-packagekit</arg>
<arg>--disable-packagekit</arg>
- </group>
- <group>
- <arg>--with-gdktarget=[x11/win32/quartz]</arg>
+ </group>
+ <group>
+ <arg>--enable-x11-backend</arg>
+ <arg>--disable-x11-backend</arg>
+ <arg>--enable-win32-backend</arg>
+ <arg>--disable-win32-backend</arg>
+ <arg>--enable-quartz-backend</arg>
+ <arg>--disable-quartz-backend</arg>
</group>
<group>
<arg>--enable-introspection=[no/auto/yes]</arg>
</formalpara>
<formalpara>
- <title><systemitem>--with-gdktarget</systemitem></title>
+ <title><systemitem>--enable-x11-backend</systemitem>,
+ <systemitem>--disable-x11-backend</systemitem>,
+ <systemitem>--enable-win32-backend</systemitem>,
+ <systemitem>--disable-win32-backend</systemitem>,
+ <systemitem>--enable-quartz-backend</systemitem>,
+ and <systemitem>--disable-quartz-backend</systemitem></title>
<para>
- Toggles between the supported backends for GDK.
- The default is x11, unless the platform is Windows, in which
- case the default is win32. Other supported backends are
- the quartz backend for OS X.
+ Enables specific backends for GDK. If none of these options
+ are given, the x11 backend will be enabled by default,
+ unless the platform is Windows, in which case the default is
+ win32. If any backend is explicitly enabled or disabled, no
+ other platform will be enabled automatically. Other
+ supported backends are the quartz backend for OS X.
</para>
</formalpara>
<formalpara>