@@ -36,45 +36,13 @@ CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
CAIRO_DEPENDENCIES = host-pkg-config fontconfig pixman
-ifeq ($(BR2_PACKAGE_DIRECTFB),y)
- CAIRO_CONF_OPT += --enable-directfb
- CAIRO_DEPENDENCIES += directfb
-else
- CAIRO_CONF_OPT += --disable-directfb
-endif
+$(eval $(call CONF_PKG_ENABLE,CAIRO,directfb))
-ifeq ($(BR2_PACKAGE_XORG7),y)
- CAIRO_CONF_OPT += --enable-xlib --with-x
- CAIRO_DEPENDENCIES += xserver_xorg-server
-else
- CAIRO_CONF_OPT += --disable-xlib --without-x
-endif
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_XORG7),xserver_xorg-server,--enable-xlib --with-x,--disable-xlib --without-x))
-ifeq ($(BR2_PACKAGE_CAIRO_PS),y)
- CAIRO_CONF_OPT += --enable-ps
- CAIRO_DEPENDENCIES += zlib
-else
- CAIRO_CONF_OPT += --disable-ps
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_PDF),y)
- CAIRO_CONF_OPT += --enable-pdf
- CAIRO_DEPENDENCIES += zlib
-else
- CAIRO_CONF_OPT += --disable-pdf
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_PNG),y)
- CAIRO_CONF_OPT += --enable-png
- CAIRO_DEPENDENCIES += libpng
-else
- CAIRO_CONF_OPT += --disable-png
-endif
-
-ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
- CAIRO_CONF_OPT += --enable-svg
-else
- CAIRO_CONF_OPT += --disable-svg
-endif
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_PS),zlib,ps))
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_PDF),zlib,pdf))
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_PNG),libpng,png))
+$(eval $(call CONF_ENABLE,CAIRO,$(BR2_PACKAGE_CAIRO_SVG),,svg))
$(eval $(call AUTOTARGETS))