Merge "gif2webp build support with autoconf tools"

This commit is contained in:
pascal massimino 2012-11-15 12:14:53 -08:00 committed by Gerrit Code Review
commit 2243e40c39
3 changed files with 36 additions and 2 deletions

View File

@ -148,6 +148,32 @@ AC_SUBST(TIFF_INCLUDES)
CPPFLAGS=$SAVED_CPPFLAGS
LIBS=$SAVED_LIBS
dnl === check for GIF support ===
WEBP_HAVE_GIF=""
GIF_LIBS=""
WITHLIB_OPTION([gif], [GIF])
SAVED_LIBS=$LIBS
LIBS="$GIF_LIBS $LIBS"
AC_CHECK_HEADER(gif_lib.h,
AC_CHECK_LIB([gif], [DGifOpenFileHandle],
[GIF_LIBS="$GIF_LIBS -lgif"
WEBP_HAVE_GIF=1
],
AC_MSG_WARN(Optional gif library not found),
[$MATH_LIBS]),
AC_MSG_WARN(gif library not available - no gif_lib.h)
)
AC_SUBST(GIF_LIBS)
CPPFLAGS=$SAVED_CPPFLAGS
LIBS=$SAVED_LIBS
AM_CONDITIONAL([BUILD_GIF2WEBP], [test "$WEBP_HAVE_GIF" = "1" -a \
"$enable_experimental_libwebpmux" = "yes"])
dnl === check for WIC support ===
if test "$target_os" = "mingw32"; then

View File

@ -4,6 +4,11 @@ bin_PROGRAMS = dwebp cwebp
if WANT_MUX
bin_PROGRAMS += webpmux
endif
if BUILD_GIF2WEBP
bin_PROGRAMS += gif2webp
endif
noinst_LTLIBRARIES = libexampleutil.la
libexampleutil_la_SOURCES = example_util.c
@ -20,6 +25,11 @@ cwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
cwebp_CPPFLAGS += $(JPEG_INCLUDES) $(PNG_INCLUDES) $(TIFF_INCLUDES)
cwebp_LDADD = ../src/libwebp.la $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS)
gif2webp_SOURCES = gif2webp.c
gif2webp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
gif2webp_LDADD = libexampleutil.la ../src/mux/libwebpmux.la ../src/libwebp.la
gif2webp_LDADD += $(GIF_LIBS)
webpmux_SOURCES = webpmux.c
webpmux_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
webpmux_LDADD = libexampleutil.la ../src/mux/libwebpmux.la ../src/libwebp.la

View File

@ -19,8 +19,6 @@
#include "config.h"
#endif
// TODO(later): Use WEBP_USE_GIF flag here, determined at config time.
#include <gif_lib.h>
#include "webp/encode.h"
#include "webp/mux.h"