mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Adds the ability to build Cogl standalone
This adds an autogen.sh, configure.ac and build/autotool files etc under clutter/cogl and makes some corresponding Makefile.am changes that make it possible to build and install Cogl as a standalone library. Some notable things about this are: A standalone installation of Cogl installs 3 pkg-config files; cogl-1.0.pc, cogl-gl-1.0.pc and cogl-2.0.pc. The second is only for compatibility with what clutter installed though I'm not sure that anything uses it so maybe we could remove it. cogl-1.0.pc is what Clutter would use if it were updated to build against a standalone cogl library. cogl-2.0.pc is what you would use if you were writing a standalone Cogl application. A standalone installation results in two libraries currently, libcogl.so and libcogl-pango.so. Notably we don't include a major number in the sonames because libcogl supports two major API versions; 1.x as used by Clutter and the experimental 2.x API for standalone applications. Parallel installation of later versions e.g. 3.x and beyond will be supportable either with new sonames or if we can maintain ABI then we'll continue to share libcogl.so. The headers are similarly not installed into a directory with a major version number since the same headers are shared to export the 1.x and 2.x APIs (The only difference is that cogl-2.0.pc ensures that -DCOGL_ENABLE_EXPERIMENTAL_2_0_API is used). Parallel installation of later versions is not precluded though since we can either continue sharing or later add a major version suffix.
This commit is contained in:
parent
d40cdfa3e1
commit
efb570fdae
@ -1 +1,7 @@
|
||||
SUBDIRS = cogl pango
|
||||
|
||||
if COGL_STANDALONE_BUILD
|
||||
SUBDIRS += po
|
||||
endif
|
||||
|
||||
ACLOCAL_AMFLAGS = -I build/autotools ${ACLOCAL_FLAGS}
|
||||
|
73
autogen.sh
Executable file
73
autogen.sh
Executable file
@ -0,0 +1,73 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
|
||||
cd $srcdir
|
||||
PROJECT=Cogl
|
||||
TEST_TYPE=-f
|
||||
FILE=cogl/cogl.h
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.11
|
||||
ACLOCAL=aclocal-1.11
|
||||
export AUTOMAKE ACLOCAL
|
||||
else
|
||||
echo
|
||||
echo "You must have automake 1.11.x installed to compile $PROJECT
|
||||
ECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have gtk-doc installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# NOCONFIGURE is used by gnome-common
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
acdir=`$ACLOCAL --print-ac-dir`
|
||||
m4list="glib-2.0.m4"
|
||||
for file in $m4list; do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
rm -rf autom4te.cache
|
||||
|
||||
gtkdocize || exit $?
|
||||
autoreconf -vfi || exit $?
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
$srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
fi
|
51
build/autotools/Makefile.am.enums
Normal file
51
build/autotools/Makefile.am.enums
Normal file
@ -0,0 +1,51 @@
|
||||
# Rules for generating enumeration types using glib-mkenums
|
||||
#
|
||||
# Define:
|
||||
# glib_enum_h = header template file
|
||||
# glib_enum_c = source template file
|
||||
# glib_enum_headers = list of headers to parse
|
||||
#
|
||||
# before including Makefile.am.enums. You will also need to have
|
||||
# the following targets already defined:
|
||||
#
|
||||
# CLEANFILES
|
||||
# DISTCLEANFILES
|
||||
# BUILT_SOURCES
|
||||
# EXTRA_DIST
|
||||
#
|
||||
# Author: Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
# Basic sanity checks
|
||||
$(if $(GLIB_MKENUMS),,$(error Need to define GLIB_MKENUMS))
|
||||
|
||||
$(if $(or $(glib_enum_h), \
|
||||
$(glib_enum_c)),, \
|
||||
$(error Need to define glib_enum_h and glib_enum_c))
|
||||
|
||||
$(if $(glib_enum_headers),,$(error Need to define glib_enum_headers))
|
||||
|
||||
enum_tmpl_h=$(addprefix $(srcdir)/, $(glib_enum_h:.h=.h.in))
|
||||
enum_tmpl_c=$(addprefix $(srcdir)/, $(glib_enum_c:.c=.c.in))
|
||||
|
||||
CLEANFILES += stamp-enum-types
|
||||
DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c)
|
||||
BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c)
|
||||
EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c)
|
||||
|
||||
stamp-enum-types: $(glib_enum_headers) $(enum_tmpl_h)
|
||||
$(AM_V_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(enum_tmpl_h) \
|
||||
$(glib_enum_headers) > xgen-eh \
|
||||
&& (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \
|
||||
&& rm -f xgen-eh \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
$(glib_enum_h): stamp-enum-types
|
||||
@true
|
||||
|
||||
$(glib_enum_c): $(glib_enum_headers) $(glib_enum_h) $(enum_tmpl_c)
|
||||
$(AM_V_GEN)$(GLIB_MKENUMS) \
|
||||
--template $(enum_tmpl_c) \
|
||||
$(glib_enum_headers) > xgen-ec \
|
||||
&& cp -f xgen-ec $(glib_enum_c) \
|
||||
&& rm -f xgen-ec
|
19
build/autotools/Makefile.am.silent
Normal file
19
build/autotools/Makefile.am.silent
Normal file
@ -0,0 +1,19 @@
|
||||
# custom rules for quiet builds
|
||||
|
||||
QUIET_GEN = $(AM_V_GEN)
|
||||
|
||||
QUIET_LN = $(QUIET_LN_$(V))
|
||||
QUIET_LN_ = $(QUIET_LN_$(AM_DEFAULT_VERBOSITY))
|
||||
QUIET_LN_0 = @echo ' LN '$@;
|
||||
|
||||
QUIET_RM = $(QUIET_RM_$(V))
|
||||
QUIET_RM_ = $(QUIET_RM_$(AM_DEFAULT_VERBOSITY))
|
||||
QUIET_RM_0 = @echo ' RM '$@;
|
||||
|
||||
QUIET_SCAN = $(QUIET_SCAN_$(V))
|
||||
QUIET_SCAN_ = $(QUIET_SCAN_$(AM_DEFAULT_VERBOSITY))
|
||||
QUIET_SCAN_0 = @echo ' GISCAN '$@;
|
||||
|
||||
QUIET_COMP = $(QUIET_COMP_$(V))
|
||||
QUIET_COMP_ = $(QUIET_COMP_$(AM_DEFAULT_VERBOSITY))
|
||||
QUIET_COMP_0 = @echo ' GICOMP '$@;
|
62
build/autotools/as-compiler-flag.m4
Normal file
62
build/autotools/as-compiler-flag.m4
Normal file
@ -0,0 +1,62 @@
|
||||
dnl as-compiler-flag.m4 0.1.0
|
||||
|
||||
dnl autostars m4 macro for detection of compiler flags
|
||||
|
||||
dnl David Schleef <ds@schleef.org>
|
||||
|
||||
dnl $Id: as-compiler-flag.m4,v 1.1 2005/12/15 23:35:19 ds Exp $
|
||||
|
||||
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
|
||||
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING([to see if compiler understands $1])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
m4_ifvaln([$2],[$2])
|
||||
true
|
||||
else
|
||||
m4_ifvaln([$3],[$3])
|
||||
true
|
||||
fi
|
||||
AC_MSG_RESULT([$flag_ok])
|
||||
])
|
||||
|
||||
dnl AS_COMPILER_FLAGS(VAR, FLAGS)
|
||||
dnl Tries to compile with the given CFLAGS.
|
||||
|
||||
AC_DEFUN([AS_COMPILER_FLAGS],
|
||||
[
|
||||
list=$2
|
||||
flags_supported=""
|
||||
flags_unsupported=""
|
||||
AC_MSG_CHECKING([for supported compiler flags])
|
||||
for each in $list
|
||||
do
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $each"
|
||||
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "X$flag_ok" = Xyes ; then
|
||||
flags_supported="$flags_supported $each"
|
||||
else
|
||||
flags_unsupported="$flags_unsupported $each"
|
||||
fi
|
||||
done
|
||||
AC_MSG_RESULT([$flags_supported])
|
||||
if test "X$flags_unsupported" != X ; then
|
||||
AC_MSG_WARN([unsupported compiler flags: $flags_unsupported])
|
||||
fi
|
||||
$1="$$1 $flags_supported"
|
||||
])
|
||||
|
24
build/autotools/as-linguas.m4
Normal file
24
build/autotools/as-linguas.m4
Normal file
@ -0,0 +1,24 @@
|
||||
# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
|
||||
# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
|
||||
# subset of the po files.
|
||||
|
||||
AC_DEFUN([AS_ALL_LINGUAS],
|
||||
[
|
||||
AC_MSG_CHECKING([for linguas])
|
||||
podir="m4_default([$1],[$srcdir/po])"
|
||||
linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
|
||||
if test -f "$podir/LINGUAS.ignore"; then
|
||||
ALL_LINGUAS="";
|
||||
ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
|
||||
-e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
|
||||
for lang in $linguas; do
|
||||
if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
|
||||
ALL_LINGUAS="$ALL_LINGUAS $lang";
|
||||
fi;
|
||||
done;
|
||||
else
|
||||
ALL_LINGUAS="$linguas";
|
||||
fi;
|
||||
AC_SUBST([ALL_LINGUAS])
|
||||
AC_MSG_RESULT($ALL_LINGUAS)
|
||||
])
|
94
build/autotools/introspection.m4
Normal file
94
build/autotools/introspection.m4
Normal file
@ -0,0 +1,94 @@
|
||||
dnl -*- mode: autoconf -*-
|
||||
dnl Copyright 2009 Johan Dahlin
|
||||
dnl
|
||||
dnl This file is free software; the author(s) gives unlimited
|
||||
dnl permission to copy and/or distribute it, with or without
|
||||
dnl modifications, as long as this notice is preserved.
|
||||
dnl
|
||||
|
||||
# serial 1
|
||||
|
||||
m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
||||
[
|
||||
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
|
||||
|
||||
dnl enable/disable introspection
|
||||
m4_if([$2], [require],
|
||||
[dnl
|
||||
enable_introspection=yes
|
||||
],[dnl
|
||||
AC_ARG_ENABLE(introspection,
|
||||
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
|
||||
[Enable introspection for this build]),,
|
||||
[enable_introspection=auto])
|
||||
])dnl
|
||||
|
||||
AC_MSG_CHECKING([for gobject-introspection])
|
||||
|
||||
dnl presence/version checking
|
||||
AS_CASE([$enable_introspection],
|
||||
[no], [dnl
|
||||
found_introspection="no (disabled, use --enable-introspection to enable)"
|
||||
],dnl
|
||||
[yes],[dnl
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0],,
|
||||
AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
|
||||
found_introspection=yes,
|
||||
AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
|
||||
],dnl
|
||||
[auto],[dnl
|
||||
PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
|
||||
],dnl
|
||||
[dnl
|
||||
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
|
||||
])dnl
|
||||
|
||||
AC_MSG_RESULT([$found_introspection])
|
||||
|
||||
INTROSPECTION_SCANNER=
|
||||
INTROSPECTION_COMPILER=
|
||||
INTROSPECTION_GENERATE=
|
||||
INTROSPECTION_GIRDIR=
|
||||
INTROSPECTION_TYPELIBDIR=
|
||||
if test "x$found_introspection" = "xyes"; then
|
||||
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
||||
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
||||
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
||||
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
||||
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
||||
fi
|
||||
AC_SUBST(INTROSPECTION_SCANNER)
|
||||
AC_SUBST(INTROSPECTION_COMPILER)
|
||||
AC_SUBST(INTROSPECTION_GENERATE)
|
||||
AC_SUBST(INTROSPECTION_GIRDIR)
|
||||
AC_SUBST(INTROSPECTION_TYPELIBDIR)
|
||||
AC_SUBST(INTROSPECTION_CFLAGS)
|
||||
AC_SUBST(INTROSPECTION_LIBS)
|
||||
AC_SUBST(INTROSPECTION_MAKEFILE)
|
||||
|
||||
AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
|
||||
])
|
||||
|
||||
|
||||
dnl Usage:
|
||||
dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
|
||||
|
||||
AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
|
||||
[
|
||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
|
||||
])
|
||||
|
||||
dnl Usage:
|
||||
dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
|
||||
|
||||
|
||||
AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
|
||||
[
|
||||
_GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
|
||||
])
|
@ -13,37 +13,53 @@ CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
|
||||
noinst_LTLIBRARIES =
|
||||
lib_LTLIBRARIES =
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/clutter/cogl \
|
||||
-I$(top_builddir) \
|
||||
-I$(srcdir)/tesselator \
|
||||
-I$(srcdir)/winsys \
|
||||
-I$(srcdir)/driver/$(COGL_DRIVER) \
|
||||
$(NULL)
|
||||
|
||||
if COGL_STANDALONE_BUILD
|
||||
INCLUDES += \
|
||||
-I$(top_srcdir)/clutter/cogl \
|
||||
-I$(top_builddir)/clutter/cogl \
|
||||
$(NULL)
|
||||
else
|
||||
INCLUDES += \
|
||||
-I$(top_srcdir)/clutter/cogl \
|
||||
-I$(top_builddir)/clutter/cogl \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_DISABLE_SINGLE_INCLUDES \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DG_LOG_DOMAIN=\"Cogl-$(COGL_WINSYS)\" \
|
||||
-DCLUTTER_COMPILATION \
|
||||
$(COGL_DEBUG_CFLAGS) \
|
||||
$(CLUTTER_DEBUG_CFLAGS) \
|
||||
-DG_DISABLE_SINGLE_INCLUDES \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DG_LOG_DOMAIN=\"Cogl\" \
|
||||
-DCLUTTER_COMPILATION \
|
||||
$(NULL)
|
||||
|
||||
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
AM_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
BUILT_SOURCES += cogl-defines.h
|
||||
DISTCLEANFILES += cogl-defines.h
|
||||
EXTRA_DIST += cogl-defines.h.in
|
||||
|
||||
# pkg-config
|
||||
# Note: The cogl-1.0/cogl-gl-1.0 files are essentially for
|
||||
# compatability only. I'm not really sure who could possibly be using
|
||||
# them so we may decide to remove them entirely at some point.
|
||||
pc_files = \
|
||||
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc \
|
||||
cogl-$(CLUTTER_API_VERSION).pc
|
||||
cogl-1.0.pc \
|
||||
cogl-gl-1.0.pc
|
||||
|
||||
cogl-$(COGL_DRIVER)-$(CLUTTER_API_VERSION).pc: cogl-$(CLUTTER_API_VERSION).pc
|
||||
if COGL_STANDALONE_BUILD
|
||||
pc_files += cogl-$(COGL_API_VERSION).pc
|
||||
endif
|
||||
|
||||
cogl-gl-1.0.pc: cogl-1.0.pc
|
||||
$(QUIET_GEN)cp -f $< $(@F)
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
@ -356,11 +372,28 @@ glib_enum_c = cogl-enum-types.c
|
||||
glib_enum_headers = $(cogl_public_h)
|
||||
include $(top_srcdir)/build/autotools/Makefile.am.enums
|
||||
|
||||
noinst_LTLIBRARIES += libclutter-cogl.la
|
||||
if COGL_STANDALONE_BUILD
|
||||
lib_LTLIBRARIES += libcogl.la
|
||||
else
|
||||
noinst_LTLIBRARIES += libcogl.la
|
||||
endif
|
||||
|
||||
libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS)
|
||||
libclutter_cogl_la_SOURCES = $(cogl_sources_c)
|
||||
nodist_libclutter_cogl_la_SOURCES = $(BUILT_SOURCES)
|
||||
libcogl_la_LIBADD = -lm $(COGL_DEP_LIBS)
|
||||
if SUPPORT_GLX
|
||||
libcogl_la_LIBADD += -ldl
|
||||
endif
|
||||
if COGL_STANDALONE_BUILD
|
||||
# XXX: The aim is to eventually get rid of all private API exports
|
||||
# for coglpango.
|
||||
libcogl_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
-version-info @COGL_LT_CURRENT@:@COGL_LT_REVISION@:@COGL_LT_AGE@ \
|
||||
-export-dynamic \
|
||||
-export-symbols-regex "^(cogl|_cogl_debug_flags|_cogl_atlas_new|_cogl_atlas_add_reorganize_callback|_cogl_atlas_reserve_space|_cogl_callback|_cogl_util_get_eye_planes_for_screen_poly).*"
|
||||
endif
|
||||
|
||||
libcogl_la_SOURCES = $(cogl_sources_c)
|
||||
nodist_libcogl_la_SOURCES = $(BUILT_SOURCES)
|
||||
|
||||
# Cogl installed headers
|
||||
cogl_headers = \
|
||||
@ -368,28 +401,33 @@ cogl_headers = \
|
||||
$(srcdir)/cogl-deprecated.h \
|
||||
$(NULL)
|
||||
|
||||
if COGL_STANDALONE_BUILD
|
||||
coglincludedir = $(includedir)/cogl/cogl
|
||||
coglinclude_HEADERS = $(cogl_headers) $(cogl_experimental_h)
|
||||
nodist_coglinclude_HEADERS = cogl-defines.h cogl-enum-types.h
|
||||
else
|
||||
coglincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/cogl
|
||||
coglinclude_HEADERS = $(cogl_headers) $(cogl_experimental_h)
|
||||
nodist_coglinclude_HEADERS = cogl-defines.h cogl-enum-types.h
|
||||
endif
|
||||
|
||||
-include $(INTROSPECTION_MAKEFILE)
|
||||
|
||||
INTROSPECTION_GIRS =
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
Cogl-1.0.gir: libcogl.la Makefile
|
||||
|
||||
Cogl-@CLUTTER_API_VERSION@.gir: libclutter-cogl.la Makefile
|
||||
Cogl_1_0_gir_NAMESPACE = Cogl
|
||||
Cogl_1_0_gir_VERSION = 1.0
|
||||
Cogl_1_0_gir_LIBS = libcogl.la
|
||||
Cogl_1_0_gir_FILES = $(cogl_headers) cogl-enum-types.h
|
||||
Cogl_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS)
|
||||
Cogl_1_0_gir_INCLUDES = GL-1.0 GObject-2.0
|
||||
Cogl_1_0_gir_EXPORT_PACKAGES = cogl-1.0
|
||||
Cogl_1_0_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
|
||||
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Cogl
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-cogl.la
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_FILES = $(cogl_headers) cogl-enum-types.h
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS)
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = GL-1.0 GObject-2.0
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_EXPORT_PACKAGES = cogl-1.0
|
||||
Cogl_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'
|
||||
|
||||
INTROSPECTION_GIRS += Cogl-@CLUTTER_API_VERSION@.gir
|
||||
INTROSPECTION_GIRS += Cogl-1.0.gir
|
||||
|
||||
girdir = $(datadir)/gir-1.0
|
||||
gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
17
cogl/cogl-1.0-clutter.pc.in
Normal file
17
cogl/cogl-1.0-clutter.pc.in
Normal file
@ -0,0 +1,17 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
apiversion=1.0
|
||||
requires=@COGL_PKG_REQUIRES@
|
||||
backend=@COGL_WINSYS@ #only kept for backward compatability
|
||||
winsys=@COGL_WINSYS@
|
||||
cogl=@COGL_DRIVER@ #only kept for backward compatability
|
||||
driver=@COGL_DRIVER@
|
||||
|
||||
Name: Cogl
|
||||
Description: An object oriented GL/GLES Abstraction/Utility Layer
|
||||
Version: @COGL_1_VERSION@
|
||||
Libs: -L${libdir} -lcogl -lcoglpango
|
||||
Cflags: -I${includedir}/clutter-${apiversion}
|
||||
Requires: ${requires}
|
13
cogl/cogl-1.0.pc.in
Normal file
13
cogl/cogl-1.0.pc.in
Normal file
@ -0,0 +1,13 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
apiversion=1.0
|
||||
requires=@COGL_PKG_REQUIRES@
|
||||
|
||||
Name: Cogl
|
||||
Description: An object oriented GL/GLES Abstraction/Utility Layer
|
||||
Version: @COGL_1_VERSION@
|
||||
Libs: -L${libdir} -lcogl -lcoglpango
|
||||
Cflags: -I${includedir}/cogl
|
||||
Requires: ${requires}
|
@ -2,16 +2,12 @@ prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
apiversion=@CLUTTER_API_VERSION@
|
||||
requires=@CLUTTER_REQUIRES@
|
||||
backend=@COGL_WINSYS@ #only kept for backward compatability
|
||||
winsys=@COGL_WINSYS@
|
||||
cogl=@COGL_DRIVER@ #only kept for backward compatability
|
||||
driver=@COGL_DRIVER@
|
||||
apiversion=@COGL_API_VERSION@
|
||||
requires=@COGL_PKG_REQUIRES@
|
||||
|
||||
Name: COGL
|
||||
Description: Clutter GL abstraction library (${winsys}/${driver} backend)
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lclutter-${winsys}-${apiversion}
|
||||
Cflags: -I${includedir}/clutter-${apiversion}
|
||||
Name: Cogl
|
||||
Description: An object oriented GL/GLES Abstraction/Utility Layer
|
||||
Version: @COGL_VERSION@
|
||||
Libs: -L${libdir} -lcogl
|
||||
Cflags: -I${includedir}/cogl -DCOGL_ENABLE_EXPERIMENTAL_2_0_API
|
||||
Requires: ${requires}
|
||||
|
462
configure.ac
Normal file
462
configure.ac
Normal file
@ -0,0 +1,462 @@
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
dnl ================================================================
|
||||
dnl XXX: If you are making a release then you need to check these
|
||||
dnl sections:
|
||||
dnl » API versions
|
||||
dnl (the pretty numbers that the users see)
|
||||
dnl
|
||||
dnl » Interface version details for libtool
|
||||
dnl (the shared library versioning information)
|
||||
dnl
|
||||
dnl » Source code release status
|
||||
dnl (mark the source code as being part of a "release" or from "git")
|
||||
dnl ================================================================
|
||||
|
||||
dnl ================================================================
|
||||
dnl API versions (i.e. the pretty numbers that users see)
|
||||
dnl ================================================================
|
||||
m4_define([cogl_major_version], [2])
|
||||
m4_define([cogl_minor_version], [0])
|
||||
m4_define([cogl_micro_version], [0])
|
||||
m4_define([cogl_version],
|
||||
[cogl_major_version.cogl_minor_version.cogl_micro_version])
|
||||
|
||||
dnl Since the core Cogl library has to also maintain support for the
|
||||
dnl Cogl 1.x API for Clutter then we track the 1.x version separately.
|
||||
m4_define([cogl_1_minor_version], [6])
|
||||
m4_define([cogl_1_micro_version], [0])
|
||||
m4_define([cogl_1_version], [1.cogl_1_minor_version.cogl_1_micro_version])
|
||||
|
||||
dnl ================================================================
|
||||
dnl Interface version details for libtool
|
||||
dnl ================================================================
|
||||
# Note: we don't automatically deduce the libtool version info from
|
||||
# the pretty version number that users sees. This is because we want
|
||||
# to update the pretty version number before making a release since it
|
||||
# can affect the name of our pkg-config file and the naming or
|
||||
# location of other installed files which we want to be able to verify
|
||||
# as correct well before making a release.
|
||||
#
|
||||
# For reference on how the various numbers should be updated at
|
||||
# release time these rules are adapted from the libtool info pages:
|
||||
#
|
||||
# 1. Update the version information only immediately before a public
|
||||
# release.
|
||||
#
|
||||
# 2. If the library source code has changed at all since the last
|
||||
# update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
|
||||
#
|
||||
# 3. If any interfaces have been added, removed, or changed since the
|
||||
# last update, increment CURRENT, and set REVISION to 0.
|
||||
#
|
||||
# 4. If any interfaces have been added since the last public release,
|
||||
# then increment AGE.
|
||||
#
|
||||
# 5. If any interfaces have been removed since the last public release,
|
||||
# then set AGE to 0.
|
||||
m4_define([cogl_lt_current], 0)
|
||||
m4_define([cogl_lt_revision], 0)
|
||||
m4_define([cogl_lt_age], 0)
|
||||
# We do also tell libtool the pretty version:
|
||||
m4_define([cogl_lt_release], [cogl_version])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Source code release status
|
||||
dnl ================================================================
|
||||
# Finally we explicitly track when we are building development source
|
||||
# from Git vs building source corresponding to a release. As with the
|
||||
# libtool version info we don't automatically derive this from the
|
||||
# pretty version number because we want to test the results of
|
||||
# updating the version number in advance of a release.
|
||||
m4_define([cogl_release_status], [git])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Required versions for dependencies
|
||||
dnl ================================================================
|
||||
m4_define([glib_req_version], [2.26.0])
|
||||
m4_define([pangocairo_req_version], [1.20])
|
||||
m4_define([gi_req_version], [0.9.5])
|
||||
m4_define([gdk_pixbuf_req_version], [2.0])
|
||||
m4_define([uprof_req_version], [0.3])
|
||||
m4_define([gtk_doc_req_version], [1.13])
|
||||
m4_define([xfixes_req_version], [3])
|
||||
m4_define([xcomposite_req_version], [0.4])
|
||||
|
||||
|
||||
AC_INIT(cogl, [cogl_version])
|
||||
AC_CONFIG_SRCDIR(cogl/cogl.h)
|
||||
AC_CONFIG_AUX_DIR([build])
|
||||
AC_CONFIG_MACRO_DIR([build/autotools])
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
# Save this value here, since automake will set cflags later and we
|
||||
# want to know if the user specified custom cflags or not.
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip
|
||||
dist-bzip2])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Export the API versioning
|
||||
dnl ================================================================
|
||||
AC_SUBST([COGL_MAJOR_VERSION],[cogl_major_version])
|
||||
AC_SUBST([COGL_MINOR_VERSION],[cogl_minor_version])
|
||||
AC_SUBST([COGL_MICRO_VERSION],[cogl_micro_version])
|
||||
AC_SUBST([COGL_VERSION],[cogl_version])
|
||||
AC_SUBST([COGL_API_VERSION],[cogl_major_version.0])
|
||||
AC_SUBST([COGL_API_VERSION_AM],[$COGL_MAJOR_VERSION\_0])
|
||||
|
||||
AC_SUBST([COGL_1_MINOR_VERSION],[cogl_1_minor_version])
|
||||
AC_SUBST([COGL_1_MICRO_VERSION],[cogl_1_micro_version])
|
||||
AC_SUBST([COGL_1_VERSION],[cogl_1_version])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Export the libtool versioning
|
||||
dnl ================================================================
|
||||
AC_SUBST([COGL_LT_CURRENT], [cogl_lt_current])
|
||||
AC_SUBST([COGL_LT_REVISION], [cogl_lt_revision])
|
||||
AC_SUBST([COGL_LT_AGE], [cogl_lt_age])
|
||||
AC_SUBST([COGL_LT_RELEASE], [cogl_lt_release])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Export the source code release status
|
||||
dnl ================================================================
|
||||
AC_SUBST([COGL_RELEASE_STATUS], [cogl_release_status])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Handle extra configure options
|
||||
dnl ================================================================
|
||||
|
||||
dnl ============================================================
|
||||
dnl Enable debugging
|
||||
dnl ============================================================
|
||||
m4_define([default], [m4_if(cogl_release_status, [git], [yes], [no])])
|
||||
AC_ARG_ENABLE(
|
||||
[debug],
|
||||
[AC_HELP_STRING([--enable-debug=@<:@no/yes@:>@], [Control Cogl debugging level @<:@default=]default[@:>@])],
|
||||
[],
|
||||
enable_debug=default
|
||||
)
|
||||
|
||||
AS_CASE(
|
||||
[$enable_debug],
|
||||
[yes],
|
||||
[
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g -O0"
|
||||
COGL_EXTRA_CFLAGS="-DCOGL_GL_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_HANDLE_DEBUG -DCOGL_ENABLE_DEBUG"
|
||||
],
|
||||
[no],
|
||||
[
|
||||
COGL_EXTRA_CFLAGS="-DCOGL_ENABLE_DEBUG -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
|
||||
],
|
||||
[AC_MSG_ERROR([Unknown argument for --enable-debug])]
|
||||
)
|
||||
|
||||
AC_SUBST(COGL_DEBUG_CFLAGS)
|
||||
|
||||
|
||||
dnl ============================================================
|
||||
dnl Enable strict compiler flags
|
||||
dnl ============================================================
|
||||
|
||||
# use strict compiler flags only when building from git; the rules for
|
||||
# distcheck will take care of turning this on when making a release
|
||||
m4_define([default], [m4_if(cogl_release_status, [git], [yes], [no])])
|
||||
AC_ARG_ENABLE(
|
||||
[maintainer-flags],
|
||||
[AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@], [Use strict compiler flags @<:@default=]default[@:>@])],
|
||||
[],
|
||||
enable_maintainer_flags=default
|
||||
)
|
||||
|
||||
MAINTAINER_COMPILER_FLAGS="-Wall -Wshadow -Wcast-align -Wuninitialized
|
||||
-Wno-strict-aliasing -Wempty-body -Wformat
|
||||
-Wformat-security -Winit-self
|
||||
-Wdeclaration-after-statement -Wvla
|
||||
-Wpointer-arith"
|
||||
|
||||
AS_CASE(
|
||||
[$enable_maintainer_flags],
|
||||
[yes],
|
||||
[
|
||||
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
|
||||
],
|
||||
[no],
|
||||
[
|
||||
],
|
||||
[error],
|
||||
[
|
||||
MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
|
||||
AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
|
||||
],
|
||||
[*],
|
||||
[AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
|
||||
)
|
||||
|
||||
# strip leading spaces
|
||||
COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS ${MAINTAINER_CFLAGS/# }"
|
||||
|
||||
|
||||
dnl ============================================================
|
||||
dnl Choose image loading backend
|
||||
dnl ============================================================
|
||||
AC_ARG_ENABLE(
|
||||
[gdk-pixbuf],
|
||||
[AC_HELP_STRING([--enable-gdk-pixbuf=@<:@no/yes@:>@], [Enable image loading via gdk-pixbuf @<:@default=yes@:>@])],
|
||||
[],
|
||||
enable_gdk_pixbuf=yes
|
||||
)
|
||||
|
||||
if test "x$enable_gdk_pixbuf" = "xyes"; then
|
||||
PKG_CHECK_EXISTS([xi], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no])
|
||||
else
|
||||
have_gdk_pixbuf=no
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[quartz-image],
|
||||
[AC_HELP_STRING([--enable-quartz-image=@<:@no/yes@:>@], [Enable image loading via quartz @<:@default=no@:>@])],
|
||||
[],
|
||||
enable_quartz_image=no
|
||||
)
|
||||
|
||||
AS_IF(
|
||||
[test "x$have_gdk_pixbuf" = "xyes"],
|
||||
[
|
||||
AC_DEFINE([USE_GDKPIXBUF], 1, [Use GdkPixbuf for loading image data])
|
||||
COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES gdk-pixbuf-2.0 >= gdk_pixbuf_req_version"
|
||||
COGL_IMAGE_BACKEND="gdk-pixbuf"
|
||||
],
|
||||
[test "x$enable_quartz_image" = "xyes"],
|
||||
[
|
||||
EXPERIMENTAL_CONFIG=yes
|
||||
EXPERIMENTAL_OPTIONS="$EXPERIMENTAL_OPTIONS Quartz Core Graphics,"
|
||||
AC_DEFINE([USE_QUARTZ], 1,
|
||||
[Use Core Graphics (Quartz) for loading image data])
|
||||
COGL_IMAGE_BACKEND="quartz"
|
||||
],
|
||||
[
|
||||
EXPERIMENTAL_CONFIG=yes
|
||||
EXPERIMENTAL_OPTIONS="$EXPERIMENTAL_OPTIONS fallback image decoding (stb_image),"
|
||||
AC_DEFINE([USE_INTERNAL], 1,
|
||||
[Use internal image decoding for loading image data])
|
||||
COGL_IMAGE_BACKEND="stb_image"
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
dnl ============================================================
|
||||
dnl Determine which window systems and drivers we can support
|
||||
dnl ============================================================
|
||||
|
||||
AM_CONDITIONAL(COGL_STANDALONE_BUILD, [true])
|
||||
AC_DEFINE([COGL_HAS_FULL_WINSYS], [1], [Cogl can create its own OpenGL context])
|
||||
|
||||
AC_DEFINE([COGL_HAS_X11_SUPPORT], [1], [Cogl supports the X11 window system])
|
||||
AC_DEFINE([COGL_HAS_XLIB_SUPPORT], [1], [Cogl supports X11 using the Xlib API])
|
||||
AC_DEFINE([COGL_HAS_GLX_SUPPORT], [1], [Cogl supports OpenGL using the GLX API])
|
||||
AC_DEFINE([HAVE_COGL_GL], [1], [Have GL for rendering])
|
||||
|
||||
AM_CONDITIONAL(SUPPORT_GLX, [true])
|
||||
AM_CONDITIONAL(SUPPORT_X11, [true])
|
||||
AM_CONDITIONAL(SUPPORT_XLIB, [true])
|
||||
AM_CONDITIONAL(SUPPORT_EGL, [false])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_X11, [false])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_NULL, [false])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_POWERVR_GDL, [false])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_DRM_SURFACELESS, [false])
|
||||
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_FRUITY, [false])
|
||||
AM_CONDITIONAL(SUPPORT_OSX, [false])
|
||||
AM_CONDITIONAL(SUPPORT_FRUITY, [false])
|
||||
AM_CONDITIONAL(SUPPORT_WIN32, [false])
|
||||
AM_CONDITIONAL(SUPPORT_CEX100, [false])
|
||||
AM_CONDITIONAL(SUPPORT_WAYLAND, [false])
|
||||
|
||||
AM_CONDITIONAL([COGL_DRIVER_GLES], [false])
|
||||
AM_CONDITIONAL([COGL_DRIVER_GL], [true])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Compiler stuff.
|
||||
dnl ================================================================
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AM_PROG_CC_C_O
|
||||
AC_ISC_POSIX
|
||||
AC_C_CONST
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Libtool stuff.
|
||||
dnl ================================================================
|
||||
dnl AC_PROG_LIBTOOL
|
||||
dnl LIBTOOL="$LIBTOOL --preserve-dup-deps"
|
||||
LT_PREREQ([2.2.6])
|
||||
LT_INIT([disable-static])
|
||||
|
||||
dnl ================================================================
|
||||
dnl I18n stuff.
|
||||
dnl ================================================================
|
||||
AM_GNU_GETTEXT_VERSION([0.17])
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
GETTEXT_PACKAGE="cogl"
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,
|
||||
"$GETTEXT_PACKAGE",
|
||||
[The prefix for our gettext translation domains.])
|
||||
AS_ALL_LINGUAS
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Documentation stuff.
|
||||
dnl ================================================================
|
||||
GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Check for dependency packages.
|
||||
dnl ================================================================
|
||||
|
||||
dnl ============================================================
|
||||
dnl Check glib dependencies
|
||||
dnl ============================================================
|
||||
AM_PATH_GLIB_2_0([glib_req_version],
|
||||
[have_glib=yes], [have_glib=no],
|
||||
[gobject gthread gmodule-no-export])
|
||||
AS_IF([test "x$have_glib" = "xno"], AC_MSG_ERROR([glib-2.0 is required]))
|
||||
|
||||
COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES glib-2.0 pangocairo >= pangocairo_req_version gl"
|
||||
AC_SUBST(COGL_PKG_REQUIRES)
|
||||
PKG_CHECK_MODULES(COGL_DEP, [$COGL_PKG_REQUIRES])
|
||||
|
||||
dnl ============================================================
|
||||
dnl Check X11 dependencies (if supporting any X11 based winsys)
|
||||
dnl ============================================================
|
||||
AS_IF(
|
||||
[test "x$SUPPORT_XLIB" = "x1"],
|
||||
[COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES x11 xext xfixes >= xfixes_req_version xdamage xcomposite >= xcomposite_req_version"]
|
||||
)
|
||||
|
||||
AM_CONDITIONAL(X11_TESTS, [test "x$SUPPORT_XLIB" = "x1"])
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Misc program dependencies.
|
||||
dnl ================================================================
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl ================================================================
|
||||
dnl GObject-Introspection check
|
||||
dnl ================================================================
|
||||
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
|
||||
|
||||
dnl ================================================================
|
||||
dnl Checks for header files.
|
||||
dnl ================================================================
|
||||
AC_PATH_X
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h signal.h)
|
||||
|
||||
|
||||
dnl ================================================================
|
||||
dnl Checks for library functions.
|
||||
dnl ================================================================
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS(putenv strdup)
|
||||
|
||||
|
||||
COGL_DEFINES_SYMBOLS="COGL_HAS_X11 COGL_HAS_X11_SUPPORT COGL_HAS_XLIB COGL_HAS_XLIB_SUPPORT COGL_HAS_GL CLUTTER_COGL_HAS_GL"
|
||||
|
||||
COGL_DEFINES=""
|
||||
for x in $COGL_DEFINES_SYMBOLS; do
|
||||
COGL_DEFINES="$COGL_DEFINES
|
||||
#define $x 1"
|
||||
done;
|
||||
|
||||
AC_SUBST(COGL_DEFINES)
|
||||
|
||||
COGL_GL_HEADER_INCLUDES="#include <GL/gl.h>"
|
||||
AC_SUBST(COGL_GL_HEADER_INCLUDES)
|
||||
|
||||
AM_CONDITIONAL([COGL_DRIVER_GL], [true])
|
||||
AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1],
|
||||
[Can use Cogl 2.0 API internally])
|
||||
|
||||
PKG_CHECK_EXISTS([gl],
|
||||
[BACKEND_PC_FILES="$BACKEND_PC_FILES gl"],
|
||||
# if a pkg-config file isn't found just add -lGL
|
||||
# and hope for the best.
|
||||
[FLAVOUR_LIBS="$FLAVOUR_LIBS -lGL"])
|
||||
|
||||
COGL_WINSYS=glx
|
||||
AC_SUBST([COGL_WINSYS])
|
||||
COGL_DRIVER=gl
|
||||
AC_SUBST([COGL_DRIVER])
|
||||
|
||||
COGL_DEBUG_CFLAGS="-DCOGL_GL_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_HANDLE_DEBUG -DCOGL_ENABLE_DEBUG"
|
||||
|
||||
dnl ================================================================
|
||||
dnl What needs to be substituted in other files
|
||||
dnl ================================================================
|
||||
AC_SUBST(COGL_DEP_CFLAGS)
|
||||
AC_SUBST(COGL_DEP_LIBS)
|
||||
AC_SUBST(COGL_EXTRA_CFLAGS)
|
||||
AC_SUBST(COGL_EXTRA_LDFLAGS)
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
cogl/Makefile
|
||||
cogl/cogl-1.0.pc
|
||||
cogl/cogl-$COGL_MAJOR_VERSION.0.pc:cogl/cogl.pc.in
|
||||
cogl/cogl-defines.h
|
||||
pango/Makefile
|
||||
po/Makefile.in
|
||||
)
|
||||
|
||||
dnl ================================================================
|
||||
dnl Dah Da!
|
||||
dnl ================================================================
|
||||
echo ""
|
||||
echo "Cogl - $COGL_1_VERSION/$COGL_VERSION (${COGL_RELEASE_STATUS})"
|
||||
|
||||
# Global flags
|
||||
echo ""
|
||||
echo " • Global:"
|
||||
echo " Prefix: ${prefix}"
|
||||
|
||||
# Compiler/Debug related flags
|
||||
echo ""
|
||||
echo " • Compiler options:"
|
||||
echo " Cogl debug: ${enable_debug}"
|
||||
echo " Compiler flags: ${CFLAGS} ${COGL_EXTRA_CFLAGS}"
|
||||
|
||||
# Miscellaneous
|
||||
echo ""
|
||||
echo " • Extra:"
|
||||
echo " Build introspection data: ${enable_introspection}"
|
||||
echo " Image backend: ${COGL_IMAGE_BACKEND}"
|
||||
|
||||
echo ""
|
||||
|
||||
# General warning about experimental features
|
||||
if test "x$EXPERIMENTAL_CONFIG" = "xyes"; then
|
||||
echo ""
|
||||
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
|
||||
echo " *WARNING*"
|
||||
echo ""
|
||||
echo " The stability of your build might be affected by one or more"
|
||||
echo " experimental configuration options."
|
||||
echo
|
||||
echo " experimental options: $EXPERIMENTAL_OPTIONS"
|
||||
echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
|
||||
echo ""
|
||||
fi
|
@ -13,21 +13,42 @@ source_h_priv = \
|
||||
cogl-pango-private.h \
|
||||
cogl-pango-glyph-cache.h
|
||||
|
||||
if COGL_STANDALONE_BUILD
|
||||
lib_LTLIBRARIES = libcoglpango.la
|
||||
else
|
||||
noinst_LTLIBRARIES = libcoglpango.la
|
||||
endif
|
||||
|
||||
libcoglpango_la_SOURCES = $(source_c) $(source_h) $(source_h_priv)
|
||||
libcoglpango_la_CPPFLAGS = $(CLUTTER_CFLAGS) $(COGL_DEBUG_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
libcoglpango_la_LIBADD = $(CLUTTER_LIBS)
|
||||
libcoglpango_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
libcoglpango_la_LIBADD = $(COGL_DEP_LIBS)
|
||||
if COGL_STANDALONE_BUILD
|
||||
libcoglpango_la_LIBADD += $(top_builddir)/cogl/libcogl.la
|
||||
libcoglpango_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
-export-symbols-regex "^cogl.*"
|
||||
-no-undefined \
|
||||
-version-info @COGL_LT_CURRENT@:@COGL_LT_REVISION@:@COGL_LT_AGE@
|
||||
endif
|
||||
|
||||
INCLUDES = \
|
||||
-DG_DISABLE_SINGLE_INCLUDES \
|
||||
-DCLUTTER_COMPILATION \
|
||||
-DG_LOG_DOMAIN=\"CoglPango\" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)
|
||||
if !COGL_STANDALONE_BUILD
|
||||
INCLUDES += \
|
||||
-I$(top_srcdir)/clutter \
|
||||
-I$(top_srcdir)/clutter/cogl \
|
||||
-I$(top_builddir)/clutter \
|
||||
-I$(top_builddir)/clutter/cogl
|
||||
endif
|
||||
|
||||
if COGL_STANDALONE_BUILD
|
||||
coglpangoheadersdir = $(includedir)/cogl/cogl
|
||||
coglpangoheaders_HEADERS = $(source_h)
|
||||
else
|
||||
coglpangoheadersdir = $(includedir)/clutter-@CLUTTER_API_VERSION@/cogl
|
||||
coglpangoheaders_HEADERS = $(source_h)
|
||||
endif
|
||||
|
||||
|
12
po/ChangeLog
Normal file
12
po/ChangeLog
Normal file
@ -0,0 +1,12 @@
|
||||
2011-02-10 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.in.in: New file, from gettext-0.17.
|
||||
* boldquot.sed: New file, from gettext-0.17.
|
||||
* en@boldquot.header: New file, from gettext-0.17.
|
||||
* en@quot.header: New file, from gettext-0.17.
|
||||
* insert-header.sin: New file, from gettext-0.17.
|
||||
* quot.sed: New file, from gettext-0.17.
|
||||
* remove-potcdate.sin: New file, from gettext-0.17.
|
||||
* Rules-quot: New file, from gettext-0.17.
|
||||
* POTFILES.in: New file.
|
||||
|
41
po/Makevars
Normal file
41
po/Makevars
Normal file
@ -0,0 +1,41 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS =
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
1
po/POTFILES.in
Normal file
1
po/POTFILES.in
Normal file
@ -0,0 +1 @@
|
||||
# List of source files which contain translatable strings.
|
47
po/Rules-quot
Normal file
47
po/Rules-quot
Normal file
@ -0,0 +1,47 @@
|
||||
# Special Makefile rules for English message catalogs with quotation marks.
|
||||
|
||||
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
|
||||
|
||||
.SUFFIXES: .insert-header .po-update-en
|
||||
|
||||
en@quot.po-create:
|
||||
$(MAKE) en@quot.po-update
|
||||
en@boldquot.po-create:
|
||||
$(MAKE) en@boldquot.po-update
|
||||
|
||||
en@quot.po-update: en@quot.po-update-en
|
||||
en@boldquot.po-update: en@boldquot.po-update-en
|
||||
|
||||
.insert-header.po-update-en:
|
||||
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
|
||||
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
|
||||
tmpdir=`pwd`; \
|
||||
echo "$$lang:"; \
|
||||
ll=`echo $$lang | sed -e 's/@.*//'`; \
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
cd $(srcdir); \
|
||||
if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
|
||||
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
else \
|
||||
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
|
||||
:; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi; \
|
||||
else \
|
||||
echo "creation of $$lang.po failed!" 1>&2; \
|
||||
rm -f $$tmpdir/$$lang.new.po; \
|
||||
fi
|
||||
|
||||
en@quot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
|
||||
|
||||
en@boldquot.insert-header: insert-header.sin
|
||||
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
|
||||
|
||||
mostlyclean: mostlyclean-quot
|
||||
mostlyclean-quot:
|
||||
rm -f *.insert-header
|
10
po/boldquot.sed
Normal file
10
po/boldquot.sed
Normal file
@ -0,0 +1,10 @@
|
||||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
||||
s/“/“[1m/g
|
||||
s/”/[0m”/g
|
||||
s/‘/‘[1m/g
|
||||
s/’/[0m’/g
|
25
po/en@boldquot.header
Normal file
25
po/en@boldquot.header
Normal file
@ -0,0 +1,25 @@
|
||||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
||||
# This catalog furthermore displays the text between the quotation marks in
|
||||
# bold face, assuming the VT100/XTerm escape sequences.
|
||||
#
|
22
po/en@quot.header
Normal file
22
po/en@quot.header
Normal file
@ -0,0 +1,22 @@
|
||||
# All this catalog "translates" are quotation characters.
|
||||
# The msgids must be ASCII and therefore cannot contain real quotation
|
||||
# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
|
||||
# and double quote (0x22). These substitutes look strange; see
|
||||
# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
|
||||
#
|
||||
# This catalog translates grave accent (0x60) and apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019).
|
||||
# It also translates pairs of apostrophe (0x27) to
|
||||
# left single quotation mark (U+2018) and right single quotation mark (U+2019)
|
||||
# and pairs of quotation mark (0x22) to
|
||||
# left double quotation mark (U+201C) and right double quotation mark (U+201D).
|
||||
#
|
||||
# When output to an UTF-8 terminal, the quotation characters appear perfectly.
|
||||
# When output to an ISO-8859-1 terminal, the single quotation marks are
|
||||
# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
|
||||
# grave/acute accent (by libiconv), and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
# When output to an ASCII terminal, the single quotation marks are
|
||||
# transliterated to apostrophes, and the double quotation marks are
|
||||
# transliterated to 0x22.
|
||||
#
|
23
po/insert-header.sin
Normal file
23
po/insert-header.sin
Normal file
@ -0,0 +1,23 @@
|
||||
# Sed script that inserts the file called HEADER before the header entry.
|
||||
#
|
||||
# At each occurrence of a line starting with "msgid ", we execute the following
|
||||
# commands. At the first occurrence, insert the file. At the following
|
||||
# occurrences, do nothing. The distinction between the first and the following
|
||||
# occurrences is achieved by looking at the hold space.
|
||||
/^msgid /{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/m/m/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Read the file.
|
||||
r HEADER
|
||||
# Output the file's contents by reading the next line. But don't lose the
|
||||
# current line while doing this.
|
||||
g
|
||||
N
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
6
po/quot.sed
Normal file
6
po/quot.sed
Normal file
@ -0,0 +1,6 @@
|
||||
s/"\([^"]*\)"/“\1”/g
|
||||
s/`\([^`']*\)'/‘\1’/g
|
||||
s/ '\([^`']*\)' / ‘\1’ /g
|
||||
s/ '\([^`']*\)'$/ ‘\1’/g
|
||||
s/^'\([^`']*\)' /‘\1’ /g
|
||||
s/“”/""/g
|
19
po/remove-potcdate.sin
Normal file
19
po/remove-potcdate.sin
Normal file
@ -0,0 +1,19 @@
|
||||
# Sed script that remove the POT-Creation-Date line in the header entry
|
||||
# from a POT file.
|
||||
#
|
||||
# The distinction between the first and the following occurrences of the
|
||||
# pattern is achieved by looking at the hold space.
|
||||
/^"POT-Creation-Date: .*"$/{
|
||||
x
|
||||
# Test if the hold space is empty.
|
||||
s/P/P/
|
||||
ta
|
||||
# Yes it was empty. First occurrence. Remove the line.
|
||||
g
|
||||
d
|
||||
bb
|
||||
:a
|
||||
# The hold space was nonempty. Following occurrences. Do nothing.
|
||||
x
|
||||
:b
|
||||
}
|
Loading…
Reference in New Issue
Block a user