gtk/acinclude.m4
Owen Taylor 88c1c94651 Requires glib-2.3.0, pango-1.2.0.
Sat Aug  2 12:53:16 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Requires glib-2.3.0, pango-1.2.0.

        * configure.in: Require Xft version 2,
        remove code for handling older versions of pango and Xft.
        Many miscellaneous improvements to X checks

        * acinclude.m4: Add GTK_ADD_LIB() macro for adding
        a library to a variable, avoiding dups.

        * gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display):
        Always load "fixed"

        * gdk/x11/gdk*-x11.[ch]: Remove support for Xft1 and
        for pangox.
2003-08-02 17:50:09 +00:00

71 lines
2.2 KiB
Plaintext

# autoconf 2.13 / 2.50 compatibility macro
# GLIB_AC_DIVERT_BEFORE_HELP(STUFF)
# ---------------------------------
# Put STUFF early enough so that they are available for $ac_help expansion.
# Handle both classic (<= v2.13) and modern autoconf
AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP],
[ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])],
[ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])],
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
$1
AC_DIVERT_POP()])])])
# GTK_ADD_LIB(VAR,LIBNAME)
# ---------------------------------
# Helper macro to add a -lBlah to a variable, avoiding repeats
# Note that this needs to be quoted when used in an enclosing macro
AC_DEFUN([GTK_ADD_LIB],
[ case "$$1 " in
*-l$2[[\ \ ]]*) ;;
*) $1="-l$2 $$1" ;;
esac
])
# Checks the location of the XML Catalog
# Usage:
# JH_PATH_XML_CATALOG
# Defines XMLCATALOG and XML_CATALOG_FILE substitutions
AC_DEFUN([JH_PATH_XML_CATALOG],
[
# check for the presence of the XML catalog
AC_ARG_WITH([xml-catalog],
AC_HELP_STRING([--with-xml-catalog=CATALOG],
[path to xml catalog to use]),,
[with_xml_catalog=/etc/xml/catalog])
XML_CATALOG_FILE="$with_xml_catalog"
AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)])
if test -f "$XML_CATALOG_FILE"; then
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([XML catalog not found])
fi
AC_SUBST([XML_CATALOG_FILE])
# check for the xmlcatalog program
AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
if test "x$XMLCATALOG" = xno; then
AC_MSG_ERROR([could not find xmlcatalog program])
fi
])
# Checks if a particular URI appears in the XML catalog
# Usage:
# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
AC_DEFUN([JH_CHECK_XML_CATALOG],
[
AC_REQUIRE([JH_PATH_XML_CATALOG])dnl
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
if AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
AC_MSG_RESULT([found])
ifelse([$3],,,[$3
])dnl
else
AC_MSG_RESULT([not found])
ifelse([$4],,
[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],
[$4])
fi
])