]> Pileus Git - ~andy/gtk/blobdiff - configure.ac
wayland: Copy gdk_wayland_keymap_translate_keyboard_state from X11 backend
[~andy/gtk] / configure.ac
index 31246415f982b3ea2c7a4ed2f8e80e06349769c3..1b13ba39424ef6b55cea935d505d3657c31581a7 100644 (file)
@@ -10,7 +10,7 @@
 
 m4_define([gtk_major_version], [2])
 m4_define([gtk_minor_version], [99])
-m4_define([gtk_micro_version], [0])
+m4_define([gtk_micro_version], [4])
 m4_define([gtk_interface_age], [0])
 m4_define([gtk_binary_age],
           [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -242,6 +242,13 @@ AC_ARG_ENABLE(rebuilds,
                               [disable all source autogeneration rules])],,
               [enable_rebuilds=yes])
 
+AC_ARG_ENABLE(gtk2-dependency,
+              AC_HELP_STRING([--enable-gtk2-dependency],
+                             [Do not build gtk-update-icon-cache and other shared tools]),,
+              [enable_gtk2_dependency=no])
+
+AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno])
+
 AC_ARG_ENABLE(xkb,
               [AC_HELP_STRING([--enable-xkb],
                               [support XKB extension [default=maybe]])],,
@@ -254,6 +261,22 @@ AC_ARG_ENABLE(xinput,
               [AC_HELP_STRING([--enable-xinput],
                               [support XInput extension if available [default=yes]])],,
               [enable_xinput="maybe"])
+AC_ARG_ENABLE(xrandr,
+              [AC_HELP_STRING([--enable-xrandr],
+                              [support XRandR extension if available [default=maybe]])],,
+              [enable_xrandr="maybe"])
+AC_ARG_ENABLE(xfixes,
+              [AC_HELP_STRING([--enable-xfixes],
+                              [support XFixes extension if available [default=maybe]])],,
+              [enable_xfixes="maybe"])
+AC_ARG_ENABLE(xcomposite,
+              [AC_HELP_STRING([--enable-xcomposite],
+                              [support X Composite extension if available [default=maybe]])],,
+              [enable_xcomposite="maybe"])
+AC_ARG_ENABLE(xdamage,
+              [AC_HELP_STRING([--enable-xdamage],
+                              [support X Damage extension if available [default=maybe]])],,
+              [enable_xdamage="maybe"])
 
 AC_ARG_ENABLE(x11-backend,
               [AC_HELP_STRING([--enable-x11-backend],
@@ -267,6 +290,10 @@ AC_ARG_ENABLE(quartz-backend,
               [AC_HELP_STRING([--enable-quartz-backend],
                               [enable the quartz gdk backend])],
                              [backend_set=yes])
+AC_ARG_ENABLE(wayland-backend,
+              [AC_HELP_STRING([--enable-wayland-backend],
+                              [enable the wayland gdk backend])],
+                             [backend_set=yes])
 
 if test -z "$backend_set"; then
   if test "$platform_win32" = yes; then
@@ -303,7 +330,6 @@ if test "x$enable_win32_backend" == xyes; then
   GDK_BACKENDS="$GDK_BACKENDS win32"
   backend_immodules="$backend_immodules,ime"
   GDK_WINDOWING="$GDK_WINDOWING
-#define GDK_NATIVE_WINDOW_POINTER
 #define GDK_WINDOWING_WIN32"
   GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
   AM_CONDITIONAL(USE_WIN32, true)
@@ -323,6 +349,19 @@ else
   AM_CONDITIONAL(USE_QUARTZ, false)
 fi
 
+if test "x$enable_wayland_backend" == "xyes"; then
+  # Wayland uses cairo-gl
+  cairo_backends="$cairo_backends cairo-gl"
+  GDK_BACKENDS="$GDK_BACKENDS wayland"
+  GIO_PACKAGE=gio-unix-2.0
+  GDK_WINDOWING="$GDK_WINDOWING
+#define GDK_WINDOWING_WAYLAND"
+  WAYLAND_PACKAGES="wayland-client xkbcommon wayland-egl"
+  AM_CONDITIONAL(USE_WAYLAND, true)
+else
+  AM_CONDITIONAL(USE_WAYLAND, false)
+fi
+
 # strip leading space
 GDK_BACKENDS=${GDK_BACKENDS/# }
 
@@ -859,13 +898,15 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
 
 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
 
-if test $cross_compiling = yes; then
+if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
   AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
   if test x$GTK_UPDATE_ICON_CACHE = xno; then
     REBUILD_PNGS=#
   fi
 fi
 
+AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
+
 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
 
 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
@@ -1105,11 +1146,15 @@ if test "x$enable_x11_backend" == xyes; then
   fi
 
   # Check for the RANDR extension
-  if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
-     AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
-
-     X_PACKAGES="$X_PACKAGES xrandr"
-     X_EXTENSIONS="$X_EXTENSIONS XRANDR"
+  if test x"$enable_xrandr" != xno; then
+    if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
+      AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
+
+      X_PACKAGES="$X_PACKAGES xrandr"
+      X_EXTENSIONS="$X_EXTENSIONS XRANDR"
+    elif test x"$enable_xrandr" = xyes; then
+      AC_MSG_ERROR([RANDR support requested but xrandr not found])
+    fi
   fi
 
   # Checks for Xcursor library
@@ -1122,32 +1167,44 @@ if test "x$enable_x11_backend" == xyes; then
 
   # Checks for XFixes extension
 
-  if $PKG_CONFIG --exists xfixes ; then
-    AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
+  if test x"$enable_xfixes" != xno; then
+    if $PKG_CONFIG --exists xfixes ; then
+      AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
 
-    X_PACKAGES="$X_PACKAGES xfixes"
-    X_EXTENSIONS="$X_EXTENSIONS XFIXES"
-    GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
+      X_PACKAGES="$X_PACKAGES xfixes"
+      X_EXTENSIONS="$X_EXTENSIONS XFIXES"
+      GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
+    elif test x"$enable_xfixes" = xyes; then
+      AC_MSG_ERROR([XFixes support requested but xfixes not found])
+    fi
   fi
 
   # Checks for Xcomposite extension
 
-  if $PKG_CONFIG --exists xcomposite ; then
-    AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
+  if test x"$enable_xcomposite" != xno; then
+    if $PKG_CONFIG --exists xcomposite ; then
+      AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
 
-    X_PACKAGES="$X_PACKAGES xcomposite"
-    X_EXTENSIONS="$X_EXTENSIONS Composite"
-    GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
+      X_PACKAGES="$X_PACKAGES xcomposite"
+      X_EXTENSIONS="$X_EXTENSIONS Composite"
+      GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
+    elif test x"$enable_xcomposite" = xyes; then
+      AC_MSG_ERROR([Xcomposite support requested but xcomposite not found])
+    fi
   fi
 
   # Checks for Xdamage extension
 
-  if $PKG_CONFIG --exists xdamage ; then
-    AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
+  if test x"$enable_xdamage" != xno; then
+    if $PKG_CONFIG --exists xdamage ; then
+      AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
 
-    X_PACKAGES="$X_PACKAGES xdamage"
-    X_EXTENSIONS="$X_EXTENSIONS DAMAGE"
-    GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
+      X_PACKAGES="$X_PACKAGES xdamage"
+      X_EXTENSIONS="$X_EXTENSIONS DAMAGE"
+      GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
+    elif test x"$enable_xdamage" = xyes; then
+      AC_MSG_ERROR([Xdamage support requested but xdamage not found])
+    fi
   fi
 
   if $have_base_x_pc ; then
@@ -1204,7 +1261,7 @@ fi
 CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"
 
-GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
+GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES $WAYLAND_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"
@@ -1470,7 +1527,7 @@ GLIB_GSETTINGS
 # GObject introspection
 ##################################################
 
-GOBJECT_INTROSPECTION_CHECK([0.9.3])
+GOBJECT_INTROSPECTION_CHECK([0.10.1])
 
 ##################################################
 # Packagekit module
@@ -1628,12 +1685,12 @@ gdk/win32/Makefile
 gdk/win32/rc/Makefile
 gdk/win32/rc/gdk.rc
 gdk/quartz/Makefile
+gdk/wayland/Makefile
 gdk/tests/Makefile
 gtk/Makefile
 gtk/makefile.msc
 gtk/gtkversion.h
 gtk/gtk-win32.rc
-gtk/theme-bits/Makefile
 gtk/tests/Makefile
 modules/Makefile
 modules/other/Makefile
@@ -1661,7 +1718,10 @@ AC_OUTPUT
 included_immodules=${included_immodules//,/ }
 included_immodules=${included_immodules:-none}
 
-echo "configuration:"
+echo ""
+echo "        GTK+ $GTK_VERSION"
+echo "        ==========="
+echo ""
 echo "        GDK backends:         $GDK_BACKENDS"
 if test "x$enable_x11_backend" = "xyes"; then
 echo "        X11 extensions:       $X_EXTENSIONS"