configure.ac 37.1 KB
Newer Older
1 2 3 4 5
AC_PREREQ(2.59)

dnl ================================================================
dnl XXX: If you are making a release then you need to check these
dnl sections:
Robert Bragg's avatar
Robert Bragg committed
6
dnl » API versions (Only the 1.x version needs to change)
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
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.
Emmanuele Bassi's avatar
Emmanuele Bassi committed
27
m4_define([cogl_1_minor_version], [22])
28
m4_define([cogl_1_micro_version], [1])
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
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.
58
m4_define([cogl_lt_current], 24)
Emmanuele Bassi's avatar
Emmanuele Bassi committed
59
m4_define([cogl_lt_revision], 1)
60
m4_define([cogl_lt_age], 4)
61 62 63 64 65 66 67 68 69 70 71 72
# 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.
Robert Bragg's avatar
Robert Bragg committed
73 74 75
#
# Possible status values are: git, snapshot or release
#
76
m4_define([cogl_release_status], [git])
77

78 79 80 81
AC_INIT(cogl, [cogl_1_version])
AC_CONFIG_SRCDIR(cogl/cogl.h)
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/autotools])
82
AC_CONFIG_HEADERS(cogl-config.h)
83
AC_CONFIG_HEADERS(cogl-mutter-config.h)
84
AC_GNU_SOURCE
85

86 87 88 89 90 91 92 93 94 95
dnl ================================================================
dnl Check that we are configured by mutter
dnl ================================================================

AC_ARG_VAR([MUTTER_VERSION])
AC_ARG_VAR([LIBMUTTER_API_VERSION])

AS_IF([test "x$MUTTER_VERSION" = "x"],
      [AC_MSG_ERROR([Clutter can only be configured by mutter])],)

96 97 98
dnl ================================================================
dnl Required versions for dependencies
dnl ================================================================
99
m4_define([glib_req_version],           [2.32.0])
100 101 102 103 104 105
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([xfixes_req_version],         [3])
m4_define([xcomposite_req_version],     [0.4])
106
m4_define([xrandr_req_version],         [1.2])
107
m4_define([cairo_req_version],          [1.10])
108
m4_define([wayland_server_req_version], [1.1.90])
109
m4_define([mirclient_req_version],      [0.9.0])
110 111 112 113 114 115 116 117 118 119

dnl These variables get copied into the generated README
AC_SUBST([GLIB_REQ_VERSION], [glib_req_version])
AC_SUBST([GDK_PIXBUF_REQ_VERSION], [gdk_pixbuf_req_version])
AC_SUBST([CAIRO_REQ_VERSION], [cairo_req_version])
AC_SUBST([PANGOCAIRO_REQ_VERSION], [pangocairo_req_version])
AC_SUBST([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
AC_SUBST([XFIXES_REQ_VERSION], [xfixes_req_version])
AC_SUBST([GI_REQ_VERSION], [gi_req_version])
AC_SUBST([UPROF_REQ_VERSION], [uprof_req_version])
120
AC_SUBST([WAYLAND_SERVER_REQ_VERSION], [wayland_server_req_version])
121 122 123 124 125

# 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}

126
AM_INIT_AUTOMAKE([1.14 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar subdir-objects])
127 128
AM_SILENT_RULES([yes])

129
AH_BOTTOM([#include "config-custom.h"])
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159

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])

160 161 162 163 164
dnl ================================================================
dnl Compiler stuff.
dnl ================================================================
AC_PROG_CC
AC_PROG_CPP
165
AC_PROG_CXX
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
AM_PROG_CC_C_O
AC_ISC_POSIX
AC_C_CONST

dnl     ============================================================
dnl     Compiler features
dnl     ============================================================
AC_MSG_CHECKING([for _Static_assert])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_Static_assert (1, "");],
                                   [(void) 0])],
                  [AC_DEFINE([HAVE_STATIC_ASSERT], [1],
                             [Whether _Static_assert can be used or not])
                   AC_MSG_RESULT([yes])],
                  [AC_MSG_RESULT([no])])

dnl ================================================================
dnl Libtool stuff.
dnl ================================================================
dnl AC_PROG_LIBTOOL
dnl LIBTOOL="$LIBTOOL --preserve-dup-deps"
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
188 189 190
dnl when using libtool 2.x create libtool early, because it's used in the
dnl internal glib configure (as-glibconfig.m4)
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
191

192 193 194 195 196 197
dnl ================================================================
dnl Find an appropriate libm, for sin() etc.
dnl ================================================================
LT_LIB_M
AC_SUBST(LIBM)

198 199 200 201 202
dnl ================================================================
dnl See what platform we are building for
dnl ================================================================
AC_CANONICAL_HOST

203 204 205 206 207 208 209 210 211 212
dnl     ============================================================
dnl     Installed tests
dnl     ============================================================

AC_ARG_ENABLE(installed_tests,
              AS_HELP_STRING([--enable-installed-tests],
                             [Install test programs (default: no)]),,
              [enable_installed_tests=no])
AM_CONDITIONAL(ENABLE_INSTALLED_TESTS, test x$enable_installed_tests = xyes)

