--- sourceforge.net/trunk/rdesktop/configure.ac 2004/12/13 12:41:20 802 +++ sourceforge.net/trunk/rdesktop/configure.ac 2008/04/05 06:15:45 1465 @@ -1,4 +1,4 @@ -AC_INIT(rdesktop, 1.3.1) +AC_INIT(rdesktop, 1.6.0) AC_CONFIG_SRCDIR([rdesktop.c]) @@ -12,6 +12,20 @@ AC_HEADER_STDC AC_C_BIGENDIAN([AC_DEFINE(B_ENDIAN)], [AC_DEFINE(L_ENDIAN)]) AC_PATH_XTRA +if test "$no_x" = "yes"; then + echo + echo "ERROR: Could not find X Window System headers/libraries." + if test -f /etc/debian_version; then + echo "Probably you need to install the libx11-dev package." + elif test -f /etc/redhat-release; then + echo "Probably you need to install the libX11-devel package." + fi + echo "To specify paths manually, use the options --x-includes and --x-libraries." + echo + exit 1 +fi + +AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(inet_aton, resolv) @@ -20,6 +34,19 @@ AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H)) AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H)) AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H)) +AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) +AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H)) + +AC_CHECK_TOOL(STRIP, strip, :) + +dnl Don't depend on pkg-config +m4_ifdef([PKG_CHECK_MODULES], [], [ + m4_errprint([warning: pkg-config checks are not available]) + m4_defun([PKG_CHECK_MODULES], [ + AC_MSG_WARN([pkg-config not available, cannot check for $2]) + $4 + ]) +]) rpath="" @@ -52,8 +79,13 @@ if test -z "$ssldir"; then AC_MSG_RESULT([Not found]) echo - echo "Couldn't find your OpenSSL library installation dir" - echo "Use --with-openssl option to fix this problem" + echo "ERROR: Could not find OpenSSL headers/libraries." + if test -f /etc/debian_version; then + echo "Probably you need to install the libssl-dev package." + elif test -f /etc/redhat-release; then + echo "Probably you need to install the openssl-devel package." + fi + echo "To specify a path manually, use the --with-openssl option." echo exit 1 fi @@ -73,6 +105,47 @@ rpath="$rpath:$ssldir/lib" ]) +AC_ARG_ENABLE(smartcard, + [ --enable-smartcard Enables smart-card support. + ], + [ + case "$OSTYPE" in + darwin*) + AC_CHECK_HEADER(PCSC/pcsclite.h, [WITH_SCARD=1], [WITH_SCARD=0]) + PCSCLITE_CFLAGS="" + PCSCLITE_LIBS="-framework PCSC" + ;; + *) + if test -n "$PKG_CONFIG"; then + PKG_CHECK_MODULES(PCSCLITE, libpcsclite, [WITH_SCARD=1], [WITH_SCARD=0]) + fi + ;; + esac + + if test x"$WITH_SCARD" = "x1"; then + SCARDOBJ="scard.o" + CFLAGS="$CFLAGS $PCSCLITE_CFLAGS" + LIBS="$LIBS $PCSCLITE_LIBS" + AC_DEFINE(WITH_SCARD) + fi + + AC_MSG_CHECKING([for old version of PCSC]) + AC_TRY_LINK([ + #include + #ifdef __APPLE__ + #include + #include + #else + #include + #endif + ], + [SCardControl(NULL, NULL, 0, NULL, NULL);], + [AC_MSG_RESULT(yes) AC_DEFINE(WITH_PCSC120, 1, [old version of PCSC])], + [AC_MSG_RESULT(no)] + ) + ]) + +AC_SUBST(SCARDOBJ) # # Alignment @@ -135,33 +208,137 @@ # # sound # + sound="yes" AC_ARG_WITH(sound, - [ --with-sound select sound system ("oss", "sgi" or "sun") ], + [ --with-sound select sound system ("oss", "sgi", "sun", "alsa" or "libao") ], [ sound="$withval" ]) -if test "$sound" = yes; then - AC_CHECK_HEADER(sys/soundcard.h, [sound=oss]) - AC_CHECK_HEADER(dmedia/audio.h, [sound=sgi]) - AC_CHECK_HEADER(sys/audioio.h, [sound=sun]) -fi -if test "$sound" = no; then - break -elif test "$sound" = oss; then - SOUNDOBJ="rdpsnd.o rdpsnd_oss.o" - AC_DEFINE(WITH_RDPSND) -elif test "$sound" = sgi; then - SOUNDOBJ="rdpsnd.o rdpsnd_sgi.o" - LDFLAGS="$LDFLAGS -laudio" - AC_DEFINE(WITH_RDPSND) -elif test "$sound" = sun; then - SOUNDOBJ="rdpsnd.o rdpsnd_sun.o" + +AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=1], [HAVE_OSS=0]) +AC_CHECK_HEADER(dmedia/audio.h, [HAVE_SGI=1], [HAVE_SGI=0]) +AC_CHECK_HEADER(sys/audioio.h, [HAVE_SUN=1], [HAVE_SUN=0]) + +AC_ARG_ENABLE(static-libsamplerate, + [ --enable-static-libsamplerate link libsamplerate statically], + [static_libsamplerate=yes], + [static_libsamplerate=no]) + +if test -n "$PKG_CONFIG"; then + PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0]) + PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0]) + PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0]) + if test x"$HAVE_LIBSAMPLERATE" = "x1"; then + AC_DEFINE(HAVE_LIBSAMPLERATE) + if test x"$static_libsamplerate" = "xyes"; then + _libsamplerate_libdir=`$PKG_CONFIG --errors-to-stdout --variable=libdir samplerate` + LIBSAMPLERATE_LIBS="$_libsamplerate_libdir""/libsamplerate.a" + fi + LIBSAMPLERATE_LIBS="$LIBSAMPLERATE_LIBS -lm" + fi +fi + +if test "$sound" != "no"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd.o rdpsnd_dsp.o" + CFLAGS="$CFLAGS $LIBSAMPLERATE_CFLAGS" + LIBS="$LIBS $LIBSAMPLERATE_LIBS" 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), SGI AL (sgi) and Sun/BSD (sun)]) fi + +case $sound in + yes) + if test x"$HAVE_OSS" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" + AC_DEFINE(RDPSND_OSS) + fi + + if test x"$HAVE_SGI" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" + LIBS="$LIBS -laudio" + AC_DEFINE(RDPSND_SGI) + fi + + if test x"$HAVE_SUN" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" + AC_DEFINE(RDPSND_SUN) + fi + + if test x"$HAVE_ALSA" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" + CFLAGS="$CFLAGS $ALSA_CFLAGS" + LIBS="$LIBS $ALSA_LIBS" + AC_DEFINE(RDPSND_ALSA) + fi + + if test x"$HAVE_LIBAO" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" + CFLAGS="$CFLAGS $LIBAO_CFLAGS" + LIBS="$LIBS $LIBAO_LIBS" + AC_DEFINE(RDPSND_LIBAO) + fi + + ;; + + oss) + if test x"$HAVE_OSS" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_oss.o" + AC_DEFINE(RDPSND_OSS) + else + AC_MSG_ERROR([Selected sound system is not available.]) + fi + ;; + + sgi) + if test x"$HAVE_SGI" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_sgi.o" + LIBS="$LIBS -laudio" + AC_DEFINE(RDPSND_SGI) + else + AC_MSG_ERROR([Selected sound system is not available.]) + fi + ;; + + sun) + if test x"$HAVE_SUN" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_sun.o" + AC_DEFINE(RDPSND_SUN) + else + AC_MSG_ERROR([Selected sound system is not available.]) + fi + ;; + + alsa) + if test x"$HAVE_ALSA" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_alsa.o" + CFLAGS="$CFLAGS $ALSA_CFLAGS" + LIBS="$LIBS $ALSA_LIBS" + AC_DEFINE(RDPSND_ALSA) + else + AC_MSG_ERROR([Selected sound system is not available.]) + fi + ;; + + libao) + if test x"$HAVE_LIBAO" = "x1"; then + SOUNDOBJ="$SOUNDOBJ rdpsnd_libao.o" + CFLAGS="$CFLAGS $LIBAO_CFLAGS" + LIBS="$LIBS $LIBAO_LIBS" + AC_DEFINE(RDPSND_LIBAO) + else + AC_MSG_ERROR([Selected sound system is not available.]) + fi + ;; + + no) + ;; + + *) + AC_MSG_WARN([sound support disabled]) + AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao]) + ;; +esac + AC_SUBST(SOUNDOBJ) # @@ -247,13 +424,383 @@ UTILS_FUNC_DIRFD +# +# iconv +# + +dnl This macros shamelessly stolen from +dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html. +dnl Written by Bruno Haible. + +AC_DEFUN([UTILS_FUNC_ICONV], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + AC_ARG_WITH([libiconv-prefix], +[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ + for dir in `echo "$withval" | tr : ' '`; do + if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi + if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi + done + ]) + AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H)) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS -liconv" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + 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);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi + LIBICONV= + if test "$am_cv_lib_iconv" = yes; then + LIBICONV="-liconv" + fi + AC_SUBST(LIBICONV) +]) + +UTILS_FUNC_ICONV +LIBS="$LIBS $LIBICONV" + +# +# socklen_t +# from curl + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc. So we +dnl have to test to find something that will work. +AC_DEFUN([TYPE_SOCKLEN_T], +[ + AC_CHECK_TYPE([socklen_t], ,[ + AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([socklen_t_equiv], + [ + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + AC_TRY_COMPILE([ + #include + #include + + int getpeername (int, $arg2 *, $t *); + ],[ + $t len; + getpeername(0,0,&len); + ],[ + socklen_t_equiv="$t" + break + ]) + done + done + + if test "x$socklen_t_equiv" = x; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + ]) + AC_MSG_RESULT($socklen_t_equiv) + AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv, + [type to use in place of socklen_t if not defined])], + [#include +#include ]) +]) + +TYPE_SOCKLEN_T + +# +# statfs stuff +# +AC_CHECK_HEADERS(sys/vfs.h) +AC_CHECK_HEADERS(sys/statvfs.h) +AC_CHECK_HEADERS(sys/statfs.h) +AC_CHECK_HEADERS(sys/param.h) + +mount_includes="\ + $ac_includes_default + #if HAVE_SYS_PARAM_H + # include + #endif + " + +AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes]) + +################################################# +# these tests are taken from the GNU fileutils package +AC_CHECKING(how to get filesystem space usage) +space=no + +# Test for statvfs64. +if test $space = no; then + # SVR4 + AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64, + [AC_TRY_RUN([ +#if defined(HAVE_UNISTD_H) +#include +#endif +#include +#include + main () + { + struct statvfs64 fsd; + exit (statvfs64 (".", &fsd)); + }], + fu_cv_sys_stat_statvfs64=yes, + fu_cv_sys_stat_statvfs64=no, + fu_cv_sys_stat_statvfs64=cross)]) + if test $fu_cv_sys_stat_statvfs64 = yes; then + space=yes + AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available]) + fi +fi + +# Perform only the link test since it seems there are no variants of the +# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) +# because that got a false positive on SCO OSR5. Adding the declaration +# of a `struct statvfs' causes this test to fail (as it should) on such +# systems. That system is reported to work fine with STAT_STATFS4 which +# is what it gets when this test fails. +if test $space = no; then + # SVR4 + AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, + [AC_TRY_LINK([#include +#include ], + [struct statvfs fsd; statvfs (0, &fsd);], + fu_cv_sys_stat_statvfs=yes, + fu_cv_sys_stat_statvfs=no)]) + if test $fu_cv_sys_stat_statvfs = yes; then + space=yes + AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) + fi +fi + +if test $space = no; then + # DEC Alpha running OSF/1 + AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, + [AC_TRY_RUN([ +#include +#include +#include + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd, sizeof (struct statfs))); + }], + fu_cv_sys_stat_statfs3_osf1=yes, + fu_cv_sys_stat_statfs3_osf1=no, + fu_cv_sys_stat_statfs3_osf1=no)]) + + +#C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) + if test $fu_cv_sys_stat_statfs3_osf1 = yes; then + space=yes + AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments]) + fi +fi + +if test $space = no; then +# AIX + AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl +member (AIX, 4.3BSD)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, + [AC_TRY_RUN([ +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_VFS_H +#include +#endif + main () + { + struct statfs fsd; + fsd.f_bsize = 0; + exit (statfs (".", &fsd)); + }], + fu_cv_sys_stat_statfs2_bsize=yes, + fu_cv_sys_stat_statfs2_bsize=no, + fu_cv_sys_stat_statfs2_bsize=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) + if test $fu_cv_sys_stat_statfs2_bsize = yes; then + space=yes + AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property]) + fi +fi + +if test $space = no; then +# SVR3 + AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs4, + [AC_TRY_RUN([#include +#include + main () + { + struct statfs fsd; + exit (statfs (".", &fsd, sizeof fsd, 0)); + }], + fu_cv_sys_stat_statfs4=yes, + fu_cv_sys_stat_statfs4=no, + fu_cv_sys_stat_statfs4=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs4) + if test $fu_cv_sys_stat_statfs4 = yes; then + space=yes + AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments]) + fi +fi + +if test $space = no; then +# 4.4BSD and NetBSD + AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl +member (4.4BSD and NetBSD)]) + AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, + [AC_TRY_RUN([#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + exit (statfs (".", &fsd)); + }], + fu_cv_sys_stat_statfs2_fsize=yes, + fu_cv_sys_stat_statfs2_fsize=no, + fu_cv_sys_stat_statfs2_fsize=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) + if test $fu_cv_sys_stat_statfs2_fsize = yes; then + space=yes + AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize]) + fi +fi + +if test $space = no; then + # Ultrix + AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) + AC_CACHE_VAL(fu_cv_sys_stat_fs_data, + [AC_TRY_RUN([#include +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifdef HAVE_SYS_MOUNT_H +#include +#endif +#ifdef HAVE_SYS_FS_TYPES_H +#include +#endif + main () + { + struct fs_data fsd; + /* Ultrix's statfs returns 1 for success, + 0 for not mounted, -1 for failure. */ + exit (statfs (".", &fsd) != 1); + }], + fu_cv_sys_stat_fs_data=yes, + fu_cv_sys_stat_fs_data=no, + fu_cv_sys_stat_fs_data=no)]) + AC_MSG_RESULT($fu_cv_sys_stat_fs_data) + if test $fu_cv_sys_stat_fs_data = yes; then + space=yes + AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available]) + fi +fi + + statxfs_includes="\ +$ac_includes_default +#if HAVE_SYS_STATVFS_H +# include +#endif +#if HAVE_SYS_VFS_H +# include +#endif +#if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H +# if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H +/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */ +# include +# include +# elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H +/* Ultrix 4.4 needs these for the declaration of struct statfs. */ +# include +# include +# include +# endif +#endif +" + +AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes]) +AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes]) +AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes]) +AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes]) + +# +# Large file support +# +AC_SYS_LARGEFILE + +# +# mntent +# +AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H)) +AC_CHECK_FUNCS(setmntent) # # IPv6 # AC_ARG_WITH(ipv6, [ --with-ipv6 enable IPv6-support], - [ AC_DEFINE(IPv6) ]) + [ + if test $withval != "no"; + then + AC_DEFINE(IPv6,1) + fi + ]) # @@ -261,20 +808,77 @@ # AC_ARG_WITH(debug, [ --with-debug enable protocol debugging output], - [ AC_DEFINE(WITH_DEBUG) ]) + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG,1) + fi + ]) AC_ARG_WITH(debug-kbd, [ --with-debug-kbd enable debugging of keyboard handling], - [ AC_DEFINE(WITH_DEBUG_KBD) ]) + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG_KBD,1) + fi + ]) AC_ARG_WITH(debug-rdp5, [ --with-debug-rdp5 enable debugging of RDP5 code], - [ AC_DEFINE(WITH_DEBUG_RDP5) ]) + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG_RDP5,1) + fi + ]) AC_ARG_WITH(debug-clipboard, [ --with-debug-clipboard enable debugging of clipboard code], - [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ]) + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG_CLIPBOARD,1) + fi + ]) +AC_ARG_WITH(debug-sound, + [ --with-debug-sound enable debugging of sound code], + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG_SOUND,1) + fi + ]) + +AC_ARG_WITH(debug-channel, + [ --with-debug-channel enable debugging of virtual channel code], + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG_CHANNEL,1) + fi + ]) + +AC_ARG_WITH(debug-seamless, + [ --with-debug-seamless enable debugging of SeamlessRDP code], + [ + if test $withval != "no"; + then + AC_DEFINE(WITH_DEBUG_SEAMLESS,1) + fi + ]) + +AC_ARG_WITH(debug-smartcard, + [ --with-debug-smartcard enable debugging of smart-card code], + [ + if test $withval != "no"; + then + if test x"$WITH_SCARD" = "x1"; then + AC_DEFINE(WITH_DEBUG_SCARD,1) + fi + fi + ]) # # target-specific stuff