From 0e9d82417bbb8ce7a1ffa97f403a7698ba7e9a6b Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 1 Dec 2006 15:06:27 +1100 Subject: Add png support to libtwin build This change adds twin_png to the default build of libtwin. Signed-off-by: Jeremy Kerr Signed-off-by: Benjamin Herrenschmidt --- Makefile.am | 5 +++++ configure.ac | 19 +++++++++++++++++-- 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]) -- cgit v1.2.3