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 |
|
AC_PATH_PROG(PKG_CONFIG, 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 |
|
dnl Don't depend on pkg-config |
31 |
|
m4_ifdef([PKG_CHECK_MODULES], [], [ |
32 |
|
m4_errprint([warning: pkg-config checks are not available]) |
33 |
|
m4_defun([PKG_CHECK_MODULES], [ |
34 |
|
AC_MSG_WARN([pkg-config not available, cannot check for $2]) |
35 |
|
$4 |
36 |
|
]) |
37 |
|
]) |
38 |
|
|
39 |
rpath="" |
rpath="" |
40 |
|
|
88 |
rpath="$rpath:$ssldir/lib" |
rpath="$rpath:$ssldir/lib" |
89 |
]) |
]) |
90 |
|
|
91 |
|
AC_ARG_ENABLE(smartcard, |
92 |
|
[ --enable-smartcard Enables smart-card support. |
93 |
|
], |
94 |
|
[ |
95 |
|
case "$OSTYPE" in |
96 |
|
darwin*) |
97 |
|
AC_CHECK_HEADER(PCSC/pcsclite.h, [WITH_SCARD=1], [WITH_SCARD=0]) |
98 |
|
AC_DEFINE(PCSC_OSX) |
99 |
|
AC_DEFINE(WITH_PCSC120) |
100 |
|
PCSCLITE_CFLAGS="" |
101 |
|
PCSCLITE_LIBS="-framework PCSC" |
102 |
|
;; |
103 |
|
*) |
104 |
|
if test -n "$PKG_CONFIG"; then |
105 |
|
PKG_CHECK_MODULES(PCSCLITE, libpcsclite, [WITH_SCARD=1], [WITH_SCARD=0]) |
106 |
|
fi |
107 |
|
;; |
108 |
|
esac |
109 |
|
|
110 |
|
if test x"$WITH_SCARD" = "x1"; then |
111 |
|
SCARDOBJ="scard.o" |
112 |
|
CFLAGS="$CFLAGS $PCSCLITE_CFLAGS" |
113 |
|
LIBS="$LIBS $PCSCLITE_LIBS" |
114 |
|
AC_DEFINE(WITH_SCARD) |
115 |
|
fi |
116 |
|
]) |
117 |
|
|
118 |
|
AC_SUBST(SCARDOBJ) |
119 |
|
|
120 |
# |
# |
121 |
# Alignment |
# Alignment |
178 |
# |
# |
179 |
# sound |
# sound |
180 |
# |
# |
|
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" |
|
|
] |
|
|
) |
|
181 |
|
|
182 |
sound="yes" |
sound="yes" |
183 |
AC_ARG_WITH(sound, |
AC_ARG_WITH(sound, |
184 |
[ --with-sound select sound system ("oss", "sgi", "sun" or "libao") ], |
[ --with-sound select sound system ("oss", "sgi", "sun", "alsa" or "libao") ], |
185 |
[ |
[ |
186 |
sound="$withval" |
sound="$withval" |
187 |
]) |
]) |
188 |
if test "$sound" = yes; then |
|
189 |
AC_CHECK_HEADER(ao/ao.h, [sound=libao]) |
AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=1], [HAVE_OSS=0]) |
190 |
AC_CHECK_HEADER(sys/soundcard.h, [sound=oss]) |
AC_CHECK_HEADER(dmedia/audio.h, [HAVE_SGI=1], [HAVE_SGI=0]) |
191 |
AC_CHECK_HEADER(dmedia/audio.h, [sound=sgi]) |
AC_CHECK_HEADER(sys/audioio.h, [HAVE_SUN=1], [HAVE_SUN=0]) |
192 |
AC_CHECK_HEADER(sys/audioio.h, [sound=sun]) |
|
193 |
fi |
AC_ARG_ENABLE(static-libsamplerate, |
194 |
if test "$sound" = no; then |
[ --enable-static-libsamplerate link libsamplerate statically], |
195 |
break |
[static_libsamplerate=yes], |
196 |
elif test "$sound" = oss; then |
[static_libsamplerate=no]) |
197 |
SOUNDOBJ="rdpsnd.o rdpsnd_oss.o" |
|
198 |
AC_DEFINE(WITH_RDPSND) |
if test -n "$PKG_CONFIG"; then |
199 |
elif test "$sound" = sgi; then |
PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0]) |
200 |
SOUNDOBJ="rdpsnd.o rdpsnd_sgi.o" |
PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0]) |
201 |
LDFLAGS="$LDFLAGS -laudio" |
PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0]) |
202 |
AC_DEFINE(WITH_RDPSND) |
if test x"$HAVE_LIBSAMPLERATE" = "x1"; then |
203 |
elif test "$sound" = sun; then |
AC_DEFINE(HAVE_LIBSAMPLERATE) |
204 |
SOUNDOBJ="rdpsnd.o rdpsnd_sun.o" |
if test x"$static_libsamplerate" = "xyes"; then |
205 |
AC_DEFINE(WITH_RDPSND) |
_libsamplerate_libdir=`$PKG_CONFIG --errors-to-stdout --variable=libdir samplerate` |
206 |
elif test "$sound" = libao; then |
LIBSAMPLERATE_LIBS="$_libsamplerate_libdir""/libsamplerate.a" |
207 |
SOUNDOBJ="rdpsnd.o rdpsnd_libao.o" |
fi |
208 |
LDFLAGS="$LDFLAGS -lao" |
LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS -lm" |
209 |
|
fi |
210 |
|
fi |
211 |
|
|
212 |
|
if test "$sound" != "no"; then |
213 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd.o rdpsnd_dsp.o" |
214 |
|
CFLAGS="$CFLAGS $LIBSAMPLERATE_CFLAGS" |
215 |
|
LIBS="$LIBS $LIBSAMPLERATE_LIBS" |
216 |
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]) |
|
217 |
fi |
fi |
218 |
|
|
219 |
|
case $sound in |
220 |
|
yes) |
221 |
|
if test x"$HAVE_OSS" = "x1"; then |
222 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" |
223 |
|
AC_DEFINE(RDPSND_OSS) |
224 |
|
fi |
225 |
|
|
226 |
|
if test x"$HAVE_SGI" = "x1"; then |
227 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" |
228 |
|
LIBS="$LIBS -laudio" |
229 |
|
AC_DEFINE(RDPSND_SGI) |
230 |
|
fi |
231 |
|
|
232 |
|
if test x"$HAVE_SUN" = "x1"; then |
233 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" |
234 |
|
AC_DEFINE(RDPSND_SUN) |
235 |
|
fi |
236 |
|
|
237 |
|
if test x"$HAVE_ALSA" = "x1"; then |
238 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" |
239 |
|
CFLAGS="$CFLAGS $ALSA_CFLAGS" |
240 |
|
LIBS="$LIBS $ALSA_LIBS" |
241 |
|
AC_DEFINE(RDPSND_ALSA) |
242 |
|
fi |
243 |
|
|
244 |
|
if test x"$HAVE_LIBAO" = "x1"; then |
245 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" |
246 |
|
CFLAGS="$CFLAGS $LIBAO_CFLAGS" |
247 |
|
LIBS="$LIBS $LIBAO_LIBS" |
248 |
|
AC_DEFINE(RDPSND_LIBAO) |
249 |
|
fi |
250 |
|
|
251 |
|
;; |
252 |
|
|
253 |
|
oss) |
254 |
|
if test x"$HAVE_OSS" = "x1"; then |
255 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" |
256 |
|
AC_DEFINE(RDPSND_OSS) |
257 |
|
else |
258 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
259 |
|
fi |
260 |
|
;; |
261 |
|
|
262 |
|
sgi) |
263 |
|
if test x"$HAVE_SGI" = "x1"; then |
264 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" |
265 |
|
LIBS="$LIBS -laudio" |
266 |
|
AC_DEFINE(RDPSND_SGI) |
267 |
|
else |
268 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
269 |
|
fi |
270 |
|
;; |
271 |
|
|
272 |
|
sun) |
273 |
|
if test x"$HAVE_SUN" = "x1"; then |
274 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" |
275 |
|
AC_DEFINE(RDPSND_SUN) |
276 |
|
else |
277 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
278 |
|
fi |
279 |
|
;; |
280 |
|
|
281 |
|
alsa) |
282 |
|
if test x"$HAVE_ALSA" = "x1"; then |
283 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" |
284 |
|
CFLAGS="$CFLAGS $ALSA_CFLAGS" |
285 |
|
LIBS="$LIBS $ALSA_LIBS" |
286 |
|
AC_DEFINE(RDPSND_ALSA) |
287 |
|
else |
288 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
289 |
|
fi |
290 |
|
;; |
291 |
|
|
292 |
|
libao) |
293 |
|
if test x"$HAVE_LIBAO" = "x1"; then |
294 |
|
SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" |
295 |
|
CFLAGS="$CFLAGS $LIBAO_CFLAGS" |
296 |
|
LIBS="$LIBS $LIBAO_LIBS" |
297 |
|
AC_DEFINE(RDPSND_LIBAO) |
298 |
|
else |
299 |
|
AC_MSG_ERROR([Selected sound system is not available.]) |
300 |
|
fi |
301 |
|
;; |
302 |
|
|
303 |
|
no) |
304 |
|
;; |
305 |
|
|
306 |
|
*) |
307 |
|
AC_MSG_WARN([sound support disabled]) |
308 |
|
AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao]) |
309 |
|
;; |
310 |
|
esac |
311 |
|
|
312 |
AC_SUBST(SOUNDOBJ) |
AC_SUBST(SOUNDOBJ) |
313 |
|
|
314 |
# |
# |
414 |
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi |
415 |
done |
done |
416 |
]) |
]) |
417 |
|
AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H)) |
418 |
|
|
419 |
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ |
420 |
am_cv_func_iconv="no, consider installing GNU libiconv" |
am_cv_func_iconv="no, consider installing GNU libiconv" |
520 |
TYPE_SOCKLEN_T |
TYPE_SOCKLEN_T |
521 |
|
|
522 |
# |
# |
523 |
|
# statfs stuff |
524 |
|
# |
525 |
|
AC_CHECK_HEADERS(sys/vfs.h) |
526 |
|
AC_CHECK_HEADERS(sys/statvfs.h) |
527 |
|
AC_CHECK_HEADERS(sys/statfs.h) |
528 |
|
AC_CHECK_HEADERS(sys/param.h) |
529 |
|
|
530 |
|
mount_includes="\ |
531 |
|
$ac_includes_default |
532 |
|
#if HAVE_SYS_PARAM_H |
533 |
|
# include <sys/param.h> |
534 |
|
#endif |
535 |
|
" |
536 |
|
|
537 |
|
AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes]) |
538 |
|
|
539 |
|
################################################# |
540 |
|
# these tests are taken from the GNU fileutils package |
541 |
|
AC_CHECKING(how to get filesystem space usage) |
542 |
|
space=no |
543 |
|
|
544 |
|
# Test for statvfs64. |
545 |
|
if test $space = no; then |
546 |
|
# SVR4 |
547 |
|
AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64, |
548 |
|
[AC_TRY_RUN([ |
549 |
|
#if defined(HAVE_UNISTD_H) |
550 |
|
#include <unistd.h> |
551 |
|
#endif |
552 |
|
#include <sys/types.h> |
553 |
|
#include <sys/statvfs.h> |
554 |
|
main () |
555 |
|
{ |
556 |
|
struct statvfs64 fsd; |
557 |
|
exit (statvfs64 (".", &fsd)); |
558 |
|
}], |
559 |
|
fu_cv_sys_stat_statvfs64=yes, |
560 |
|
fu_cv_sys_stat_statvfs64=no, |
561 |
|
fu_cv_sys_stat_statvfs64=cross)]) |
562 |
|
if test $fu_cv_sys_stat_statvfs64 = yes; then |
563 |
|
space=yes |
564 |
|
AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available]) |
565 |
|
fi |
566 |
|
fi |
567 |
|
|
568 |
|
# Perform only the link test since it seems there are no variants of the |
569 |
|
# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) |
570 |
|
# because that got a false positive on SCO OSR5. Adding the declaration |
571 |
|
# of a `struct statvfs' causes this test to fail (as it should) on such |
572 |
|
# systems. That system is reported to work fine with STAT_STATFS4 which |
573 |
|
# is what it gets when this test fails. |
574 |
|
if test $space = no; then |
575 |
|
# SVR4 |
576 |
|
AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, |
577 |
|
[AC_TRY_LINK([#include <sys/types.h> |
578 |
|
#include <sys/statvfs.h>], |
579 |
|
[struct statvfs fsd; statvfs (0, &fsd);], |
580 |
|
fu_cv_sys_stat_statvfs=yes, |
581 |
|
fu_cv_sys_stat_statvfs=no)]) |
582 |
|
if test $fu_cv_sys_stat_statvfs = yes; then |
583 |
|
space=yes |
584 |
|
AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) |
585 |
|
fi |
586 |
|
fi |
587 |
|
|
588 |
|
if test $space = no; then |
589 |
|
# DEC Alpha running OSF/1 |
590 |
|
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) |
591 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, |
592 |
|
[AC_TRY_RUN([ |
593 |
|
#include <sys/param.h> |
594 |
|
#include <sys/types.h> |
595 |
|
#include <sys/mount.h> |
596 |
|
main () |
597 |
|
{ |
598 |
|
struct statfs fsd; |
599 |
|
fsd.f_fsize = 0; |
600 |
|
exit (statfs (".", &fsd, sizeof (struct statfs))); |
601 |
|
}], |
602 |
|
fu_cv_sys_stat_statfs3_osf1=yes, |
603 |
|
fu_cv_sys_stat_statfs3_osf1=no, |
604 |
|
fu_cv_sys_stat_statfs3_osf1=no)]) |
605 |
|
|
606 |
|
|
607 |
|
#C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) |
608 |
|
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then |
609 |
|
space=yes |
610 |
|
AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments]) |
611 |
|
fi |
612 |
|
fi |
613 |
|
|
614 |
|
if test $space = no; then |
615 |
|
# AIX |
616 |
|
AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl |
617 |
|
member (AIX, 4.3BSD)]) |
618 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, |
619 |
|
[AC_TRY_RUN([ |
620 |
|
#ifdef HAVE_SYS_PARAM_H |
621 |
|
#include <sys/param.h> |
622 |
|
#endif |
623 |
|
#ifdef HAVE_SYS_MOUNT_H |
624 |
|
#include <sys/mount.h> |
625 |
|
#endif |
626 |
|
#ifdef HAVE_SYS_VFS_H |
627 |
|
#include <sys/vfs.h> |
628 |
|
#endif |
629 |
|
main () |
630 |
|
{ |
631 |
|
struct statfs fsd; |
632 |
|
fsd.f_bsize = 0; |
633 |
|
exit (statfs (".", &fsd)); |
634 |
|
}], |
635 |
|
fu_cv_sys_stat_statfs2_bsize=yes, |
636 |
|
fu_cv_sys_stat_statfs2_bsize=no, |
637 |
|
fu_cv_sys_stat_statfs2_bsize=no)]) |
638 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) |
639 |
|
if test $fu_cv_sys_stat_statfs2_bsize = yes; then |
640 |
|
space=yes |
641 |
|
AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property]) |
642 |
|
fi |
643 |
|
fi |
644 |
|
|
645 |
|
if test $space = no; then |
646 |
|
# SVR3 |
647 |
|
AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) |
648 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs4, |
649 |
|
[AC_TRY_RUN([#include <sys/types.h> |
650 |
|
#include <sys/statfs.h> |
651 |
|
main () |
652 |
|
{ |
653 |
|
struct statfs fsd; |
654 |
|
exit (statfs (".", &fsd, sizeof fsd, 0)); |
655 |
|
}], |
656 |
|
fu_cv_sys_stat_statfs4=yes, |
657 |
|
fu_cv_sys_stat_statfs4=no, |
658 |
|
fu_cv_sys_stat_statfs4=no)]) |
659 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs4) |
660 |
|
if test $fu_cv_sys_stat_statfs4 = yes; then |
661 |
|
space=yes |
662 |
|
AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments]) |
663 |
|
fi |
664 |
|
fi |
665 |
|
|
666 |
|
if test $space = no; then |
667 |
|
# 4.4BSD and NetBSD |
668 |
|
AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl |
669 |
|
member (4.4BSD and NetBSD)]) |
670 |
|
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, |
671 |
|
[AC_TRY_RUN([#include <sys/types.h> |
672 |
|
#ifdef HAVE_SYS_PARAM_H |
673 |
|
#include <sys/param.h> |
674 |
|
#endif |
675 |
|
#ifdef HAVE_SYS_MOUNT_H |
676 |
|
#include <sys/mount.h> |
677 |
|
#endif |
678 |
|
main () |
679 |
|
{ |
680 |
|
struct statfs fsd; |
681 |
|
fsd.f_fsize = 0; |
682 |
|
exit (statfs (".", &fsd)); |
683 |
|
}], |
684 |
|
fu_cv_sys_stat_statfs2_fsize=yes, |
685 |
|
fu_cv_sys_stat_statfs2_fsize=no, |
686 |
|
fu_cv_sys_stat_statfs2_fsize=no)]) |
687 |
|
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) |
688 |
|
if test $fu_cv_sys_stat_statfs2_fsize = yes; then |
689 |
|
space=yes |
690 |
|
AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize]) |
691 |
|
fi |
692 |
|
fi |
693 |
|
|
694 |
|
if test $space = no; then |
695 |
|
# Ultrix |
696 |
|
AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) |
697 |
|
AC_CACHE_VAL(fu_cv_sys_stat_fs_data, |
698 |
|
[AC_TRY_RUN([#include <sys/types.h> |
699 |
|
#ifdef HAVE_SYS_PARAM_H |
700 |
|
#include <sys/param.h> |
701 |
|
#endif |
702 |
|
#ifdef HAVE_SYS_MOUNT_H |
703 |
|
#include <sys/mount.h> |
704 |
|
#endif |
705 |
|
#ifdef HAVE_SYS_FS_TYPES_H |
706 |
|
#include <sys/fs_types.h> |
707 |
|
#endif |
708 |
|
main () |
709 |
|
{ |
710 |
|
struct fs_data fsd; |
711 |
|
/* Ultrix's statfs returns 1 for success, |
712 |
|
0 for not mounted, -1 for failure. */ |
713 |
|
exit (statfs (".", &fsd) != 1); |
714 |
|
}], |
715 |
|
fu_cv_sys_stat_fs_data=yes, |
716 |
|
fu_cv_sys_stat_fs_data=no, |
717 |
|
fu_cv_sys_stat_fs_data=no)]) |
718 |
|
AC_MSG_RESULT($fu_cv_sys_stat_fs_data) |
719 |
|
if test $fu_cv_sys_stat_fs_data = yes; then |
720 |
|
space=yes |
721 |
|
AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available]) |
722 |
|
fi |
723 |
|
fi |
724 |
|
|
725 |
|
statxfs_includes="\ |
726 |
|
$ac_includes_default |
727 |
|
#if HAVE_SYS_STATVFS_H |
728 |
|
# include <sys/statvfs.h> |
729 |
|
#endif |
730 |
|
#if HAVE_SYS_VFS_H |
731 |
|
# include <sys/vfs.h> |
732 |
|
#endif |
733 |
|
#if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H |
734 |
|
# if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H |
735 |
|
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */ |
736 |
|
# include <sys/param.h> |
737 |
|
# include <sys/mount.h> |
738 |
|
# elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H |
739 |
|
/* Ultrix 4.4 needs these for the declaration of struct statfs. */ |
740 |
|
# include <netinet/in.h> |
741 |
|
# include <nfs/nfs_clnt.h> |
742 |
|
# include <nfs/vfs.h> |
743 |
|
# endif |
744 |
|
#endif |
745 |
|
" |
746 |
|
|
747 |
|
AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes]) |
748 |
|
AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes]) |
749 |
|
AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes]) |
750 |
|
AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes]) |
751 |
|
|
752 |
|
# |
753 |
|
# Large file support |
754 |
|
# |
755 |
|
AC_SYS_LARGEFILE |
756 |
|
|
757 |
|
# |
758 |
|
# mntent |
759 |
|
# |
760 |
|
AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H)) |
761 |
|
AC_CHECK_FUNCS(setmntent) |
762 |
|
|
763 |
|
# |
764 |
# IPv6 |
# IPv6 |
765 |
# |
# |
766 |
AC_ARG_WITH(ipv6, |
AC_ARG_WITH(ipv6, |
767 |
[ --with-ipv6 enable IPv6-support], |
[ --with-ipv6 enable IPv6-support], |
768 |
[ AC_DEFINE(IPv6) ]) |
[ |
769 |
|
if test $withval != "no"; |
770 |
|
then |
771 |
|
AC_DEFINE(IPv6,1) |
772 |
|
fi |
773 |
|
]) |
774 |
|
|
775 |
|
|
776 |
# |
# |
778 |
# |
# |
779 |
AC_ARG_WITH(debug, |
AC_ARG_WITH(debug, |
780 |
[ --with-debug enable protocol debugging output], |
[ --with-debug enable protocol debugging output], |
781 |
[ AC_DEFINE(WITH_DEBUG) ]) |
[ |
782 |
|
if test $withval != "no"; |
783 |
|
then |
784 |
|
AC_DEFINE(WITH_DEBUG,1) |
785 |
|
fi |
786 |
|
]) |
787 |
|
|
788 |
AC_ARG_WITH(debug-kbd, |
AC_ARG_WITH(debug-kbd, |
789 |
[ --with-debug-kbd enable debugging of keyboard handling], |
[ --with-debug-kbd enable debugging of keyboard handling], |
790 |
[ AC_DEFINE(WITH_DEBUG_KBD) ]) |
[ |
791 |
|
if test $withval != "no"; |
792 |
|
then |
793 |
|
AC_DEFINE(WITH_DEBUG_KBD,1) |
794 |
|
fi |
795 |
|
]) |
796 |
|
|
797 |
AC_ARG_WITH(debug-rdp5, |
AC_ARG_WITH(debug-rdp5, |
798 |
[ --with-debug-rdp5 enable debugging of RDP5 code], |
[ --with-debug-rdp5 enable debugging of RDP5 code], |
799 |
[ AC_DEFINE(WITH_DEBUG_RDP5) ]) |
[ |
800 |
|
if test $withval != "no"; |
801 |
|
then |
802 |
|
AC_DEFINE(WITH_DEBUG_RDP5,1) |
803 |
|
fi |
804 |
|
]) |
805 |
|
|
806 |
AC_ARG_WITH(debug-clipboard, |
AC_ARG_WITH(debug-clipboard, |
807 |
[ --with-debug-clipboard enable debugging of clipboard code], |
[ --with-debug-clipboard enable debugging of clipboard code], |
808 |
[ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ]) |
[ |
809 |
|
if test $withval != "no"; |
810 |
|
then |
811 |
|
AC_DEFINE(WITH_DEBUG_CLIPBOARD,1) |
812 |
|
fi |
813 |
|
]) |
814 |
|
|
815 |
|
AC_ARG_WITH(debug-channel, |
816 |
|
[ --with-debug-channel enable debugging of virtual channel code], |
817 |
|
[ |
818 |
|
if test $withval != "no"; |
819 |
|
then |
820 |
|
AC_DEFINE(WITH_DEBUG_CHANNEL,1) |
821 |
|
fi |
822 |
|
]) |
823 |
|
|
824 |
|
|
825 |
|
AC_ARG_WITH(debug-smartcard, |
826 |
|
[ --with-debug-smartcard enable debugging of smart-card code], |
827 |
|
[ |
828 |
|
if test $withval != "no"; |
829 |
|
then |
830 |
|
if test x"$WITH_SCARD" = "x1"; then |
831 |
|
AC_DEFINE(WITH_DEBUG_SCARD,1) |
832 |
|
fi |
833 |
|
fi |
834 |
|
]) |
835 |
|
|
836 |
# |
# |
837 |
# target-specific stuff |
# target-specific stuff |