]> Pileus Git - ~andy/gtk/blobdiff - configure.in
Output Makefile for the pixbuf engine directory.
[~andy/gtk] / configure.in
index f148834e2b806403eef336d061eee585556cfa0d..9d82b8490f69dc431a37d674dada53fe86bf1b0e 100644 (file)
@@ -11,12 +11,13 @@ 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], [3])
-m4_define([gtk_micro_version], [0])
+m4_define([gtk_minor_version], [5])
+m4_define([gtk_micro_version], [6])
 m4_define([gtk_version],
           [gtk_major_version.gtk_minor_version.gtk_micro_version])
 m4_define([gtk_interface_age], [0])
-m4_define([gtk_binary_age], [300])
+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])
 
@@ -25,11 +26,11 @@ m4_define([gtk_api_version], [2.0])
 # locations. (Should this be backwards-compat instead?)
 #
 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
-m4_define([gtk_binary_version], [2.2.0])
+m4_define([gtk_binary_version], [2.4.0])
 
 # required versions of other packages
-m4_define([glib_required_version], [2.3.0])
-m4_define([pango_required_version], [1.2.0])
+m4_define([glib_required_version], [2.5.4])
+m4_define([pango_required_version], [1.5.1])
 m4_define([atk_required_version], [1.0.1])
 
 
@@ -47,6 +48,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
@@ -106,20 +108,46 @@ GETTEXT_PACKAGE=gtk20
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
 
+AC_CANONICAL_HOST
+
+MATH_LIB=-lm
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+  *-*-mingw*)
+    os_win32=yes
+    MATH_LIB=
+    ;;
+  *)
+    os_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$os_win32])
 
 dnl Initialize libtool
 AC_PROG_CC
 AM_DISABLE_STATIC
-AC_LIBTOOL_WIN32_DLL
+
+if test "$os_win32" = "yes"; then
+  if test x$enable_static = xyes -o x$enable_static = x; then
+    AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
+    enable_static=no
+  fi
+  if test x$enable_shared = xno; then
+    AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
+  fi
+  enable_shared=yes
+fi
+
 AM_PROG_LIBTOOL
 
+# Make sure we use 64-bit versions of various file stuff.
+AC_SYS_LARGEFILE
+
 AM_PROG_AS
 
 dnl Initialize maintainer mode
 AM_MAINTAINER_MODE
 
-AC_CANONICAL_HOST
-
 AC_MSG_CHECKING([for some Win32 platform])
 case "$host" in
   *-*-mingw*|*-*-cygwin*)
@@ -132,19 +160,8 @@ esac
 AC_MSG_RESULT([$platform_win32])
 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
 
-MATH_LIB=-lm
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
-  *-*-mingw*)
-    os_win32=yes
-    MATH_LIB=
-    ;;
-  *)
-    os_win32=no
-    ;;
-esac
-AC_MSG_RESULT([$os_win32])
 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
 
 if test "$os_win32" = "yes"; then
   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
@@ -175,6 +192,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])])
@@ -230,6 +251,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}")
 
                        
@@ -379,25 +405,18 @@ if test "$gtk_ok" = "yes"; then
   AC_DEFINE(HAVE_SIGSETJMP)
 fi
 
-AC_MSG_CHECKING(whether make is GNU Make)
-STRIP_BEGIN=
-STRIP_END=
-if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
-       STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
-       STRIP_END=')'
-       AC_MSG_RESULT(yes)
-else
-       AC_MSG_RESULT(no)
-fi
-STRIP_DUMMY=
-AC_SUBST(STRIP_DUMMY)
-AC_SUBST(STRIP_BEGIN)
-AC_SUBST(STRIP_END)
-
 # i18n stuff
-ALL_LINGUAS="am ar az be bg ca cs cy da de el en_GB es et eu fa fi fr ga gl he hi hr hu ia id it ja ko li lt lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sr sr@Latn sv ta tr uk vi wa yi zh_CN zh_TW"
+# TRANSLATORS:  Please note that gtk+ has both po/ and po-properties/
+# directories.  If you add a new language to ALL_LINGUAS, please make
+# 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 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"
 AM_GLIB_GNU_GETTEXT
 LIBS="$LIBS $INTLLIBS"
+AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
+        sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
+      esac])
 
 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
 
@@ -552,6 +571,7 @@ AC_C_CONST
 AC_TYPE_SIGNAL
 AC_FUNC_MMAP
 
+AC_CHECK_FUNCS(mallinfo)
 AC_CHECK_FUNCS(getresuid)
 AC_TYPE_UID_T
 
@@ -619,6 +639,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
@@ -792,12 +820,6 @@ dnl Test for libpng
 *** from CVS.])
   fi
 
-  REBUILD_PNGS=\#
-  if test -z "$LIBPNG"; then
-     REBUILD_PNGS=
-  fi
-  AC_SUBST(REBUILD_PNGS)
-
 AC_SUBST(LIBTIFF)
 AC_SUBST(LIBJPEG)
 AC_SUBST(LIBPNG)
@@ -919,6 +941,11 @@ fi
 
 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
 
+REBUILD_PNGS=
+if test -z "$LIBPNG"; then
+  REBUILD_PNGS=#
+fi
+
 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
 
 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
@@ -926,10 +953,20 @@ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
 if test $cross_compiling = yes; then
   AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
   if test x$GDK_PIXBUF_CSOURCE = xno; then
-    AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
+    REBUILD_PNGS=#
   fi
 fi
 
