diff options
author | Nokis Mavrogiannopoulos | 2008-03-05 17:38:09 +0000 |
---|---|---|
committer | Nokis Mavrogiannopoulos | 2008-03-05 17:38:09 +0000 |
commit | 2cb49bd5137176e1445550399b6e9592607858a3 (patch) | |
tree | e7c8933ce56ecdac588fbaa9af0c4beb03850c3e /m4/librsvg.m4 | |
parent | fc05b4b880d4247da9353cae6be44180dee17b23 (diff) |
Diffstat (limited to 'm4/librsvg.m4')
-rw-r--r-- | m4/librsvg.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/m4/librsvg.m4 b/m4/librsvg.m4 new file mode 100644 index 0000000..c8d2bf0 --- /dev/null +++ b/m4/librsvg.m4 | |||
@@ -0,0 +1,29 @@ | |||
1 | dnl Check for librsvg libraries | ||
2 | dnl CHECK_RSVG(MINIMUM-VERSION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) | ||
3 | AC_DEFUN([CHECK_RSVG], | ||
4 | [dnl | ||
5 | |||
6 | pname=librsvg-2.0 | ||
7 | |||
8 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) | ||
9 | |||
10 | if test x$PKG_CONFIG = xno ; then | ||
11 | ifelse([$3], , AC_MSG_ERROR([pkg-config not found. pkg-config is required for librsvg]), $3) | ||
12 | fi | ||
13 | |||
14 | AC_MSG_CHECKING(for librsvg - version >= $1) | ||
15 | |||
16 | if $PKG_CONFIG --atleast-version=$1 $pname; then | ||
17 | RSVG_LDFLAGS=`$PKG_CONFIG $pname --libs-only-L` | ||
18 | RSVG_LIBS=`$PKG_CONFIG $pname --libs-only-l --libs-only-other` | ||
19 | RSVG_CFLAGS=`$PKG_CONFIG $pname --cflags` | ||
20 | RSVG_VERSION=`$PKG_CONFIG $pname --modversion` | ||
21 | AC_SUBST(RSVG_LDFLAGS) | ||
22 | AC_SUBST(RSVG_LIBS) | ||
23 | AC_SUBST(RSVG_CFLAGS) | ||
24 | AC_SUBST(RSVG_VERSION) | ||
25 | ifelse([$2], , AC_MSG_RESULT([yes]), $2) | ||
26 | else | ||
27 | ifelse([$3], , AC_MSG_ERROR([librsvg >=$1 is not installed.]), $3) | ||
28 | fi | ||
29 | ]) | ||