mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-06-09 03:58:23 +02:00
Make configure generate cairo-features.h. Generate AC_DEFINE and AM_CONDITIONALS
for all CAIRO_HAS_* in CAIRO_BACKEND_ENABLE.
This commit is contained in:
parent
c6c1da2a23
commit
c88bab66ab
3 changed files with 96 additions and 190 deletions
198
configure.in
198
configure.in
|
|
@ -44,7 +44,6 @@ CAIRO_VERSION_MICRO=cairo_version_micro()
|
|||
AC_SUBST(CAIRO_VERSION_MAJOR)
|
||||
AC_SUBST(CAIRO_VERSION_MINOR)
|
||||
AC_SUBST(CAIRO_VERSION_MICRO)
|
||||
AC_SUBST(CAIRO_VERSION_OTHER)
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
|
|
@ -88,7 +87,7 @@ PKG_PROG_PKG_CONFIG
|
|||
dnl ===========================================================================
|
||||
dnl
|
||||
dnl Define a macro to enable backends.
|
||||
dnl - Macro: CAIRO_BACKEND_ENABLE (ID, NAME, DEFAULT, NAMESPACE, REQUIRES, COMMANDS-TO-CHECK-IT)
|
||||
dnl - Macro: CAIRO_BACKEND_ENABLE (ID, NAME, NAMESPACE, FEATURE, DEFAULT, REQUIRES, COMMANDS-TO-CHECK-IT)
|
||||
dnl
|
||||
dnl Where COMMANDS should set $use_ID to something other than yes if the
|
||||
dnl backend cannot be built.
|
||||
|
|
@ -100,7 +99,7 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
|
|||
[AC_ARG_ENABLE([$1],
|
||||
AS_HELP_STRING([--enable-$1=@<:@no/auto/yes@:>@],
|
||||
[Enable cairo's $2 backend @<:@default=$3@:>@]),
|
||||
use_$1=$enableval, use_$1=$3)
|
||||
use_$1=$enableval, use_$1=$5)
|
||||
if test "x$use_$1" = xno; then
|
||||
use_$1="no (disabled, use --enable-$1 to enable)"
|
||||
else
|
||||
|
|
@ -108,7 +107,7 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
|
|||
[echo
|
||||
saved_use_$1=$use_$1
|
||||
use_$1=yes
|
||||
$6
|
||||
$7
|
||||
cairo_cv_use_$1=$use_$1
|
||||
use_$1=$saved_use_$1
|
||||
AC_MSG_CHECKING([whether cairo's $1 backend could be enabled])])
|
||||
|
|
@ -128,27 +127,32 @@ AC_DEFUN([CAIRO_BACKEND_ENABLE],
|
|||
;;
|
||||
esac
|
||||
if test "x$use_$1" = xyes; then
|
||||
AC_MSG_NOTICE([creating src/cairo-$4.pc])
|
||||
mkdir src
|
||||
CAIRO_FEATURES="$CAIRO_FEATURES $4"
|
||||
AC_MSG_NOTICE([creating src/cairo-$3.pc])
|
||||
mkdir -p src
|
||||
AS_IF([sed \
|
||||
-e "s/@backend_name@/$4/g" \
|
||||
-e "s/@backend_name@/$3/g" \
|
||||
-e "s/@Backend_Name@/$2/g" \
|
||||
-e "s/@BACKEND_REQUIRES@/$5/g" \
|
||||
-e "s/@BACKEND_REQUIRES@/$6/g" \
|
||||
-e "s,@prefix@,$prefix,g" \
|
||||
-e "s,@exec_prefix@,$exec_prefix,g" \
|
||||
-e "s,@libdir@,$libdir,g" \
|
||||
-e "s,@includedir@,$includedir,g" \
|
||||
-e "s,@VERSION@,$VERSION,g" \
|
||||
$srcdir/src/cairo-backend.pc.in > src/cairo-$4.pc],,[
|
||||
rm -f "src/cairo-$4.pc"
|
||||
AC_MSG_ERROR([failed creating src/cairo-$4.pc])
|
||||
$srcdir/src/cairo-backend.pc.in > src/cairo-$3.pc],,[
|
||||
rm -f "src/cairo-$3.pc"
|
||||
AC_MSG_ERROR([failed creating src/cairo-$3.pc])
|
||||
])
|
||||
fi
|
||||
fi])
|
||||
fi
|
||||
AM_CONDITIONAL(CAIRO_HAS_$4, test "x$use_$1" = xyes)
|
||||
])
|
||||
|
||||
CAIRO_FEATURES=""
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(xlib, Xlib, auto, xlib, [xrender], [
|
||||
CAIRO_BACKEND_ENABLE(xlib, Xlib, xlib, XLIB_SURFACE, auto, [xrender], [
|
||||
dnl Check for Xrender header files if the Xrender package is not installed:
|
||||
PKG_CHECK_MODULES(XRENDER, xrender >= 0.6, [
|
||||
XRENDER_REQUIRES=xrender], [
|
||||
|
|
@ -159,43 +163,28 @@ CAIRO_BACKEND_ENABLE(xlib, Xlib, auto, xlib, [xrender], [
|
|||
_CHECK_FUNCS_WITH_FLAGS(XrmFinalize, $XRENDER_CFLAGS, $XRENDER_LIBS)
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_XLIB_SURFACE, test "x$use_xlib" = "xyes")
|
||||
if test "x$use_xlib" = "xyes"; then
|
||||
XLIB_SURFACE_FEATURE="#define CAIRO_HAS_XLIB_SURFACE 1"
|
||||
fi
|
||||
AC_SUBST(XLIB_SURFACE_FEATURE)
|
||||
|
||||
AC_SUBST(XRENDER_REQUIRES)
|
||||
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $XRENDER_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $XRENDER_LIBS"
|
||||
|
||||
CAIRO_BACKEND_ENABLE(quartz, Quartz, no, quartz, [], [
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(quartz, Quartz, quartz, QUARTZ_SURFACE, no, [], [
|
||||
dnl There is no pkgconfig for quartz; lets do a header check
|
||||
AC_CHECK_HEADER(Carbon/Carbon.h, [use_quartz=yes], [use_quartz="no (Carbon headers not found)"])
|
||||
QUARTZ_LIBS="-Xlinker -framework -Xlinker Carbon"
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_QUARTZ_SURFACE, test "x$use_quartz" = "xyes")
|
||||
if test "x$use_quartz" = "xyes"; then
|
||||
QUARTZ_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_SURFACE 1"
|
||||
QUARTZ_LIBS="-Xlinker -framework -Xlinker Carbon"
|
||||
fi
|
||||
AC_SUBST(QUARTZ_SURFACE_FEATURE)
|
||||
CAIRO_LIBS="$CAIRO_LIBS $QUARTZ_LIBS"
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(xcb, XCB, no, xcb, [xcb xcb-render], [
|
||||
CAIRO_BACKEND_ENABLE(xcb, XCB, xcb, XCB_SURFACE, no, [xcb xcb-render], [
|
||||
PKG_CHECK_MODULES(XCB, xcb xcb-render, [use_xcb=yes], [
|
||||
use_xcb="no (requires XCB http://xcb.freedesktop.org)"])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_XCB_SURFACE, test "x$use_xcb" = "xyes")
|
||||
if test "x$use_xcb" = "xyes"; then
|
||||
XCB_SURFACE_FEATURE="#define CAIRO_HAS_XCB_SURFACE 1"
|
||||
fi
|
||||
AC_SUBST(XCB_SURFACE_FEATURE)
|
||||
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $XCB_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $XCB_LIBS"
|
||||
|
||||
|
|
@ -211,7 +200,7 @@ case "$host" in
|
|||
;;
|
||||
esac
|
||||
|
||||
CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, auto, win32, [], [
|
||||
CAIRO_BACKEND_ENABLE(win32, Microsoft Windows, win32, WIN32_SURFACE, auto, [], [
|
||||
case "$host" in
|
||||
*-*-mingw*|*-*-cygwin*)
|
||||
use_win32=yes
|
||||
|
|
@ -227,23 +216,15 @@ if test "x$use_win32" = "xyes"; then
|
|||
CAIRO_LIBS="$CAIRO_LIBS -lgdi32 -lmsimg32"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_WIN32_SURFACE, test "x$use_win32" = "xyes")
|
||||
if test "x$use_win32" = "xyes"; then
|
||||
WIN32_SURFACE_FEATURE="#define CAIRO_HAS_WIN32_SURFACE 1"
|
||||
fi
|
||||
AC_SUBST(WIN32_SURFACE_FEATURE)
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_WIN32_FONT, test "x$use_win32" = "xyes")
|
||||
if test "x$use_win32" = "xyes"; then
|
||||
WIN32_FONT_FEATURE="#define CAIRO_HAS_WIN32_FONT 1"
|
||||
fi
|
||||
AC_SUBST(WIN32_FONT_FEATURE)
|
||||
CAIRO_BACKEND_ENABLE(win32_font, Microsoft Windows Fonts, win32-font, WIN32_FONT, auto, [], [
|
||||
use_win32_font=$use_win32
|
||||
])
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
|
||||
CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, no, beos, [], [
|
||||
CAIRO_BACKEND_ENABLE(beos, BeOS/Zeta, beos, BEOS_SURFACE, no, [], [
|
||||
case "$host" in
|
||||
*-*-beos)
|
||||
use_beos=yes
|
||||
|
|
@ -261,16 +242,10 @@ if test "x$use_beos" = "xyes"; then
|
|||
AC_CHECK_LIB(zeta,main,CAIRO_LIBS="$CAIRO_LIBS -lzeta")
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_BEOS_SURFACE, test "x$use_beos" = "xyes")
|
||||
if test "x$use_beos" = "xyes"; then
|
||||
BEOS_SURFACE_FEATURE="#define CAIRO_HAS_BEOS_SURFACE 1"
|
||||
fi
|
||||
AC_SUBST(BEOS_SURFACE_FEATURE)
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(png, PNG, yes, png, [], [
|
||||
CAIRO_BACKEND_ENABLE(png, PNG, png, PNG_FUNCTIONS, yes, [], [
|
||||
use_png=no
|
||||
# libpng13 is GnuWin32's libpng-1.2.8 :-(
|
||||
for l in libpng12 libpng13 libpng10 ; do
|
||||
|
|
@ -289,13 +264,11 @@ CAIRO_BACKEND_ENABLE(png, PNG, yes, png, [], [
|
|||
fi
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_PNG_FUNCTIONS, test "x$use_png" = "xyes")
|
||||
if test "x$use_png" = "xyes"; then
|
||||
PNG_FUNCTIONS_FEATURE="#define CAIRO_HAS_PNG_FUNCTIONS 1"
|
||||
:
|
||||
else
|
||||
AC_MSG_WARN([*** To run the tests, cairo must be built with png support ***])
|
||||
fi
|
||||
AC_SUBST(PNG_FUNCTIONS_FEATURE)
|
||||
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $PNG_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $PNG_LIBS"
|
||||
|
|
@ -304,7 +277,7 @@ AC_SUBST(PNG_REQUIRES)
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(glitz, glitz, no, glitz, [glitz], [
|
||||
CAIRO_BACKEND_ENABLE(glitz, glitz, glitz, GLITZ_SURFACE, no, [glitz], [
|
||||
PKG_CHECK_MODULES(GLITZ, glitz >= 0.5.1, [
|
||||
GLITZ_REQUIRES=glitz
|
||||
use_glitz=yes], [use_glitz="no (requires glitz http://freedesktop.org/Software/glitz)"])
|
||||
|
|
@ -339,12 +312,6 @@ AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_EGL_SURFACE, test "x$have_glitz_egl" = "xyes
|
|||
AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_GLX_SURFACE, test "x$have_glitz_glx" = "xyes")
|
||||
AM_CONDITIONAL(CAIRO_CAN_TEST_GLITZ_WGL_SURFACE, test "x$have_glitz_wgl" = "xyes")
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_GLITZ_SURFACE, test "x$use_glitz" = "xyes")
|
||||
if test "x$use_glitz" = "xyes"; then
|
||||
GLITZ_SURFACE_FEATURE="#define CAIRO_HAS_GLITZ_SURFACE 1"
|
||||
fi
|
||||
AC_SUBST(GLITZ_SURFACE_FEATURE)
|
||||
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $GLITZ_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $GLITZ_LIBS"
|
||||
|
||||
|
|
@ -352,23 +319,17 @@ AC_SUBST(GLITZ_REQUIRES)
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(directfb, directfb, no, directfb, [directfb], [
|
||||
CAIRO_BACKEND_ENABLE(directfb, directfb, directfb, DIRECTFB_SURFACE, no, [directfb], [
|
||||
PKG_CHECK_MODULES(DIRECTFB, directfb, [use_directfb=yes], [
|
||||
use_directfb="no (requires directfb http://www.directfb.org)"])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_DIRECTFB_SURFACE, test "x$use_directfb" = "xyes")
|
||||
if test "x$use_directfb" = "xyes"; then
|
||||
DIRECTFB_SURFACE_FEATURE="#define CAIRO_HAS_DIRECTFB_SURFACE 1"
|
||||
fi
|
||||
AC_SUBST(DIRECTFB_SURFACE_FEATURE)
|
||||
|
||||
CAIRO_CFLAGS="$CAIRO_CFLAGS $DIRECTFB_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $DIRECTFB_LIBS"
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(freetype, freetype font, auto, ft, [freetype2 fontconfig], [
|
||||
CAIRO_BACKEND_ENABLE(freetype, freetype font, ft, FT_FONT, auto, [freetype2 fontconfig], [
|
||||
PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
|
||||
[use_freetype=yes], [use_freetype=no])
|
||||
_CHECK_FUNCS_WITH_FLAGS(FcFini, $FONTCONFIG_CFLAGS, $FONTCONFIG_LIBS)
|
||||
|
|
@ -469,12 +430,6 @@ fi
|
|||
CAIRO_CFLAGS="$CAIRO_CFLAGS $FREETYPE_CFLAGS"
|
||||
CAIRO_LIBS="$CAIRO_LIBS $FREETYPE_LIBS"
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_FT_FONT, test "x$use_freetype" = "xyes")
|
||||
if test "x$use_freetype" = "xyes"; then
|
||||
FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
|
||||
fi
|
||||
AC_SUBST(FT_FONT_FEATURE)
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
AC_CHECK_HEADERS([pthread.h], have_pthread=yes, have_pthread=no)
|
||||
|
|
@ -482,7 +437,7 @@ AM_CONDITIONAL(HAVE_PTHREAD, test "x$have_pthread" = "xyes")
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(ps, PostScript, auto, ps, [], [
|
||||
CAIRO_BACKEND_ENABLE(ps, PostScript, ps, PS_SURFACE, auto, [], [
|
||||
if test x"$have_ft_load_sfnt_table" != "xyes" ; then
|
||||
use_ps="no (PS backend requires FreeType 2.1.4 or newer)"
|
||||
fi
|
||||
|
|
@ -494,12 +449,9 @@ AC_CHECK_LIB(z, compress,
|
|||
[use_ps="no (requires zlib http://www.gzip.org/zlib/)"])],
|
||||
[use_ps="no (requires zlib http://www.gzip.org/zlib/)"])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_PS_SURFACE, test "x$use_ps" = "xyes")
|
||||
if test "x$use_ps" = "xyes"; then
|
||||
PS_SURFACE_FEATURE="#define CAIRO_HAS_PS_SURFACE 1"
|
||||
PS_LIBS=-lz
|
||||
fi
|
||||
AC_SUBST(PS_SURFACE_FEATURE)
|
||||
|
||||
CAIRO_LIBS="$CAIRO_LIBS $PS_LIBS"
|
||||
|
||||
|
|
@ -507,16 +459,14 @@ AC_SUBST(PS_LIBS)
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(pdf, PDF, auto, pdf, [], [
|
||||
CAIRO_BACKEND_ENABLE(pdf, PDF, pdf, PDF_SURFACE, auto, [], [
|
||||
if test x"$have_ft_load_sfnt_table" != "xyes" ; then
|
||||
use_pdf="no (PDF backend requires FreeType 2.1.4 or newer)"
|
||||
fi
|
||||
])
|
||||
|
||||
test_pdf=no
|
||||
AM_CONDITIONAL(CAIRO_HAS_PDF_SURFACE, test "x$use_pdf" = "xyes")
|
||||
if test "x$use_pdf" = "xyes"; then
|
||||
PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
|
||||
PDF_LIBS=-lz
|
||||
PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.4.1 pango gtk+-2.0, [test_pdf=yes], [test_pdf=no])
|
||||
if test "x$test_pdf" = "xyes"; then
|
||||
|
|
@ -525,7 +475,6 @@ if test "x$use_pdf" = "xyes"; then
|
|||
AC_MSG_WARN([PDF backend will not be tested since poppler is not available])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(PDF_SURFACE_FEATURE)
|
||||
|
||||
AM_CONDITIONAL(CAIRO_CAN_TEST_PDF_SURFACE, test "x$test_pdf" = "xyes")
|
||||
AC_SUBST(POPPLER_CFLAGS)
|
||||
|
|
@ -539,15 +488,13 @@ AC_SUBST(PDF_LIBS)
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
CAIRO_BACKEND_ENABLE(svg, SVG, auto, svg, [], [
|
||||
CAIRO_BACKEND_ENABLE(svg, SVG, svg, SVG_SURFACE, auto, [], [
|
||||
if test x"$have_ft_load_sfnt_table" != "xyes" ; then
|
||||
use_svg="no (SVG backend requires FreeType 2.1.4 or newer)"
|
||||
fi
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_SVG_SURFACE, test "x$use_svg" = "xyes")
|
||||
if test "x$use_svg" = "xyes"; then
|
||||
SVG_SURFACE_FEATURE="#define CAIRO_HAS_SVG_SURFACE 1"
|
||||
PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 gdk-2.0, [test_svg=yes], [test_svg=no])
|
||||
if test "x$test_svg" = "xyes"; then
|
||||
AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested (need librsvg)])
|
||||
|
|
@ -555,7 +502,6 @@ if test "x$use_svg" = "xyes"; then
|
|||
AC_MSG_WARN([SVG backend will not be tested since a librsvg is not available])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SVG_SURFACE_FEATURE)
|
||||
|
||||
AM_CONDITIONAL(CAIRO_CAN_TEST_SVG_SURFACE, test "x$test_svg" = "xyes")
|
||||
AC_SUBST(LIBRSVG_CFLAGS)
|
||||
|
|
@ -563,20 +509,14 @@ AC_SUBST(LIBRSVG_LIBS)
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
dnl This check should default to 'yes' once we have code to actually
|
||||
dnl This check should default to 'auto' once we have code to actually
|
||||
dnl check for the atsui font backend.
|
||||
|
||||
CAIRO_BACKEND_ENABLE(atsui, atsui font, no, atsui, [], [
|
||||
CAIRO_BACKEND_ENABLE(atsui, atsui font, atsui, ATSUI_FONT, no, [], [
|
||||
dnl There is no pkgconfig for atsui; lets do a header check
|
||||
AC_CHECK_HEADER(Carbon/Carbon.h, [use_atsui=yes], [use_atsui=no])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(CAIRO_HAS_ATSUI_FONT, test "x$use_atsui" = "xyes")
|
||||
if test "x$use_atsui" = "xyes"; then
|
||||
ATSUI_FONT_FEATURE="#define CAIRO_HAS_ATSUI_FONT 1"
|
||||
fi
|
||||
AC_SUBST(ATSUI_FONT_FEATURE)
|
||||
|
||||
dnl ===========================================================================
|
||||
dnl Checks for precise integer types
|
||||
AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h])
|
||||
|
|
@ -621,7 +561,7 @@ dnl Check for MMX
|
|||
MMX_CFLAGS="-mmmx -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
|
||||
|
||||
have_mmx_intrinsics=no
|
||||
AC_MSG_CHECKING(For MMX/SSE intrinsics in the compiler)
|
||||
AC_MSG_CHECKING(for MMX/SSE intrinsics in the compiler)
|
||||
xserver_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS $MMX_CFLAGS"
|
||||
AC_COMPILE_IFELSE([
|
||||
|
|
@ -727,12 +667,60 @@ fi
|
|||
|
||||
dnl ===========================================================================
|
||||
|
||||
AC_OUTPUT([
|
||||
AC_CONFIG_COMMANDS([src/cairo-features.h],
|
||||
[
|
||||
featuresfile=src/cairo-features.h
|
||||
outfile=$featuresfile.tmp
|
||||
AC_MSG_NOTICE([creating $featuresfile])
|
||||
mkdir -p src
|
||||
cat > $outfile <<_EOF
|
||||
/* Generated by configure. Do not edit */
|
||||
#ifndef CAIRO_FEATURES_H
|
||||
#define CAIRO_FEATURES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define CAIRO_BEGIN_DECLS extern "C" {
|
||||
# define CAIRO_END_DECLS }
|
||||
#else
|
||||
# define CAIRO_BEGIN_DECLS
|
||||
# define CAIRO_END_DECLS
|
||||
#endif
|
||||
|
||||
#ifndef cairo_public
|
||||
# define cairo_public
|
||||
#endif
|
||||
|
||||
#define CAIRO_VERSION_MAJOR $CAIRO_VERSION_MAJOR
|
||||
#define CAIRO_VERSION_MINOR $CAIRO_VERSION_MINOR
|
||||
#define CAIRO_VERSION_MICRO $CAIRO_VERSION_MICRO
|
||||
|
||||
#define CAIRO_VERSION_STRING "$CAIRO_VERSION_MAJOR.$CAIRO_VERSION_MINOR.$CAIRO_VERSION_MICRO"
|
||||
|
||||
_EOF
|
||||
for FEATURE in $CAIRO_FEATURES; do
|
||||
echo "#define CAIRO_HAS_$FEATURE 1" >> $outfile
|
||||
done
|
||||
|
||||
echo '' >> $outfile
|
||||
echo '#endif' >> $outfile
|
||||
|
||||
if cmp -s $outfile $featuresfile; then
|
||||
AC_MSG_NOTICE([$featuresfile is unchanged])
|
||||
rm -f $outfile
|
||||
else
|
||||
mv $outfile $featuresfile
|
||||
fi
|
||||
],[
|
||||
CAIRO_FEATURES='$CAIRO_FEATURES'
|
||||
CAIRO_VERSION_MAJOR=$CAIRO_VERSION_MAJOR
|
||||
CAIRO_VERSION_MINOR=$CAIRO_VERSION_MINOR
|
||||
CAIRO_VERSION_MICRO=$CAIRO_VERSION_MICRO
|
||||
])
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
pixman/Makefile
|
||||
pixman/src/Makefile
|
||||
src/Makefile
|
||||
src/cairo-features.h
|
||||
test/Makefile
|
||||
doc/Makefile
|
||||
doc/public/Makefile
|
||||
|
|
@ -740,6 +728,8 @@ doc/public/version.xml
|
|||
src/cairo.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
echo ""
|
||||
|
|
@ -758,7 +748,7 @@ echo " DirectFB: $use_directfb"
|
|||
echo ""
|
||||
echo "the following font backends:"
|
||||
echo " FreeType: $use_freetype"
|
||||
echo " Win32: $use_win32"
|
||||
echo " Win32: $use_win32_font"
|
||||
echo " ATSUI: $use_atsui"
|
||||
echo ""
|
||||
echo "the following features:"
|
||||
|
|
@ -772,9 +762,9 @@ echo "using CFLAGS:"
|
|||
echo $CAIRO_CFLAGS
|
||||
echo ""
|
||||
|
||||
if test x"$use_freetype" != "xyes" && \
|
||||
test x"$use_win32" != "xyes" && \
|
||||
test x"$use_atsui" != "xyes" ; then
|
||||
if test x"$use_freetype" != "xyes" && \
|
||||
test x"$use_win32_font" != "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:
|
||||
|
|
|
|||
|
|
@ -130,6 +130,8 @@ endif
|
|||
FONTCONFIG_LIBS=@FONTCONFIG_LIBS@
|
||||
XRENDER_LIBS=@XRENDER_LIBS@
|
||||
|
||||
BUILT_SOURCES = cairo-features.h
|
||||
|
||||
cairoincludedir = $(includedir)/cairo
|
||||
cairoinclude_HEADERS = \
|
||||
cairo.h \
|
||||
|
|
|
|||
|
|
@ -1,86 +0,0 @@
|
|||
/* cairo - a vector graphics library with display and print output
|
||||
*
|
||||
* Copyright © 2003 University of Southern California
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it either under the terms of the GNU Lesser General Public
|
||||
* License version 2.1 as published by the Free Software Foundation
|
||||
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
||||
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
||||
* notice, a recipient may use your version of this file under either
|
||||
* the MPL or the LGPL.
|
||||
*
|
||||
* You should have received a copy of the LGPL along with this library
|
||||
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* You should have received a copy of the MPL along with this library
|
||||
* in the file COPYING-MPL-1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
||||
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
||||
* the specific language governing rights and limitations.
|
||||
*
|
||||
* The Original Code is the cairo graphics library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is University of Southern
|
||||
* California.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Carl D. Worth <cworth@cworth.org>
|
||||
*/
|
||||
|
||||
#ifndef CAIRO_FEATURES_H
|
||||
#define CAIRO_FEATURES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define CAIRO_BEGIN_DECLS extern "C" {
|
||||
# define CAIRO_END_DECLS }
|
||||
#else
|
||||
# define CAIRO_BEGIN_DECLS
|
||||
# define CAIRO_END_DECLS
|
||||
#endif
|
||||
|
||||
#ifndef cairo_public
|
||||
# define cairo_public
|
||||
#endif
|
||||
|
||||
#define CAIRO_VERSION_MAJOR @CAIRO_VERSION_MAJOR@
|
||||
#define CAIRO_VERSION_MINOR @CAIRO_VERSION_MINOR@
|
||||
#define CAIRO_VERSION_MICRO @CAIRO_VERSION_MICRO@
|
||||
|
||||
#define CAIRO_VERSION_STRING "@CAIRO_VERSION_MAJOR@.@CAIRO_VERSION_MINOR@.@CAIRO_VERSION_MICRO@"
|
||||
|
||||
@PS_SURFACE_FEATURE@
|
||||
|
||||
@PDF_SURFACE_FEATURE@
|
||||
|
||||
@SVG_SURFACE_FEATURE@
|
||||
|
||||
@XLIB_SURFACE_FEATURE@
|
||||
|
||||
@QUARTZ_SURFACE_FEATURE@
|
||||
|
||||
@XCB_SURFACE_FEATURE@
|
||||
|
||||
@WIN32_SURFACE_FEATURE@
|
||||
|
||||
@BEOS_SURFACE_FEATURE@
|
||||
|
||||
@GLITZ_SURFACE_FEATURE@
|
||||
|
||||
@DIRECTFB_SURFACE_FEATURE@
|
||||
|
||||
@FT_FONT_FEATURE@
|
||||
|
||||
@WIN32_FONT_FEATURE@
|
||||
|
||||
@ATSUI_FONT_FEATURE@
|
||||
|
||||
@PNG_FUNCTIONS_FEATURE@
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue