]> Pileus Git - ~andy/gtk/blobdiff - configure.in
New directory with the start of a framework for testing performance in
[~andy/gtk] / configure.in
index 23d5d6749f2585b080314396b210d6b92efc7d60..954718e5f7a12feae53ab0a54da59dcd6f7e92a9 100644 (file)
@@ -11,31 +11,34 @@ AC_PREREQ(2.54)
 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
 
 m4_define([gtk_major_version], [2])
-m4_define([gtk_minor_version], [5])
-m4_define([gtk_micro_version], [1])
+m4_define([gtk_minor_version], [7])
+m4_define([gtk_micro_version], [4])
 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
 m4_define([gtk_api_version], [2.0])
 
 # Define a string for the earliest version that this release has
-# forward/backwards binary compatibility with. This is used for module
-# locations. (Should this be backwards-compat instead?)
+# backwards binary compatibility with for all interfaces a module
+# might. Unless we add module-only API with lower stability
+# guarantees, this should be unchanged until we break binary compat
+# for GTK+.
 #
 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
 m4_define([gtk_binary_version], [2.4.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.4.0])
-m4_define([pango_required_version], [1.4.0])
+m4_define([glib_required_version], [2.7.1])
+m4_define([pango_required_version], [1.9.0])
 m4_define([atk_required_version], [1.0.1])
+m4_define([cairo_required_version], [0.5.2-head])
 
 
 AC_INIT([gtk+], [gtk_version],
-        [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk+],
+        [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
        [gtk+])
 
 AC_CONFIG_SRCDIR([gdk/gdktypes.h])
@@ -48,6 +51,7 @@ AM_CONFIG_HEADER(config.h)
 
 #
 # For each of the libraries we build, we define the following
 # substituted variables:
 #
 # foo_PACKAGES:     pkg-config packages this library requires
@@ -122,6 +126,11 @@ case "$host" in
 esac
 AC_MSG_RESULT([$os_win32])
 
+case $host in
+  *-*-linux*)
+    os_linux=yes
+    ;;
+esac
 dnl Initialize libtool
 AC_PROG_CC
 AM_DISABLE_STATIC
@@ -137,12 +146,14 @@ if test "$os_win32" = "yes"; then
   enable_shared=yes
 fi
 
+AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
 # Make sure we use 64-bit versions of various file stuff.
 AC_SYS_LARGEFILE
 
 AM_PROG_AS
+AC_PATH_PROG(NM, nm, nm)
 
 dnl Initialize maintainer mode
 AM_MAINTAINER_MODE
@@ -161,8 +172,13 @@ AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
 
 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
+AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
 
 if test "$os_win32" = "yes"; then
+  AC_CHECK_TOOL(WINDRES, windres, no)
+  if test "$WINDRES" = no; then
+    AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
+  fi
   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
 fi
 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
@@ -179,10 +195,6 @@ AC_ARG_ENABLE(shm,
               [AC_HELP_STRING([--enable-shm],
                               [support shared memory if available [default=yes]])],,
               [enable_shm="yes"])
-AC_ARG_ENABLE(ansi,
-              [AC_HELP_STRING([--enable-ansi],
-                              [turn on strict ansi [default=no]])],,
-              [enable_ansi=no])
 AC_ARG_ENABLE(xkb,
               [AC_HELP_STRING([--enable-xkb],
                               [support XKB [default=maybe]])],,
@@ -191,6 +203,10 @@ AC_ARG_ENABLE(rebuilds,
               [AC_HELP_STRING([--disable-rebuilds],
                               [disable all source autogeneration rules])],,
               [enable_rebuilds=yes])
+AC_ARG_ENABLE(visibility,
+              [AC_HELP_STRING([--disable-visibility],
+                              [don't use ELF visibility attributes])],,
+              [enable_visibility=yes])
 
 AC_ARG_WITH(xinput,
             [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
@@ -202,15 +218,13 @@ AC_ARG_WITH(ie55,
             [AC_HELP_STRING([--with-ie55=DIRECTORY],
                             [IE5.5 libs and headers (for Active IMM)])])
 
-GLIB_AC_DIVERT_BEFORE_HELP([
 if test "$platform_win32" = yes; then
   gdktarget=win32
 else
   gdktarget=x11
 fi
-])
 
-AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/linux-fb/win32]] select GDK target [default=$gdktarget]],
+AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/linux-fb/win32]] select non-default GDK target],
        gdktarget=$with_gdktarget)
 
 AC_SUBST(gdktarget)
