summaryrefslogtreecommitdiff
path: root/m4/evas_check_loader.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/evas_check_loader.m4')
-rw-r--r--m4/evas_check_loader.m438
1 files changed, 10 insertions, 28 deletions
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
index 3ac4d5901e..ff48c3c388 100644
--- a/m4/evas_check_loader.m4
+++ b/m4/evas_check_loader.m4
@@ -264,44 +264,26 @@ dnl use: EVAS_CHECK_LOADER_DEP_JP2K(loader, want_static[, ACTION-IF-FOUND[, ACTI
264AC_DEFUN([EVAS_CHECK_LOADER_DEP_JP2K], 264AC_DEFUN([EVAS_CHECK_LOADER_DEP_JP2K],
265[ 265[
266 266
267requirement=""
267have_dep="no" 268have_dep="no"
268have_dep_pc="no"
269evas_image_loader_[]$1[]_cflags="" 269evas_image_loader_[]$1[]_cflags=""
270evas_image_loader_[]$1[]_libs="" 270evas_image_loader_[]$1[]_libs=""
271 271
272AC_CHECK_HEADER([openjpeg.h], [have_dep="yes"]) 272PKG_CHECK_EXISTS([libopenjp2 >= 2.0],
273 273 [
274if test "x${have_dep}" = "xyes" ; then 274 have_dep="yes"
275 AC_CHECK_LIB([openjp2], 275 requirement="libopenjp2 >= 2.0"
276 [opj_stream_create], 276 ],
277 [ 277 [have_dep="no"])
278 evas_image_loader_[]$1[]_libs="-lopenjp2"
279 have_dep="yes"
280 ],
281 [have_dep="no"])
282fi
283
284if test "x${have_dep}" = "xno" ; then
285 PKG_CHECK_EXISTS([libopenjp2 >= 2.0],
286 [
287 have_dep="yes"
288 have_dep_pc="yes"
289 requirement="libopenjp2 >= 2.0"
290 ],
291 [have_dep="no"])
292fi
293 278
294if test "x${have_dep}" = "xyes" ; then 279if test "x${have_dep}" = "xyes" ; then
295 if test "x$2" = "xstatic" ; then 280 if test "x$2" = "xstatic" ; then
296 requirements_pc_evas="${requirement} ${requirements_pc_evas}" 281 requirements_pc_evas="${requirement} ${requirements_pc_evas}"
297 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}" 282 requirements_pc_deps_evas="${requirement} ${requirements_pc_deps_evas}"
298 requirements_libs_evas="${evas_image_loader_[]$1[]_libs} ${requirements_libs_evas}"
299 fi
300 if test "x${have_dep_pc}" = "xyes" ; then
301 PKG_CHECK_MODULES([JP2K], [${requirement}])
302 evas_image_loader_[]$1[]_cflags="${JP2K_CFLAGS}"
303 evas_image_loader_[]$1[]_libs="${JP2K_LIBS}"
304 fi 283 fi
284 PKG_CHECK_MODULES([JP2K], [${requirement}])
285 evas_image_loader_[]$1[]_cflags="${JP2K_CFLAGS}"
286 evas_image_loader_[]$1[]_libs="${JP2K_LIBS}"
305fi 287fi
306 288
307AC_SUBST([evas_image_loader_$1_cflags]) 289AC_SUBST([evas_image_loader_$1_cflags])