summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am43
-rw-r--r--tests/cxx-test.C29
2 files changed, 70 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 16bca8a8..aabc7afc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,12 +1,44 @@
## Process this file with automake to create Makefile.in.
-INCLUDES = -I$(top_srcdir) $(GLIB_CFLAGS)
+if HAVE_XFT
+X_DEFINES=-DHAVE_X
+else
+X_DEFINES=
+endif
+
+if HAVE_XFT
+XFT_DEFINES=-DHAVE_XFT
+else
+XFT_DEFINES=
+endif
+
+if HAVE_FREETYPE
+FT2_DEFINES=-DHAVE_FREETYPE
+else
+FT2_DEFINES=
+endif
+
+if HAVE_WIN32
+WIN32_DEFINES=-DHAVE_WIN32
+else
+WIN32_DEFINES=
+endif
+
+INCLUDES = \
+ -I$(top_srcdir) \
+ $(GLIB_CFLAGS) \
+ $(X_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
+ $(X_DEFINES) \
+ $(XFT_DEFINES) \
+ $(FT2_DEFINES) \
+ $(WIN32_DEFINES)
TESTS=runtests.sh
noinst_PROGRAMS = gen-all-unicode dump-boundaries
-check_PROGRAMS = testboundaries
+check_PROGRAMS = testboundaries $(CXX_TEST)
gen_all_unicode_SOURCES = gen-all-unicode.c
@@ -20,6 +52,13 @@ testboundaries_LDADD = ../pango/libpango.la
dump_boundaries_LDADD = ../pango/libpango.la
+if HAVE_CXX
+CXX_TEST = cxx-test
+cxx_test_SOURCES = cxx-test.C
+else
+CXX_TEST =
+endif
+
EXTRA_DIST = \
all-unicode.txt \
boundaries.utf8 \
diff --git a/tests/cxx-test.C b/tests/cxx-test.C
new file mode 100644
index 00000000..7142152b
--- /dev/null
+++ b/tests/cxx-test.C
@@ -0,0 +1,29 @@
+/* This test makes sure that all Pango headers can be included
+ * and compiled in a C++ program.
+ */
+#define PANGO_ENABLE_ENGINE
+#define PANGO_ENABLE_BACKEND
+
+#include <pango/pango.h>
+
+#ifdef HAVE_X
+#include <pango/pangox.h>
+#endif
+
+#ifdef HAVE_XFT
+#include <pango/pangoxft.h>
+#endif
+
+#ifdef HAVE_FREETYPE
+#include <pango/pangoft2.h>
+#endif
+
+#ifdef HAVE_WIN32
+#include <pango/pangowin32.h>
+#endif
+
+int
+main ()
+{
+ return 0;
+}