-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac.in
More file actions
298 lines (262 loc) · 8.92 KB
/
configure.ac.in
File metadata and controls
298 lines (262 loc) · 8.92 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# Copyright (C) 2010-2013 Ulteo SAS
# http://www.ulteo.com
# Author David LECHEVALIER <david@ulteo.com> 2010, 2013
# Author Samuel BOVEE <samuel@ulteo.com> 2010
# Author David PHAM-VAN <d.pham-van@ulteo.com> 2013
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
AC_PREREQ(2.59)
AC_INIT([uxda-server], [@VERSION@], [http://bugs.ulteo.com])
AM_CONFIG_HEADER(config_ac.h:config_ac-h.in)
AM_INIT_AUTOMAKE([1.6 foreign])
AC_PROG_CC
AC_PROG_CXX
AC_C_CONST
AC_PROG_LIBTOOL
AC_ARG_ENABLE(nopam, AS_HELP_STRING([--enable-nopam],
[Build no PAM support (default: no)]),
[nopam=true], [nopam=false])
AM_CONDITIONAL(SESMAN_NOPAM, [test x$nopam = xtrue])
AC_ARG_ENABLE(kerberos, AS_HELP_STRING([--enable-kerberos],
[Build kerberos support (default: no)]),
[kerberos=true], [kerberos=false])
AM_CONDITIONAL(SESMAN_KERBEROS, [test x$kerberos = xtrue])
AC_ARG_ENABLE(pamuserpass, AS_HELP_STRING([--enable-pamuserpass],
[Build pam userpass support (default: no)]),
[pamuserpass=true], [pamuserpass=false])
AM_CONDITIONAL(SESMAN_PAMUSERPASS, [test x$pamuserpass = xtrue])
AC_ARG_ENABLE(scim, AS_HELP_STRING([--enable-scim], [Build scim module for unicode input support (default: yes)]))
# checking for openssl
AC_CHECK_HEADER([openssl/rc4.h], [],
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
[#include <stdlib.h>])
# checking if pam should be autodetected.
if test -z "$enable_nopam"
then
if test -z "$enable_kerberos"
then
AC_CHECK_HEADER([security/pam_appl.h], [],
[AC_MSG_ERROR([please install libpam0g-dev or pam-devel])])
fi
fi
# checking for Xlib, Xfixes
AC_CHECK_HEADER([X11/Xlib.h], [], [AC_MSG_ERROR([please install libx11-dev])])
AC_CHECK_HEADER([X11/extensions/Xfixes.h], [], [AC_MSG_ERROR([please install libxfixes-dev])],
[#include <X11/Xlib.h>])
# checking libjpeg
AC_CHECK_HEADER([jpeglib.h], [], [AC_MSG_ERROR([please install libjpeg-dev])])
# checking for libcups2
AC_CHECK_HEADER([cups/cups.h], [], [AC_MSG_ERROR([please install libcups2-dev])])
# checking for libxml2
# Determine XML2 include path
AC_MSG_CHECKING(for libxml/xmlmemory.h)
# Can we include headers using system include dirs?
AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
XML2_INCLUDE=" ",
XML2_INCLUDE=
)
# Hunt through several possible directories to find the includes for libxml2
if test "x$XML2_INCLUDE" = "x"; then
old_CPPFLAGS="$CPPFLAGS"
for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do
CPPFLAGS="$old_CPPFLAGS -I$i"
AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
XML2_INCLUDE="-I$i",
XML2_INCLUDE=
)
if test "x$XML2_INCLUDE" != "x"; then
break;
fi
done
CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE"
fi
AC_CHECK_HEADERS([libxml/xmlmemory.h libxml/parser.h libxml/xinclude.h], [],
[AC_MSG_ERROR([Please install libxml2-dev])])
# Check for pulseaudio headers
AC_CHECK_HEADER([pulse/pulseaudio.h], [], [AC_MSG_ERROR([Please install libpulse-dev])])
# Check for libtool headers
AC_CHECK_HEADER([ltdl.h], [], [AC_MSG_ERROR([Please install libltdl3-dev or libltdl-dev])])
# Check for fuse headers
CPPFLAGS="-D_FILE_OFFSET_BITS=64"
AC_CHECK_HEADER([fuse.h], [], [AC_MSG_ERROR([Please install libfuse-dev])])
# Check for ImageMagick headers
if which Wand-config >/dev/null; then
CFLAGS=$(Wand-config --cflags)
AC_CHECK_HEADER([wand/MagickWand.h], [], [AC_MSG_ERROR([Please install libmagickwand-dev])])
else
AC_MSG_ERROR([Do not found MagickWand-config tool])
fi
# iconv library
have_iconv="no"
AC_ARG_WITH([iconv-link],
AC_HELP_STRING([--with-iconv-link=ICONV_LINK], [explicitly specify an iconv link option]),
[
LIBS="$withval $LIBS"
have_iconv="yes"
])
AC_MSG_CHECKING(for explicit iconv link options)
if test "x${iconv_libs}" = "x" ; then
AC_MSG_RESULT([no explicit iconv link option])
else
AC_MSG_RESULT([$iconv_libs])
fi
if test "x${have_iconv}" = "xno" ; then
AC_CHECK_HEADERS([iconv.h], [have_iconv="yes"])
if test "x${have_iconv}" = "xyes" ; then
AC_MSG_CHECKING([whether iconv() is in libc])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <stdlib.h>
#include <iconv.h>
]],
[[
iconv_t ic;
size_t count = iconv(ic, NULL, NULL, NULL, NULL);
]])],
[have_iconv="yes"],
[have_iconv="no"])
AC_MSG_RESULT([${have_iconv}])
fi
if test "x${have_iconv}" = "xno" ; then
AC_MSG_CHECKING([whether iconv() is in libiconv.a])
LIBS_save="${LIBS}"
LIBS="-liconv $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <stdlib.h>
#include <iconv.h>
]],
[[
iconv_t ic;
size_t count;
count = iconv(ic, NULL, NULL, NULL, NULL);
]])],
[have_iconv="yes"],
[
have_iconv="no"
LIBS=${LIBS_save}
])
AC_MSG_RESULT([${have_iconv}])
fi
if test "x${have_iconv}" = "xno" ; then
AC_MSG_CHECKING([whether iconv() is in libiconv_plug.a])
LIBS_save="${LIBS}"
LIBS="-liconv_plug $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <stdlib.h>
#include <iconv.h>
]],
[[
iconv_t ic;
size_t count = iconv(ic, NULL, NULL, NULL, NULL);
]])],
[have_iconv="yes"],
[
have_iconv="no"
LIBS=${LIBS_save}
])
AC_MSG_RESULT([${have_iconv}])
fi
fi
if test "x${have_iconv}" = "xyes" ; then
AC_DEFINE([HAVE_ICONV], [1], [Set to 1 if iconv library is installed])
fi
if test "x${prefix}" = "xNONE" ; then
prefix="/usr"
sysconfdir="/etc";
bindir="/usr/bin";
datarootdir="/usr/share";
localstatedir="/var";
fi
if test "x$enable_scim" = "x" ; then
enable_scim="yes"
fi
if test "x$enable_scim" = "xyes" ; then
# check libscim
SCIM_VERSION=1.4.0
PKG_CHECK_MODULES(SCIM,[scim >= $SCIM_VERSION])
SCIM_CFLAGS=`$PKG_CONFIG --cflags scim`
SCIM_LDFLAGS=`$PKG_CONFIG --libs scim`
AC_SUBST(SCIM_CFLAGS)
AC_SUBST(SCIM_LDFLAGS)
# check scim-gtkutils
PKG_CHECK_MODULES(SCIMGTKUTILS,[scim-gtkutils >= $SCIM_VERSION])
SCIMGTKUTILS_CFLAGS=`$PKG_CONFIG --cflags scim-gtkutils gthread-2.0`
SCIMGTKUTILS_LDFLAGS=`$PKG_CONFIG --libs scim-gtkutils gthread-2.0`
AC_SUBST(SCIMGTKUTILS_CFLAGS)
AC_SUBST(SCIMGTKUTILS_LDFLAGS)
fi
AM_CONDITIONAL(SCIM_ENABLED, [test x$enable_scim = xyes])
AC_MSG_CHECKING([premium check: ])
AM_CONDITIONAL(PREMIUM_ENABLED, [test -d ${srcdir}/premium])
AM_COND_IF([PREMIUM_ENABLED], [
AC_MSG_RESULT([yes])
PE_CFLAGS=`$PKG_CONFIG --cflags libssl`
PE_LDFLAGS=`$PKG_CONFIG --libs libssl`
MAYBE_PREMIUM=premium
],[
AC_MSG_RESULT([no])
PE_CFLAGS=""
PE_LDFLAGS=""
MAYBE_PREMIUM=
])
AC_SUBST([MAYBE_PREMIUM])
AC_SUBST(PE_CFLAGS)
AC_SUBST(PE_LDFLAGS)
AC_CONFIG_FILES([Makefile
common/Makefile
docs/Makefile
docs/man/Makefile
genkeymap/Makefile
instfiles/Makefile
instfiles/init/Makefile
instfiles/pam.d/Makefile
instfiles/Xserver/Makefile
keygen/Makefile
libxrdp/Makefile
logd/Makefile
mc/Makefile
@PREMIUM_MK@
sesman/Makefile
sesman/libscp/Makefile
sesman/tools/Makefile
sesman/sessvc/Makefile
printer/Makefile
printerd/Makefile
python/Makefile
seamlessrdpshell/Makefile
vchannel/Makefile
vchannel/lib/Makefile
vchannel/rdpdr/Makefile
vchannel/rdpsnd/Makefile
vchannel/cliprdr/Makefile
userChannel/Makefile
userChannel/ip/Makefile
userChannel/abstract/Makefile
userChannel/proxy/Makefile
userChannel/advance/Makefile
userChannel/plugins/Makefile
userChannel/plugins/vnc/Makefile
userChannel/plugins/xup/Makefile
userChannel/plugins/rdp/Makefile
xrdp/Makefile
scim/Makefile
ukbrdr/Makefile
])
AC_OUTPUT