@@ -246,6 +260,11 @@ else
   fi
 fi
 
+if test "x$enable_visibility" = "xno"; then
+  GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
+fi
+
+
 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
 
                        
@@ -326,7 +345,8 @@ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
   [glib-2.0 >= glib_required_version dnl
    atk >= atk_required_version dnl
-   pango >= pango_required_version])
+   pango >= pango_required_version dnl
+   cairo >= cairo_required_version])
 
 if test "$os_win32" != yes; then
     # libtool option to control which symbols are exported
@@ -384,6 +404,18 @@ AC_SUBST(REBUILD)
 
 AC_CHECK_FUNCS(lstat mkstemp flockfile)
 
+# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *)  nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
+], gtk_ok=yes, gtk_ok=no)
+AC_MSG_RESULT($gtk_ok)
+if test "$gtk_ok" = "yes"; then
+  AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
+           [Define if _NL_TIME_FIRST_WEEKDAY 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>], [
@@ -401,7 +433,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 be bg bn br ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk uz uz@Latn vi wa yi zh_CN 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 ko 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@ije sr@Latn sv ta th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
 AM_GLIB_GNU_GETTEXT
 LIBS="$LIBS $INTLLIBS"
 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
@@ -445,6 +477,20 @@ case $host in
   ;;
 esac
 
+#
+# see bug 162979
+#
+AC_MSG_CHECKING(for HP-UX)
+case $host_os in
+  hpux9* | hpux10* | hpux11*)
+    AC_MSG_RESULT(yes)
+    CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
+  ;;
+  *)
+    AC_MSG_RESULT(no)
+  ;;
+esac
+
 dnl NeXTStep cc seems to need this
 AC_MSG_CHECKING([for extra flags for POSIX compliance])
 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
@@ -461,13 +507,13 @@ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
 # 
 
-GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
+GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
 
 AM_PATH_GLIB_2_0(glib_required_version, :,
   AC_MSG_ERROR([
 *** GLIB glib_required_version or better is required. The latest version of 
 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
-  gobject gmodule gthread)
+  gobject gmodule-no-export gthread)
 
 dnl
 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
@@ -561,6 +607,7 @@ AC_C_CONST
 AC_TYPE_SIGNAL
 AC_FUNC_MMAP
 
+AC_CHECK_FUNCS(mallinfo)
 AC_CHECK_FUNCS(getresuid)
 AC_TYPE_UID_T
 
@@ -628,6 +675,14 @@ fi
 AC_MSG_RESULT($gdk_working_wctype)
 AC_SUBST(GDK_WLIBS)
 
+# Check for uxtheme.h (for MS-Windows Engine)
+AC_MSG_CHECKING(for uxtheme.h)
+AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
+if test $gtk_uxtheme_h = yes; then
+   AC_DEFINE(HAVE_UXTHEME_H,1,[Have uxtheme.h include file])
+fi
+AC_MSG_RESULT($gtk_uxtheme_h)
+
 
 ##################################################
 # Checks for gdk-pixbuf
@@ -661,7 +716,7 @@ else
     AC_MSG_RESULT(yes)
     AC_MSG_CHECKING(whether dynamic modules work)
     ## for loop is to strip newline 
-    tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0`
+    tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
     for I in $tmp; do
         dynworks=$I
     done
@@ -715,7 +770,7 @@ dnl Test for libtiff
           [AC_CHECK_HEADER(tiffio.h,
             TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
             AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
-        AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
+        AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
   fi
 
   if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
@@ -948,7 +1003,7 @@ fi
 
 AC_SUBST(REBUILD_PNGS)
 
-GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
+GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0"
 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
 GDK_PIXBUF_EXTRA_CFLAGS= 
 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
@@ -1021,7 +1076,7 @@ if test "x$gdktarget" = "xx11"; then
       AC_MSG_ERROR([Xft Pango backend found but did not find freetype libraries])
     fi
   else
-    AC_MSG_ERROR([Pango 1.2.0 and Xft backend is required for x11 target])
+    AC_MSG_ERROR([Xft Pango backend is required for x11 target])
   fi
 
   if $PKG_CONFIG --exists xft ; then : ; else
@@ -1050,7 +1105,7 @@ if test "x$gdktarget" = "xx11"; then
   
   if test $pango_omitted_x_deps = yes ; then
     # Old versions of Xft didn't necessarily include -lX11 in the output
-    x_libs="`pkg-config --libs xft` -lX11 $X_EXTRA_LIBS"
+    x_libs="`$PKG_CONFIG --libs xft` -lX11 $X_EXTRA_LIBS"
   fi           
 
   ## Strip the .la files
@@ -1099,12 +1154,15 @@ if test "x$gdktarget" = "xx11"; then
           # Check for solaris
          use_solaris_xinerama=yes
          AC_CHECK_LIB(Xext, XineramaGetInfo,
-                       use_solaris_xinerama=yes, use_solaris_xinerama=no)
+                       use_solaris_xinerama=yes, 
+                       use_solaris_xinerama=no,
+                       -lXext $x_libs_for_checks)
          if test "x$use_solaris_xinerama" = "xyes"; then
              AC_CHECK_HEADER(X11/extensions/xinerama.h,
                [GTK_ADD_LIB(x_extra_libs,Xext)
                AC_DEFINE(HAVE_SOLARIS_XINERAMA)
-               AC_DEFINE(HAVE_XINERAMA)], use_solaris_xinerama=no, -lXext $x_libs_for_checks)
+               AC_DEFINE(HAVE_XINERAMA)], 
+               use_solaris_xinerama=no,[#include <X11/Xlib.h>])
          fi    
          AC_MSG_CHECKING(for Xinerama support on Solaris)
          AC_MSG_RESULT($use_solaris_xinerama);
@@ -1128,6 +1186,26 @@ if test "x$gdktarget" = "xx11"; then
 
   CPPFLAGS="$gtk_save_cppflags"
 
+  # Check for xReply
+
+  gtk_save_cppflags="$CPPFLAGS"
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+  AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
+  AC_TRY_COMPILE([#include <X11/Xlibint.h>],
+      [xReply *rep;],
+      [AC_MSG_RESULT([no])],
+      [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
+#include <X11/Xlibint.h>],
+           [xReply *rep;],
+           [AC_MSG_RESULT([yes])
+            AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
+                [Define if <X11/extensions/XIproto.h> needed for xReply])],
+           [AC_MSG_RESULT([unknown])
+            AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
+
+  CPPFLAGS="$gtk_save_cppflags"
+
   # Check for shaped window extension
 
   AC_CHECK_LIB(Xext, XShapeCombineMask,
@@ -1143,10 +1221,18 @@ if test "x$gdktarget" = "xx11"; then
       ,
       $x_libs_for_checks)
 
+  # Check for XInternAtoms (X11R6 specific)
+
+  AC_CHECK_LIB(X11, XInternAtoms,
+      AC_DEFINE([HAVE_XINTERNATOMS], 1,
+          [Define to 1 if you have the `XInternAtoms' function.]),
+      ,
+      $x_libs_for_checks)
+
   # Generic X11R6 check needed for XIM support; we could
   # probably use this to replace the above, but we'll
