-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
57 lines (40 loc) · 1.5 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
AC_PREREQ([2.64])
AC_INIT([oring], [0.0.1])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
AM_SILENT_RULES([yes])
# Check for programs
AC_PROG_CC
AC_PROG_SED
PKG_PROG_PKG_CONFIG()
if test "x$GCC" = "xyes"; then
GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter \
-Wno-missing-field-initializers -g -fvisibility=hidden \
-Wstrict-prototypes -Wmissing-prototypes -Wsign-compare"
fi
AC_SUBST(GCC_CFLAGS)
# Check for Wayland protocols and tools
AC_PATH_PROG([wayland_scanner], [wayland-scanner])
if test x$wayland_scanner = x; then
PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
fi
PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
[ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
# Check for system features
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
# In old glibc versions (< 2.17) clock_gettime() is in librt
WESTON_SEARCH_LIBS([CLOCK_GETTIME], [rt], [clock_gettime])
AC_CHECK_DECL(CLOCK_MONOTONIC,[],
[AC_MSG_ERROR("CLOCK_MONOTONIC is needed")],
[[#include <time.h>]])
# Per-program dependencies
PKG_CHECK_MODULES(ORING_CAL,
[egl glesv2 wayland-client >= 1.10 wayland-egl wayland-cursor])
# Results
AC_CONFIG_FILES([Makefile])
AC_OUTPUT