1 |
AC_INIT(rdesktop, 1.3.1) |
AC_INIT(rdesktop, 1.6.0) |
2 |
|
|
3 |
AC_CONFIG_SRCDIR([rdesktop.c]) |
AC_CONFIG_SRCDIR([rdesktop.c]) |
4 |
|
|
12 |
AC_HEADER_STDC |
AC_HEADER_STDC |
13 |
AC_C_BIGENDIAN([AC_DEFINE(B_ENDIAN)], [AC_DEFINE(L_ENDIAN)]) |
AC_C_BIGENDIAN([AC_DEFINE(B_ENDIAN)], [AC_DEFINE(L_ENDIAN)]) |
14 |
AC_PATH_XTRA |
AC_PATH_XTRA |
15 |
|
if test "$no_x" = "yes"; then |
16 |
|
echo |
17 |
|
echo "ERROR: Could not find X Window System headers/libraries." |
18 |
|
if test -f /etc/debian_version; then |
19 |
|
echo "Probably you need to install the libx11-dev package." |
20 |
|
elif test -f /etc/redhat-release; then |
21 |
|
echo "Probably you need to install the libX11-devel package." |
22 |
|
fi |
23 |
|
echo "To specify paths manually, use the options --x-includes and --x-libraries." |
24 |
|
echo |
25 |
|
exit 1 |
26 |
|
fi |
27 |
|
|
28 |
|
AC_PATH_PROG(PKG_CONFIG, pkg-config) |
29 |
|
|
30 |
AC_SEARCH_LIBS(socket, socket) |
AC_SEARCH_LIBS(socket, socket) |
31 |
AC_SEARCH_LIBS(inet_aton, resolv) |
AC_SEARCH_LIBS(inet_aton, resolv) |
32 |
|
|
33 |
|
AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H)) |
34 |
|
AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H)) |
35 |
|
AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H)) |
36 |
|
AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H)) |
37 |
|
AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) |
38 |
|
AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H)) |
39 |
|
|
40 |
|
AC_CHECK_TOOL(STRIP, strip, :) |
41 |
|
|
42 |
|
dnl Don't depend on pkg-config |
43 |
|
m4_ifdef([PKG_CHECK_MODULES], [], [ |
44 |
|
m4_errprint([warning: pkg-config checks are not available]) |
45 |
|
m4_defun([PKG_CHECK_MODULES], [ |
46 |
|
AC_MSG_WARN([pkg-config not available, cannot check for $2]) |
47 |
|
$4 |
48 |
|
]) |
49 |
|
]) |
50 |
|
|
51 |
rpath="" |
rpath="" |
52 |
|
|
53 |
# |
# |
79 |
if test -z "$ssldir"; then |
if test -z "$ssldir"; then |
80 |
AC_MSG_RESULT([Not found]) |
AC_MSG_RESULT([Not found]) |
81 |
echo |
echo |
82 |
echo "Couldn't find your OpenSSL library installation dir" |
echo "ERROR: Could not find OpenSSL headers/libraries." |
83 |
echo "Use --with-openssl option to fix this problem" |
if test -f /etc/debian_version; then |
84 |
|
echo "Probably you need to install the libssl-dev package." |
85 |
|
elif test -f /etc/redhat-release; then |
86 |
|
echo "Probably you need to install the openssl-devel package." |
87 |
|
fi |
88 |
|
echo "To specify a path manually, use the --with-openssl option." |
89 |
echo |
echo |
90 |
exit 1 |
exit 1 |
91 |
fi |
fi |
105 |
rpath="$rpath:$ssldir/lib" |
rpath="$rpath:$ssldir/lib" |
106 |
]) |
]) |
107 |
|
|
108 |
|
AC_ARG_ENABLE(smartcard, |
109 |
|
[ --enable-smartcard Enables smart-card support. |
110 |
|
], |
111 |
|
[ |
112 |
|
case "$OSTYPE" in |
113 |
|
darwin*) |
114 |
|
AC_CHECK_HEADER(PCSC/pcsclite.h, [WITH_SCARD=1], [WITH_SCARD=0]) |
115 |
|
PCSCLITE_CFLAGS="" |
116 |
|
PCSCLITE_LIBS="-framework PCSC" |
117 |
|
;; |
118 |
|
*) |
119 |
|
if test -n "$PKG_CONFIG"; then |
120 |
|
PKG_CHECK_MODULES(PCSCLITE, libpcsclite, [WITH_SCARD=1], [WITH_SCARD=0]) |
121 |
|
fi |
122 |
|
;; |
123 |
|
esac |
124 |
|
|
125 |
|
if test x"$WITH_SCARD" = "x1"; then |
126 |
|
SCARDOBJ="scard.o" |
127 |
|
CFLAGS="$CFLAGS $PCSCLITE_CFLAGS" |
128 |
|
LIBS="$LIBS $PCSCLITE_LIBS" |
129 |
|
AC_DEFINE(WITH_SCARD) |
130 |
|
fi |
131 |
|
|
132 |
|
AC_MSG_CHECKING([for old version of PCSC]) |
133 |
|
AC_TRY_LINK([ |
134 |
|
#include <stdlib.h> |
135 |
|
#ifdef __APPLE__ |
136 |
|
#include <PCSC/wintypes.h> |
137 |
|
#include <PCSC/winscard.h> |
138 |
|
#else |
139 |
|
#include <winscard.h> |
140 |
|
#endif |
141 |
|
], |
142 |
|
[SCardControl(NULL, NULL, 0, NULL, NULL);], |
143 |
|
[AC_MSG_RESULT(yes) AC_DEFINE(WITH_PCSC120, 1, [old version of PCSC])], |
144 |
|
[AC_MSG_RESULT(no)] |
145 |
|
) |
146 |
|
]) |
147 |
|
|
148 |
|
AC_SUBST(SCARDOBJ) |
149 |
|
|
150 |
# |
# |
151 |
# Alignment |
# Alignment |
208 |
# |
# |
209 |
# sound |
# sound |
210 |
# |
# |
211 |
|
|
212 |
sound="yes" |
sound="yes" |
213 |
AC_ARG_WITH(sound, |
AC_ARG_WITH(sound, |
214 |
[ --with-sound select sound system ("oss" or "sun") ], |
[ --with-sound select sound system ("oss", "sgi", "sun", "alsa" or "libao") ], |
215 |
[ |
[ |
216 |
sound="$withval" |
sound="$withval" |
217 |
]) |
]) |
218 |
if test "$sound" = yes; then |
|
219 |
AC_CHECK_HEADER(sys/soundcard.h, [sound=oss]) |
AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=1], [HAVE_OSS=0]) |
220 |
AC_CHECK_HEADER(sys/audioio.h, [sound=sun]) |
AC_CHECK_HEADER(dmedia/audio.h, [HAVE_SGI=1], [HAVE_SGI=0]) |
221 |
fi |
AC_CHECK_HEADER(sys/audioio.h, [HAVE_SUN=1], [HAVE_SUN=0]) |
222 |
if test "$sound" = no; then |
|
223 |
break |
AC_ARG_ENABLE(static-libsamplerate, |
224 |
elif test "$sound" = oss; then |
[ --enable-static-libsamplerate link libsamplerate statically], |
225 |
SOUNDOBJ="rdpsnd.o rdpsnd_oss.o" |
[static_libsamplerate=yes], |
226 |
AC_DEFINE(WITH_RDPSND) |
[static_libsamplerate=no]) |
227 |
elif test "$sound" = sun; then |
|
228 |
SOUNDOBJ="rdpsnd.o rdpsnd_sun.o" |
if test -n "$PKG_CONFIG"; then |
229 |
|
PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0]) |
230 |
|
PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0]) |
231 |
|
PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0]) |
232 |
|
if test x"$HAVE_LIBSAMPLERATE" = "x1"; then |
233 |
|
AC_DEFINE(HAVE_LIBSAMPLERATE) |
234 |
|
if test x"$static_libsamplerate" = "xyes"; then |
235 |
|
_libsamplerate_libdir=`$PKG_CONFIG --errors-to-stdout --variable=libdir samplerate` |
236 |
|
LIBSAMPLERATE_LIBS="$_libsamplerate_libdir""/libsamplerate.a" |
237 |
|
fi |
238 |
|
LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS -lm" |
239 |
|
fi |
240 |
|
fi |
241 |
|
|
242 |
|
if test "$sound" != "no"; then |
243 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd.o rdpsnd_dsp.o" |
244 |
|
CFLAGS="$CFLAGS $LIBSAMPLERATE_CFLAGS" |
245 |
|
LIBS="$LIBS $LIBSAMPLERATE_LIBS" |
246 |
AC_DEFINE(WITH_RDPSND) |
AC_DEFINE(WITH_RDPSND) |
|
else |
|
|
AC_MSG_WARN([sound support disabled (no sys/soundcard.h or sys/audioio.h)]) |
|
|
AC_MSG_WARN([Currently supported systems are Open Sound System (oss) and Sun/BSD (sun)]) |
|
247 |
fi |
fi |
248 |
|
|
249 |
|
case $sound in |
250 |
|
yes) |
251 |
|
if test x"$HAVE_OSS" = "x1"; then |
252 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" |
253 |
|
AC_DEFINE(RDPSND_OSS) |
254 |
|
fi |
255 |
|
|
256 |
|
if test x"$HAVE_SGI" = "x1"; then |
257 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" |
258 |
|
LIBS="$LIBS -laudio" |
259 |
|
AC_DEFINE(RDPSND_SGI) |
260 |
|
fi |
261 |
|
|
262 |
|
if test x"$HAVE_SUN" = "x1"; then |
263 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" |
264 |
|
AC_DEFINE(RDPSND_SUN) |
265 |
|
fi |
266 |
|
|
267 |
|
if test x"$HAVE_ALSA" = "x1"; then |
268 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" |
269 |
|
CFLAGS="$CFLAGS $ALSA_CFLAGS" |
270 |
|
LIBS="$LIBS $ALSA_LIBS" |
271 |
|
AC_DEFINE(RDPSND_ALSA) |
272 |
|
fi |
273 |
|
|
274 |
|
if test x"$HAVE_LIBAO" = "x1"; then |
275 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" |
276 |
|
CFLAGS="$CFLAGS $LIBAO_CFLAGS" |
277 |
|
LIBS="$LIBS $LIBAO_LIBS" |
278 |
|
AC_DEFINE(RDPSND_LIBAO) |
279 |
|
fi |
280 |
|
|
281 |
|
;; |
282 |
|
|
283 |
|
oss) |
284 |
|
if test x"$HAVE_OSS" = "x1"; then |
285 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" |
286 |
|
AC_DEFINE(RDPSND_OSS) |
287 |
|
else |
288 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
289 |
|
fi |
290 |
|
;; |
291 |
|
|
292 |
|
sgi) |
293 |
|
if test x"$HAVE_SGI" = "x1"; then |
294 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" |
295 |
|
LIBS="$LIBS -laudio" |
296 |
|
AC_DEFINE(RDPSND_SGI) |
297 |
|
else |
298 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
299 |
|
fi |
300 |
|
;; |
301 |
|
|
302 |
|
sun) |
303 |
|
if test x"$HAVE_SUN" = "x1"; then |
304 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" |
305 |
|
AC_DEFINE(RDPSND_SUN) |
306 |
|
else |
307 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
308 |
|
fi |
309 |
|
;; |
310 |
|
|
311 |
|
alsa) |
312 |
|
if test x"$HAVE_ALSA" = "x1"; then |
313 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" |
314 |
|
CFLAGS="$CFLAGS $ALSA_CFLAGS" |
315 |
|
LIBS="$LIBS $ALSA_LIBS" |
316 |
|
AC_DEFINE(RDPSND_ALSA) |
317 |
|
else |
318 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
319 |
|
fi |
320 |
|
;; |
321 |
|
|
322 |
|
libao) |
323 |
|
if test x"$HAVE_LIBAO" = "x1"; then |
324 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" |
325 |
|
CFLAGS="$CFLAGS $LIBAO_CFLAGS" |
326 |
|
LIBS="$LIBS $LIBAO_LIBS" |
327 |
|
AC_DEFINE(RDPSND_LIBAO) |
328 |
|
else |
329 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
330 |
|
fi |
331 |
|
;; |
332 |
|
|
333 |
|
no) |
334 |
|
;; |
335 |
|
|
336 |
|
*) |
337 |
|
AC_MSG_WARN([sound support disabled]) |
338 |
|
AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao]) |
339 |
|
;; |
340 |
|
esac |
341 |
|
|
342 |
AC_SUBST(SOUNDOBJ) |
AC_SUBST(SOUNDOBJ) |
343 |
|
|
344 |
# |
# |
425 |
UTILS_FUNC_DIRFD |
UTILS_FUNC_DIRFD |
426 |
|
|
427 |
# |
# |
428 |
|
# iconv |
429 |
|
# |
430 |
|
|
431 |
|
dnl This macros shamelessly stolen from |
432 |
|
dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html. |
433 |
|
dnl Written by Bruno Haible. |
434 |
|
|
435 |
|
AC_DEFUN([UTILS_FUNC_ICONV], |
436 |
|
[ |
437 |
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and |
438 |
|
dnl those with the standalone portable GNU libiconv installed). |
439 |
|
|
440 |
|
AC_ARG_WITH([libiconv-prefix], |
441 |
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ |
442 |
|
for dir in `echo "$withval" | tr : ' '`; do |
443 |
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi |
444 |
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
445 |
|
done |
446 |
|
]) |
447 |
|
AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H)) |
448 |
|
|
449 |
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
450 |
|
am_cv_func_iconv="no, consider installing GNU libiconv" |
451 |
|
am_cv_lib_iconv=no |
452 |
|
AC_TRY_LINK([#include <stdlib.h> |
453 |
|
#include <iconv.h>], |
454 |
|
[iconv_t cd = iconv_open("",""); |
455 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
456 |
|
iconv_close(cd);], |
457 |
|
am_cv_func_iconv=yes) |
458 |
|
if test "$am_cv_func_iconv" != yes; then |
459 |
|
am_save_LIBS="$LIBS" |
460 |
|
LIBS="$LIBS -liconv" |
461 |
|
AC_TRY_LINK([#include <stdlib.h> |
462 |
|
#include <iconv.h>], |
463 |
|
[iconv_t cd = iconv_open("",""); |
464 |
|
iconv(cd,NULL,NULL,NULL,NULL); |
465 |
|
iconv_close(cd);], |
466 |
|
am_cv_lib_iconv=yes |
467 |
|
am_cv_func_iconv=yes) |
468 |
|
LIBS="$am_save_LIBS" |
469 |
|
fi |
470 |
|
]) |
471 |
|
if test "$am_cv_func_iconv" = yes; then |
472 |
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) |
473 |
|
AC_MSG_CHECKING([for iconv declaration]) |
474 |
|
AC_CACHE_VAL(am_cv_proto_iconv, [ |
475 |
|
AC_TRY_COMPILE([ |
476 |
|
#include <stdlib.h> |
477 |
|
#include <iconv.h> |
478 |
|
extern |
479 |
|
#ifdef __cplusplus |
480 |
|
"C" |
481 |
|
#endif |
482 |
|
#if defined(__STDC__) || defined(__cplusplus) |
483 |
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
484 |
|
#else |
485 |
|
size_t iconv(); |
486 |
|
#endif |
487 |
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") |
488 |
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) |
489 |
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
490 |
|
AC_MSG_RESULT([$]{ac_t:- |
491 |
|
}[$]am_cv_proto_iconv) |
492 |
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, |
493 |
|
[Define as const if the declaration of iconv() needs const.]) |
494 |
|
fi |
495 |
|
LIBICONV= |
496 |
|
if test "$am_cv_lib_iconv" = yes; then |
497 |
|
LIBICONV="-liconv" |
498 |
|
fi |
499 |
|
AC_SUBST(LIBICONV) |
500 |
|
]) |
501 |
|
|
502 |
|
UTILS_FUNC_ICONV |
503 |
|
LIBS="$LIBS $LIBICONV" |
504 |
|
|
505 |
|
# |
506 |
|
# socklen_t |
507 |
|
# from curl |
508 |
|
|
509 |
|
dnl Check for socklen_t: historically on BSD it is an int, and in |
510 |
|
dnl POSIX 1g it is a type of its own, but some platforms use different |
511 |
|
dnl types for the argument to getsockopt, getpeername, etc. So we |
512 |
|
dnl have to test to find something that will work. |
513 |
|
AC_DEFUN([TYPE_SOCKLEN_T], |
514 |
|
[ |
515 |
|
AC_CHECK_TYPE([socklen_t], ,[ |
516 |
|
AC_MSG_CHECKING([for socklen_t equivalent]) |
517 |
|
AC_CACHE_VAL([socklen_t_equiv], |
518 |
|
[ |
519 |
|
# Systems have either "struct sockaddr *" or |
520 |
|
# "void *" as the second argument to getpeername |
521 |
|
socklen_t_equiv= |
522 |
|
for arg2 in "struct sockaddr" void; do |
523 |
|
for t in int size_t unsigned long "unsigned long"; do |
524 |
|
AC_TRY_COMPILE([ |
525 |
|
#include <sys/types.h> |
526 |
|
#include <sys/socket.h> |
527 |
|
|
528 |
|
int getpeername (int, $arg2 *, $t *); |
529 |
|
],[ |
530 |
|
$t len; |
531 |
|
getpeername(0,0,&len); |
532 |
|
],[ |
533 |
|
socklen_t_equiv="$t" |
534 |
|
break |
535 |
|
]) |
536 |
|
done |
537 |
|
done |
538 |
|
|
539 |
|
if test "x$socklen_t_equiv" = x; then |
540 |
|
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) |
541 |
|
fi |
542 |
|
]) |
543 |
|
AC_MSG_RESULT($socklen_t_equiv) |
544 |
|
AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv, |
545 |
|
[type to use in place of socklen_t if not defined])], |
546 |
|
[#include <sys/types.h> |
547 |
|
#include <sys/socket.h>]) |
548 |
|
]) |
549 |
|
|
550 |
|
TYPE_SOCKLEN_T |
551 |
|
|
552 |
|
# |
553 |
|
# statfs stuff |
554 |
|
# |
555 |
|
AC_CHECK_HEADERS(sys/vfs.h) |
556 |
|
AC_CHECK_HEADERS(sys/statvfs.h) |
557 |
|
AC_CHECK_HEADERS(sys/statfs.h) |
558 |
|
AC_CHECK_HEADERS(sys/param.h) |
559 |
|
|
560 |
|
mount_includes="\ |
561 |
|
$ac_includes_default |
562 |
|
#if HAVE_SYS_PARAM_H |
563 |
|
# include <sys/param.h> |
564 |
|
#endif |
565 |
|
" |
566 |
|
|
567 |
|
AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes]) |
568 |
|
|
569 |
|
################################################# |
570 |
|
# these tests are taken from the GNU fileutils package |
571 |
|
AC_CHECKING(how to get filesystem space usage) |
572 |
|
space=no |
573 |
|
|
574 |
|
# Test for statvfs64. |
575 |
|
if test $space = no; then |
576 |
|
# SVR4 |
577 |
|
AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64, |
578 |
|
[AC_TRY_RUN([ |
579 |
|
#if defined(HAVE_UNISTD_H) |
580 |
|
#include <unistd.h> |
581 |
|
#endif |
582 |
|
#include <sys/types.h> |
583 |
|
#include <sys/statvfs.h> |
584 |
|
main () |
585 |
|
{ |
586 |
|
struct statvfs64 fsd; |
587 |
|
exit (statvfs64 (".", &fsd)); |
588 |
|
}], |
589 |
|
fu_cv_sys_stat_statvfs64=yes, |
590 |
|
fu_cv_sys_stat_statvfs64=no, |
591 |
|
fu_cv_sys_stat_statvfs64=cross)]) |
592 |
|
if test $fu_cv_sys_stat_statvfs64 = yes; then |
593 |
|
space=yes |
594 |
|
AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available]) |
595 |
|
fi |
596 |
|
fi |
597 |
|
|
598 |
|
# Perform only the link test since it seems there are no variants of the |
599 |
|
# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) |
600 |
|
# because that got a false positive on SCO OSR5. Adding the declaration |
601 |
|
# of a `struct statvfs' causes this test to fail (as it should) on such |
602 |
|
# systems. That system is reported to work fine with STAT_STATFS4 which |
603 |
|
# is what it gets when this test fails. |
604 |
|
if test $space = no; then |
605 |
|
# SVR4 |
606 |
|
AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, |
607 |
|
[AC_TRY_LINK([#include <sys/types.h> |
608 |
|
#include <sys/statvfs.h>], |
609 |
|
[struct statvfs fsd; statvfs (0, &fsd);], |
610 |
|
fu_cv_sys_stat_statvfs=yes, |
611 |
|
fu_cv_sys_stat_statvfs=no)]) |
612 |
|
if test $fu_cv_sys_stat_statvfs = yes; then |
613 |
|
space=yes |
614 |
|
AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) |
615 |
|
fi |
616 |
|
fi |
617 |
|
|
618 |
|
if test $space = no; then |
619 |
|
# DEC Alpha running OSF/1 |
620 |
|
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) |
621 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, |
622 |
|
[AC_TRY_RUN([ |
623 |
|
#include <sys/param.h> |
624 |
|
#include <sys/types.h> |
625 |
|
#include <sys/mount.h> |
626 |
|
main () |
627 |
|
{ |
628 |
|
struct statfs fsd; |
629 |
|
fsd.f_fsize = 0; |
630 |
|
exit (statfs (".", &fsd, sizeof (struct statfs))); |
631 |
|
}], |
632 |
|
fu_cv_sys_stat_statfs3_osf1=yes, |
633 |
|
fu_cv_sys_stat_statfs3_osf1=no, |
634 |
|
fu_cv_sys_stat_statfs3_osf1=no)]) |
635 |
|
|
636 |
|
|
637 |
|
#C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) |
638 |
|
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then |
639 |
|
space=yes |
640 |
|
AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments]) |
641 |
|
fi |
642 |
|
fi |
643 |
|
|
644 |
|
if test $space = no; then |
645 |
|
# AIX |
646 |
|
AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl |
647 |
|
member (AIX, 4.3BSD)]) |
648 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, |
649 |
|
[AC_TRY_RUN([ |
650 |
|
#ifdef HAVE_SYS_PARAM_H |
651 |
|
#include <sys/param.h> |
652 |
|
#endif |
653 |
|
#ifdef HAVE_SYS_MOUNT_H |
654 |
|
#include <sys/mount.h> |
655 |
|
#endif |
656 |
|
#ifdef HAVE_SYS_VFS_H |
657 |
|
#include <sys/vfs.h> |
658 |
|
#endif |
659 |
|
main () |
660 |
|
{ |
661 |
|
struct statfs fsd; |
662 |
|
fsd.f_bsize = 0; |
663 |
|
exit (statfs (".", &fsd)); |
664 |
|
}], |
665 |
|
fu_cv_sys_stat_statfs2_bsize=yes, |
666 |
|
fu_cv_sys_stat_statfs2_bsize=no, |
667 |
|
fu_cv_sys_stat_statfs2_bsize=no)]) |
668 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) |
669 |
|
if test $fu_cv_sys_stat_statfs2_bsize = yes; then |
670 |
|
space=yes |
671 |
|
AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property]) |
672 |
|
fi |
673 |
|
fi |
674 |
|
|
675 |
|
if test $space = no; then |
676 |
|
# SVR3 |
677 |
|
AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) |
678 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs4, |
679 |
|
[AC_TRY_RUN([#include <sys/types.h> |
680 |
|
#include <sys/statfs.h> |
681 |
|
main () |
682 |
|
{ |
683 |
|
struct statfs fsd; |
684 |
|
exit (statfs (".", &fsd, sizeof fsd, 0)); |
685 |
|
}], |
686 |
|
fu_cv_sys_stat_statfs4=yes, |
687 |
|
fu_cv_sys_stat_statfs4=no, |
688 |
|
fu_cv_sys_stat_statfs4=no)]) |
689 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs4) |
690 |
|
if test $fu_cv_sys_stat_statfs4 = yes; then |
691 |
|
space=yes |
692 |
|
AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments]) |
693 |
|
fi |
694 |
|
fi |
695 |
|
|
696 |
|
if test $space = no; then |
697 |
|
# 4.4BSD and NetBSD |
698 |
|
AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl |
699 |
|
member (4.4BSD and NetBSD)]) |
700 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, |
701 |
|
[AC_TRY_RUN([#include <sys/types.h> |
702 |
|
#ifdef HAVE_SYS_PARAM_H |
703 |
|
#include <sys/param.h> |
704 |
|
#endif |
705 |
|
#ifdef HAVE_SYS_MOUNT_H |
706 |
|
#include <sys/mount.h> |
707 |
|
#endif |
708 |
|
main () |
709 |
|
{ |
710 |
|
struct statfs fsd; |
711 |
|
fsd.f_fsize = 0; |
712 |
|
exit (statfs (".", &fsd)); |
713 |
|
}], |
714 |
|
fu_cv_sys_stat_statfs2_fsize=yes, |
715 |
|
fu_cv_sys_stat_statfs2_fsize=no, |
716 |
|
fu_cv_sys_stat_statfs2_fsize=no)]) |
717 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) |
718 |
|
if test $fu_cv_sys_stat_statfs2_fsize = yes; then |
719 |
|
space=yes |
720 |
|
AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize]) |
721 |
|
fi |
722 |
|
fi |
723 |
|
|
724 |
|
if test $space = no; then |
725 |
|
# Ultrix |
726 |
|
AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) |
727 |
|
AC_CACHE_VAL(fu_cv_sys_stat_fs_data, |
728 |
|
[AC_TRY_RUN([#include <sys/types.h> |
729 |
|
#ifdef HAVE_SYS_PARAM_H |
730 |
|
#include <sys/param.h> |
731 |
|
#endif |
732 |
|
#ifdef HAVE_SYS_MOUNT_H |
733 |
|
#include <sys/mount.h> |
734 |
|
#endif |
735 |
|
#ifdef HAVE_SYS_FS_TYPES_H |
736 |
|
#include <sys/fs_types.h> |
737 |
|
#endif |
738 |
|
main () |
739 |
|
{ |
740 |
|
struct fs_data fsd; |
741 |
|
/* Ultrix's statfs returns 1 for success, |
742 |
|
0 for not mounted, -1 for failure. */ |
743 |
|
exit (statfs (".", &fsd) != 1); |
744 |
|
}], |
745 |
|
fu_cv_sys_stat_fs_data=yes, |
746 |
|
fu_cv_sys_stat_fs_data=no, |
747 |
|
fu_cv_sys_stat_fs_data=no)]) |
748 |
|
AC_MSG_RESULT($fu_cv_sys_stat_fs_data) |
749 |
|
if test $fu_cv_sys_stat_fs_data = yes; then |
750 |
|
space=yes |
751 |
|
AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available]) |
752 |
|
fi |
753 |
|
fi |
754 |
|
|
755 |
|
statxfs_includes="\ |
756 |
|
$ac_includes_default |
757 |
|
#if HAVE_SYS_STATVFS_H |
758 |
|
# include <sys/statvfs.h> |
759 |
|
#endif |
760 |
|
#if HAVE_SYS_VFS_H |
761 |
|
# include <sys/vfs.h> |
762 |
|
#endif |
763 |
|
#if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H |
764 |
|
# if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H |
765 |
|
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */ |
766 |
|
# include <sys/param.h> |
767 |
|
# include <sys/mount.h> |
768 |
|
# elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H |
769 |
|
/* Ultrix 4.4 needs these for the declaration of struct statfs. */ |
770 |
|
# include <netinet/in.h> |
771 |
|
# include <nfs/nfs_clnt.h> |
772 |
|
# include <nfs/vfs.h> |
773 |
|
# endif |
774 |
|
#endif |
775 |
|
" |
776 |
|
|
777 |
|
AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes]) |
778 |
|
AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes]) |
779 |
|
AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes]) |
780 |
|
AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes]) |
781 |
|
|
782 |
|
# |
783 |
|
# Large file support |
784 |
|
# |
785 |
|
AC_SYS_LARGEFILE |
786 |
|
|
787 |
|
# |
788 |
|
# mntent |
789 |
|
# |
790 |
|
AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H)) |
791 |
|
AC_CHECK_FUNCS(setmntent) |
792 |
|
|
793 |
|
# |
794 |
|
# IPv6 |
795 |
|
# |
796 |
|
AC_ARG_WITH(ipv6, |
797 |
|
[ --with-ipv6 enable IPv6-support], |
798 |
|
[ |
799 |
|
if test $withval != "no"; |
800 |
|
then |
801 |
|
AC_DEFINE(IPv6,1) |
802 |
|
fi |
803 |
|
]) |
804 |
|
|
805 |
|
|
806 |
|
# |
807 |
# debugging |
# debugging |
808 |
# |
# |
809 |
AC_ARG_WITH(debug, |
AC_ARG_WITH(debug, |
810 |
[ --with-debug enable protocol debugging output], |
[ --with-debug enable protocol debugging output], |
811 |
[ AC_DEFINE(WITH_DEBUG) ]) |
[ |
812 |
|
if test $withval != "no"; |
813 |
|
then |
814 |
|
AC_DEFINE(WITH_DEBUG,1) |
815 |
|
fi |
816 |
|
]) |
817 |
|
|
818 |
AC_ARG_WITH(debug-kbd, |
AC_ARG_WITH(debug-kbd, |
819 |
[ --with-debug-kbd enable debugging of keyboard handling], |
[ --with-debug-kbd enable debugging of keyboard handling], |
820 |
[ AC_DEFINE(WITH_DEBUG_KBD) ]) |
[ |
821 |
|
if test $withval != "no"; |
822 |
|
then |
823 |
|
AC_DEFINE(WITH_DEBUG_KBD,1) |
824 |
|
fi |
825 |
|
]) |
826 |
|
|
827 |
AC_ARG_WITH(debug-rdp5, |
AC_ARG_WITH(debug-rdp5, |
828 |
[ --with-debug-rdp5 enable debugging of RDP5 code], |
[ --with-debug-rdp5 enable debugging of RDP5 code], |
829 |
[ AC_DEFINE(WITH_DEBUG_RDP5) ]) |
[ |
830 |
|
if test $withval != "no"; |
831 |
|
then |
832 |
|
AC_DEFINE(WITH_DEBUG_RDP5,1) |
833 |
|
fi |
834 |
|
]) |
835 |
|
|
836 |
AC_ARG_WITH(debug-clipboard, |
AC_ARG_WITH(debug-clipboard, |
837 |
[ --with-debug-clipboard enable debugging of clipboard code], |
[ --with-debug-clipboard enable debugging of clipboard code], |
838 |
[ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ]) |
[ |
839 |
|
if test $withval != "no"; |
840 |
|
then |
841 |
|
AC_DEFINE(WITH_DEBUG_CLIPBOARD,1) |
842 |
|
fi |
843 |
|
]) |
844 |
|
|
845 |
|
AC_ARG_WITH(debug-sound, |
846 |
|
[ --with-debug-sound enable debugging of sound code], |
847 |
|
[ |
848 |
|
if test $withval != "no"; |
849 |
|
then |
850 |
|
AC_DEFINE(WITH_DEBUG_SOUND,1) |
851 |
|
fi |
852 |
|
]) |
853 |
|
|
854 |
|
AC_ARG_WITH(debug-channel, |
855 |
|
[ --with-debug-channel enable debugging of virtual channel code], |
856 |
|
[ |
857 |
|
if test $withval != "no"; |
858 |
|
then |
859 |
|
AC_DEFINE(WITH_DEBUG_CHANNEL,1) |
860 |
|
fi |
861 |
|
]) |
862 |
|
|
863 |
|
AC_ARG_WITH(debug-seamless, |
864 |
|
[ --with-debug-seamless enable debugging of SeamlessRDP code], |
865 |
|
[ |
866 |
|
if test $withval != "no"; |
867 |
|
then |
868 |
|
AC_DEFINE(WITH_DEBUG_SEAMLESS,1) |
869 |
|
fi |
870 |
|
]) |
871 |
|
|
872 |
|
AC_ARG_WITH(debug-smartcard, |
873 |
|
[ --with-debug-smartcard enable debugging of smart-card code], |
874 |
|
[ |
875 |
|
if test $withval != "no"; |
876 |
|
then |
877 |
|
if test x"$WITH_SCARD" = "x1"; then |
878 |
|
AC_DEFINE(WITH_DEBUG_SCARD,1) |
879 |
|
fi |
880 |
|
fi |
881 |
|
]) |
882 |
|
|
883 |
# |
# |
884 |
# target-specific stuff |
# target-specific stuff |
896 |
*-*-hpux*) |
*-*-hpux*) |
897 |
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" |
CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" |
898 |
;; |
;; |
899 |
|
*-*-irix6.5*) |
900 |
|
LIBS="$LIBS -L$ssldir/lib32 -lcrypto" |
901 |
|
CFLAGS="$CFLAGS -D__SGI_IRIX__" |
902 |
|
;; |
903 |
esac |
esac |
904 |
|
|
905 |
|
|