-  # leave the separate XConvertCase check for clarity
-
+  # leave the separate checks for XConvertCase and XInternAtoms 
+  # for clarity
   have_x11r6=false
   AC_CHECK_LIB(X11, XAddConnectionWatch,
       have_x11r6=true,
@@ -1280,7 +1366,7 @@ if test "x$gdktarget" = "xwin32"; then
     AC_SUBST(GDK_WIN32_EXTRA_CFLAGS)
   fi
 
-  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -luuid"
+  GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -Wl,-luuid"
   AM_CONDITIONAL(USE_WIN32, true)
 else
   AM_CONDITIONAL(USE_WIN32, false)
@@ -1337,7 +1423,7 @@ fi
 #
 
 if test "x$gdktarget" = "xx11"; then
-        PANGO_PACKAGES=pangoxft
+        PANGO_PACKAGES="pangoxft pangocairo"
        
         # We no longer use pangox, but if we find it, we link to it 
        # for binary compatibility.
@@ -1345,11 +1431,11 @@ if test "x$gdktarget" = "xx11"; then
                PANGO_PACKAGES="$PANGO_PACKAGES pangox"
        fi
 elif test "x$gdktarget" = "xwin32"; then
-        PANGO_PACKAGES=pangowin32
+        PANGO_PACKAGES="pangowin32 pangocairo"
 elif test "x$gdktarget" = "xlinux-fb"; then
-        PANGO_PACKAGES=pangoft2
+        PANGO_PACKAGES="pangoft2 pangocairo"
 else
-        PANGO_PACKAGES=pango
+        PANGO_PACKAGES="pango pangocairo"
 fi
 
 # Check for Pango flags
@@ -1362,10 +1448,8 @@ if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
         AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
 else
         AC_MSG_ERROR([
-*** Pango not found. Pango is required to build GTK+.
-*** See http://www.pango.org for Pango information.
-*** For the framebuffer target, you will need to build 
-*** Pango with freetype support.
+*** Pango not found. Pango built with Cairo support is required
+*** to build GTK+. See http://www.pango.org for Pango information.
 ])
 fi
 
@@ -1433,12 +1517,16 @@ else
         LIBS="$gtk_save_LIBS"
 fi
 
-GTK_PACKAGES=atk
+GTK_PACKAGES="atk cairo"
 GTK_EXTRA_LIBS=
 GTK_EXTRA_CFLAGS= 
 GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
 GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
 
+if test x"$os_win32" = xyes; then
+  GTK_EXTRA_CFLAGS="$msnative_struct"
+fi
+
 AC_SUBST(GTK_PACKAGES)
 AC_SUBST(GTK_EXTRA_LIBS)
 AC_SUBST(GTK_EXTRA_CFLAGS)
@@ -1459,7 +1547,9 @@ AC_SUBST(GTK_XIM_FLAGS)
 #  the effect is undefined; what it causes on Linux is that the
 #  export list from -export-symbols-regex is ignored and everything
 #  is exported
-#      
+#
+# We are using gmodule-no-export now, but I'm leaving the stripping
+# code in place for now, since pango and atk still require gmodule.
 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
 if test -n "$export_dynamic"; then
   GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
@@ -1473,7 +1563,7 @@ fi
 # Checks for gtk-doc and docbook-tools
 ##################################################
 
-GTK_DOC_CHECK([1.0])
+GTK_DOC_CHECK([1.4])
 
 AC_CHECK_PROG(DB2HTML, db2html, true, false)
 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
@@ -1501,6 +1591,7 @@ fi
 
 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
 
+
 ##################################################
 # Output commands
 ##################################################
@@ -1585,9 +1676,6 @@ gtk+-2.0-uninstalled.pc
 m4macros/Makefile
 po/Makefile.in
 po-properties/Makefile.in
-build/Makefile
-build/win32/Makefile
-build/win32/dirent/Makefile
 demos/Makefile
 demos/gtk-demo/Makefile
 demos/gtk-demo/geninclude.pl
@@ -1601,6 +1689,7 @@ docs/reference/gdk/version.xml
 docs/reference/gtk/Makefile
 docs/reference/gtk/version.xml
 docs/faq/Makefile
+docs/tools/Makefile
 docs/tutorial/Makefile
 gdk-pixbuf/Makefile
 gdk-pixbuf/gdk_pixbuf.rc
@@ -1621,9 +1710,24 @@ gtk/theme-bits/Makefile
 gtk/xdgmime/Makefile
 modules/Makefile
 modules/input/Makefile
+modules/engines/Makefile
+modules/engines/pixbuf/Makefile
+modules/engines/ms-windows/Makefile
+modules/engines/ms-windows/Theme/Makefile
+modules/engines/ms-windows/Theme/gtk-2.0/Makefile
+perf/Makefile
 contrib/Makefile
 contrib/gdk-pixbuf-xlib/Makefile
 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
 ])
 
 AC_OUTPUT
+
+echo "configuration:
+        target: $gdktarget"
+
+if test "x$gdktarget" = "xlinux-fb"; then
+  echo "Warning: The linux-fb GDK target is unmaintained"
+  echo "         and may not work or even compile"
+fi
+