2008-11-20 14:00:50 -08:00
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_EDB(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_EDB],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([EDB], [edb], [have_dep="yes"], [have_dep="no"])
|
|
|
|
evas_image_loader_[]$1[]_cflags="${EDB_CFLAGS}"
|
|
|
|
evas_image_loader_[]$1[]_libs="${EDB_LIBS}"
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_EET(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_EET],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([EET], [eet >= 1.0.1], [have_dep="yes"], [have_dep="no"])
|
|
|
|
evas_image_loader_[]$1[]_cflags="${EET_CFLAGS}"
|
|
|
|
evas_image_loader_[]$1[]_libs="${EET_LIBS}"
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_GIF(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_GIF],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([gif_lib.h], [have_dep="yes"])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([gif],
|
|
|
|
[DGifOpenFileName],
|
|
|
|
[
|
|
|
|
evas_image_loader_[]$1[]_libs="-lgif"
|
|
|
|
],
|
|
|
|
[have_dep="no"]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xno" ; then
|
|
|
|
AC_CHECK_LIB([ungif],
|
|
|
|
[DGifOpenFileName],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_image_loader_[]$1[]_libs="-lungif"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_JPEG(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_JPEG],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([jpeglib.h], [have_dep="yes"])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([jpeg],
|
|
|
|
[jpeg_CreateDecompress],
|
|
|
|
[evas_image_loader_[]$1[]_libs="-ljpeg"],
|
|
|
|
[have_dep="no"]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="yes"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_PNG(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_PNG],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_EXISTS([libpng12],
|
|
|
|
[PKG_CHECK_MODULES([PNG], [libpng12], [have_dep="yes"], [have_dep="no"])],
|
|
|
|
[PKG_CHECK_EXISTS([libpng10],
|
|
|
|
[PKG_CHECK_MODULES([PNG], [libpng10], [have_dep="yes"], [have_dep="no"])],
|
|
|
|
[PKG_CHECK_MODULES([PNG], [libpng], [have_dep="yes"], [have_dep="no"])])]
|
|
|
|
)
|
|
|
|
|
|
|
|
evas_image_loader_[]$1[]_cflags="${PNG_CFLAGS}"
|
|
|
|
evas_image_loader_[]$1[]_libs="${PNG_LIBS}"
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_SVG(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_SVG],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0],
|
|
|
|
[have_dep="yes"],
|
|
|
|
[have_svg="no"]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
2008-11-24 15:57:49 -08:00
|
|
|
evas_image_loader_[]$1[]_cflags="${SVG_CFLAGS}"
|
|
|
|
evas_image_loader_[]$1[]_libs="${SVG_LIBS}"
|
2008-11-20 14:00:50 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_TIFF(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_TIFF],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="no"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([tiffio.h], [have_dep="yes"])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([tiff],
|
|
|
|
[TIFFReadScanline],
|
|
|
|
[
|
|
|
|
evas_image_loader_[]$1[]_libs="-ltiff"
|
|
|
|
],
|
|
|
|
[have_dep="no"]
|
|
|
|
)
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xno" ; then
|
|
|
|
AC_CHECK_LIB([tiff],
|
|
|
|
[TIFFReadScanline],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_image_loader_[]$1[]_libs="-ltiff -ljpeg -lz -lm"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xno" ; then
|
|
|
|
AC_CHECK_LIB([tiff34],
|
|
|
|
[TIFFReadScanline],
|
|
|
|
[
|
|
|
|
have_dep="yes"
|
|
|
|
evas_image_loader_[]$1[]_libs="-ltiff34 -ljpeg -lz -lm"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_LOADER_DEP_XPM(loader[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_LOADER_DEP_XPM],
|
|
|
|
[
|
|
|
|
|
|
|
|
have_dep="yes"
|
|
|
|
evas_image_loader_[]$1[]_cflags=""
|
|
|
|
evas_image_loader_[]$1[]_libs=""
|
|
|
|
|
|
|
|
AC_SUBST([evas_image_loader_$1_cflags])
|
|
|
|
AC_SUBST([evas_image_loader_$1_libs])
|
|
|
|
|
|
|
|
if test "x${have_dep}" = "xyes" ; then
|
|
|
|
m4_default([$2], [:])
|
|
|
|
else
|
|
|
|
m4_default([$3], [:])
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro)
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_IMAGE_LOADER],
|
|
|
|
[
|
|
|
|
|
|
|
|
m4_pushdef([UP], m4_toupper([[$1]]))
|
|
|
|
m4_pushdef([DOWN], m4_tolower([[$1]]))
|
|
|
|
|
|
|
|
want_loader="$2"
|
2009-06-22 10:35:31 -07:00
|
|
|
want_static_loader="no"
|
|
|
|
have_loader="no"
|
2008-11-20 14:00:50 -08:00
|
|
|
have_evas_image_loader_[]DOWN="no"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([image-loader-[]DOWN],
|
2009-06-22 10:35:31 -07:00
|
|
|
[AC_HELP_STRING([--enable-image-loader-[]DOWN], [enable $1 image loader])],
|
|
|
|
[
|
|
|
|
if test "x${enableval}" = "xyes" ; then
|
|
|
|
want_loader="yes"
|
|
|
|
else
|
|
|
|
if test "x${enableval}" = "xstatic" ; then
|
|
|
|
want_loader="static"
|
|
|
|
else
|
|
|
|
want_loader="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
]
|
2008-11-20 14:00:50 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to enable $1 image loader])
|
|
|
|
AC_MSG_RESULT([${want_loader}])
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${want_loader}" = "xyes" -o "x${want_loader}" = "xstatic" -o "x${want_loader}" = "xauto"; then
|
|
|
|
m4_default([EVAS_CHECK_LOADER_DEP_]m4_defn([UP]))(DOWN, [have_loader="yes"], [have_loader="no"])
|
2008-11-20 14:00:50 -08:00
|
|
|
fi
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${have_loader}" = "xno" -a "x${want_loader}" = "xyes" -a "x${use_strict}" = "xyes" ; then
|
2008-11-20 14:00:50 -08:00
|
|
|
AC_MSG_ERROR([$1 dependencies not found (strict dependencies checking)])
|
|
|
|
fi
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
AC_MSG_CHECKING([whether $1 image loader will be built])
|
|
|
|
AC_MSG_RESULT([${have_loader}])
|
2008-11-20 14:00:50 -08:00
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${have_loader}" = "xyes" ; then
|
|
|
|
if test "x${want_loader}" = "xstatic" ; then
|
|
|
|
have_evas_image_loader_[]DOWN="static"
|
|
|
|
want_static_loader="yes"
|
|
|
|
else
|
|
|
|
have_evas_image_loader_[]DOWN="yes"
|
|
|
|
fi
|
|
|
|
fi
|
2009-06-16 06:01:36 -07:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build inside evas library $1 image loader])
|
2009-06-22 10:35:31 -07:00
|
|
|
AC_MSG_RESULT([${want_static_loader}])
|
2009-06-16 06:01:36 -07:00
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
if test "x${have_loader}" = "xyes" ; then
|
|
|
|
AC_DEFINE(BUILD_LOADER_[]UP, [1], [UP Image Loader Support])
|
|
|
|
fi
|
2009-06-16 06:01:36 -07:00
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
AM_CONDITIONAL(BUILD_LOADER_[]UP, [test "x${have_loader}" = "xyes"])
|
|
|
|
|
|
|
|
if test "x${want_static_loader}" = "xyes" ; then
|
2009-06-16 06:01:36 -07:00
|
|
|
AC_DEFINE(EVAS_STATIC_BUILD_[]UP, [1], [Build $1 image loader inside libevas])
|
|
|
|
fi
|
|
|
|
|
2009-06-22 10:35:31 -07:00
|
|
|
AM_CONDITIONAL(EVAS_STATIC_BUILD_[]UP, [test "x${want_static_loader}" = "xyes"])
|
|
|
|
|
2008-12-20 05:22:46 -08:00
|
|
|
m4_popdef([UP])
|
|
|
|
m4_popdef([DOWN])
|
2008-11-20 14:00:50 -08:00
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl use: EVAS_CHECK_FONT_LOADER(want)
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN([EVAS_CHECK_FONT_LOADER],
|
|
|
|
[
|
|
|
|
|
|
|
|
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
|
|
|
|
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
|
|
|
|
|
|
|
|
want_loader="$1"
|
|
|
|
have_evas_font_loader_eet="no"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([font-loader-eet],
|
|
|
|
[AC_HELP_STRING([--disable-font-loader-eet],
|
|
|
|
[disable EET font loader. [[default=enabled]]])],
|
|
|
|
[want_loader=${enableval}]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to enable Eet font loader])
|
|
|
|
AC_MSG_RESULT([${want_loader}])
|
|
|
|
|
|
|
|
if test "x$want_loader" = "xyes" -o "x$want_loader" = "xauto"; then
|
2009-06-14 13:58:59 -07:00
|
|
|
PKG_CHECK_MODULES([EET], [eet >= 1.0.1], [have_evas_font_loader_eet="yes"], [have_evas_font_loader_eet="no"])
|
2008-11-20 14:00:50 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x${have_evas_font_loader_eet}" = "xno" -a "x$want_loader" = "xyes" -a "x$use_strict" = "xyes" ; then
|
|
|
|
AC_MSG_ERROR([Eet dependencies not found (strict dependencies checking)])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$have_evas_font_loader_eet" = "xyes" ; then
|
|
|
|
AC_DEFINE([BUILD_FONT_LOADER_EET], [1], [EET Font Loader Support])
|
|
|
|
fi
|
|
|
|
|
|
|
|
popdef([UP])
|
|
|
|
popdef([DOWN])
|
|
|
|
|
|
|
|
])
|