mirror of
https://github.com/brl/mutter.git
synced 2025-02-24 00:44:10 +00:00
configure.ac: move the --enable-cairo check
This moves the --enable-cairo check because it was put in the middle of the logic that handles the --enable-debug option. This moves the --enable-cairo check down after the --enable-debug logic and adds a comment header to delimit the option like we have for other options.
This commit is contained in:
parent
b380fed23d
commit
32e7c93aff
46
configure.ac
46
configure.ac
@ -165,32 +165,12 @@ AC_ARG_ENABLE(
|
|||||||
[],
|
[],
|
||||||
enable_debug=default
|
enable_debug=default
|
||||||
)
|
)
|
||||||
|
|
||||||
PKG_CHECK_EXISTS([CAIRO], [cairo], [have_cairo=yes])
|
|
||||||
AC_ARG_ENABLE(
|
|
||||||
[cairo],
|
|
||||||
[AC_HELP_STRING([--enable-cairo=@<:@no/yes@:>@], [Control Cairo usage in Cogl debugging code @<:@default=]default[@:>@])],
|
|
||||||
[],
|
|
||||||
enable_cairo=default
|
|
||||||
)
|
|
||||||
AS_IF([test "x$enable_cairo" = "xyes" && test "x$have_cairo" != "xyes"],
|
|
||||||
[AC_MSG_ERROR([Could not find Cairo])])
|
|
||||||
|
|
||||||
|
|
||||||
AS_CASE(
|
AS_CASE(
|
||||||
[$enable_debug],
|
[$enable_debug],
|
||||||
[yes],
|
[yes],
|
||||||
[
|
[
|
||||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g -O0"
|
test "$cflags_set" = set || CFLAGS="$CFLAGS -g -O0"
|
||||||
COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DCOGL_GL_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_HANDLE_DEBUG -DCOGL_ENABLE_DEBUG"
|
COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DCOGL_GL_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_HANDLE_DEBUG -DCOGL_ENABLE_DEBUG"
|
||||||
|
|
||||||
# debugging code can use cairo to dump the atlas
|
|
||||||
AS_IF([test "x$have_cairo" = "xyes" && test "x$enable_cairo" != "xno"],
|
|
||||||
[
|
|
||||||
COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES cairo"
|
|
||||||
AC_DEFINE([HAVE_CAIRO], [1], [Whether we have cairo or not])
|
|
||||||
])
|
|
||||||
|
|
||||||
],
|
],
|
||||||
[no],
|
[no],
|
||||||
[
|
[
|
||||||
@ -202,6 +182,32 @@ AS_CASE(
|
|||||||
AC_SUBST(COGL_DEBUG_CFLAGS)
|
AC_SUBST(COGL_DEBUG_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
dnl ============================================================
|
||||||
|
dnl Enable cairo usage for debugging
|
||||||
|
dnl (debugging code can use cairo to dump the atlas)
|
||||||
|
dnl ============================================================
|
||||||
|
|
||||||
|
PKG_CHECK_EXISTS([CAIRO], [cairo], [have_cairo=yes])
|
||||||
|
AC_ARG_ENABLE(
|
||||||
|
[cairo],
|
||||||
|
[AC_HELP_STRING([--enable-cairo=@<:@no/yes@:>@], [Control Cairo usage in Cogl debugging code @<:@default=auto@:>@])],
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
AS_IF([test "x$enable_debug" = "xyes"],
|
||||||
|
[enable_cairo=$have_cairo],
|
||||||
|
[enable_cairo=no])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AS_IF([test "x$enable_cairo" = "xyes" && test "x$enable_debug" = "xyes"],
|
||||||
|
[
|
||||||
|
AS_IF([test "x$have_cairo" != "xyes"],
|
||||||
|
[AC_MSG_ERROR([Could not find Cairo])])
|
||||||
|
|
||||||
|
COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES cairo"
|
||||||
|
AC_DEFINE([HAVE_CAIRO], [1], [Whether we have cairo or not])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl ============================================================
|
dnl ============================================================
|
||||||
dnl Enable strict compiler flags
|
dnl Enable strict compiler flags
|
||||||
dnl ============================================================
|
dnl ============================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user