#
GTK_MAJOR_VERSION=2
GTK_MINOR_VERSION=1
-GTK_MICRO_VERSION=0
+GTK_MICRO_VERSION=1
GTK_INTERFACE_AGE=0
-GTK_BINARY_AGE=100
+GTK_BINARY_AGE=101
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
dnl This is the X.Y used in -lgtk-FOO-X.Y
GTK_API_VERSION=2.0
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
+fi
+changequote([,])dnl
- if test "$os_win32" = "yes"; then
- case "$CC $CFLAGS " in
- *[[\ \ ]]-fnative-struct[[\ \ ]]*) ;;
- *) CFLAGS="$CFLAGS -fnative-struct" ;;
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
+# gcc2 uses "-fnative-struct".
+if test x"$os_win32" = xyes; then
+ if test x"$GCC" = xyes; then
+ msnative_struct=''
+ AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
+ if test -z "$ac_cv_prog_CC"; then
+ our_gcc="$CC"
+ else
+ our_gcc="$ac_cv_prog_CC"
+ fi
+ case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+ 2.)
+ if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+ msnative_struct='-fnative-struct'
+ fi
+ ;;
+ *)
+ if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+ msnative_struct='-mms-bitfields'
+ fi
+ ;;
esac
+ if test x"$msnative_struct" = x ; then
+ AC_MSG_RESULT([no way])
+ AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
+ else
+ CFLAGS="$CFLAGS $msnative_struct"
+ AC_MSG_RESULT([${msnative_struct}])
+ fi
fi
fi
-changequote([,])dnl
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_SUBST(STRIP_END)
# i18n stuff
-ALL_LINGUAS="az ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hi hr hu ia it ja ko lt ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
+ALL_LINGUAS="az bg ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hi hr hu ia it ja ko lt ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
fi
fi
-all_loaders="png,bmp,wbmp,gif,ico,jpeg,pnm,ras,tiff,xpm,tga"
+all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,tga"
included_loaders=""
# If no loaders specified, include all
if test "x$with_included_loaders" = xyes ; then
IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
for loader in $included_loaders; do
- if echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
+ if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
:
else
AC_MSG_ERROR([the specified loader $loader does not exist])
if $dynworks ; then
STATIC_LIB_DEPS=
- if echo "$included_loaders" | grep "\(^\|\,\)tiff\(\$\|\,\)" > /dev/null; then
+ if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
fi
- if echo "$included_loaders" | grep "\(^\|\,\)jpeg\(\$\|\,\)" > /dev/null; then
+ if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
fi
- if echo "$included_loaders" | grep "\(^\|\,\)png\(\$\|\,\)" > /dev/null; then
+ if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
fi
else
## be sure we also have Pango built with xft support
if $PKG_CONFIG --exists pangoxft ; then
- PANGO_PACKAGES="pangox pangoxft"
+ PANGO_PACKAGES="pangoxft pangox"
have_xft=true
AC_DEFINE(HAVE_XFT)
if $have_freetype ; then
AM_CONDITIONAL(HAVE_XFT, $have_xft)
+ if $PKG_CONFIG --exists xft ; then
+ AC_DEFINE(HAVE_XFT2, 1, [Define if we have Xft, version 2])
+ fi
+
#
# If Pango included the shared library dependencies from X11 in
# the pkg-config output, then we use that (to avoid duplicates).
if test $have_xft = true ; then
have_xft=false
- if $PKG_CONFIG --exists xft ; then
+ if pkg-config --exists pangoxft '>=' 1.1.0 ; then
x_libs="`pkg-config --libs xft` -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
have_xft=true
else
GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
# Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
- GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs `$PKG_CONFIG --libs pangox`"
+ GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs $x_libs"
# Check for Xinerama extension (Solaris impl or Xfree impl)
+ gtk_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $x_cflags"
+
case "$host" in
*-*-solaris*)
# Check for solaris
x_extra_libs="-lXext $x_extra_libs"
fi
AC_DEFINE(HAVE_SOLARIS_XINERAMA)
- AC_DEFINE(HAVE_XINERAMA), use_solaris_xinerama=no)
+ AC_DEFINE(HAVE_XINERAMA), use_solaris_xinerama=no, -lXext $x_libs_for_checks)
fi
AC_MSG_CHECKING(for Xinerama support on Solaris)
AC_MSG_RESULT($use_solaris_xinerama);
# Check for XFree
use_xfree_xinerama=yes
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
- [AC_CHECK_HEADER(extensions/Xinerama.h,
+ [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
x_extra_libs="-lXinerama $x_extra_libs"
if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
x_extra_libs="-lXext $x_extra_libs"
fi
AC_DEFINE(HAVE_XFREE_XINERAMA)
AC_DEFINE(HAVE_XINERAMA),
- use_xfree_xinerama=no)],
- use_xfree_xinerama=no)
+ use_xfree_xinerama=no,
+ [#include <X11/Xlib.h>])],
+ use_xfree_xinerama=no, -lXext $x_libs_for_checks)
AC_MSG_CHECKING(for Xinerama support on XFree86)
AC_MSG_RESULT($use_xfree_xinerama);
;;
esac
+ CPPFLAGS="$gtk_save_cppflags"
+
# Check for shaped window extension
AC_CHECK_LIB(Xext, XShapeCombineMask,
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
+ # Check for the RANDR extension
+
+ AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
+ [AC_CHECK_HEADER(X11/extensions/Xrandr.h,
+ # RANDR requires RENDER
+ if test -z "`echo $x_extra_libs $x_libs | grep "\-lXrender" 2> /dev/null`"; then
+ x_extra_libs="-lXrender $x_extra_libs"
+ fi
+ x_extra_libs="-lXrandr $x_extra_libs"
+ AC_DEFINE(HAVE_RANDR, 1, Have the Xrandr extension library),
+ :, [#include <X11/Xlib.h>])], : ,
+ $X_LIBS -lXrandr -lXrender -lX11 $X_EXTRA_LIBS)
+
+ # Xshm checks
+
if test "x$enable_shm" = "xyes"; then
# Check for shared memory
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
AM_CONDITIONAL(USE_X11, true)
else
+ AM_CONDITIONAL(HAVE_XFT, false)
+ AM_CONDITIONAL(XINPUT_XFREE, false)
AM_CONDITIONAL(USE_X11, false)
fi