[PATCH:xserver] Use fontutil macros to determine default font path

Alan Coopersmith Alan.Coopersmith at Sun.COM
Tue Oct 13 18:34:09 PDT 2009


Thanks - I was planning to do this once the fontutil macros had gotten out there
and distributed.   I'd also like to see a check like the one in app/xfs for
/etc/X11/fontpath.d and using that as a catalogue: entry if it exists, but that
can be done as a separate patch.

Also I've been using m4_fatal instead of AC_FATAL, as per a discussion a while
ago that it stops autoconf from generating the bad configure, instead of letting
configure get built if it might not be usable.

	-alan-

Yaakov (Cygwin/X) wrote:
> From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
> 
> With font-util 1.1, the default font path has changed, and macros are
> provided to determine the configured path.  xserver should use these
> macros as well to provide a default which is more likely to be correct.
> 
> This adds a build-time (or at least an autoconf/autogen time) dependency
> on font-util, and changes the --with-fontdir argument to --with-fontrootdir.
> 
> Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
> ---
>  configure.ac |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index fa454fa..7c967d0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -36,6 +36,9 @@ AM_MAINTAINER_MODE
>  m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
>  XORG_MACROS_VERSION(1.3)
>  
> +m4_ifndef([XORG_FONT_MACROS_VERSION], [AC_FATAL([must install fontutil 1.1 or later before running autoconf/autogen])])
> +XORG_FONT_MACROS_VERSION(1.1)
> +
>  dnl this gets generated by autoheader, and thus contains all the defines.  we
>  dnl don't ever actually use it, internally.
>  AC_CONFIG_HEADERS(include/do-not-use-config.h)
> @@ -74,6 +77,7 @@ XORG_PROG_RAWCPP
>  AC_PATH_PROG(SED,sed)
>  
>  XORG_DEFAULT_OPTIONS
> +XORG_FONTROOTDIR
>  # Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow
>  # easier overrides at build time.
>  XSERVER_CFLAGS='$(CWARNFLAGS)'
> @@ -487,10 +491,7 @@ AC_ARG_WITH(os-vendor,       AS_HELP_STRING([--with-os-vendor=OSVENDOR], [Name o
>  AC_ARG_WITH(builderstring,   AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]),
>  				[ BUILDERSTRING="$withval" ]
>  				[ ])
> -AC_ARG_WITH(fontdir,         AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to top level dir where fonts are installed (default: ${libdir}/X11/fonts)]),
> -                                [ FONTDIR="$withval" ],
> -                                [ FONTDIR="${libdir}/X11/fonts" ])
> -DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/"
> +DEFAULT_FONT_PATH="${FONTROOTDIR}/misc/,${FONTROOTDIR}/TTF/,${FONTROOTDIR}/OTF/,${FONTROOTDIR}/Type1/,${FONTROOTDIR}/100dpi/,${FONTROOTDIR}/75dpi/"
>  case $host_os in
>  	darwin*)    DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
>  esac
> @@ -1180,7 +1181,7 @@ fi
>  AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
>  AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path])
>  AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path])
> -AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
> +AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path])
>  AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
>  AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name])
>  AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name])

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering



More information about the xorg-devel mailing list