[cairo] Rework of cairo.h now committed

Ned Konz ned at squeakland.org
Thu Jan 20 14:02:54 PST 2005


On Thursday 20 January 2005 8:53 am, Carl Worth wrote:
> I've just committed two big changes to how cairo.h works, (that have
> been discussed here in multiple threads). Both of these will require
> application changes.
>
> 1) The public header files will no longer be directly installed into
>    the system include directory. They will now be installed in a
>    subdirectory named "cairo", (eg. in /usr/include/cairo rather than
>    in /usr/include).
>
>    For applications using pkg-config, the change should be mostly
>    transparent, as pkg-config will find the new directory.
>
>    However, user will also need to manually remove the old versions of
>    cairo.h and cairo-features.h from the system include directories in
>    order to prevent them being found first. One good suggestion was to
>    augment "make install" to error out when the old headers are
>    found. I'd be glad for somebody to implement that.
>
> 2) The backend-specific portions of the old monolithic cairo.h have
>    been split out into individual public header files. The new files
>    are:
>
>  cairo-ft.h
>  cairo-glitz.h
>  cairo-pdf.h
>  cairo-png.h
>  cairo-ps.h
>  cairo-xcb.h
>  cairo-xlib.h
>
>    Applications will need to be modified to explicitly include the new
>    header files where appropriate.
>
> For the many bindings and applications hosted within the cairo CVS
> tree, I've tried to update everything that needed it. I did so
> whenever I successfully compiled the module. If you maintain a module
> that still needs changes, then we should work it out so that it is
> easier for me to compile your module. ;-)

There is something odd with the #define @SOMETHING@ lines.
Compiling on a Mac with the latest XCode tools loaded (as well as Fink), this 
is what I get:

~/SqueakVM/libcairo/cairo ned$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking build system type... powerpc-apple-darwin7.7.0
checking host system type... powerpc-apple-darwin7.7.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fl32... no
checking for af77... no
checking for fort77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for lf95... no
checking for g95... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 65536
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... darwin7.7.0 dyld
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... darwin7.7.0 dyld
appending configuration tag "F77" to libtool
checking for ANSI C header files... (cached) yes
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for pkg-config... /sw/bin/pkg-config
checking for xrender >= 0.6... Package xrender was not found in the pkg-config 
search path.
Perhaps you should add the directory containing `xrender.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xrender' found
checking X11/extensions/Xrender.h usability... yes
checking X11/extensions/Xrender.h presence... yes
checking for X11/extensions/Xrender.h... yes
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for xcb... Package xcb was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xcb' found
checking for libpng12... yes
checking PNG_CFLAGS... -I/sw/include/libpng12  
checking PNG_LIBS... -L/sw/lib -lpng12 -lz  
checking for glitz >= 0.3.0... Requested 'glitz >= 0.3.0' but version of 
libglitz is 0.1.5
checking for fontconfig... yes
checking FONTCONFIG_CFLAGS... -I/usr/X11R6/include  
checking FONTCONFIG_LIBS... -L/usr/X11R6/lib -lfontconfig  
checking for libpixman >= 0.1.2... yes
checking PIXMAN_CFLAGS... -I/sw/include  
checking PIXMAN_LIBS... -L/sw/lib -lpixman  
checking for freetype-config... /usr/X11R6/bin/freetype-config
checking freetype2 libtool version... 9.0.3 - OK
checking for uint64_t... yes
checking for uint128_t... no
configure: creating ./config.status
config.status: creating cairo.pc
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/cairo-features.h
config.status: creating test/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

cairo will be compiled with the following backends:
  Xlib: yes
  XCB: no (requires XCB http://freedesktop.org/software/xcb)
  PostScript: yes
  PDF: yes
  PNG: yes
  glitz: no (requires glitz http://freedesktop.org/software/glitz)

~/SqueakVM/libcairo/cairo ned$ make
make  all-recursive
Making all in src
source='cairo.c' object='cairo.lo' libtool=yes \
depfile='.deps/cairo.Plo' tmpdepfile='.deps/cairo.TPlo' \
depmode=gcc3 /bin/sh ../depcomp \
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. 
-I/sw/include/libpng12    -I/usr/X11R6/include   -I/sw/include   
-I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -Wall -Wpointer-arith 
-Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations 
 -Wnested-externs -fno-strict-aliasing    -g -O2 -c -o cairo.lo `test -f 
'cairo.c' || echo './'`cairo.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I/sw/include/libpng12 
-I/usr/X11R6/include -I/sw/include -I/usr/X11R6/include 
-I/usr/X11R6/include/freetype2 -Wall -Wpointer-arith -Wstrict-prototypes 
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs 
-fno-strict-aliasing -g -O2 -c cairo.c -MT cairo.lo -MD -MP 
-MF .deps/cairo.TPlo  -fno-common -DPIC -o .libs/cairo.o
In file included from cairo.h:40,
                 from cairoint.h:59,
                 from cairo.c:38:
cairo-features.h:52:9: macro names must be identifiers
cairo-features.h:54:9: macro names must be identifiers
make[2]: *** [cairo.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

~/SqueakVM/libcairo/cairo ned$ cat src/cairo-features.h

#ifndef CAIRO_FEATURES_H
#define CAIRO_FEATURES_H

#define CAIRO_HAS_PS_SURFACE

#define CAIRO_HAS_PDF_SURFACE

#define CAIRO_HAS_PNG_SURFACE

#define CAIRO_HAS_XLIB_SURFACE

#define CAIRO_HAS_NO_XCB_SURFACE

#define CAIRO_HAS_NO_GLITZ_SURFACE

#define @FT_FONT_FEATURE@

#define @ATSUI_FONT_FEATURE@

#define CAIRO_DO_SANITY_CHECKING

#endif


-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the cairo mailing list