+AC_ARG_ENABLE(imlib2,
+ AC_HELP_STRING(
+ [--disable-imlib2],
+ [disable use of Imlib2 image library for loading icons. [default=enabled]]
+ ),
+ [enable_imlib2=$enableval],
+ [enable_imlib2=yes]
+)
+
+if test "$enable_imlib2" = yes; then
+PKG_CHECK_MODULES(IMLIB2, [imlib2],
+ [
+ AC_DEFINE(USE_IMLIB2, [1], [Use Imlib2 image library])
+ AC_SUBST(IMLIB2_CFLAGS)
+ AC_SUBST(IMLIB2_LIBS)
+ # export it for the pkg-config file
+ PKG_CONFIG_IMLIB=imlib2
+ AC_SUBST(PKG_CONFIG_IMLIB)
+ imlib2_found=yes
+ ],
+ [
+ imlib2_found=no
+ ]
+)
+else
+ imlib2_found=no
+fi
+
+AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
+
+AC_ARG_ENABLE(librsvg,
+ AC_HELP_STRING(
+ [--disable-librsvg],
+ [disable use of SVG image files for loading icons. [default=enabled]]
+ ),
+ [enable_librsvg=$enableval],
+ [enable_librsvg=yes]
+)
+
+if test "$enable_librsvg" = yes; then
+PKG_CHECK_MODULES(LIBRSVG, [librsvg-2.0],
+ [
+ AC_DEFINE(USE_LIBRSVG, [1], [Use SVG image files])
+ AC_SUBST(LIBRSVG_CFLAGS)
+ AC_SUBST(LIBRSVG_LIBS)
+ # export it for the pkg-config file
+ PKG_CONFIG_LIBRSVG=librsvg-2.0
+ AC_SUBST(PKG_CONFIG_LIBRSVG)
+ librsvg_found=yes
+ ],
+ [
+ librsvg_found=no
+ ]
+)
+else
+ librsvg_found=no
+fi
+
+AM_CONDITIONAL(USE_LIBRSVG, [test $librsvg_found = yes])
+