1 |
AC_INIT(rdesktop, 1.4.0) |
AC_INIT(rdesktop, 1.5.0) |
2 |
|
|
3 |
AC_CONFIG_SRCDIR([rdesktop.c]) |
AC_CONFIG_SRCDIR([rdesktop.c]) |
4 |
|
|
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 |
|
|
16 |
|
PKG_PROG_PKG_CONFIG |
17 |
|
|
18 |
AC_SEARCH_LIBS(socket, socket) |
AC_SEARCH_LIBS(socket, socket) |
19 |
AC_SEARCH_LIBS(inet_aton, resolv) |
AC_SEARCH_LIBS(inet_aton, resolv) |
20 |
|
|
24 |
AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H)) |
AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H)) |
25 |
AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) |
AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) |
26 |
AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H)) |
AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H)) |
27 |
AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H)) |
|
28 |
|
AC_CHECK_TOOL(STRIP, strip, :) |
29 |
|
|
30 |
rpath="" |
rpath="" |
31 |
|
|
79 |
rpath="$rpath:$ssldir/lib" |
rpath="$rpath:$ssldir/lib" |
80 |
]) |
]) |
81 |
|
|
82 |
|
AC_ARG_ENABLE(smartcard, |
83 |
|
[ --enable-smartcard Enables smart-card support. |
84 |
|
], |
85 |
|
[ |
86 |
|
if test -n "$PKG_CONFIG"; then |
87 |
|
PKG_CHECK_MODULES(PCSCLITE, libpcsclite, [WITH_SCARD=1], [WITH_SCARD=0]) |
88 |
|
if test x"$WITH_SCARD" = "x1"; then |
89 |
|
SCARDOBJ="scard.o" |
90 |
|
CFLAGS="$CFLAGS $PCSCLITE_CFLAGS" |
91 |
|
LIBS="$LIBS $PCSCLITE_LIBS" |
92 |
|
AC_DEFINE(WITH_SCARD) |
93 |
|
fi |
94 |
|
fi |
95 |
|
]) |
96 |
|
|
97 |
|
AC_SUBST(SCARDOBJ) |
98 |
|
|
99 |
# |
# |
100 |
# Alignment |
# Alignment |
157 |
# |
# |
158 |
# sound |
# sound |
159 |
# |
# |
|
AC_ARG_WITH(libao, |
|
|
[ --with-libao=DIR look for libao at DIR/include, DIR/lib], |
|
|
[ |
|
|
CFLAGS="$CFLAGS -I$withval/include" |
|
|
CPPFLAGS="$CPPFLAGS -I$withval/include" |
|
|
LIBS="$LIBS -L$withval/lib" |
|
|
rpath="$rpath:$withval/lib" |
|
|
] |
|
|
) |
|
160 |
|
|
161 |
sound="yes" |
sound="yes" |
162 |
AC_ARG_WITH(sound, |
AC_ARG_WITH(sound, |
163 |
[ --with-sound select sound system ("oss", "sgi", "sun" or "libao") ], |
[ --with-sound select sound system ("oss", "sgi", "sun", "alsa" or "libao") ], |
164 |
[ |
[ |
165 |
sound="$withval" |
sound="$withval" |
166 |
]) |
]) |
167 |
if test "$sound" = yes; then |
|
168 |
AC_CHECK_HEADER(ao/ao.h, [sound=libao]) |
AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=1], [HAVE_OSS=0]) |
169 |
AC_CHECK_HEADER(sys/soundcard.h, [sound=oss]) |
AC_CHECK_HEADER(dmedia/audio.h, [HAVE_SGI=1], [HAVE_SGI=0]) |
170 |
AC_CHECK_HEADER(dmedia/audio.h, [sound=sgi]) |
AC_CHECK_HEADER(sys/audioio.h, [HAVE_SUN=1], [HAVE_SUN=0]) |
171 |
AC_CHECK_HEADER(sys/audioio.h, [sound=sun]) |
|
172 |
fi |
AC_ARG_ENABLE(static-libsamplerate, |
173 |
if test "$sound" = no; then |
[ --enable-static-libsamplerate link libsamplerate statically], |
174 |
break |
[static_libsamplerate=yes], |
175 |
elif test "$sound" = oss; then |
[static_libsamplerate=no]) |
176 |
SOUNDOBJ="rdpsnd.o rdpsnd_oss.o" |
|
177 |
AC_DEFINE(WITH_RDPSND) |
if test -n "$PKG_CONFIG"; then |
178 |
elif test "$sound" = sgi; then |
PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0]) |
179 |
SOUNDOBJ="rdpsnd.o rdpsnd_sgi.o" |
PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0]) |
180 |
LDFLAGS="$LDFLAGS -laudio" |
PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0]) |
181 |
AC_DEFINE(WITH_RDPSND) |
if test x"$HAVE_LIBSAMPLERATE" = "x1"; then |
182 |
elif test "$sound" = sun; then |
AC_DEFINE(HAVE_LIBSAMPLERATE) |
183 |
SOUNDOBJ="rdpsnd.o rdpsnd_sun.o" |
if test x"$static_libsamplerate" = "xyes"; then |
184 |
AC_DEFINE(WITH_RDPSND) |
_libsamplerate_libdir=`$PKG_CONFIG --errors-to-stdout --variable=libdir samplerate` |
185 |
elif test "$sound" = libao; then |
LIBSAMPLERATE_LIBS="$_libsamplerate_libdir""/libsamplerate.a" |
186 |
SOUNDOBJ="rdpsnd.o rdpsnd_libao.o" |
fi |
187 |
LDFLAGS="$LDFLAGS -lao" |
LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS -lm" |
188 |
|
fi |
189 |
|
fi |
190 |
|
|
191 |
|
if test "$sound" != "no"; then |
192 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd.o rdpsnd_dsp.o" |
193 |
|
CFLAGS="$CFLAGS $LIBSAMPLERATE_CFLAGS" |
194 |
|
LIBS="$LIBS $LIBSAMPLERATE_LIBS" |
195 |
AC_DEFINE(WITH_RDPSND) |
AC_DEFINE(WITH_RDPSND) |
|
else |
|
|
AC_MSG_WARN([sound support disabled]) |
|
|
AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun) and libao]) |
|
196 |
fi |
fi |
197 |
|
|
198 |
|
case $sound in |
199 |
|
yes) |
200 |
|
if test x"$HAVE_OSS" = "x1"; then |
201 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" |
202 |
|
AC_DEFINE(RDPSND_OSS) |
203 |
|
fi |
204 |
|
|
205 |
|
if test x"$HAVE_SGI" = "x1"; then |
206 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" |
207 |
|
LIBS="$LIBS -laudio" |
208 |
|
AC_DEFINE(RDPSND_SGI) |
209 |
|
fi |
210 |
|
|
211 |
|
if test x"$HAVE_SUN" = "x1"; then |
212 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" |
213 |
|
AC_DEFINE(RDPSND_SUN) |
214 |
|
fi |
215 |
|
|
216 |
|
if test x"$HAVE_ALSA" = "x1"; then |
217 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" |
218 |
|
CFLAGS="$CFLAGS $ALSA_CFLAGS" |
219 |
|
LIBS="$LIBS $ALSA_LIBS" |
220 |
|
AC_DEFINE(RDPSND_ALSA) |
221 |
|
fi |
222 |
|
|
223 |
|
if test x"$HAVE_LIBAO" = "x1"; then |
224 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" |
225 |
|
CFLAGS="$CFLAGS $LIBAO_CFLAGS" |
226 |
|
LIBS="$LIBS $LIBAO_LIBS" |
227 |
|
AC_DEFINE(RDPSND_LIBAO) |
228 |
|
fi |
229 |
|
|
230 |
|
;; |
231 |
|
|
232 |
|
oss) |
233 |
|
if test x"$HAVE_OSS" = "x1"; then |
234 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" |
235 |
|
AC_DEFINE(RDPSND_OSS) |
236 |
|
else |
237 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
238 |
|
fi |
239 |
|
;; |
240 |
|
|
241 |
|
sgi) |
242 |
|
if test x"$HAVE_SGI" = "x1"; then |
243 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" |
244 |
|
LIBS="$LIBS -laudio" |
245 |
|
AC_DEFINE(RDPSND_SGI) |
246 |
|
else |
247 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
248 |
|
fi |
249 |
|
;; |
250 |
|
|
251 |
|
sun) |
252 |
|
if test x"$HAVE_SUN" = "x1"; then |
253 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" |
254 |
|
AC_DEFINE(RDPSND_SUN) |
255 |
|
else |
256 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
257 |
|
fi |
258 |
|
;; |
259 |
|
|
260 |
|
alsa) |
261 |
|
if test x"$HAVE_ALSA" = "x1"; then |
262 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" |
263 |
|
CFLAGS="$CFLAGS $ALSA_CFLAGS" |
264 |
|
LIBS="$LIBS $ALSA_LIBS" |
265 |
|
AC_DEFINE(RDPSND_ALSA) |
266 |
|
else |
267 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
268 |
|
fi |
269 |
|
;; |
270 |
|
|
271 |
|
libao) |
272 |
|
if test x"$HAVE_LIBAO" = "x1"; then |
273 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" |
274 |
|
CFLAGS="$CFLAGS $LIBAO_CFLAGS" |
275 |
|
LIBS="$LIBS $LIBAO_LIBS" |
276 |
|
AC_DEFINE(RDPSND_LIBAO) |
277 |
|
else |
278 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
279 |
|
fi |
280 |
|
;; |
281 |
|
|
282 |
|
no) |
283 |
|
;; |
284 |
|
|
285 |
|
*) |
286 |
|
AC_MSG_WARN([sound support disabled]) |
287 |
|
AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao]) |
288 |
|
;; |
289 |
|
esac |
290 |
|
|
291 |
AC_SUBST(SOUNDOBJ) |
AC_SUBST(SOUNDOBJ) |
292 |
|
|
293 |
# |
# |
393 |
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
394 |
done |
done |
395 |
]) |
]) |
396 |
|
AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H)) |
397 |
|
|
398 |
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
399 |
am_cv_func_iconv="no, consider installing GNU libiconv" |
am_cv_func_iconv="no, consider installing GNU libiconv" |
452 |
LIBS="$LIBS $LIBICONV" |
LIBS="$LIBS $LIBICONV" |
453 |
|
|
454 |
# |
# |
455 |
|
# socklen_t |
456 |
|
# from curl |
457 |
|
|
458 |
|
dnl Check for socklen_t: historically on BSD it is an int, and in |
459 |
|
dnl POSIX 1g it is a type of its own, but some platforms use different |
460 |
|
dnl types for the argument to getsockopt, getpeername, etc. So we |
461 |
|
dnl have to test to find something that will work. |
462 |
|
AC_DEFUN([TYPE_SOCKLEN_T], |
463 |
|
[ |
464 |
|
AC_CHECK_TYPE([socklen_t], ,[ |
465 |
|
AC_MSG_CHECKING([for socklen_t equivalent]) |
466 |
|
AC_CACHE_VAL([socklen_t_equiv], |
467 |
|
[ |
468 |
|
# Systems have either "struct sockaddr *" or |
469 |
|
# "void *" as the second argument to getpeername |
470 |
|
socklen_t_equiv= |
471 |
|
for arg2 in "struct sockaddr" void; do |
472 |
|
for t in int size_t unsigned long "unsigned long"; do |
473 |
|
AC_TRY_COMPILE([ |
474 |
|
#include <sys/types.h> |
475 |
|
#include <sys/socket.h> |
476 |
|
|
477 |
|
int getpeername (int, $arg2 *, $t *); |
478 |
|
],[ |
479 |
|
$t len; |
480 |
|
getpeername(0,0,&len); |
481 |
|
],[ |
482 |
|
socklen_t_equiv="$t" |
483 |
|
break |
484 |
|
]) |
485 |
|
done |
486 |
|
done |
487 |
|
|
488 |
|
if test "x$socklen_t_equiv" = x; then |
489 |
|
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) |
490 |
|
fi |
491 |
|
]) |
492 |
|
AC_MSG_RESULT($socklen_t_equiv) |
493 |
|
AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv, |
494 |
|
[type to use in place of socklen_t if not defined])], |
495 |
|
[#include <sys/types.h> |
496 |
|
#include <sys/socket.h>]) |
497 |
|
]) |
498 |
|
|
499 |
|
TYPE_SOCKLEN_T |
500 |
|
|
501 |
|
# |
502 |
|
# statfs stuff |
503 |
|
# |
504 |
|
AC_CHECK_HEADERS(sys/vfs.h) |
505 |
|
AC_CHECK_HEADERS(sys/statvfs.h) |
506 |
|
AC_CHECK_HEADERS(sys/statfs.h) |
507 |
|
AC_CHECK_HEADERS(sys/param.h) |
508 |
|
|
509 |
|
mount_includes="\ |
510 |
|
$ac_includes_default |
511 |
|
#if HAVE_SYS_PARAM_H |
512 |
|
# include <sys/param.h> |
513 |
|
#endif |
514 |
|
" |
515 |
|
|
516 |
|
AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes]) |
517 |
|
|
518 |
|
################################################# |
519 |
|
# these tests are taken from the GNU fileutils package |
520 |
|
AC_CHECKING(how to get filesystem space usage) |
521 |
|
space=no |
522 |
|
|
523 |
|
# Test for statvfs64. |
524 |
|
if test $space = no; then |
525 |
|
# SVR4 |
526 |
|
AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64, |
527 |
|
[AC_TRY_RUN([ |
528 |
|
#if defined(HAVE_UNISTD_H) |
529 |
|
#include <unistd.h> |
530 |
|
#endif |
531 |
|
#include <sys/types.h> |
532 |
|
#include <sys/statvfs.h> |
533 |
|
main () |
534 |
|
{ |
535 |
|
struct statvfs64 fsd; |
536 |
|
exit (statvfs64 (".", &fsd)); |
537 |
|
}], |
538 |
|
fu_cv_sys_stat_statvfs64=yes, |
539 |
|
fu_cv_sys_stat_statvfs64=no, |
540 |
|
fu_cv_sys_stat_statvfs64=cross)]) |
541 |
|
if test $fu_cv_sys_stat_statvfs64 = yes; then |
542 |
|
space=yes |
543 |
|
AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available]) |
544 |
|
fi |
545 |
|
fi |
546 |
|
|
547 |
|
# Perform only the link test since it seems there are no variants of the |
548 |
|
# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) |
549 |
|
# because that got a false positive on SCO OSR5. Adding the declaration |
550 |
|
# of a `struct statvfs' causes this test to fail (as it should) on such |
551 |
|
# systems. That system is reported to work fine with STAT_STATFS4 which |
552 |
|
# is what it gets when this test fails. |
553 |
|
if test $space = no; then |
554 |
|
# SVR4 |
555 |
|
AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, |
556 |
|
[AC_TRY_LINK([#include <sys/types.h> |
557 |
|
#include <sys/statvfs.h>], |
558 |
|
[struct statvfs fsd; statvfs (0, &fsd);], |
559 |
|
fu_cv_sys_stat_statvfs=yes, |
560 |
|
fu_cv_sys_stat_statvfs=no)]) |
561 |
|
if test $fu_cv_sys_stat_statvfs = yes; then |
562 |
|
space=yes |
563 |
|
AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) |
564 |
|
fi |
565 |
|
fi |
566 |
|
|
567 |
|
if test $space = no; then |
568 |
|
# DEC Alpha running OSF/1 |
569 |
|
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) |
570 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, |
571 |
|
[AC_TRY_RUN([ |
572 |
|
#include <sys/param.h> |
573 |
|
#include <sys/types.h> |
574 |
|
#include <sys/mount.h> |
575 |
|
main () |
576 |
|
{ |
577 |
|
struct statfs fsd; |
578 |
|
fsd.f_fsize = 0; |
579 |
|
exit (statfs (".", &fsd, sizeof (struct statfs))); |
580 |
|
}], |
581 |
|
fu_cv_sys_stat_statfs3_osf1=yes, |
582 |
|
fu_cv_sys_stat_statfs3_osf1=no, |
583 |
|
fu_cv_sys_stat_statfs3_osf1=no)]) |
584 |
|
|
585 |
|
|
586 |
|
#C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) |
587 |
|
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then |
588 |
|
space=yes |
589 |
|
AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments]) |
590 |
|
fi |
591 |
|
fi |
592 |
|
|
593 |
|
if test $space = no; then |
594 |
|
# AIX |
595 |
|
AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl |
596 |
|
member (AIX, 4.3BSD)]) |
597 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, |
598 |
|
[AC_TRY_RUN([ |
599 |
|
#ifdef HAVE_SYS_PARAM_H |
600 |
|
#include <sys/param.h> |
601 |
|
#endif |
602 |
|
#ifdef HAVE_SYS_MOUNT_H |
603 |
|
#include <sys/mount.h> |
604 |
|
#endif |
605 |
|
#ifdef HAVE_SYS_VFS_H |
606 |
|
#include <sys/vfs.h> |
607 |
|
#endif |
608 |
|
main () |
609 |
|
{ |
610 |
|
struct statfs fsd; |
611 |
|
fsd.f_bsize = 0; |
612 |
|
exit (statfs (".", &fsd)); |
613 |
|
}], |
614 |
|
fu_cv_sys_stat_statfs2_bsize=yes, |
615 |
|
fu_cv_sys_stat_statfs2_bsize=no, |
616 |
|
fu_cv_sys_stat_statfs2_bsize=no)]) |
617 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) |
618 |
|
if test $fu_cv_sys_stat_statfs2_bsize = yes; then |
619 |
|
space=yes |
620 |
|
AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property]) |
621 |
|
fi |
622 |
|
fi |
623 |
|
|
624 |
|
if test $space = no; then |
625 |
|
# SVR3 |
626 |
|
AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) |
627 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs4, |
628 |
|
[AC_TRY_RUN([#include <sys/types.h> |
629 |
|
#include <sys/statfs.h> |
630 |
|
main () |
631 |
|
{ |
632 |
|
struct statfs fsd; |
633 |
|
exit (statfs (".", &fsd, sizeof fsd, 0)); |
634 |
|
}], |
635 |
|
fu_cv_sys_stat_statfs4=yes, |
636 |
|
fu_cv_sys_stat_statfs4=no, |
637 |
|
fu_cv_sys_stat_statfs4=no)]) |
638 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs4) |
639 |
|
if test $fu_cv_sys_stat_statfs4 = yes; then |
640 |
|
space=yes |
641 |
|
AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments]) |
642 |
|
fi |
643 |
|
fi |
644 |
|
|
645 |
|
if test $space = no; then |
646 |
|
# 4.4BSD and NetBSD |
647 |
|
AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl |
648 |
|
member (4.4BSD and NetBSD)]) |
649 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, |
650 |
|
[AC_TRY_RUN([#include <sys/types.h> |
651 |
|
#ifdef HAVE_SYS_PARAM_H |
652 |
|
#include <sys/param.h> |
653 |
|
#endif |
654 |
|
#ifdef HAVE_SYS_MOUNT_H |
655 |
|
#include <sys/mount.h> |
656 |
|
#endif |
657 |
|
main () |
658 |
|
{ |
659 |
|
struct statfs fsd; |
660 |
|
fsd.f_fsize = 0; |
661 |
|
exit (statfs (".", &fsd)); |
662 |
|
}], |
663 |
|
fu_cv_sys_stat_statfs2_fsize=yes, |
664 |
|
fu_cv_sys_stat_statfs2_fsize=no, |
665 |
|
fu_cv_sys_stat_statfs2_fsize=no)]) |
666 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) |
667 |
|
if test $fu_cv_sys_stat_statfs2_fsize = yes; then |
668 |
|
space=yes |
669 |
|
AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize]) |
670 |
|
fi |
671 |
|
fi |
672 |
|
|
673 |
|
if test $space = no; then |
674 |
|
# Ultrix |
675 |
|
AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) |
676 |
|
AC_CACHE_VAL(fu_cv_sys_stat_fs_data, |
677 |
|
[AC_TRY_RUN([#include <sys/types.h> |
678 |
|
#ifdef HAVE_SYS_PARAM_H |
679 |
|
#include <sys/param.h> |
680 |
|
#endif |
681 |
|
#ifdef HAVE_SYS_MOUNT_H |
682 |
|
#include <sys/mount.h> |
683 |
|
#endif |
684 |
|
#ifdef HAVE_SYS_FS_TYPES_H |
685 |
|
#include <sys/fs_types.h> |
686 |
|
#endif |
687 |
|
main () |
688 |
|
{ |
689 |
|
struct fs_data fsd; |
690 |
|
/* Ultrix's statfs returns 1 for success, |
691 |
|
0 for not mounted, -1 for failure. */ |
692 |
|
exit (statfs (".", &fsd) != 1); |
693 |
|
}], |
694 |
|
fu_cv_sys_stat_fs_data=yes, |
695 |
|
fu_cv_sys_stat_fs_data=no, |
696 |
|
fu_cv_sys_stat_fs_data=no)]) |
697 |
|
AC_MSG_RESULT($fu_cv_sys_stat_fs_data) |
698 |
|
if test $fu_cv_sys_stat_fs_data = yes; then |
699 |
|
space=yes |
700 |
|
AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available]) |
701 |
|
fi |
702 |
|
fi |
703 |
|
|
704 |
|
statxfs_includes="\ |
705 |
|
$ac_includes_default |
706 |
|
#if HAVE_SYS_STATVFS_H |
707 |
|
# include <sys/statvfs.h> |
708 |
|
#endif |
709 |
|
#if HAVE_SYS_VFS_H |
710 |
|
# include <sys/vfs.h> |
711 |
|
#endif |
712 |
|
#if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H |
713 |
|
# if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H |
714 |
|
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */ |
715 |
|
# include <sys/param.h> |
716 |
|
# include <sys/mount.h> |
717 |
|
# elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H |
718 |
|
/* Ultrix 4.4 needs these for the declaration of struct statfs. */ |
719 |
|
# include <netinet/in.h> |
720 |
|
# include <nfs/nfs_clnt.h> |
721 |
|
# include <nfs/vfs.h> |
722 |
|
# endif |
723 |
|
#endif |
724 |
|
" |
725 |
|
|
726 |
|
AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes]) |
727 |
|
AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes]) |
728 |
|
AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes]) |
729 |
|
AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes]) |
730 |
|
|
731 |
|
# |
732 |
|
# Large file support |
733 |
|
# |
734 |
|
AC_SYS_LARGEFILE |
735 |
|
|
736 |
|
# |
737 |
|
# mntent |
738 |
|
# |
739 |
|
AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H)) |
740 |
|
AC_CHECK_FUNCS(setmntent) |
741 |
|
|
742 |
|
# |
743 |
# IPv6 |
# IPv6 |
744 |
# |
# |
745 |
AC_ARG_WITH(ipv6, |
AC_ARG_WITH(ipv6, |
746 |
[ --with-ipv6 enable IPv6-support], |
[ --with-ipv6 enable IPv6-support], |
747 |
[ AC_DEFINE(IPv6) ]) |
[ |
748 |
|
if test $withval != "no"; |
749 |
|
then |
750 |
|
AC_DEFINE(IPv6,1) |
751 |
|
fi |
752 |
|
]) |
753 |
|
|
754 |
|
|
755 |
# |
# |
757 |
# |
# |
758 |
AC_ARG_WITH(debug, |
AC_ARG_WITH(debug, |
759 |
[ --with-debug enable protocol debugging output], |
[ --with-debug enable protocol debugging output], |
760 |
[ AC_DEFINE(WITH_DEBUG) ]) |
[ |
761 |
|
if test $withval != "no"; |
762 |
|
then |
763 |
|
AC_DEFINE(WITH_DEBUG,1) |
764 |
|
fi |
765 |
|
]) |
766 |
|
|
767 |
AC_ARG_WITH(debug-kbd, |
AC_ARG_WITH(debug-kbd, |
768 |
[ --with-debug-kbd enable debugging of keyboard handling], |
[ --with-debug-kbd enable debugging of keyboard handling], |
769 |
[ AC_DEFINE(WITH_DEBUG_KBD) ]) |
[ |
770 |
|
if test $withval != "no"; |
771 |
|
then |
772 |
|
AC_DEFINE(WITH_DEBUG_KBD,1) |
773 |
|
fi |
774 |
|
]) |
775 |
|
|
776 |
AC_ARG_WITH(debug-rdp5, |
AC_ARG_WITH(debug-rdp5, |
777 |
[ --with-debug-rdp5 enable debugging of RDP5 code], |
[ --with-debug-rdp5 enable debugging of RDP5 code], |
778 |
[ AC_DEFINE(WITH_DEBUG_RDP5) ]) |
[ |
779 |
|
if test $withval != "no"; |
780 |
|
then |
781 |
|
AC_DEFINE(WITH_DEBUG_RDP5,1) |
782 |
|
fi |
783 |
|
]) |
784 |
|
|
785 |
AC_ARG_WITH(debug-clipboard, |
AC_ARG_WITH(debug-clipboard, |
786 |
[ --with-debug-clipboard enable debugging of clipboard code], |
[ --with-debug-clipboard enable debugging of clipboard code], |
787 |
[ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ]) |
[ |
788 |
|
if test $withval != "no"; |
789 |
|
then |
790 |
|
AC_DEFINE(WITH_DEBUG_CLIPBOARD,1) |
791 |
|
fi |
792 |
|
]) |
793 |
|
|
794 |
|
AC_ARG_WITH(debug-channel, |
795 |
|
[ --with-debug-channel enable debugging of virtual channel code], |
796 |
|
[ |
797 |
|
if test $withval != "no"; |
798 |
|
then |
799 |
|
AC_DEFINE(WITH_DEBUG_CHANNEL,1) |
800 |
|
fi |
801 |
|
]) |
802 |
|
|
803 |
|
|
804 |
|
AC_ARG_WITH(debug-smartcard, |
805 |
|
[ --with-debug-smartcard enable debugging of smart-card code], |
806 |
|
[ |
807 |
|
if test $withval != "no"; |
808 |
|
then |
809 |
|
if test x"$WITH_SCARD" = "x1"; then |
810 |
|
AC_DEFINE(WITH_SCARD_DEBUG,1) |
811 |
|
fi |
812 |
|
fi |
813 |
|
]) |
814 |
|
|
815 |
# |
# |
816 |
# target-specific stuff |
# target-specific stuff |