aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-xml-check.m4
blob: 5788770905b2611216e6fc7115736a902f608fb2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
dnl
dnl GNOME_XML_HOOK (script-if-xml-found, failflag)
dnl
dnl If failflag is "failure", script aborts due to lack of XML
dnl 
dnl Check for availability of the libxml library
dnl the XML parser uses libz if available too
dnl

AC_DEFUN([GNOME_XML_HOOK],[
    AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
    if test "$GNOME_CONFIG" = no; then
        if test x$2 = xfailure; then
            AC_MSG_ERROR(Could not find gnome-config)
        fi
    fi
    AC_CHECK_LIB(xml, xmlNewDoc, [$1], [
        if text x$2 = failure; then 
            AC_MSG_ERROR(Could not link sample xml program)
        fi
    ], gnome-config --libs xml)
])

AC_DEFUN([GNOME_XML_CHECK], [
    GNOME_XML_HOOK([],failure)
])