Use Cairo for wxGraphicsContext in wxX11.

Check for Cairo in configure for wxX11 too.

Fix compilation of wxCairoContext for non-{GTK,MSW} platforms.

Also make wxUSE_CAIRO a "normal" option, i.e. add it to all wx/setup.h files
instead of defining it as 1 unconditionally for wxGTK and 0 for everything
else.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-10 13:52:45 +00:00
parent ac98aec510
commit 711a481223
13 changed files with 156 additions and 27 deletions

41
configure vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in 65489 2010-09-09 20:59:10Z VZ .
# From configure.in Id.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.2.
#
@@ -16958,7 +16958,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_prog_gcc_traditional=no
fi
rm -f -r conftest*
rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
@@ -16975,7 +16975,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "$ac_pattern" >/dev/null 2>&1; then
ac_cv_prog_gcc_traditional=yes
fi
rm -f -r conftest*
rm -f conftest*
fi
fi
@@ -19598,7 +19598,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
rm -f -r conftest*
rm -f conftest*
fi
@@ -19619,7 +19619,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
rm -f -r conftest*
rm -f conftest*
fi
@@ -24420,11 +24420,13 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@@ -24464,11 +24466,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
#include <sys/types.h> /* for off_t */
#include <stdio.h>
int
main ()
{
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@@ -24515,7 +24519,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
;;
esac
rm -f -r conftest*
rm -f conftest*
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
@@ -31225,7 +31229,7 @@ _ACEOF
eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
done
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
for ac_extension in a so sl dylib la dll; do
for ac_extension in a so sl; do
if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
test -f "$ac_im_libdir/libX11.$ac_extension"; then
ac_im_usrlibdir=$ac_im_libdir; break
@@ -31378,7 +31382,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
do
# Don't even attempt the hair of trying to link an X program!
for ac_extension in a so sl dylib la dll; do
for ac_extension in a so sl; do
if test -r "$ac_dir/libX11.$ac_extension"; then
ac_x_libraries=$ac_dir
break 2
@@ -48143,7 +48147,7 @@ echo "${ECHO_T}$wx_cv_lib_gdiplus" >&6; }
if test "$wx_cv_lib_gdiplus" = "yes"; then
wx_has_graphics=1
fi
elif test "$wxUSE_GTK" = 1; then
elif test "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
pkg_failed=no
{ echo "$as_me:$LINENO: checking for CAIRO" >&5
@@ -48217,6 +48221,17 @@ else
echo "${ECHO_T}yes" >&6; }
wx_has_graphics=1
fi
if test "$wx_has_graphics" = 1; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_CAIRO 1
_ACEOF
if test "$wxUSE_GTK" != 1; then
CPPFLAGS="$CAIRO_CFLAGS $CPPFLAGS"
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $CAIRO_LIBS"
fi
fi
else
wx_has_graphics=1
fi