]> Pileus Git - ~andy/gtk/blobdiff - configure.in
Use g_return_val_if_fail (#344288, Kazuki Iwamoto)
[~andy/gtk] / configure.in
index 4e786c831f817c2e6c655bf2ca1e313ebc703714..bd33705371ee6a6b8ec408edaf24a7f5bbc07fa4 100644 (file)
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
 
 m4_define([gtk_major_version], [2])
 m4_define([gtk_minor_version], [9])
-m4_define([gtk_micro_version], [0])
+m4_define([gtk_micro_version], [3])
 m4_define([gtk_version],
           [gtk_major_version.gtk_minor_version.gtk_micro_version])
-m4_define([gtk_interface_age], [0])
+m4_define([gtk_interface_age], [1])
 m4_define([gtk_binary_age],
           [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
 # This is the X.Y used in -lgtk-FOO-X.Y
@@ -28,13 +28,13 @@ m4_define([gtk_api_version], [2.0])
 # for GTK+.
 #
 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
-m4_define([gtk_binary_version], [2.4.0])
+m4_define([gtk_binary_version], [2.10.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.9.2])
-m4_define([pango_required_version], [1.9.0])
-m4_define([atk_required_version], [1.0.1])
-m4_define([cairo_required_version], [0.9.2])
+m4_define([glib_required_version], [2.11.0])
+m4_define([pango_required_version], [1.13.0])
+m4_define([atk_required_version], [1.9.0])
+m4_define([cairo_required_version], [1.1.6])
 
 
 AC_INIT([gtk+], [gtk_version],
@@ -224,13 +224,13 @@ else
   gdktarget=x11
 fi
 
-AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/linux-fb/win32/quartz]] select non-default GDK target],
+AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/linux-fb/win32/quartz/directfb]] select non-default GDK target],
        gdktarget=$with_gdktarget)
 
 AC_SUBST(gdktarget)
 case $gdktarget in
-  x11|linux-fb|win32|quartz) ;;
-  *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb, quartz or win32.]);;
+  x11|linux-fb|win32|quartz|directfb) ;;
+  *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb, quartz, directfb or win32.]);;
 esac
 
 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
@@ -416,6 +416,42 @@ if test "$gtk_ok" = "yes"; then
            [Define if _NL_TIME_FIRST_WEEKDAY is available])
 fi
 
+# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
+AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
+], gtk_ok=yes, gtk_ok=no)
+AC_MSG_RESULT($gtk_ok)
+if test "$gtk_ok" = "yes"; then
+  AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
+           [Define if _NL_MEASUREMENT_MEASUREMENT is available])
+fi
+
+# _NL_PAPER_HEIGHT is an enum and not a define
+AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *)  nl_langinfo(_NL_PAPER_HEIGHT));
+], gtk_ok=yes, gtk_ok=no)
+AC_MSG_RESULT($gtk_ok)
+if test "$gtk_ok" = "yes"; then
+  AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
+           [Define if _NL_PAPER_HEIGHT is available])
+fi
+
+# _NL_PAPER_WIDTH is an enum and not a define
+AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *)  nl_langinfo(_NL_PAPER_WIDTH));
+], gtk_ok=yes, gtk_ok=no)
+AC_MSG_RESULT($gtk_ok)
+if test "$gtk_ok" = "yes"; then
+  AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
+           [Define if _NL_PAPER_WIDTH is available])
+fi
+       
 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
 AC_MSG_CHECKING(for sigsetjmp)
 AC_TRY_LINK([#include <setjmp.h>], [
@@ -433,7 +469,7 @@ fi
 # sure that both po/ and po-properties/ have .po files that correspond
 # to your language.  If you only add one to po/, the build will break
 # in po-properties/.
-ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ko ku li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
+ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
 AM_GLIB_GNU_GETTEXT
 LIBS="$LIBS $INTLLIBS"
 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
@@ -1239,7 +1275,7 @@ if test "x$gdktarget" = "xx11"; then
              AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
                  [AC_CHECK_HEADER(X11/extensions/Xinerama.h, 
                      [GTK_ADD_LIB(x_extra_libs,Xinerama)
-                     have_xfree_xinerama=true], :
+                     have_xfree_xinerama=true], :,
                       [#include <X11/Xlib.h>])])
           fi
 
@@ -1369,6 +1405,27 @@ else
   AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
 fi
 
+if test "x$gdktarget" = "xdirectfb"; then
+  DIRECTFB_REQUIRED_VERSION=0.9.21
+  AC_MSG_CHECKING(for DirectFB)
+
+  if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
+      AC_MSG_RESULT(found)
+      GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags directfb` $GDK_EXTRA_CFLAGS"
+      GDK_EXTRA_LIBS="`$PKG_CONFIG --libs directfb` $GDK_EXTRA_LIBS"
+  else
+      AC_MSG_ERROR([
+*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest
+*** version of DirectFB is always available from http://www.directfb.org/.
+  ])
+  fi
+
+  AM_CONDITIONAL(USE_DIRECTFB, true)
+else
+  AM_CONDITIONAL(USE_DIRECTFB, false)
+fi
+
+
 # Check for Pango flags
 
 if test "x$gdktarget" = "xwin32"; then
@@ -1478,6 +1535,36 @@ AC_SUBST(GTK_DEP_CFLAGS)
 AC_SUBST(GTK_DEBUG_FLAGS)
 AC_SUBST(GTK_XIM_FLAGS)
 
+################################################################
+# Printing system checks
+################################################################
+
+AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
+if test "x$CUPS_CONFIG" != "xno"; then
+  CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
+  CUPS_LIBS=`cups-config --libs`
+
+  AC_SUBST(CUPS_CFLAGS)
+  AC_SUBST(CUPS_LIBS)
+fi
+AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
+
+gtk_save_cppflags="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
+                         
+AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
+*** Can't find cairo-pdf.h. You must build Cairo with the pdf
+*** backend enabled.]))
+
+if test "$os_win32" != "yes"; then
+  AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
+*** Can't find cairo-ps.h. You must build Cairo with the 
+*** postscript backend enabled.]))
+fi   
+
+CPPFLAGS="$gtk_save_cppflags"
+     
+                               
 ################################################################
 # Strip -export-dynamic from the link lines of various libraries
 ################################################################
@@ -1589,6 +1676,9 @@ elif test "x$gdktarget" = "xlinux-fb" ; then
 elif test "x$gdktarget" = "xquartz" ; then
   gdk_windowing='
 #define GDK_WINDOWING_QUARTZ'
+elif test "x$gdktarget" = "xdirectfb" ; then
+  gdk_windowing='
+#define GDK_WINDOWING_DIRECTFB'
 fi
 
 if test x$gdk_wchar_h = xyes; then
@@ -1614,6 +1704,7 @@ Makefile
 gdk-pixbuf-2.0.pc
 gdk-2.0.pc
 gtk+-2.0.pc
+gtk+-unix-print-2.0.pc
 gdk-pixbuf-2.0-uninstalled.pc
 gdk-2.0-uninstalled.pc
 gtk+-2.0-uninstalled.pc
@@ -1646,6 +1737,7 @@ gdk/win32/rc/Makefile
 gdk/win32/rc/gdk.rc
 gdk/linux-fb/Makefile
 gdk/quartz/Makefile
+gdk/directfb/Makefile
 gtk/Makefile
 gtk/makefile.msc
 gtk/gtkversion.h
@@ -1659,6 +1751,10 @@ modules/engines/pixbuf/Makefile
 modules/engines/ms-windows/Makefile
 modules/engines/ms-windows/Theme/Makefile
 modules/engines/ms-windows/Theme/gtk-2.0/Makefile
+modules/printbackends/Makefile
+modules/printbackends/cups/Makefile
+modules/printbackends/lpr/Makefile
+modules/printbackends/pdf/Makefile
 perf/Makefile
 contrib/Makefile
 contrib/gdk-pixbuf-xlib/Makefile