aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-xml-check.m4
blob: 1caad1009fba8076a0a8a9549278420b0c0dac82 (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
27
28
29
30
31
32
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
    GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml`
    AC_SUBST(GNOME_XML_CFLAGS)
    AC_CHECK_LIB(xml, xmlNewDoc, [
        $1
        GNOME_XML_LIB=`$GNOME_CONFIG --libs xml`
    ], [
        if test x$2 = xfailure; then 
            AC_MSG_ERROR(Could not link sample xml program)
        fi
    ], `$GNOME_CONFIG --libs xml`)
    AC_SUBST(GNOME_XML_LIB)
])

AC_DEFUN([GNOME_XML_CHECK], [
    GNOME_XML_HOOK([],failure)
])
* - Remove easy_install dependencymva2014-06-181-4/+4 * The FreeBSD x11@ and graphics team proudly presentszeising2014-04-171-0/+1 * Support stagedir.vanilla2014-01-111-1/+0 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * The FreeBSD x11 team proudly presentszeising2013-05-251-7/+2 * - Get Rid MD5 supportmiwi2011-03-191-1/+0 * - Update to 1.1gahr2010-06-122-4/+4