aboutsummaryrefslogtreecommitdiff
path: root/pixman
diff options
context:
space:
mode:
Diffstat (limited to 'pixman')
-rw-r--r--pixman/Makefile.win3225
-rw-r--r--pixman/Makefile.win32.common54
-rw-r--r--pixman/pixman/Makefile.am61
-rw-r--r--pixman/pixman/Makefile.sources55
-rw-r--r--pixman/pixman/Makefile.win32107
-rw-r--r--pixman/test/Makefile.am47
-rw-r--r--pixman/test/Makefile.sources36
-rw-r--r--pixman/test/Makefile.win3289
-rw-r--r--pixman/test/blitters-test.c1
-rw-r--r--pixman/test/composite.c1
-rw-r--r--pixman/test/fetch-test.c5
-rw-r--r--pixman/test/pdf-op-test.c1
-rw-r--r--pixman/test/scaling-helpers-test.c3
-rw-r--r--pixman/test/utils.h5
14 files changed, 232 insertions, 258 deletions
diff --git a/pixman/Makefile.win32 b/pixman/Makefile.win32
new file mode 100644
index 000000000..91cd12a52
--- /dev/null
+++ b/pixman/Makefile.win32
@@ -0,0 +1,25 @@
+default: all
+
+top_srcdir = .
+include $(top_srcdir)/Makefile.win32.common
+
+# Recursive targets
+pixman_r:
+ @$(MAKE) -C pixman -f Makefile.win32
+
+test_r:
+ @$(MAKE) -C test -f Makefile.win32
+
+clean_r:
+ @$(MAKE) -C pixman -f Makefile.win32 clean
+ @$(MAKE) -C test -f Makefile.win32 clean
+
+check_r:
+ @$(MAKE) -C test -f Makefile.win32 check
+
+# Base targets
+all: test_r
+
+clean: clean_r
+
+check: check_r
diff --git a/pixman/Makefile.win32.common b/pixman/Makefile.win32.common
new file mode 100644
index 000000000..56c3593d2
--- /dev/null
+++ b/pixman/Makefile.win32.common
@@ -0,0 +1,54 @@
+LIBRARY = pixman-1
+
+CC = cl
+LD = link
+AR = lib
+PERL = perl
+
+ifeq ($(top_builddir),)
+top_builddir = $(top_srcdir)
+endif
+
+CFG_VAR = $(CFG)
+ifeq ($(CFG_VAR),)
+CFG_VAR = release
+endif
+
+ifeq ($(CFG_VAR),debug)
+CFG_CFLAGS = -MDd -Od -Zi
+CFG_LDFLAGS = -DEBUG
+else
+CFG_CFLAGS = -MD -O2
+CFG_LDFLAGS =
+endif
+
+# Package definitions, to be used instead of those provided in config.h
+PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
+
+BASE_CFLAGS = -nologo -I. -I$(top_srcdir) -I$(top_srcdir)/pixman
+
+PIXMAN_CFLAGS = $(BASE_CFLAGS) $(PKG_CFLAGS) $(CFG_CFLAGS) $(CFLAGS)
+PIXMAN_LDFLAGS = -nologo $(CFG_LDFLAGS) $(LDFLAGS)
+PIXMAN_ARFLAGS = -nologo $(LDFLAGS)
+
+
+inform:
+ifneq ($(CFG),release)
+ifneq ($(CFG),debug)
+ifneq ($(CFG),)
+ @echo "Invalid specified configuration option: "$(CFG)"."
+ @echo
+ @echo "Possible choices for configuration are 'release' and 'debug'"
+ @exit 1
+endif
+ @echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
+endif
+endif
+
+
+$(CFG_VAR)/%.obj: %.c $(BUILT_SOURCES)
+ @mkdir -p $(CFG_VAR)
+ @$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
+
+clean: inform
+ @$(RM) $(CFG_VAR)/*.{exe,ilk,lib,obj,pdb} $(BUILT_SOURCES) || exit 0
diff --git a/pixman/pixman/Makefile.am b/pixman/pixman/Makefile.am
index 44e6b17e4..2421a4f9e 100644
--- a/pixman/pixman/Makefile.am
+++ b/pixman/pixman/Makefile.am
@@ -1,60 +1,25 @@
+include $(top_srcdir)/pixman/Makefile.sources
+
lib_LTLIBRARIES = libpixman-1.la
+
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined @PTHREAD_LDFLAGS@
libpixman_1_la_LIBADD = @PTHREAD_LIBS@ @DEP_LIBS@ -lm
-libpixman_1_la_SOURCES = \
- pixman.h \
- pixman-accessor.h \
- pixman-access.c \
- pixman-access-accessors.c \
- pixman-cpu.c \
- pixman-gradient-walker.c \
- pixman-region16.c \
- pixman-region32.c \
- pixman-compiler.h \
- pixman-private.h \
- pixman-image.c \
- pixman-implementation.c \
- pixman-combine32.c \
- pixman-combine32.h \
- pixman-combine64.c \
- pixman-combine64.h \
- pixman-general.c \
- pixman.c \
- pixman-noop.c \
- pixman-fast-path.c \
- pixman-solid-fill.c \
- pixman-conical-gradient.c \
- pixman-linear-gradient.c \
- pixman-radial-gradient.c \
- pixman-bits-image.c \
- pixman-utils.c \
- pixman-edge.c \
- pixman-edge-accessors.c \
- pixman-edge-imp.h \
- pixman-inlines.h \
- pixman-trap.c \
- pixman-timer.c \
- pixman-matrix.c
+libpixman_1_la_SOURCES = $(libpixman_sources) $(libpixman_headers)
libpixmanincludedir = $(includedir)/pixman-1
libpixmaninclude_HEADERS = pixman.h pixman-version.h
noinst_LTLIBRARIES =
-BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c
-
-pixman-combine32.c : pixman-combine.c.template pixman-combine32.h make-combine.pl
- $(PERL) $(srcdir)/make-combine.pl 8 < $(srcdir)/pixman-combine.c.template > $@ || ($(RM) $@; exit 1)
-pixman-combine32.h : pixman-combine.h.template make-combine.pl
- $(PERL) $(srcdir)/make-combine.pl 8 < $(srcdir)/pixman-combine.h.template > $@ || ($(RM) $@; exit 1)
-
-pixman-combine64.c : pixman-combine.c.template pixman-combine64.h make-combine.pl
- $(PERL) $(srcdir)/make-combine.pl 16 < $(srcdir)/pixman-combine.c.template > $@ || ($(RM) $@; exit 1)
-pixman-combine64.h : pixman-combine.h.template make-combine.pl
- $(PERL) $(srcdir)/make-combine.pl 16 < $(srcdir)/pixman-combine.h.template > $@ || ($(RM) $@; exit 1)
+EXTRA_DIST = \
+ Makefile.win32 \
+ make-combine.pl \
+ pixman-combine.c.template \
+ pixman-combine.h.template \
+ pixman-region.c \
+ solaris-hwcap.mapfile \
+ $(NULL)
-EXTRA_DIST = Makefile.win32 pixman-combine.c.template make-combine.pl pixman-region.c \
- pixman-combine.h.template solaris-hwcap.mapfile
-CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h
+DISTCLEANFILES = $(BUILT_SOURCES)
# mmx code
if USE_MMX
diff --git a/pixman/pixman/Makefile.sources b/pixman/pixman/Makefile.sources
new file mode 100644
index 000000000..ca3f001db
--- /dev/null
+++ b/pixman/pixman/Makefile.sources
@@ -0,0 +1,55 @@
+libpixman_sources = \
+ pixman.c \
+ pixman-access.c \
+ pixman-access-accessors.c \
+ pixman-bits-image.c \
+ pixman-combine32.c \
+ pixman-combine64.c \
+ pixman-conical-gradient.c \
+ pixman-cpu.c \
+ pixman-edge.c \
+ pixman-edge-accessors.c \
+ pixman-fast-path.c \
+ pixman-general.c \
+ pixman-gradient-walker.c \
+ pixman-image.c \
+ pixman-implementation.c \
+ pixman-linear-gradient.c \
+ pixman-matrix.c \
+ pixman-noop.c \
+ pixman-radial-gradient.c \
+ pixman-region16.c \
+ pixman-region32.c \
+ pixman-solid-fill.c \
+ pixman-timer.c \
+ pixman-trap.c \
+ pixman-utils.c \
+ $(NULL)
+
+libpixman_headers = \
+ pixman.h \
+ pixman-accessor.h \
+ pixman-combine32.h \
+ pixman-combine64.h \
+ pixman-compiler.h \
+ pixman-edge-imp.h \
+ pixman-inlines.h \
+ pixman-private.h \
+ $(NULL)
+
+BUILT_SOURCES = \
+ pixman-combine32.c \
+ pixman-combine32.h \
+ pixman-combine64.c \
+ pixman-combine64.h \
+ $(NULL)
+
+pixman-combine32.c: pixman-combine.c.template make-combine.pl
+ $(PERL) $(lastword $+) 8 < $< > $@ || ($(RM) $@; exit 1)
+pixman-combine32.h: pixman-combine.h.template make-combine.pl
+ $(PERL) $(lastword $+) 8 < $< > $@ || ($(RM) $@; exit 1)
+
+pixman-combine64.c: pixman-combine.c.template make-combine.pl
+ $(PERL) $(lastword $+) 16 < $< > $@ || ($(RM) $@; exit 1)
+pixman-combine64.h: pixman-combine.h.template make-combine.pl
+ $(PERL) $(lastword $+) 16 < $< > $@ || ($(RM) $@; exit 1)
diff --git a/pixman/pixman/Makefile.win32 b/pixman/pixman/Makefile.win32
index 7c92722c3..beff4a068 100644
--- a/pixman/pixman/Makefile.win32
+++ b/pixman/pixman/Makefile.win32
@@ -1,12 +1,8 @@
-LIBRARY = pixman-1
+default: all
-CC = cl
-LINK = link
-
-CFG_VAR = $(CFG)
-ifeq ($(CFG_VAR),)
-CFG_VAR=release
-endif
+top_srcdir = ..
+include $(top_srcdir)/pixman/Makefile.sources
+include $(top_srcdir)/Makefile.win32.common
MMX_VAR = $(MMX)
ifeq ($(MMX_VAR),)
@@ -18,83 +14,25 @@ ifeq ($(SSE2_VAR),)
SSE2_VAR=on
endif
-CFLAGS = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I../pixman/src -I. -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
MMX_CFLAGS = -DUSE_MMX -w14710 -w14714
SSE2_CFLAGS = -DUSE_SSE2
-# optimization flags
-ifeq ($(CFG_VAR),debug)
-CFLAGS += -Od -Zi
-else
-CFLAGS += -O2
-endif
-
-SOURCES = \
- pixman-image.c \
- pixman-access.c \
- pixman-access-accessors.c \
- pixman-region16.c \
- pixman-region32.c \
- pixman-combine32.c \
- pixman-combine64.c \
- pixman-utils.c \
- pixman-edge.c \
- pixman-edge-accessors.c \
- pixman-trap.c \
- pixman-timer.c \
- pixman-matrix.c \
- pixman-gradient-walker.c \
- pixman-conical-gradient.c \
- pixman-linear-gradient.c \
- pixman-radial-gradient.c \
- pixman-bits-image.c \
- pixman.c \
- pixman-noop.c \
- pixman-cpu.c \
- pixman-fast-path.c \
- pixman-implementation.c \
- pixman-solid-fill.c \
- pixman-general.c \
- $(NULL)
-
-BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c
-
# MMX compilation flags
ifeq ($(MMX_VAR),on)
-CFLAGS += $(MMX_CFLAGS)
-SOURCES += pixman-mmx.c
+PIXMAN_CFLAGS += $(MMX_CFLAGS)
+libpixman_sources += pixman-mmx.c
endif
# SSE2 compilation flags
ifeq ($(SSE2_VAR),on)
-CFLAGS += $(SSE2_CFLAGS)
-SOURCES += pixman-sse2.c
+PIXMAN_CFLAGS += $(SSE2_CFLAGS)
+libpixman_sources += pixman-sse2.c
endif
-OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES))
+OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libpixman_sources))
# targets
all: inform informMMX informSSE2 $(CFG_VAR)/$(LIBRARY).lib
- @exit 0
-clean: inform clean_r
- @exit 0
-pixman: inform informMMX informSSE2 $(CFG_VAR)/$(LIBRARY).lib
- @exit 0
-
-inform:
-ifneq ($(CFG),release)
-ifneq ($(CFG),debug)
-ifneq ($(CFG),)
- @echo "Invalid specified configuration option : "$(CFG)"."
- @echo
- @echo -n "Possible choices for configuration are "
- @echo "'release' and 'debug'"
- @echo ""
- @exit 1
-endif
- @echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
-endif
-endif
informMMX:
ifneq ($(MMX),off)
@@ -102,8 +40,7 @@ ifneq ($(MMX),on)
ifneq ($(MMX),)
@echo "Invalid specified MMX option : "$(MMX_VAR)"."
@echo
- @echo -n "Possible choices for MMX are 'on' or 'off'"
- @echo ""
+ @echo "Possible choices for MMX are 'on' or 'off'"
@exit 1
endif
@echo "Setting MMX flag to default value 'on'... (use MMX=on or MMX=off)"
@@ -116,32 +53,14 @@ ifneq ($(SSE2),on)
ifneq ($(SSE2),)
@echo "Invalid specified SSE option : "$(SSE2)"."
@echo
- @echo -n "Possible choices for SSE2 are 'on' or 'off'"
- @echo ""
+ @echo "Possible choices for SSE2 are 'on' or 'off'"
@exit 1
endif
@echo "Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)"
endif
endif
-# pixman compilation and linking
-$(CFG_VAR)/%.obj: %.c $(BUILT_SOURCES)
- @mkdir -p $(CFG_VAR)
- @$(CC) -c $(CFLAGS) -Fo"$@" $<
+# pixman linking
$(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS)
- lib -NOLOGO -OUT:$@ $(OBJECTS) || exit 0
-
-pixman-combine32.c: pixman-combine.c.template pixman-combine32.h make-combine.pl
- perl ./make-combine.pl 8 < $< > $@ || ($(RM) $@; exit 1)
-pixman-combine32.h: pixman-combine.h.template make-combine.pl
- perl ./make-combine.pl 8 < $< > $@ || ($(RM) $@; exit 1)
-
-pixman-combine64.c: pixman-combine.c.template pixman-combine64.h make-combine.pl
- perl ./make-combine.pl 16 < $< > $@ || ($(RM) $@; exit 1)
-pixman-combine64.h: pixman-combine.h.template make-combine.pl
- perl ./make-combine.pl 16 < $< > $@ || ($(RM) $@; exit 1)
-
-clean_r:
- @rm -f $(CFG_VAR)/*.obj $(CFG_VAR)/*.lib $(CFG_VAR)/*.pdb $(CFG)/*.ilk || exit 0
- @rm -f $(CFG)/*.obj $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk $(BUILT_SOURCES) || exit 0
+ @$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^
diff --git a/pixman/test/Makefile.am b/pixman/test/Makefile.am
index 6687bed35..4268cd7c5 100644
--- a/pixman/test/Makefile.am
+++ b/pixman/test/Makefile.am
@@ -1,50 +1,13 @@
+include $(top_srcdir)/test/Makefile.sources
+
AM_CFLAGS = @OPENMP_CFLAGS@
AM_LDFLAGS = @OPENMP_CFLAGS@ @TESTPROGS_EXTRA_LDFLAGS@
-LDADD = $(top_builddir)/pixman/libpixman-1.la -lm @PNG_LIBS@
+LDADD = $(top_builddir)/pixman/libpixman-1.la libutils.la -lm @PNG_LIBS@
INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman @PNG_CFLAGS@
-TESTPROGRAMS = \
- a1-trap-test \
- pdf-op-test \
- region-test \
- region-translate-test \
- fetch-test \
- oob-test \
- trap-crasher \
- alpha-loop \
- scaling-crash-test \
- scaling-helpers-test \
- gradient-crash-test \
- region-contains-test \
- alphamap \
- stress-test \
- composite-traps-test \
- blitters-test \
- scaling-test \
- affine-test \
- composite
-
-pdf_op_test_SOURCES = pdf-op-test.c utils.c utils.h
-region_test_SOURCES = region-test.c utils.c utils.h
-blitters_test_SOURCES = blitters-test.c utils.c utils.h
-region_contains_test_SOURCES = region-contains-test.c utils.c utils.h
-composite_traps_test_SOURCES = composite-traps-test.c utils.c utils.h
-scaling_test_SOURCES = scaling-test.c utils.c utils.h
-affine_test_SOURCES = affine-test.c utils.c utils.h
-alphamap_SOURCES = alphamap.c utils.c utils.h
-alpha_loop_SOURCES = alpha-loop.c utils.c utils.h
-composite_SOURCES = composite.c utils.c utils.h
-gradient_crash_test_SOURCES = gradient-crash-test.c utils.c utils.h
-stress_test_SOURCES = stress-test.c utils.c utils.h
-scaling_helpers_test_SOURCES = scaling-helpers-test.c utils.c utils.h
-
-# Benchmarks
-
-BENCHMARKS = \
- lowlevel-blt-bench
-
-lowlevel_blt_bench_SOURCES = lowlevel-blt-bench.c utils.c utils.h
+libutils_la_SOURCES = $(libutils_sources) $(libutils_headers)
+noinst_LTLIBRARIES = libutils.la
noinst_PROGRAMS = $(TESTPROGRAMS) $(BENCHMARKS)
TESTS = $(TESTPROGRAMS)
diff --git a/pixman/test/Makefile.sources b/pixman/test/Makefile.sources
new file mode 100644
index 000000000..99eb705af
--- /dev/null
+++ b/pixman/test/Makefile.sources
@@ -0,0 +1,36 @@
+# Tests (sorted by expected completion time)
+TESTPROGRAMS = \
+ a1-trap-test \
+ pdf-op-test \
+ region-test \
+ region-translate-test \
+ fetch-test \
+ oob-test \
+ trap-crasher \
+ alpha-loop \
+ scaling-crash-test \
+ scaling-helpers-test \
+ gradient-crash-test \
+ region-contains-test \
+ alphamap \
+ stress-test \
+ composite-traps-test \
+ blitters-test \
+ scaling-test \
+ affine-test \
+ composite \
+ $(NULL)
+
+# Benchmarks
+BENCHMARKS = \
+ lowlevel-blt-bench \
+ $(NULL)
+
+# Utility functions
+libutils_sources = \
+ utils.c \
+ $(NULL)
+
+libutils_headers = \
+ utils.h \
+ $(NULL)
diff --git a/pixman/test/Makefile.win32 b/pixman/test/Makefile.win32
index a62b6fc35..307ba0c23 100644
--- a/pixman/test/Makefile.win32
+++ b/pixman/test/Makefile.win32
@@ -1,76 +1,31 @@
-CC = cl
-LINK = link
+default: all
-CFG_VAR = $(CFG)
-ifeq ($(CFG_VAR),)
-CFG_VAR=release
-endif
+top_srcdir = ..
+include $(top_srcdir)/test/Makefile.sources
+include $(top_srcdir)/Makefile.win32.common
-CFLAGS = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_BIND_TO_CURRENT_VCLIBS_VERSION -D_MT -I../pixman -I. -I../
-TEST_LDADD = ../pixman/$(CFG_VAR)/pixman-1.lib
-INCLUDES = -I../pixman -I$(top_builddir)/pixman
+TEST_LDADD = \
+ $(top_builddir)/pixman/$(CFG_VAR)/$(LIBRARY).lib \
+ $(CFG_VAR)/libutils.lib \
+ $(NULL)
-# optimization flags
-ifeq ($(CFG_VAR),debug)
-CFLAGS += -Od -Zi
-else
-CFLAGS += -O2
-endif
+libutils_OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libutils_sources))
-SOURCES = \
- a1-trap-test.c \
- pdf-op-test.c \
- region-test.c \
- region-translate-test.c \
- fetch-test.c \
- oob-test.c \
- trap-crasher.c \
- alpha-loop.c \
- scaling-crash-test.c \
- gradient-crash-test.c \
- alphamap.c \
- stress-test.c \
- composite-traps-test.c \
- blitters-test.c \
- scaling-test.c \
- affine-test.c \
- composite.c \
- lowlevel-blt-bench.c \
- utils.c
+SOURCES = $(patsubst %, %.c, $(TESTPROGRAMS) $(BENCHMARKS))
+OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES))
+TESTS = $(patsubst %, $(CFG_VAR)/%.exe, $(TESTPROGRAMS))
+BENCHS = $(patsubst %, $(CFG_VAR)/%.exe, $(BENCHMARKS))
-TESTS = \
- $(CFG_VAR)/a1-trap-test.exe \
- $(CFG_VAR)/pdf-op-test.exe \
- $(CFG_VAR)/region-test.exe \
- $(CFG_VAR)/region-translate-test.exe \
- $(CFG_VAR)/fetch-test.exe \
- $(CFG_VAR)/oob-test.exe \
- $(CFG_VAR)/trap-crasher.exe \
- $(CFG_VAR)/alpha-loop.exe \
- $(CFG_VAR)/scaling-crash-test.exe \
- $(CFG_VAR)/gradient-crash-test.exe \
- $(CFG_VAR)/alphamap.exe \
- $(CFG_VAR)/stress-test.exe \
- $(CFG_VAR)/composite-traps-test.exe \
- $(CFG_VAR)/blitters-test.exe \
- $(CFG_VAR)/scaling-test.exe \
- $(CFG_VAR)/affine-test.exe \
- $(CFG_VAR)/composite.exe
+all: inform $(TESTS) $(BENCHS)
-BENCHMARKS = \
- $(CFG_VAR)/lowlevel-blt-bench.exe
+check: inform $(TESTS)
+ @for test in $(TESTS) ; do ./$$test && echo "PASS: $$test" || echo "FAIL: $$test" ; done
-OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES))
+$(CFG_VAR)/libutils.lib: $(libutils_OBJECTS)
+ @$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^
-$(CFG_VAR)/%.obj: %.c
- @mkdir -p $(CFG_VAR)
- @$(CC) -c $(CFLAGS) -Fo"$@" $<
+$(CFG_VAR)/%.exe: $(CFG_VAR)/%.obj $(TEST_LDADD)
+ @$(LD) $(PIXMAN_LDFLAGS) -OUT:$@ $^
-$(CFG_VAR)/%.exe: $(CFG_VAR)/%.obj
- $(LINK) /NOLOGO /OUT:$@ $< $(CFG_VAR)/utils.obj $(TEST_LDADD)
-
-all: $(OBJECTS) $(TESTS) $(BENCHMARKS)
- @exit 0
-
-clean:
- @rm -f $(CFG_VAR)/*.obj $(CFG_VAR)/*.pdb || exit 0
+$(top_builddir)/pixman/$(CFG_VAR)/$(LIBRARY).lib:
+ @$(MAKE) -C $(top_builddir)/pixman -f Makefile.win32
diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c
index 594ec548b..790a27f03 100644
--- a/pixman/test/blitters-test.c
+++ b/pixman/test/blitters-test.c
@@ -8,7 +8,6 @@
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
-#include <config.h>
#include "utils.h"
static pixman_indexed_t rgb_palette[9];
diff --git a/pixman/test/composite.c b/pixman/test/composite.c
index edea9a96b..408c363a3 100644
--- a/pixman/test/composite.c
+++ b/pixman/test/composite.c
@@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdlib.h> /* abort() */
#include <math.h>
-#include <config.h>
#include <time.h>
#include "utils.h"
diff --git a/pixman/test/fetch-test.c b/pixman/test/fetch-test.c
index feb98d9b7..9f80eec1b 100644
--- a/pixman/test/fetch-test.c
+++ b/pixman/test/fetch-test.c
@@ -1,8 +1,11 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "pixman.h"
-#include <config.h>
#define SIZE 1024
diff --git a/pixman/test/pdf-op-test.c b/pixman/test/pdf-op-test.c
index dc7a4fd0b..99cb7dfea 100644
--- a/pixman/test/pdf-op-test.c
+++ b/pixman/test/pdf-op-test.c
@@ -1,4 +1,3 @@
-#include <config.h>
#include <stdlib.h>
#include "utils.h"
diff --git a/pixman/test/scaling-helpers-test.c b/pixman/test/scaling-helpers-test.c
index a38cac544..a8b94b0c7 100644
--- a/pixman/test/scaling-helpers-test.c
+++ b/pixman/test/scaling-helpers-test.c
@@ -1,4 +1,3 @@
-#include <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
@@ -20,12 +19,12 @@ bilinear_pad_repeat_get_scanline_bounds_ref (int32_t source_image_width,
int32_t * right_pad)
{
int w = *width;
+ int64_t vx = vx_;
*left_pad = 0;
*left_tz = 0;
*width = 0;
*right_tz = 0;
*right_pad = 0;
- int64_t vx = vx_;
while (--w >= 0)
{
if (vx < 0)
diff --git a/pixman/test/utils.h b/pixman/test/utils.h
index 3790483db..b23925c4a 100644
--- a/pixman/test/utils.h
+++ b/pixman/test/utils.h
@@ -1,5 +1,8 @@
-#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
#include <config.h>
+#endif
+
+#include <stdlib.h>
#include <assert.h>
#include "pixman-private.h" /* For 'inline' definition */