[I realize that the user running configure can force the default font dir via a
configure arg, but some people building fontconfig might not understand the
fontconfig's configure.in calls AC_PATH_X, and then later uses $x_libraries to
set the default location to search for X fonts.
For platforms that install their X-related libraries in directories that the
linker searches anyway (e.g. /usr/lib or some other standard path), $x_libraries
is not set at all by AC_PATH_X. Aside: same behavior for $x_includes, but that
doesn't matter for fontconfig's configure.in.
This means that on platforms like Tru64 and IRIX, $x_includes is empty, and
X_FONT_DIR will end up being /X11/fonts.
configure could be improved by:
1) testing if X_FONT_DIR exists, and warning the user if it doesn't.
2) encoding platform-specific knowledge about where to look for X fonts in
a `case $build_host ... esac' structure in configure.in, to help configure
in the cases where it gets it wrong.
I would be happy to supply patches that accomplish this or some other behavior
you choose, if you just let me know what you think should be done.
I suggest that the best solution would be to have a default font directory
computed from the X paths, but to complain if it doesn't exist and also provide
an override to set the path explicitly from the configure command line. Does
this seem sensible?
That seems reasonable.
The check should probably be something like
if test X"$x_libraries" = X"" ; then
# $x_libraries is not set, so the libraries are in a directory that's
# searched by the linker.
# do something here
The new automake configuration scheme looks for X fonts and adds nothing
if it can't find the directory, or if --without-x-fonts is passed to