Changing fonts configure.ac

Kristian Høgsberg krh at bitplanet.net
Fri Sep 1 10:11:57 PDT 2006


On 9/1/06, Donnie Berkholz <dberkholz at gentoo.org> wrote:
...
> Kinda screws up the case where you actually don't want to install to the
> "traditional" directories though. Some people prefer installing one
> package per directory in /usr/share/fonts/.

Yeah, but on the other hand it's in-line with how we handle module
installation - the video and input drivers take a
--with-xorg-module-dir option to allow overriding the module dir
location, but then installs into hardcoded subdirectories of that dir.

But I see your point, the other options is to either not add the
suffix when the path is specified on the command line (which screws up
cases where you want the default subdir structure but in a
non-standard place) or add a --with-font-prefix option, but that just
seems like more complexity than I'd like to put in a silly font
configure.ac.

cheers,
Kristian

diff --git a/Makefile.am b/Makefile.am
diff --git a/configure.ac b/configure.ac
index 7297c63..60a1ef9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,14 +37,19 @@ AC_PATH_PROG(MKFONTDIR, mkfontdir)

 m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING],
m4_defn([AC_HELP_STRING]))])

-DEFAULT_FONTDIR=${libdir}/X11/fonts/misc
+PKG_CHECK_MODULES(MAPS, [fontutil])
+
+AC_ARG_WITH(font-prefix,
+       AS_HELP_STRING([--with-font-prefix=PREFIX], [Path to toplevel
font dir]),
+       [FONT_PREFIX="$withval"],
+       [FONT_PREFIX="$(pkg-config --variable=fontdir) fontutil"])
+
 AC_ARG_WITH(fontdir,
        AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to install fonts]),
        [FONTDIR="$withval"],
-       [FONTDIR="$DEFAULT_FONTDIR"])
+       [FONTDIR="$FONT_PREFIX"/misc])
 AC_SUBST(FONTDIR)

-PKG_CHECK_MODULES(MAPS, [fontutil])
 MAPFILES_PATH=$(pkg-config --variable=mapdir fontutil)
 AC_SUBST(MAPFILES_PATH)



More information about the xorg mailing list