-
Notifications
You must be signed in to change notification settings - Fork 19
/
configure.ac
99 lines (83 loc) · 2.68 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
AC_PREREQ(2.59)
AC_INIT([grate], [0.0.0], [[email protected]])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([no-dist-gzip dist-xz foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_LIBTOOL
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_INSTALL
AM_PROG_LEX
AC_PROG_YACC
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(DevIL, ILU)
PKG_CHECK_MODULES(PNG, libpng)
PKG_CHECK_MODULES(DRM, libdrm)
AC_CHECK_LIB([z], [adler32], [enable_zlib=yes], [enable_zlib=no])
AM_CONDITIONAL([ENABLE_ZLIB], [test "x$enable_zlib" = "xyes"])
AC_CHECK_LIB([lz4], [LZ4_compress_default], [enable_lz4=yes], [enable_lz4=no])
AM_CONDITIONAL([ENABLE_LZ4], [test "x$enable_lz4" = "xyes"])
AC_ARG_ENABLE([gles-tests],
[AS_HELP_STRING([--enable-gles-tests],
[Build GLES tests (default: enabled)])],
[enable_gles="$enableval"],
[enable_gles=yes])
AS_IF([test "x$enable_gles" = "xyes"], [
PKG_CHECK_MODULES(GLES1, [egl glesv1_cm x11], [HAVE_GLES1=1], [HAVE_GLES1=0])
AM_CONDITIONAL([USE_GLES1], [test "$HAVE_GLES1" -eq 1])
PKG_CHECK_MODULES(GLES2, [egl glesv2 x11], [HAVE_GLES2=1], [HAVE_GLES2=0])
AM_CONDITIONAL([USE_GLES2], [test "$HAVE_GLES2" -eq 1])
])
AC_ARG_ENABLE([x11-display],
[AS_HELP_STRING([--enable-x11-display],
[Build with X11 display support (default: enabled)])],
[enable_x11="$enableval"],
[enable_x11=yes])
AS_IF([test "x$enable_x11" = "xyes"], [
PKG_CHECK_MODULES(XCB, [xcb xcb-image xcb-dri2 xcb-icccm], [AC_DEFINE([HAVE_XCB], [1], [Use XCB])])
])
CFLAGS="$CFLAGS -Wall"
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror],
[Treat warnings as errors (default: disabled)])],
[enable_werror="$enableval"],
[enable_werror=no])
if test "x$enable_werror" = "xyes"; then
CFLAGS="$CFLAGS -Werror"
fi
AC_CHECK_LIB([cgdrv], [CgDrv_Create], [enable_cgc=yes], [enable_cgc=no])
AM_CONDITIONAL([ENABLE_CGC], [test "x$enable_cgc" = "xyes"])
AC_CHECK_HEADER([envytools/rnn.h],
[AC_CHECK_LIB([rnn], [rnn_init], [enable_rnn=yes], [enable_rnn=no], [-lenvyutil -lxml2])])
AM_CONDITIONAL([ENABLE_RNN], [test "x$enable_rnn" = "xyes"])
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
AC_CHECK_DECL(drmSetClientCap,
[AC_DEFINE(HAVE_LIBDRM_CLIENT_CAP, 1,
[Have drmSetClientCap API])], [],
[#include <xf86drm.h>])
CPPFLAGS="$SAVE_CPPFLAGS"
AC_CONFIG_FILES([
src/libgrate/libgrate.pc
])
AC_OUTPUT([
Makefile
include/Makefile
src/Makefile
src/libcgc/Makefile
src/libgrate/Makefile
src/libhost1x/Makefile
src/libwrap/Makefile
tests/Makefile
tests/drm/Makefile
tests/gles1/Makefile
tests/gles2/Makefile
tests/grate/Makefile
tests/host1x/Makefile
tests/nvhost/Makefile
tools/Makefile
])