diff options
| author | Dana Jansens <danakj@orodu.net> | 2013-08-10 20:46:27 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2013-08-10 21:59:12 -0400 |
| commit | 4e6c0086a657399d989f2e4849f7b397d7d4efbc (patch) | |
| tree | 64cb34f3a3ee63df40443e39661c33a060953860 /configure.ac | |
| parent | a5eb363f48b75b6eae0a1dc4a6c8e079c9831f92 (diff) | |
Add support for loading SVG icons using librsvg.
This adds a configure option --disable-librsvg, but defaults to
using the library if it is present during configure.
When enabled, Openbox will attempt to load svg image files using
the library, similar to how Imlib2 is used for other image
formats.
Since librsvg uses the libXml2 library, their errors end up in
the same global namespace as Openbox config file parsing. To
avoid this, we reset the libXml current error whenever we start
loading a file, and save the last error that occurred when we
are finished, by storing the error in the ObtXmlInst.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a1833090..49cfd938 100644 --- a/configure.ac +++ b/configure.ac @@ -195,6 +195,36 @@ 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]) + dnl Check for session management X11_SM @@ -233,6 +263,7 @@ AC_MSG_RESULT([Compiling with these options: Startup Notification... $sn_found X Cursor Library... $xcursor_found Session Management... $SM - Imlib2 library... $imlib2_found + Imlib2 Library... $imlib2_found + SVG Support (librsvg)... $librsvg_found ]) AC_MSG_RESULT([configure complete, now type "make"]) |