+if test ! -f $srcdir/gtk/stock-icons/gtkstockpixbufs.h && 
+   test "x$REBUILD_PNGS" = "x#" ; then
+     AC_MSG_ERROR([
+*** gtkstockpixbufs.h is not in the tree, and cannot be built
+*** because you don't have libpng, or (when cross-compiling) you 
+*** don't have a prebuilt gdk-pixbuf-csource on the host system.])
+fi
+
+AC_SUBST(REBUILD_PNGS)
+
 GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
 GDK_PIXBUF_EXTRA_CFLAGS= 
@@ -974,7 +1011,8 @@ if test "x$gdktarget" = "xlinux-fb" || test "x$gdktarget" = "xx11" ; then
 
       AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)])
       AC_TRY_COMPILE([
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
 #include FT_ERRORS_H
     ],
                     [(void)1;],:,have_freetype=false)
@@ -1080,12 +1118,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);
@@ -1109,10 +1150,30 @@ 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,
-      [GTK_ADD_LIB(x_extra_libs,Xext),
+      [GTK_ADD_LIB(x_extra_libs,Xext)
        AC_DEFINE(HAVE_SHAPE_EXT)],
       ,
       $x_libs_for_checks)
@@ -1124,10 +1185,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,
@@ -1185,9 +1254,27 @@ if test "x$gdktarget" = "xx11"; then
 
   if $have_xcursor ; then
     AC_DEFINE(HAVE_XCURSOR, 1, Have the Xcursor library)
-    XCURSOR_PACKAGES="xcursor"
-  else
-    XCURSOR_PACKAGES=
+    GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xcursor` $GDK_EXTRA_CFLAGS"
+    GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xcursor` $GDK_EXTRA_LIBS"
+  fi
+
+  # X SYNC check
+  AC_CHECK_LIB(Xext, XSyncQueryExtension,
+      [AC_CHECK_HEADER(X11/extensions/sync.h,
+          [GTK_ADD_LIB(x_extra_libs, Xext)
+         AC_DEFINE(HAVE_XSYNC, 1, Have the SYNC extension library)],
+         :, [#include <X11/Xlib.h>])], : ,
+       $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+
+  # Checks for XFixes extension
+  
+  have_xfixes=false
+  PKG_CHECK_MODULES(XFIXES, xfixes, have_xfixes=true, :)
+
+  if $have_xfixes ; then
+    AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension)
+    GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xfixes` $GDK_EXTRA_CFLAGS"
+    GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS"
   fi
     
   # Xshm checks
@@ -1222,7 +1309,6 @@ if test "x$gdktarget" = "xx11"; then
     fi
   fi
 
-  GDK_EXTRA_CFLAGS=
   if test $pango_omitted_x_deps = yes ; then
     GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs $x_libs $GDK_EXTRA_LIBS"
   else
@@ -1286,7 +1372,6 @@ if test "x$gdktarget" = "xlinux-fb"; then
     AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
   fi
   
-  GDK_EXTRA_CFLAGS=""
   if test $pango_omitted_ft2_deps = yes ; then
     GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
   fi
@@ -1350,7 +1435,7 @@ fi
 CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"
 
-GDK_PACKAGES="$XCURSOR_PACKAGES $PANGO_PACKAGES"
+GDK_PACKAGES="$PANGO_PACKAGES"
 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
 
@@ -1414,6 +1499,26 @@ AC_SUBST(GTK_DEP_CFLAGS)
 AC_SUBST(GTK_DEBUG_FLAGS)
 AC_SUBST(GTK_XIM_FLAGS)
 
+################################################################
+# Strip -export-dynamic from the link lines of various libraries
+################################################################
+
+#
+# pkg-config --libs gmodule includes the "export_dynamic" flag,
+#  but this flag is only meaningful for executables. For libraries
+#  the effect is undefined; what it causes on Linux is that the
+#  export list from -export-symbols-regex is ignored and everything
+#  is exported
+#      
+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//"`
+  GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
+  GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+  GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+
 ##################################################
 # Checks for gtk-doc and docbook-tools
 ##################################################
@@ -1428,19 +1533,22 @@ AC_ARG_ENABLE(man,
                               [regenerate man pages from Docbook [default=no]])],enable_man=yes,
               enable_man=no)
 
-dnl
-dnl Check for xsltproc
-dnl
-AC_PATH_PROG([XSLTPROC], [xsltproc])
-if test -z "$XSLTPROC"; then
-  enable_man=no
+if test "${enable_man}" != no; then
+  dnl
+  dnl Check for xsltproc
+  dnl
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  if test -z "$XSLTPROC"; then
+    enable_man=no
+  fi
+
+  dnl check for DocBook DTD and stylesheets in the local catalog.
+  JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
+     [DocBook XML DTD V4.1.2],,enable_man=no)
+  JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
+     [DocBook XSL Stylesheets],,enable_man=no)
 fi
 
-dnl check for DocBook DTD and stylesheets in the local catalog.
-JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
-   [DocBook XML DTD V4.1.2],,enable_man=no)
-JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
-   [DocBook XSL Stylesheets],,enable_man=no)
 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
 
 ##################################################
@@ -1514,9 +1622,6 @@ fi
 
 ])
 
-AC_PATH_PROG(SGML2HTML, sgml2html, no)
-AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
-
 AC_CONFIG_FILES([
 config.h.win32
 gtk-zip.sh
@@ -1529,6 +1634,7 @@ gdk-2.0-uninstalled.pc
 gtk+-2.0-uninstalled.pc
 m4macros/Makefile
 po/Makefile.in
+po-properties/Makefile.in
 build/Makefile
 build/win32/Makefile
 build/win32/dirent/Makefile
@@ -1545,6 +1651,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
@@ -1562,8 +1669,14 @@ gtk/gtkversion.h
 gtk/gtk-win32.rc
 gtk/stock-icons/Makefile
 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
 contrib/Makefile
 contrib/gdk-pixbuf-xlib/Makefile
 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc