1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-10-27 05:10:11 -04:00
icecast-server/m4/xiph_xml2.m4
Karl Heyes 54ff6f6b63 move xml/xslt detection into the m4 tree
svn path=/trunk/m4/; revision=5148
2003-07-17 10:46:03 +00:00

59 lines
1.8 KiB
Plaintext

dnl XIPH_PATH_XML
dnl Populate XML_CFLAGS and XML_LIBS with infomation for
dnl linking with libxml2
AC_DEFUN([XIPH_PATH_XML],
[dnl
AC_MSG_RESULT([checking for XML configuration])
AC_ARG_VAR([XMLCONFIG],[XML configuration program])
AC_ARG_WITH(xml-config,
[AC_HELP_STRING([--with-xml-config=PATH],
[use xml-config in PATH to find libxml])],
[XMLCONFIG="$withval"],
[AC_PATH_PROGS(XMLCONFIG, [xml2-config xml-config], "")]
)
if test "x$XMLCONFIG" = "x"; then
AC_MSG_ERROR([XML configuration could not be found])
fi
if ! test -x "$XMLCONFIG"; then
AC_MSG_ERROR([$XMLCONFIG cannot be executed])
fi
XML_LIBS="$($XMLCONFIG --libs)"
XML_CFLAGS="$($XMLCONFIG --cflags)"
ac_xml_save_LIBS="$LIBS"
ac_xml_save_CFLAGS="$CFLAGS"
LIBS="$XML_LIBS $LIBS"
CFLAGS="$CFLAGS $XML_CFLAGS"
AC_CHECK_FUNC(xmlParseFile,, [AC_MSG_ERROR([Unable to link with libxml])])
CFLAGS="$ac_xml_save_CFLAGS"
LIBS="$ac_xml_save_LIBS"
])
dnl XIPH_PATH_XSLT
dnl Populate XSLT_CFLAGS and XSLT_LIBS with infomation for
dnl linking with libxml2
AC_DEFUN([XIPH_PATH_XSLT],
[dnl
AC_ARG_VAR([XSLTCONFIG],[XSLT configuration program])
AC_ARG_WITH(xslt-config,
[AC_HELP_STRING([--with-xslt-config=PATH],
[use xslt-config in PATH to find libxslt])],
[XSLTCONFIG="$withval"],
[AC_PATH_PROGS(XSLTCONFIG, [xslt-config], "")]
)
if test "x$XSLTCONFIG" = "x"; then
AC_MSG_ERROR([XSLT configuration could not be found])
fi
if ! test -x "$XSLTCONFIG"; then
AC_MSG_ERROR([$XSLTCONFIG cannot be executed])
fi
XSLT_LIBS="$($XSLTCONFIG --libs)"
XSLT_CFLAGS="$($XSLTCONFIG --cflags)"
ac_xslt_save_LIBS="$LIBS"
ac_xslt_save_CFLAGS="$CFLAGS"
LIBS="$XSLT_LIBS $LIBS"
CFLAGS="$CFLAGS $XSLT_CFLAGS"
AC_CHECK_FUNC(xsltParseStylesheetFile,,[AC_MSG_ERROR([Unable to link with libxslt])])
CFLAGS="$ac_xslt_save_CFLAGS"
LIBS="$ac_xslt_save_LIBS"
])