Bug 18 - X_FONT_DIR defaults to bogus value on several platforms
Summary: X_FONT_DIR defaults to bogus value on several platforms
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.1
Hardware: Alpha All
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-28 15:49 UTC by Tim Mooney
Modified: 2007-01-23 20:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tim Mooney 2003-01-28 15:49:43 UTC
[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
issue...]

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.

or

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.
Comment 1 Keith Packard 2003-02-05 18:34:42 UTC
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?
Comment 2 Tim Mooney 2003-02-13 12:09:14 UTC
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
  fi
Comment 3 Keith Packard 2003-02-28 21:39:52 UTC
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
configure.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.