213 214 215
dnl     ============================================================
dnl     Enable debugging
dnl     ============================================================
216
m4_define([debug_default], [m4_if(cogl_release_status, [git], [yes], [no])])
217 218
AC_ARG_ENABLE(
  [debug],
219
  [AC_HELP_STRING([--enable-debug=@<:@no/yes@:>@], [Control Cogl debugging level @<:@default=]debug_default[@:>@])],
220
  [],
221
  enable_debug=debug_default
222 223 224 225 226 227
)
AS_CASE(
  [$enable_debug],
  [yes],
  [
    test "$cflags_set" = set || CFLAGS="$CFLAGS -g -O0"
Neil Roberts's avatar
Neil Roberts committed
228
    COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DCOGL_GL_DEBUG -DCOGL_OBJECT_DEBUG -DCOGL_ENABLE_DEBUG"
229 230 231
  ],
  [no],
  [
Neil Roberts's avatar
Neil Roberts committed
232
    COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
233 234 235 236 237 238
  ],
  [AC_MSG_ERROR([Unknown argument for --enable-debug])]
)

AC_SUBST(COGL_DEBUG_CFLAGS)

239 240 241 242 243 244 245 246 247 248 249 250
AC_ARG_ENABLE(
  [unit-tests],
  [AC_HELP_STRING([--enable-unit-tests=@<:@no/yes@:>@], [Build Cogl unit tests @<:@default=yes@:>@])],
  [],
  enable_unit_tests=yes
)
AS_IF([test "x$enable_unit_tests" = "xyes"],
      [
        AC_DEFINE([ENABLE_UNIT_TESTS], [1], [Whether to enable building unit tests])
      ]
)
AM_CONDITIONAL(UNIT_TESTS, test "x$enable_unit_tests" = "xyes")
251

252 253 254 255 256
dnl     ============================================================
dnl     Enable cairo usage for debugging
dnl       (debugging code can use cairo to dump the atlas)
dnl     ============================================================

257
PKG_CHECK_EXISTS([CAIRO], [cairo >= cairo_req_version], [have_cairo=yes])
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
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])])

273
        COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES cairo >= cairo_req_version"
274 275 276 277
        AC_DEFINE([HAVE_CAIRO], [1], [Whether we have cairo or not])
      ])


278 279 280 281
dnl     ============================================================
dnl     Enable profiling
dnl     ============================================================
AC_ARG_ENABLE(profile,
282
              [AC_HELP_STRING([--enable-profile=@<:@no/yes@:>@],
283
                             [Turn on uprof profiling support. yes; All UProf profiling probe points are compiled in and may be runtime enabled. no; No profiling support will built into cogl.  @<:@default=no@:>@])],
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
              [],
              [enable_profile=no])
AS_IF([test "x$enable_profile" = "xyes"],
      [
        AS_IF([test "x$GCC" = "xyes"],
              [
                COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES uprof-0.3"
                COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DCOGL_ENABLE_PROFILE"
                AS_IF([test "x$enable_debug" = "xyes"], [COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -DUPROF_DEBUG"])
              ],
              [
                AC_MSG_ERROR([--enable-profile is currently only supported if using GCC])
              ])
      ])
AM_CONDITIONAL(PROFILE, test "x$enable_profile" != "xno")


301 302 303 304 305 306
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
307
m4_define([maintainer_default], [m4_if(cogl_release_status, [git], [yes], [no])])
308 309
AC_ARG_ENABLE(
  [maintainer-flags],
310
  [AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@], [Use strict compiler flags @<:@default=]maintainer_default[@:>@])],
311
  [],
312
  enable_maintainer_flags=maintainer_default
313 314
)

315
MAINTAINER_COMPILER_FLAGS="-Wall -Wcast-align -Wformat -Wformat-security
316 317 318
                           -Werror=uninitialized -Werror=no-strict-aliasing
                           -Werror=empty-body -Werror=init-self -Werror=undef
                           -Werror=declaration-after-statement -Werror=vla
319 320
                           -Werror=pointer-arith -Werror=missing-declarations
                           -Werror=maybe-uninitialized"
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340

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
341
COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS ${MAINTAINER_CFLAGS#*  }"
Rui Matos's avatar
Rui Matos committed
342
COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS -Wno-error=sign-compare"
343 344


345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
dnl     ============================================================
dnl     Enable deprecation guards
dnl     ============================================================

# disable deprecated options from Glib only when building from git;
# the rules for distcheck will take care of turning this on when
# making a release
m4_define([deprecated_default],
          [m4_if(cogl_release_status, [git], [no], [yes])])

AC_ARG_ENABLE([deprecated],
              [AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
                              [Whether deprecated symbols should be disabled when compiling Cogl @<:@default=]deprecated_default[@:>@])],
              [],
              [enable_deprecated=deprecated_default])

