forked from neutrinolabs/xorgxrdp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
98 lines (85 loc) · 3.31 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
# Process this file with autoconf to produce a configure script
AC_PREREQ(2.65)
# package version must be x.y.z
AC_INIT([xorgxrdp], [0.9.80], [[email protected]])
package_version_major=$(echo ${PACKAGE_VERSION}|cut -d. -f1)
package_version_minor=$(echo ${PACKAGE_VERSION}|cut -d. -f2)
package_version_patchlevel=$(echo ${PACKAGE_VERSION}|cut -d. -f3)
AC_SUBST([package_version_major], [${package_version_major}])
AC_SUBST([package_version_minor], [${package_version_minor}])
AC_SUBST([package_version_patchlevel], [${package_version_patchlevel}])
AC_CONFIG_HEADERS(config_ac.h:config_ac-h.in)
AM_INIT_AUTOMAKE([1.11 foreign parallel-tests])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
AC_C_CONST
AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AX_CFLAGS_WARN_ALL
AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
AX_GCC_FUNC_ATTRIBUTE([format])
PKG_CHECK_MODULES([XORG_SERVER], [xorg-server >= 0], [],
[AC_MSG_ERROR([please install xserver-xorg-dev, xorg-x11-server-sdk or xorg-x11-server-devel])])
if test "x${enable_glamor}" = "xyes"; then
PKG_CHECK_MODULES([XORG_SERVER_GLAMOR], [xorg-server >= 1.19.0])
PKG_CHECK_MODULES([XORG_SERVER_GBM], [gbm >= 0], [], [AC_MSG_ERROR([please install libgbm-dev or mesa-libgbm-devel])])
PKG_CHECK_MODULES([XORG_SERVER_EPOXY], [epoxy >= 0], [], [AC_MSG_ERROR([please install libepoxy-dev or libepoxy-devel])])
PKG_CHECK_MODULES([XORG_SERVER_EGL], [egl >= 0], [], [AC_MSG_ERROR([please install libegl1-mesa-dev or mesa-libEGL-devel])])
fi
if test "x$XRDP_CFLAGS" = "x"; then
PKG_CHECK_MODULES([XRDP], [xrdp >= 0.9.80])
XRDP_CFLAGS=`pkg-config xrdp --cflags`
fi
AC_ARG_ENABLE([strict-locations],
[AS_HELP_STRING([--enable-strict-locations], [Use standard installation directories])])
if test "x$enable_strict_locations" = "xyes"; then
moduledir='${libdir}/xorg/modules'
else
moduledir=`pkg-config xorg-server --variable=moduledir`
sysconfdir="/etc"
fi
AC_SUBST([moduledir])
# SIMD is optional
AC_ARG_WITH([simd],
AC_HELP_STRING([--without-simd],[Omit SIMD extensions.]))
if test "x${with_simd}" != "xno"; then
# Check if we're on a supported CPU
AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
case "$host_cpu" in
x86_64 | amd64)
AC_MSG_RESULT([yes (x86_64)])
AC_PROG_NASM
simd_arch=x86_64
;;
i*86 | x86 | ia32)
AC_MSG_RESULT([yes (i386)])
AC_PROG_NASM
simd_arch=i386
;;
*)
AC_MSG_RESULT([no ("$host_cpu")])
AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.])
with_simd=no;
;;
esac
if test "x${with_simd}" != "xno"; then
AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
fi
fi
AC_ARG_ENABLE(glamor, AS_HELP_STRING([--enable-glamor],
[Use glamor(requires xorg server 1.19+) (default: no)]),
[], [enable_glamor=no])
AM_CONDITIONAL(WITH_GLAMOR, [test x$enable_glamor = xyes])
AM_CONDITIONAL(WITH_SIMD_AMD64, [test x$simd_arch = xx86_64])
AM_CONDITIONAL(WITH_SIMD_X86, [test x$simd_arch = xi386])
AC_CONFIG_FILES([Makefile
module/Makefile
module/amd64/Makefile
module/x86/Makefile
tests/Makefile
tests/yuv2rgb/Makefile
xrdpdev/Makefile
xrdpkeyb/Makefile
xrdpmouse/Makefile
])
AC_OUTPUT