1 # autoconf 2.13 / 2.50 compatibility macro
3 # GLIB_AC_DIVERT_BEFORE_HELP(STUFF)
4 # ---------------------------------
5 # Put STUFF early enough so that they are available for $ac_help expansion.
6 # Handle both classic (<= v2.13) and modern autoconf
7 AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP],
8 [ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])],
9 [ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])],
10 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
14 # GTK_ADD_LIB(VAR,LIBNAME)
15 # ---------------------------------
16 # Helper macro to add a -lBlah to a variable, avoiding repeats
17 # Note that this needs to be quoted when used in an enclosing macro
18 AC_DEFUN([GTK_ADD_LIB],
25 # Checks the location of the XML Catalog
28 # Defines XMLCATALOG and XML_CATALOG_FILE substitutions
29 AC_DEFUN([JH_PATH_XML_CATALOG],
31 # check for the presence of the XML catalog
32 AC_ARG_WITH([xml-catalog],
33 AC_HELP_STRING([--with-xml-catalog=CATALOG],
34 [path to xml catalog to use]),,
35 [with_xml_catalog=/etc/xml/catalog])
36 XML_CATALOG_FILE="$with_xml_catalog"
37 AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)])
38 if test -f "$XML_CATALOG_FILE"; then
39 AC_MSG_RESULT([found])
41 AC_MSG_RESULT([not found])
42 AC_MSG_ERROR([XML catalog not found])
44 AC_SUBST([XML_CATALOG_FILE])
46 # check for the xmlcatalog program
47 AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
48 if test "x$XMLCATALOG" = xno; then
49 AC_MSG_ERROR([could not find xmlcatalog program])
53 # Checks if a particular URI appears in the XML catalog
55 # JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
56 AC_DEFUN([JH_CHECK_XML_CATALOG],
58 AC_REQUIRE([JH_PATH_XML_CATALOG])dnl
59 AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
60 if AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
61 AC_MSG_RESULT([found])
65 AC_MSG_RESULT([not found])
67 [AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],