File: acinclude.m4

package info (click to toggle)
libxml%2B%2B 1.0.4-1.2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,448 kB
  • ctags: 442
  • sloc: sh: 8,219; cpp: 3,095; makefile: 248; xml: 186
file content (40 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download | duplicates (3)
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
33
34
35
36
37
38
39
40
dnl AM_LIBXML([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])

AC_DEFUN(AM_LIBXML,
[

AC_MSG_CHECKING(for libxml version >= 2.5.1)

if xml2-config --libs print > /dev/null 2>&1; then
    vers=`xml2-config --version | sed -e "s/libxml //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
    if test $vers -ge 2005001; then
        AC_MSG_RESULT(yes)
        LIBXML_CFLAGS=`xml2-config --cflags`
        LIBXML_LIBS=`xml2-config --libs`
        AC_SUBST(LIBXML_CFLAGS)
        AC_SUBST(LIBXML_LIBS)
        ifelse([$1], , :, [$1])
    else
        AC_MSG_RESULT(no)
        ifelse([$2], , , [$2])
    fi
elif xml-config --libs print > /dev/null 2>&1; then
    vers=`xml-config --version | sed -e "s/libxml //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'`
    if test $vers -ge 2000000; then
        AC_MSG_RESULT(yes)
        LIBXML_CFLAGS=`xml-config --cflags`
        LIBXML_LIBS=`xml-config --libs`
        AC_SUBST(LIBXML_CFLAGS)
        AC_SUBST(LIBXML_LIBS)
        ifelse([$1], , :, [$1])
    else
        AC_MSG_RESULT(no)
        ifelse([$2], , , [$2])
    fi
else
    AC_MSG_RESULT(no)
    ifelse([$2], , , [$2])
fi

])