AS_CASE([$enable_deprecated],

        [no],
        [
          DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES"
        ],

        [yes],
        [
          DEPRECATED_CFLAGS=""
        ],

        [AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
)

# strip leading spaces
COGL_EXTRA_CFLAGS="$COGL_EXTRA_CFLAGS ${DEPRECATED_CFLAGS#*  }"

379 380 381 382
dnl ================================================================
dnl Check for dependency packages.
dnl ================================================================

383 384 385 386
AM_PATH_GLIB_2_0([glib_req_version],
                 [],
                 [AC_MSG_ERROR([glib-2.0 is required])],
                 [gobject gthread gmodule-no-export])
387

388
COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES gobject-2.0 gmodule-no-export-2.0"
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405

dnl     ============================================================
dnl     Should cogl-pango be built?
dnl     ============================================================

AC_ARG_ENABLE(
  [cogl-pango],
  [AC_HELP_STRING([--enable-cogl-pango=@<:@no/yes@:>@], [Enable pango support @<:@default=yes@:>@])],
  [],
  enable_cogl_pango=yes
)
AS_IF([test "x$enable_cogl_pango" = "xyes"],
      [
	COGL_PANGO_PKG_REQUIRES="$COGL_PANGO_PKG_REQUIRES pangocairo >= pangocairo_req_version"
      ]
)

406 407 408 409 410 411
dnl     ============================================================
dnl     Should cogl-path be built?
dnl     ============================================================

AC_ARG_ENABLE(
  [cogl-path],
412
  [AC_HELP_STRING([--enable-cogl-path=@<:@no/yes@:>@], [Enable 2D path support @<:@default=yes@:>@])],
413 414 415 416 417 418 419 420
  [],
  enable_cogl_path=yes
)
AS_IF([test "x$enable_cogl_path" = "xyes"],
      [
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_COGL_PATH_SUPPORT"
      ]
)
Plamena Manolova's avatar
Plamena Manolova committed
421

422 423 424
dnl     ============================================================
dnl     Choose image loading backend
dnl     ============================================================
425 426
COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES gdk-pixbuf-2.0 >= gdk_pixbuf_req_version"
COGL_IMAGE_BACKEND="gdk-pixbuf"
427 428

dnl     ============================================================
429
dnl     Determine which drivers and window systems we can support
430 431
dnl     ============================================================

432 433 434 435 436
dnl         ========================================================
dnl         Drivers first...
dnl         ========================================================
EGL_CHECKED=no

437 438
enabled_drivers=""

439
HAVE_GLES1=0
440 441 442 443 444 445 446 447
AC_ARG_ENABLE(
  [gles1],
  [AC_HELP_STRING([--enable-gles1=@<:@no/yes@:>@], [Enable support for OpenGL-ES 1.1 @<:@default=no@:>@])],
  [],
  enable_gles1=no
)
AS_IF([test "x$enable_gles1" = "xyes"],
      [
448
        enabled_drivers="$enabled_drivers gles1"
449 450 451 452 453 454

        cogl_gl_headers="GLES/gl.h GLES/glext.h"

        AC_DEFINE([HAVE_COGL_GLES], 1, [Have GLES 1.1 for rendering])
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES CLUTTER_COGL_HAS_GLES"
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES1"
455
        HAVE_GLES1=1
456 457

        PKG_CHECK_EXISTS([glesv1_cm],
458
          [COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL glesv1_cm"
459
           COGL_GLES1_LIBNAME="libGLESv1_CM.so"
460 461
          ],
          [
462 463 464 465 466 467 468 469 470 471
            # We have to check the two headers independently as GLES/glext.h
            # needs to include GLES/gl.h to have the GL types defined (eg.
            # GLenum).
            AC_CHECK_HEADER([GLES/gl.h],
                            [],
                            [AC_MSG_ERROR([Unable to locate GLES/gl.h])])
            AC_CHECK_HEADER([GLES/glext.h],
                            [],
                            [AC_MSG_ERROR([Unable to locate GLES/glext.h])],
                            [#include <GLES/gl.h>])
472

473 474 475 476 477 478 479
            # Early implementations provided only a GLES/egl.h while Khronos's
            # implementer guide now states EGL/egl.h is the One. Some
            # implementations keep a GLES/egl.h wrapper around EGL/egl.h for
            # backward compatibility while others provide EGL/egl.h only.
            AC_CHECK_HEADERS([GLES/egl.h EGL/egl.h])

            AS_IF([test "x$ac_cv_header_GLES_egl_h" = "xyes"],
480 481 482 483 484 485 486
                  [COGL_EGL_INCLUDES="#include <GLES/egl.h>"],
                  [test "x$ac_cv_header_EGL_egl_h" = "xyes"],
                  [
                    COGL_EGL_INCLUDES="#include <EGL/egl.h>"
                  ],
                  [AC_MSG_ERROR([Unable to locate EGL header])])
            AC_SUBST([COGL_EGL_INCLUDES])
487

488 489 490 491 492 493
            AC_CHECK_HEADERS([EGL/eglext.h],
                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
#include <EGL/eglext.h>"],
                             [],
                             [$COGL_EGL_INCLUDES])

494 495 496 497 498 499 500 501 502
            # Check for a GLES 1.x Common Profile library with/without EGL.
            #
            # Note: historically GLES 1 libraries shipped with the
            # EGL and GLES symbols all bundled in one library. Now
            # the Khronos Implementers Guide defines two naming
            # schemes: -lGLES_CM should be used for a library that
            # bundles the GLES and EGL API together and -lGLESv1_CM
            # would be used for a standalone GLES API.
            AC_CHECK_LIB(GLES_CM, [eglInitialize],
503
              [COGL_GLES1_LIBNAME="libGLES_CM.so"],
504 505
              [
                AC_CHECK_LIB(GLESv1_CM, [glFlush],
506
                  [COGL_GLES1_LIBNAME="libGLESv1_CM.so"
507 508 509 510 511 512 513 514 515
                   NEED_SEPARATE_EGL=yes
                  ],
                  [AC_MSG_ERROR([Unable to locate required GLES 1.x Common Profile library])])
              ])

            EGL_CHECKED=yes
          ])
      ])

516
HAVE_GLES2=0
517 518 519 520 521 522 523 524
AC_ARG_ENABLE(
  [gles2],
  [AC_HELP_STRING([--enable-gles2=@<:@no/yes@:>@], [Enable support for OpenGL-ES 2.0 @<:@default=no@:>@])],
  [],
  enable_gles2=no
)
AS_IF([test "x$enable_gles2" = "xyes"],
      [
525
        enabled_drivers="$enabled_drivers gles2"
526 527 528 529 530

        cogl_gl_headers="GLES2/gl2.h GLES2/gl2ext.h"
        AC_DEFINE([HAVE_COGL_GLES2], 1, [Have GLES 2.0 for rendering])
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES CLUTTER_COGL_HAS_GLES"
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES2"
531
        HAVE_GLES2=1
532

533 534 535 536 537 538 539 540 541 542 543 544 545 546 547
        PKG_CHECK_EXISTS([glesv2],
          [COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL glesv2"
           COGL_GLES2_LIBNAME="libGLESv2.so"
          ],
          [
            # We have to check the two headers independently as GLES2/gl2ext.h
            # needs to include GLES2/gl2.h to have the GL types defined (eg.
            # GLenum).
            AC_CHECK_HEADER([GLES2/gl2.h],
                            [],
                            [AC_MSG_ERROR([Unable to locate GLES2/gl2.h])])
            AC_CHECK_HEADER([GLES2/gl2ext.h],
                            [],
                            [AC_MSG_ERROR([Unable to locate GLES2/gl2ext.h])],
                            [#include <GLES2/gl2.h>])
548

549 550
            COGL_GLES2_LIBNAME="libGLESv2.so"
          ])
551 552
      ])

553
HAVE_GL=0
554 555 556 557
AC_ARG_ENABLE(
  [gl],
  [AC_HELP_STRING([--enable-gl=@<:@no/yes@:>@], [Enable support for OpenGL @<:@default=yes@:>@])],
  [],
558
  [enable_gl=yes]
559 560 561
)
AS_IF([test "x$enable_gl" = "xyes"],
      [
562
        enabled_drivers="$enabled_drivers gl"
563 564

        PKG_CHECK_EXISTS([x11], [ALLOW_GLX=yes])
565 566 567

        cogl_gl_headers="GL/gl.h"

Rui Matos's avatar
Rui Matos committed
568 569 570 571 572 573 574 575 576
        PKG_CHECK_EXISTS([gl],
        dnl We don't want to use COGL_PKG_REQUIRES here because we don't want to
        dnl directly link against libGL
        [COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL gl"],
        [AC_CHECK_LIB(GL, [glGetString],
        ,
        [AC_MSG_ERROR([Unable to locate required GL library])])
        ])
        COGL_GL_LIBNAME="libGL.so.1"
577 578 579 580 581

        AC_DEFINE([HAVE_COGL_GL], [1], [Have GL for rendering])

        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GL"
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS CLUTTER_COGL_HAS_GL"
582
        HAVE_GL=1
583 584
      ])

585 586 587
AM_CONDITIONAL([COGL_DRIVER_GL_SUPPORTED], [test "x$enable_gl" = "xyes"])
AM_CONDITIONAL([COGL_DRIVER_GLES_SUPPORTED],
               [test "x$enable_gles1" = "xyes" || test "x$enable_gles2" = "xyes"])
588

589
dnl Allow the GL library names and default driver to be overridden with configure options
590 591 592 593 594 595 596 597 598 599 600 601
AC_ARG_WITH([gl-libname],
            [AS_HELP_STRING([--with-gl-libname],
                            override the name of the GL library to dlopen)],
            [COGL_GL_LIBNAME="$withval"])
AC_ARG_WITH([gles1-libname],
            [AS_HELP_STRING([--with-gles1-libname],
                            override the name of the GLESv1 library to dlopen)],
            [COGL_GLES1_LIBNAME="$withval"])
AC_ARG_WITH([gles2-libname],
            [AS_HELP_STRING([--with-gles2-libname],
                            override the name of the GLESv2 library to dlopen)],
            [COGL_GLES2_LIBNAME="$withval"])
602 603 604 605 606 607 608 609 610
AC_ARG_WITH([default-driver],
            [AS_HELP_STRING([--with-default-driver],
                            specify a default cogl driver)],
            [COGL_DEFAULT_DRIVER="${withval}"],
            [COGL_DEFAULT_DRIVER="" ])

AM_CONDITIONAL(HAVE_COGL_DEFAULT_DRIVER,
  [ test "x$COGL_DEFAULT_DRIVER" != "x" ])

611

612
AC_SUBST([COGL_GL_LIBNAME])
613
AC_SUBST([HAVE_GL])
614
AC_SUBST([COGL_GLES1_LIBNAME])
615
AC_SUBST([HAVE_GLES1])
616
AC_SUBST([COGL_GLES2_LIBNAME])
617
AC_SUBST([HAVE_GLES2])
618
AC_SUBST([COGL_DEFAULT_DRIVER])
619

620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640
AC_ARG_ENABLE(
  [cogl-gles2],
  [AC_HELP_STRING([--enable-cogl-gles2=@<:@no/yes@:>@],
                  [Enable libcogl-gles2 frontend api for OpenGL-ES 2.0 @<:@default=auto@:>@])],
  [],
  [
    AS_IF([test "x$HAVE_GLES2" = "x1"],
          [enable_cogl_gles2=yes],
          [enable_cogl_gles2=no])
  ]
)
AS_IF([test "x$enable_cogl_gles2" = "xyes"],
      [
        AS_IF([test "x$HAVE_GLES2" != "x1"],
              [
                AC_MSG_ERROR([libcogl-gles2 is currently only supported on systems with a native GLES 2.0 library])
              ])
      ])
AM_CONDITIONAL([BUILD_COGL_GLES2], [test "x$enable_cogl_gles2" = "xyes"])


641 642 643 644 645 646 647 648 649 650 651 652 653
dnl         ========================================================
dnl         Check window system integration libraries...
dnl         ========================================================

AC_ARG_ENABLE(
  [glx],
  [AC_HELP_STRING([--enable-glx=@<:@no/yes@:>@], [Enable support GLX @<:@default=auto@:>@])],
  [],
  [AS_IF([test "x$ALLOW_GLX" = "xyes"], [enable_glx=yes], [enable_glx=no])]
)
AS_IF([test "x$enable_glx" = "xyes"],
      [
        AS_IF([test "x$ALLOW_GLX" != "xyes"],
654
              [AC_MSG_ERROR([GLX not supported with this configuration])])
655 656 657 658 659

        NEED_XLIB=yes
        SUPPORT_GLX=yes
        GL_WINSYS_APIS="$GL_WINSYS_APIS glx"

660
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLX_SUPPORT"
661 662 663 664 665
      ])
AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "xyes"])

EGL_PLATFORM_COUNT=0

666 667
AC_ARG_ENABLE(
  [kms-egl-platform],
668
  [AC_HELP_STRING([--enable-kms-egl-platform=@<:@no/yes@:>@], [Enable support for the KMS egl platform @<:@default=no@:>@])],
669
  [],
Rui Matos's avatar
Rui Matos committed
670
  enable_kms_egl_platform=yes
671
)
672
AS_IF([test "x$enable_kms_egl_platform" = "xyes"],
673 674 675 676 677 678 679 680 681 682
      [
        EGL_PLATFORM_COUNT=$((EGL_PLATFORM_COUNT+1))
        NEED_EGL=yes
        EGL_PLATFORMS="$EGL_PLATFORMS kms"

        PKG_CHECK_EXISTS([gbm],
                         [
                           COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES gbm"
                           COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES libdrm"
                         ],
683
                         [AC_MSG_ERROR([Unable to locate required libgbm library for the KMS egl platform])])
684

685 686 687
        GBM_VERSION=`$PKG_CONFIG --modversion gbm`
        GBM_MAJOR=`echo $GBM_VERSION | cut -d'.' -f1`
        GBM_MINOR=`echo $GBM_VERSION | cut -d'.' -f2`
Neil Roberts's avatar
Neil Roberts committed
688
        GBM_MICRO=`echo $GBM_VERSION | cut -d'.' -f3 | sed 's/-.*//'`
689 690 691 692 693

        AC_DEFINE_UNQUOTED([COGL_GBM_MAJOR], [$GBM_MAJOR], [The major version for libgbm])
        AC_DEFINE_UNQUOTED([COGL_GBM_MINOR], [$GBM_MINOR], [The minor version for libgbm])
        AC_DEFINE_UNQUOTED([COGL_GBM_MICRO], [$GBM_MICRO], [The micro version for libgbm])

694 695 696 697 698
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_PLATFORM_KMS_SUPPORT"
      ])
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_KMS,
               [test "x$enable_kms_egl_platform" = "xyes"])

699 700 701 702
AC_ARG_ENABLE(
  [wayland-egl-server],
  [AC_HELP_STRING([--enable-wayland-egl-server=@<:@no/yes@:>@], [Enable server side wayland support @<:@default=no@:>@])],
  [],
Rui Matos's avatar
Rui Matos committed
703
  enable_wayland_egl_server=yes
704
)
705
AS_IF([test "x$enable_wayland_egl_server" = "xyes"],
706 707
      [
        NEED_EGL=yes
708

709
        PKG_CHECK_MODULES(WAYLAND_SERVER,
710 711
                          [wayland-server >= wayland_server_req_version])
        COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-server >= wayland_server_req_version"
712

713 714 715 716 717
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT"
      ])
AM_CONDITIONAL(SUPPORT_WAYLAND_EGL_SERVER,
               [test "x$enable_wayland_egl_server" = "xyes"])

718 719 720 721 722 723
dnl This should go last, since it's the default fallback and we need
dnl to check the value of $EGL_PLATFORM_COUNT here.
AC_ARG_ENABLE(
  [xlib-egl-platform],
  [AC_HELP_STRING([--enable-xlib-egl-platform=@<:@no/yes@:>@], [Enable support for the Xlib egl platform @<:@default=auto@:>@])],
  [],
Rui Matos's avatar
Rui Matos committed
724
  enable_xlib_egl_platform=yes
725 726 727 728 729 730 731 732
)
AS_IF([test "x$enable_xlib_egl_platform" = "xyes"],
      [
        EGL_PLATFORM_COUNT=$((EGL_PLATFORM_COUNT+1))
        NEED_EGL=yes
        NEED_XLIB=yes
        EGL_PLATFORMS="$EGL_PLATFORMS xlib"

733
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_PLATFORM_XLIB_SUPPORT"
734
      ])
735
AM_CONDITIONAL(SUPPORT_EGL_PLATFORM_XLIB,
736 737 738 739 740 741 742 743
               [test "x$enable_xlib_egl_platform" = "xyes"])

AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
      [
        PKG_CHECK_EXISTS([egl],
          [COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES egl"],
          [
            AC_CHECK_HEADERS(
744
              [EGL/egl.h],
745 746
              [],
              [AC_MSG_ERROR([Unable to locate required EGL headers])])
747 748 749 750 751
            AC_CHECK_HEADERS(
              [EGL/eglext.h],
              [],
              [AC_MSG_ERROR([Unable to locate required EGL headers])],
              [#include <EGL/egl.h>])
752 753 754 755 756 757 758 759

            AC_CHECK_LIB(EGL, [eglInitialize],
              [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],
              [AC_MSG_ERROR([Unable to locate required EGL library])])

            COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"
          ]
          )
760 761 762 763 764

        COGL_EGL_INCLUDES="#include <EGL/egl.h>
#include <EGL/eglext.h>"
        AC_SUBST([COGL_EGL_INCLUDES])
      ])
765 766 767

AS_IF([test "x$NEED_EGL" = "xyes"],
      [
768 769
        SUPPORT_EGL=yes
        GL_WINSYS_APIS="$GL_WINSYS_APIS egl"
770
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_SUPPORT"
771
      ])
772

773 774 775 776 777 778 779
AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "xyes"])

dnl         ========================================================
dnl         Check X11 dependencies if required
dnl         ========================================================
AS_IF([test "x$NEED_XLIB" = "xyes"],
      [
780
        X11_MODULES="x11 xext xfixes >= xfixes_req_version xdamage xcomposite >= xcomposite_req_version xrandr >= xrandr_req_version"
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795
        PKG_CHECK_MODULES(DUMMY, [$X11_MODULES],
                          [COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES $X11_MODULES"])
        SUPPORT_X11=yes
        SUPPORT_XLIB=yes

        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_X11"
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_X11_SUPPORT"
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_XLIB"
        COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_XLIB_SUPPORT"
      ])

AM_CONDITIONAL(X11_TESTS, [test "x$SUPPORT_X11" = "xyes"])
AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "xyes"])
AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "xyes"])

796 797 798
dnl ================================================================
dnl Documentation stuff.
dnl ================================================================
799 800 801 802 803
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
GDKPIXBUF_PREFIX="`$PKG_CONFIG --variable=prefix gdk-pixbuf-2.0`"
AC_SUBST(GLIB_PREFIX)
AC_SUBST(GDKPIXBUF_PREFIX)

804 805

AC_SUBST(COGL_PKG_REQUIRES)
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824
if test -n "$COGL_PKG_REQUIRES"; then
  PKG_CHECK_MODULES(COGL_DEP, [$COGL_PKG_REQUIRES])

  if test -n "$COGL_PKG_REQUIRES_GL"; then
    PKG_CHECK_MODULES(COGL_DEP_GL, [$COGL_PKG_REQUIRES_GL])

    dnl Strip out the GL libraries from the GL pkg-config files so we can
    dnl dynamically load them instead
    gl_libs=""
    for x in $COGL_DEP_GL_LIBS; do
      AS_CASE([$x],
              [-lGL], [],
              [-lGLESv2], [],
              [-lGLESv1_CM], [],
              [*], [gl_libs="$gl_libs $x"])
    done
    COGL_DEP_CFLAGS="$COGL_DEP_CFLAGS $COGL_DEP_CFLAGS_GL"
    COGL_DEP_LIBS="$COGL_DEP_LIBS $gl_libs"
  fi
825
fi
826
AC_SUBST(COGL_PANGO_PKG_REQUIRES)
827 828

AS_IF([test "x$enable_cogl_pango" = "xyes"],
829
  [PKG_CHECK_MODULES(COGL_PANGO_DEP, [$COGL_PANGO_PKG_REQUIRES])]
830
)
831 832
AM_CONDITIONAL([BUILD_COGL_PANGO], [test "x$enable_cogl_pango" = "xyes"])

833 834
AM_CONDITIONAL([BUILD_COGL_PATH], [test "x$enable_cogl_path" = "xyes"])

835 836 837 838 839 840 841 842
dnl ================================================================
dnl Misc program dependencies.
dnl ================================================================
AC_PROG_INSTALL

dnl ================================================================
dnl GObject-Introspection check
dnl ================================================================
843
GOBJECT_INTROSPECTION_CHECK([gi_req_version])
844 845 846 847 848 849

dnl ================================================================
dnl Checks for header files.
dnl ================================================================
AC_PATH_X
AC_HEADER_STDC
850
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h)
851 852 853 854
AC_CHECK_HEADER([endian.h],
                [AC_CHECK_DECL([__FLOAT_WORD_ORDER],
                               AC_DEFINE([HAVE_FLOAT_WORD_ORDER], [1],
                                         [Has the __FLOAT_WORD_ORDER macro]))])
