File: configure.ac

package info (click to toggle)
egl-wayland 1%3A1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 388 kB
  • sloc: ansic: 3,111; xml: 198; makefile: 82; sh: 7
file content (104 lines) | stat: -rw-r--r-- 3,447 bytes parent folder | download
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
100
101
102
103
104
AC_PREREQ([2.64])

m4_define([wayland_eglstream_major_version], [1])
m4_define([wayland_eglstream_minor_version], [1])
m4_define([wayland_eglstream_micro_version], [2])
m4_define([wayland_eglstream_version],
          [wayland_eglstream_major_version.wayland_eglstream_minor_version.wayland_eglstream_micro_version])

AC_INIT([wayland-eglstream],
        [wayland_eglstream_version],
        [mvicomoya@nvidia.com])

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])

AC_SUBST([WAYLAND_EXTERNAL_MAJOR_VERSION], [wayland_eglstream_major_version])
AC_SUBST([WAYLAND_EXTERNAL_MINOR_VERSION], [wayland_eglstream_minor_version])
AC_SUBST([WAYLAND_EXTERNAL_MICRO_VERSION], [wayland_eglstream_micro_version])
AC_SUBST([WAYLAND_EXTERNAL_VERSION], [wayland_eglstream_version])

AC_SUBST([EGL_EXTERNAL_PLATFORM_MIN_VERSION], [${WAYLAND_EXTERNAL_MAJOR_VERSION}.${WAYLAND_EXTERNAL_MINOR_VERSION}])
AC_SUBST([EGL_EXTERNAL_PLATFORM_MAX_VERSION], [$(($WAYLAND_EXTERNAL_MAJOR_VERSION + 1))])

# Add an --enable-debug option
AX_CHECK_ENABLE_DEBUG(no, DEBUG)

AC_USE_SYSTEM_EXTENSIONS

AM_INIT_AUTOMAKE([1.11 foreign subdir-objects])

AM_SILENT_RULES([yes])

PKG_PROG_PKG_CONFIG()

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AM_PROG_AS
AC_PROG_LIBTOOL

AC_ARG_VAR([WAYLAND_SCANNER], [The wayland-scanner executable])
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])

# User didn't specify wayland-scanner location manually, so find it ourselves
if test x$WAYLAND_SCANNER = x; then
    PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
    WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
fi
AM_CONDITIONAL([WAYLAND_SCANNER_HAS_PRIVATE_CODE],
               [test x$WAYLAND_SCANNER = x`$PKG_CONFIG --variable=wayland_scanner "wayland-scanner >= 1.14.91"`])

# Initialize libtool
LT_PREREQ([2.2])
LT_INIT

# Checks for libraries.
AX_PTHREAD()
AC_CHECK_LIB([dl], [dlsym],
             [],
             [AC_MSG_ERROR("dlsym is needed to compile wayland-external")])
PKG_CHECK_MODULES([EGL_EXTERNAL_PLATFORM], [eglexternalplatform >= ${EGL_EXTERNAL_PLATFORM_MIN_VERSION} eglexternalplatform < ${EGL_EXTERNAL_PLATFORM_MAX_VERSION}])
PKG_CHECK_MODULES([WAYLAND], [wayland-server wayland-client wayland-egl-backend >= 3])

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([getpagesize inet_ntoa memset socket strcasecmp strstr])

# See if the compiler supports the -fvisibility=hidden flag.
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
      [AC_SUBST([COMPILER_FLAG_VISIBILITY_HIDDEN], ["-fvisibility=hidden"])],
      [AC_SUBST([COMPILER_FLAG_VISIBILITY_HIDDEN], [""])])

# See if the linker supports the --no-undefined flag.
AX_CHECK_LINK_FLAG([-Xlinker --no-undefined],
      [AC_SUBST([LINKER_FLAG_NO_UNDEFINED], ["-Xlinker --no-undefined"])],
      [AC_SUBST([LINKER_FLAG_NO_UNDEFINED], [""])])

# Default CFLAGS
CFLAGS="$CFLAGS -Wall -Werror -include config.h"

PKG_NOARCH_INSTALLDIR

AC_CONFIG_FILES([
    wayland-eglstream.pc
    wayland-eglstream-protocols.pc
    Makefile
    ])
AC_OUTPUT

AC_MSG_RESULT([
    Version                 ${WAYLAND_EXTERNAL_VERSION}
    Prefix                  ${prefix}
    ])