summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-12-01 15:06:27 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-12-01 16:39:48 +1100
commit0e9d82417bbb8ce7a1ffa97f403a7698ba7e9a6b (patch)
treeb16d0bbc8c0aaeeef89573dd830a79779848d939
parent1650078f6a0aaf062094728c877c3e294611e182 (diff)
Add png support to libtwin build
This change adds twin_png to the default build of libtwin. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac19
2 files changed, 22 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 1e464aa..cd0febd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,6 +54,11 @@ pkginclude_HEADERS += twin_linux_mouse.h
libtwin_la_SOURCES += twin_linux_mouse.c
endif
+if TWIN_PNG
+pkginclude_HEADERS += twin_png.h
+libtwin_la_SOURCES += twin_png.c
+endif
+
# demo twin applications
EXTRA_PROGRAMS += twin_demos/xtwin twin_demos/ftwin
noinst_PROGRAMS =
diff --git a/configure.ac b/configure.ac
index da11de1..3d7b547 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,19 @@ AC_ARG_ENABLE(linux-mouse,
[Disable linux mouse support (default=enabled)]),
twin_mouse="$enableval", twin_mouse="yes")
+# png support
+AC_ARG_ENABLE(png,
+ AC_HELP_STRING([--disable-png],
+ [Disable png support (default=enabled)]),
+ twin_png="$enableval", twin_png="yes")
+
+if test "x$twin_png" = "xyes"
+then
+ PKG_CHECK_MODULES(PNG, libpng12, twin_png="yes", twin_png="no")
+fi
+AC_SUBST(PNG_CFLAGS)
+AC_SUBST(PNG_LIBS)
+
# Check for freetype
AC_ARG_ENABLE(twin-ttf,
AC_HELP_STRING([--disable-twin-ttf],
@@ -95,18 +108,20 @@ AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
# TWIN_DEP_*FLAGS define all flags required by dependencies of libtwin
-TWIN_DEP_LDFLAGS="$X_LIBS -lm"
-TWIN_DEPCFLAGS="$X_CFLAGS"
+TWIN_DEP_LDFLAGS="$X_LIBS $PNG_LIBS -lm"
+TWIN_DEPCFLAGS="$X_CFLAGS $PNG_CFLAGS"
AC_SUBST(TWIN_DEP_CFLAGS)
AC_SUBST(TWIN_DEP_LDFLAGS)
AM_CONDITIONAL(TWIN_X11, test x$twin_x11 = xyes)
AM_CONDITIONAL(TWIN_FB, test x$twin_fb = xyes)
+AM_CONDITIONAL(TWIN_PNG, test x$twin_png = xyes)
AM_CONDITIONAL(TWIN_TTF, test x$twin_ttf = xyes)
AM_CONDITIONAL(TWIN_MOUSE, test x$twin_mouse = xyes)
AC_MSG_NOTICE([x11 support: $twin_x11])
AC_MSG_NOTICE([fbdev support: $twin_fb])
+AC_MSG_NOTICE([png support: $twin_png])
AC_MSG_NOTICE([twin_ttf tool: $twin_ttf])
AC_MSG_NOTICE([linux mouse: $twin_mouse])