855 856 857 858 859

dnl ================================================================
dnl Checks for library functions.
dnl ================================================================

860 861
dnl The 'ffs' function is part of C99 so it isn't always
dnl available. Cogl has a fallback if needed.
862
AC_CHECK_FUNCS([ffs])
863

864 865 866
dnl 'memmem' is a GNU extension but we have a simple fallback
AC_CHECK_FUNCS([memmem])

867 868 869 870 871 872
dnl This is used in the cogl-gles2-gears example but it is a GNU extension
save_libs="$LIBS"
LIBS="$LIBS $LIBM"
AC_CHECK_FUNCS([sincos])
LIBS="$save_libs"

873 874 875 876 877 878
dnl ================================================================
dnl Platform values
dnl ================================================================

dnl These are values from system headers that we want to copy into the
dnl public Cogl headers without having to include the system header
879
have_poll_h=no
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
AC_CHECK_HEADER(poll.h,
	       [
		AC_COMPUTE_INT(COGL_SYSDEF_POLLIN, POLLIN, [#include <poll.h>],
			       AC_MSG_ERROR([Unable to get value of POLLIN]))
		AC_COMPUTE_INT(COGL_SYSDEF_POLLPRI, POLLPRI, [#include <poll.h>],
			       AC_MSG_ERROR([Unable to get value of POLLPRI]))
		AC_COMPUTE_INT(COGL_SYSDEF_POLLOUT, POLLOUT, [#include <poll.h>],
			       AC_MSG_ERROR([Unable to get value of POLLOUT]))
		AC_COMPUTE_INT(COGL_SYSDEF_POLLERR, POLLERR, [#include <poll.h>],
			       AC_MSG_ERROR([Unable to get value of POLLERR]))
		AC_COMPUTE_INT(COGL_SYSDEF_POLLHUP, POLLHUP, [#include <poll.h>],
			       AC_MSG_ERROR([Unable to get value of POLLHUP]))
		AC_COMPUTE_INT(COGL_SYSDEF_POLLNVAL, POLLNVAL, [#include <poll.h>],
			       AC_MSG_ERROR([Unable to get value of POLLNVAL]))
		COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_POLL_SUPPORT"
		have_poll_h=yes
	       ])
897 898 899 900 901 902 903 904 905 906 907

AS_IF([test "x$have_poll_h" = "xno"],
      [
       COGL_SYSDEF_POLLIN=1
       COGL_SYSDEF_POLLPRI=2
       COGL_SYSDEF_POLLOUT=4
       COGL_SYSDEF_POLLERR=8
       COGL_SYSDEF_POLLHUP=16
       COGL_SYSDEF_POLLNVAL=32
      ])

908 909 910 911 912 913 914 915 916
COGL_DEFINES_EXTRA="$COGL_DEFINES_EXTRA
#define COGL_SYSDEF_POLLIN $COGL_SYSDEF_POLLIN
#define COGL_SYSDEF_POLLPRI $COGL_SYSDEF_POLLPRI
#define COGL_SYSDEF_POLLOUT $COGL_SYSDEF_POLLOUT
#define COGL_SYSDEF_POLLERR $COGL_SYSDEF_POLLERR
#define COGL_SYSDEF_POLLHUP $COGL_SYSDEF_POLLHUP
#define COGL_SYSDEF_POLLNVAL $COGL_SYSDEF_POLLNVAL
"

917 918 919
dnl ================================================================
dnl What needs to be substituted in other files
dnl ================================================================
920
COGL_DEFINES="$COGL_DEFINES_EXTRA"
921 922 923 924 925
for x in $COGL_DEFINES_SYMBOLS; do
  COGL_DEFINES="$COGL_DEFINES
#define $x 1"
done;
AC_SUBST(COGL_DEFINES)
926
AM_SUBST_NOTMAKE(COGL_DEFINES)
927 928 929 930 931 932 933 934 935 936 937

AS_IF([test "x$cogl_gl_headers" = "x"],
      [AC_MSG_ERROR([Internal error: no GL header set])])
dnl cogl_gl_headers is a space separate list of headers to
dnl include. We'll now convert them to a single variable with a
dnl #include line for each header
COGL_GL_HEADER_INCLUDES=""
for x in $cogl_gl_headers; do
  COGL_GL_HEADER_INCLUDES="$COGL_GL_HEADER_INCLUDES
#include <$x>"
done;
938
AC_SUBST(COGL_GL_HEADER_INCLUDES)
939
AM_SUBST_NOTMAKE(COGL_GL_HEADER_INCLUDES)
940 941 942

AC_SUBST(COGL_DEP_CFLAGS)
AC_SUBST(COGL_DEP_LIBS)
943 944
AC_SUBST(COGL_PANGO_DEP_CFLAGS)
AC_SUBST(COGL_PANGO_DEP_LIBS)
Plamena Manolova's avatar
Plamena Manolova committed
945 946
AC_SUBST(COGL_GST_DEP_CFLAGS)
AC_SUBST(COGL_GST_DEP_LIBS)
947 948 949
AC_SUBST(COGL_EXTRA_CFLAGS)
AC_SUBST(COGL_EXTRA_LDFLAGS)

950 951 952 953
# just for compatability with the clutter build...
MAINTAINER_CFLAGS=
AC_SUBST(MAINTAINER_CFLAGS)

954 955
AC_OUTPUT(
Makefile
956
test-fixtures/Makefile
957
cogl/Makefile
958
cogl/mutter-cogl-$LIBMUTTER_API_VERSION.pc:cogl/mutter-cogl.pc.in
959
cogl/cogl-defines.h
960
cogl/cogl-gl-header.h
961
cogl/cogl-egl-defines.h
962
cogl-pango/Makefile
963
cogl-pango/mutter-cogl-pango-$LIBMUTTER_API_VERSION.pc:cogl-pango/mutter-cogl-pango.pc.in
964
cogl-path/Makefile
965
cogl-path/mutter-cogl-path-$LIBMUTTER_API_VERSION.pc:cogl-path/mutter-cogl-path.pc.in
966
cogl-gles2/Makefile
967
cogl-gles2/mutter-cogl-gles2-$LIBMUTTER_API_VERSION.pc:cogl-gles2/mutter-cogl-gles2.pc.in
968
tests/Makefile
969
tests/config.env
970
tests/conform/Makefile
971
tests/unit/Makefile
972
tests/micro-perf/Makefile
973
tests/data/Makefile
974 975 976 977 978 979 980 981 982 983 984 985
)

dnl ================================================================
dnl Dah Da!
dnl ================================================================
echo ""
echo "Cogl - $COGL_1_VERSION/$COGL_VERSION (${COGL_RELEASE_STATUS})"

# Global flags
echo ""
echo " • Global:"
echo "        Prefix: ${prefix}"
986 987 988
if test "x$COGL_DEFAULT_DRIVER" != "x"; then
echo "        Default driver: ${COGL_DEFAULT_DRIVER}"
fi
989

990 991 992
echo ""
# Features
echo " • Features:"
993
echo "        Drivers: ${enabled_drivers}"
994 995 996 997 998
for driver in $enabled_drivers; do
        driver=`echo $driver | tr "[gles]" "[GLES]"`
        libname=`eval echo \\$COGL_${driver}_LIBNAME`
        echo "        Library name for $driver: $libname"
done
999 1000 1001
echo "        GL Window System APIs:${GL_WINSYS_APIS}"
if test "x$SUPPORT_EGL" = "xyes"; then
echo "        EGL Platforms:${EGL_PLATFORMS}"
1002
echo "        Wayland compositor support: ${enable_wayland_egl_server}"
1003
fi
1004
echo "        Build libcogl-gles2 GLES 2.0 frontend api: ${enable_cogl_gles2}"
1005
echo "        Image backend: ${COGL_IMAGE_BACKEND}"
1006
echo "        Cogl Pango: ${enable_cogl_pango}"
1007
echo "        Cogl Path: ${enable_cogl_path}"
1008

1009 1010
# Compiler/Debug related flags
echo ""
1011 1012 1013
echo " • Build options:"
echo "        Debugging: ${enable_debug}"
echo "        Profiling: ${enable_profile}"
1014
echo "        Enable deprecated symbols: ${enable_deprecated}"
1015
echo "        Compiler flags: ${CFLAGS} ${COGL_EXTRA_CFLAGS}"
1016
echo "        Linker flags: ${LDFLAGS} ${COGL_EXTRA_LDFLAGS}"
1017 1018 1019 1020 1021

# Miscellaneous
echo ""
echo " • Extra:"
echo "        Build introspection data: ${enable_introspection}"
1022
echo "        Build unit tests: ${enable_unit_tests}"
1023 1024

echo ""