aboutsummaryrefslogtreecommitdiffstats
path: root/m4/librsvg.m4
diff options
context:
space:
mode:
authorGravatar Nokis Mavrogiannopoulos 2008-02-20 19:53:44 +0000
committerGravatar Nokis Mavrogiannopoulos 2008-02-20 19:53:44 +0000
commit4dd789740526f169c5acf821d220a38e35d42389 (patch)
treeb71cda083d1ed8ceb2db2fb815eadf042295c348 /m4/librsvg.m4
parentb4d4a1e816332777d3196b50b0be33fc31aef47b (diff)
added new m4 directory
Diffstat (limited to 'm4/librsvg.m4')
-rw-r--r--m4/librsvg.m429
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 @@
1dnl Check for librsvg libraries
2dnl CHECK_RSVG(MINIMUM-VERSION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
3AC_DEFUN([CHECK_RSVG],
4[dnl
5
6pname=librsvg-2.0
7
8AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
9
10if test x$PKG_CONFIG = xno ; then
11 ifelse([$3], , AC_MSG_ERROR([pkg-config not found. pkg-config is required for librsvg]), $3)
12fi
13
14AC_MSG_CHECKING(for librsvg - version >= $1)
15
16if $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)
26else
27 ifelse([$3], , AC_MSG_ERROR([librsvg >=$1 is not installed.]), $3)
28fi
29])