mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 09:08:16 +02:00
[configure] Improve win32 detection
We now test for windows.h availability to automatically enable win32 backends. This nicely enables compiling cairo against libwine by just setting CC=winegcc LD=winegcc during configure. This currently only generates static libs though.
This commit is contained in:
parent
0fcd6cfe0e
commit
8133530ae5
2 changed files with 23 additions and 11 deletions
27
configure.in
27
configure.in
|
|
@ -286,20 +286,29 @@ CAIRO_BACKEND_ENABLE(nquartz, NativeQuartz, nquartz, NQUARTZ_SURFACE, no, [
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
AC_MSG_CHECKING([for native Win32])
|
||||
case "$host" in
|
||||
*-*-mingw*)
|
||||
cairo_os_win32=yes
|
||||
;;
|
||||
*)
|
||||
cairo_os_win32=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$cairo_os_win32])
|
||||
AM_CONDITIONAL(OS_WIN32, test "$cairo_os_win32" = "yes")
|
||||
|
||||
AC_CHECK_HEADERS([windows.h], have_windows=yes, have_windows=no)
|
||||
|
||||
CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, win32, WIN32_SURFACE, auto, [
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
use_win32="no (requires a Win32 platform)"
|
||||
;;
|
||||
esac
|
||||
if test "x$have_windows" != xyes; then
|
||||
use_win32="no (requires a Win32 platform)"
|
||||
fi
|
||||
win32_LIBS="-lgdi32 -lmsimg32"
|
||||
])
|
||||
|
||||
CAIRO_BACKEND_ENABLE(win32_font, Microsoft Windows font, win32-font, WIN32_FONT, auto, [
|
||||
use_win32_font=$use_win32
|
||||
use_win32_font=$use_win32
|
||||
])
|
||||
|
||||
dnl ===========================================================================
|
||||
|
|
|
|||
|
|
@ -72,12 +72,15 @@ libcairo_nquartz_sources = cairo-nquartz-surface.c cairo-quartz-private.h
|
|||
backend_pkgconfigs += cairo-nquartz.pc
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
export_symbols = -export-symbols cairo.def
|
||||
cairo_def_dependency = cairo.def
|
||||
endif
|
||||
|
||||
libcairo_win32_sources =
|
||||
if CAIRO_HAS_WIN32_SURFACE
|
||||
libcairo_win32_headers = cairo-win32.h
|
||||
libcairo_win32_sources += cairo-win32-surface.c cairo-win32-private.h
|
||||
export_symbols = -export-symbols cairo.def
|
||||
cairo_def_dependency = cairo.def
|
||||
backend_pkgconfigs += cairo-win32.pc
|
||||
endif
|
||||
# This is not really a separate conditional. Is TRUE iff the previous one is.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue