summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2013-09-28 14:28:41 +0200
committerCedric Bail <cedric.bail@samsung.com>2013-10-01 16:38:44 +0900
commit3b8b2ac66c10be49a85ec2dad2d54082fe47742f (patch)
tree5eb31d7c7cdb754c1da5d5efa882ab7e15d5d315 /m4
parent83eaf14f32e3fb804b97906af6e0af70303bf24b (diff)
evas: add JPEG 2000 loader.
This add finally support for JPEG 2000, but be aware that libopenjpeg is very badly managed. There is currently only version 1.5.x that does provide the right files, is usable by a third party and portable. You can seriously forget any other version.
Diffstat (limited to 'm4')
-rw-r--r--m4/evas_check_loader.m462
1 files changed, 62 insertions, 0 deletions
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
index e10e330..b34c28f 100644
--- a/m4/evas_check_loader.m4
+++ b/m4/evas_check_loader.m4
@@ -184,6 +184,68 @@ AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
184 184
185]) 185])
186 186
187dnl use: EVAS_CHECK_LOADER_DEP_JP2K(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
188
189AC_DEFUN([EVAS_CHECK_LOADER_DEP_JP2K],
190[
191
192have_dep="no"
193have_dep_pc="no"
194evas_image_loader_[]$1[]_cflags=""
195evas_image_loader_[]$1[]_libs=""
196
197AC_CHECK_HEADER([openjpeg.h], [have_dep="yes"])
198
199if test "x${have_dep}" = "xyes" ; then
200 AC_CHECK_LIB([openjp2],
201 [opj_set_default_decoder_parameters],
202 [
203 evas_image_loader_[]$1[]_libs="-lopenjp2"
204 have_dep="yes"
205 ],
206 [have_dep="no"])
207fi
208
209if test "x${have_dep}" = "xno" ; then
210 PKG_CHECK_EXISTS([libopenjpeg1 >= 1.5],
211 [
212 have_dep="yes"
213 have_dep_pc="yes"
214 requirement="libopenjpeg1 >= 1.5"
215 ],
216 [have_dep="no"])
217fi
218
219if test "x${have_dep}" = "xno" ; then
220 PKG_CHECK_EXISTS([libopenjpeg >= 1.5],
221 [
222 have_dep="yes"
223 have_dep_pc="yes"
224 requirement="libopenjpeg >= 1.5"
225 ],
226 [have_dep="no"])
227fi
228
229if test "x${have_dep}" = "xyes" ; then
230 if test "x$2" = "xstatic" ; then
231 requirements_pc_evas="${requirement} ${requirements_pc_evas}"
232 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
233 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
234 fi
235 if test "x${have_dep_pc}" = "xyes" ; then
236 PKG_CHECK_MODULES([JP2K], [${requirement}])
237 evas_image_loader_[]$1[]_cflags="${JP2K_CFLAGS}"
238 evas_image_loader_[]$1[]_libs="${JP2K_LIBS}"
239 fi
240fi
241
242AC_SUBST([evas_image_loader_$1_cflags])
243AC_SUBST([evas_image_loader_$1_libs])
244
245AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
246
247])
248
187dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader, want_static[[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 249dnl use: EVAS_CHECK_LOADER_DEP_PMAPS(loader, want_static[[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
188 250
189AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS], 251AC_DEFUN([EVAS_CHECK_LOADER_DEP_PMAPS],