Bug 2652 - configure will create a configuration that does not compile
Summary: configure will create a configuration that does not compile
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: xlib backend (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-04 23:18 UTC by Boris Zbarsky
Modified: 2005-08-22 00:14 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Boris Zbarsky 2005-03-04 23:18:06 UTC
VERSION: Cairo 0.3.0

STEPS TO REPRODUCE:
1) Make sure there is no "fontconfig" package known to pkg-config
2) Configure and build Cairo.

ACTUAL RESULTS:
Configure succeeds, but produces the following output:

checking for fontconfig... checking for Carbon/Carbon.h... (cached) no
[skipped]
cairo will be compiled with the following surface backends:
[skipped]
and the following font backends:
  freetype: no
  atsui: no

When compiling, the following error stops the compile:

cairo/src/cairo_font.c:88:
`CAIRO_FONT_BACKEND_DEFAULT' undeclared (first use in this function)

EXPECTED RESULTS: 
Not having a valid font backend should lead to a configure-time error, if it
will definitely lead to a build-time error.

OTHER INFORMATION:  
The code in cairo/src/cairoint.h does:

749 #ifdef CAIRO_HAS_FT_FONT 
...
754 #define CAIRO_FONT_BACKEND_DEFAULT &cairo_ft_font_backend
755 
756 #elif defined(CAIRO_HAS_ATSUI_FONT)
...
760 #define CAIRO_FONT_BACKEND_DEFAULT &cairo_atsui_font_backend
761 
762 #endif

This should probably have an #else clause that has an appropriate #error.  But
again, this should be getting flagged as a fatal error at configure time.
Comment 1 Carl Worth 2005-03-07 12:42:37 UTC
Thanks for the report. Here's a new block of code to make configure fail
if no font backend is available:

if test x"$use_freetype" != "xyes" && \
   test x"$use_win32"    != "xyes" && \
   test x"$use_atsui"    != "xyes" ; then

   AC_MSG_ERROR([Cairo requires at least one font backend.
                  Please install freetype and fontconfig, then try again:
                  http://freetype.org/    http://fontconfig.org
                ])
fi

I've committed this now.
Comment 2 Carl Worth 2005-08-22 17:14:41 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.


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.