GUAC-745: Add --without-SUPPORT options for vnc/rdp/ssh/etc.

This commit is contained in:
Michael Jumper 2014-08-12 14:37:48 -07:00
parent 405140cc8f
commit a29f0e8ccd

View File

@ -129,33 +129,38 @@ AC_ARG_WITH(init_dir,
AM_CONDITIONAL([ENABLE_INIT], [test "x${init_dir}" != "x"]) AM_CONDITIONAL([ENABLE_INIT], [test "x${init_dir}" != "x"])
AC_SUBST(init_dir) AC_SUBST(init_dir)
AC_ARG_ENABLE(ssh_agent,
[AS_HELP_STRING([--enable-ssh-agent],
[enable built-in ssh-agent])
],enable_ssh_agent=yes)
# #
# libssl # libssl
# #
have_ssl=yes have_ssl=disabled
SSL_LIBS= SSL_LIBS=
AC_ARG_WITH([ssl],
[AS_HELP_STRING([--with-ssl],
[support SSL encryption @<:@default=check@:>@])],
[],
[with_ssl=check])
AC_CHECK_HEADER(openssl/ssl.h,, [have_ssl=no]) if test "x$with_ssl" != "xno"
AC_CHECK_LIB([ssl], [SSL_CTX_new], [SSL_LIBS="$SSL_LIBS -lssl"], [have_ssl=no])
AM_CONDITIONAL([ENABLE_SSL], [test "x${have_ssl}" = "xyes"])
if test "x${have_ssl}" = "xno"
then then
AC_MSG_WARN([ have_ssl=yes
AC_CHECK_HEADER(openssl/ssl.h,, [have_ssl=no])
AC_CHECK_LIB([ssl], [SSL_CTX_new], [SSL_LIBS="$SSL_LIBS -lssl"], [have_ssl=no])
if test "x${have_ssl}" = "xno"
then
AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find libssl. Unable to find libssl.
guacd will not support SSL connections. guacd will not support SSL connections.
--------------------------------------------]) --------------------------------------------])
else else
AC_DEFINE([ENABLE_SSL],, [Whether SSL-related support is enabled]) AC_DEFINE([ENABLE_SSL],, [Whether SSL-related support is enabled])
fi
fi fi
AM_CONDITIONAL([ENABLE_SSL], [test "x${have_ssl}" = "xyes"])
AC_SUBST(SSL_LIBS) AC_SUBST(SSL_LIBS)
@ -163,68 +168,108 @@ AC_SUBST(SSL_LIBS)
# Ogg Vorbis # Ogg Vorbis
# #
have_vorbis=yes have_vorbis=disabled
VORBIS_LIBS= VORBIS_LIBS=
AC_ARG_WITH([vorbis],
[AS_HELP_STRING([--with-vorbis],
[support Ogg Vorbis @<:@default=check@:>@])],
[],
[with_vorbis=check])
AC_CHECK_HEADER(vorbis/vorbisenc.h,, [have_vorbis=no]) if test "x$with_vorbis" != "xno"
AC_CHECK_LIB([ogg], [ogg_stream_init], [VORBIS_LIBS="$VORBIS_LIBS -logg"], [have_vorbis=no])
AC_CHECK_LIB([vorbis], [vorbis_block_init], [VORBIS_LIBS="$VORBIS_LIBS -lvorbis"], [have_vorbis=no])
AC_CHECK_LIB([vorbisenc], [vorbis_encode_init], [VORBIS_LIBS="$VORBIS_LIBS -lvorbisenc"], [have_vorbis=no])
AM_CONDITIONAL([ENABLE_OGG], [test "x${have_vorbis}" = "xyes"])
if test "x${have_vorbis}" = "xno"
then then
AC_MSG_WARN([ have_vorbis=yes
AC_CHECK_HEADER(vorbis/vorbisenc.h,, [have_vorbis=no])
AC_CHECK_LIB([ogg], [ogg_stream_init], [VORBIS_LIBS="$VORBIS_LIBS -logg"], [have_vorbis=no])
AC_CHECK_LIB([vorbis], [vorbis_block_init], [VORBIS_LIBS="$VORBIS_LIBS -lvorbis"], [have_vorbis=no])
AC_CHECK_LIB([vorbisenc], [vorbis_encode_init], [VORBIS_LIBS="$VORBIS_LIBS -lvorbisenc"], [have_vorbis=no])
if test "x${have_vorbis}" = "xno"
then
AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find libogg / libvorbis / libvorbisenc. Unable to find libogg / libvorbis / libvorbisenc.
Sound will not be encoded with Ogg Vorbis. Sound will not be encoded with Ogg Vorbis.
--------------------------------------------]) --------------------------------------------])
else else
AC_DEFINE([ENABLE_OGG],, AC_DEFINE([ENABLE_OGG],,
[Whether support for Ogg Vorbis is enabled]) [Whether support for Ogg Vorbis is enabled])
fi
fi fi
AM_CONDITIONAL([ENABLE_OGG], [test "x${have_vorbis}" = "xyes"])
AC_SUBST(VORBIS_LIBS) AC_SUBST(VORBIS_LIBS)
# #
# PulseAudio # PulseAudio
# #
have_pulse=yes have_pulse=disabled
PULSE_LIBS= PULSE_LIBS=
AC_ARG_WITH([pulse],
[AS_HELP_STRING([--with-pulse],
[support PulseAudio @<:@default=check@:>@])],
[],
[with_pulse=check])
AC_CHECK_LIB([pulse], [pa_context_new], [PULSE_LIBS="$PULSE_LIBS -lpulse"], [have_pulse=no]) if test "x$with_pulse" != "xno"
AM_CONDITIONAL([ENABLE_PULSE], [test "x${have_pulse}" = "xyes"])
if test "x${have_pulse}" = "xno"
then then
AC_MSG_WARN([ have_pulse=yes
AC_CHECK_LIB([pulse], [pa_context_new], [PULSE_LIBS="$PULSE_LIBS -lpulse"], [have_pulse=no])
if test "x${have_pulse}" = "xno"
then
AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find libpulse Unable to find libpulse
Sound support for VNC will be disabled Sound support for VNC will be disabled
--------------------------------------------]) --------------------------------------------])
else else
AC_DEFINE([ENABLE_PULSE],, [Whether PulseAudio support is enabled]) AC_DEFINE([ENABLE_PULSE],, [Whether PulseAudio support is enabled])
fi
fi fi
AM_CONDITIONAL([ENABLE_PULSE], [test "x${have_pulse}" = "xyes"])
AC_SUBST(PULSE_LIBS) AC_SUBST(PULSE_LIBS)
# #
# PANGO # PANGO
# #
have_pango=yes have_pango=disabled
PKG_CHECK_MODULES([PANGO], [pango],, [have_pango=no]); AC_ARG_WITH([pango],
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo],, [have_pango=no]); [AS_HELP_STRING([--with-pango],
[support Pango text layout @<:@default=check@:>@])],
[],
[with_pango=check])
if test "x$with_pango" != "xno"
then
have_pango=yes
PKG_CHECK_MODULES([PANGO], [pango],, [have_pango=no]);
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo],, [have_pango=no]);
fi
# #
# Terminal emulator # Terminal emulator
# #
have_terminal=yes have_terminal=disabled
if test "x${have_pango}" = "xno" AC_ARG_WITH([terminal],
[AS_HELP_STRING([--with-terminal],
[support text-based protocols @<:@default=check@:>@])],
[],
[with_terminal=check])
if test "x$with_terminal" != "xno"
then then
have_terminal=no have_terminal=yes
if test "x${have_pango}" = "xno"
then
have_terminal=no
fi
fi fi
AM_CONDITIONAL([ENABLE_TERMINAL], [test "x${have_terminal}" = "xyes"]) AM_CONDITIONAL([ENABLE_TERMINAL], [test "x${have_terminal}" = "xyes"])
@ -233,12 +278,21 @@ AM_CONDITIONAL([ENABLE_TERMINAL], [test "x${have_terminal}" = "xyes"])
# libVNCServer # libVNCServer
# #
have_libvncserver=yes have_libvncserver=disabled
VNC_LIBS= VNC_LIBS=
AC_ARG_WITH([vnc],
[AS_HELP_STRING([--with-vnc],
[support VNC @<:@default=check@:>@])],
[],
[with_vnc=check])
if test "x$with_vnc" != "xno"
then
have_libvncserver=yes
AC_CHECK_LIB([vncclient], [rfbInitClient], [VNC_LIBS="$VNC_LIBS -lvncclient"], [have_libvncserver=no])
fi
AC_CHECK_LIB([vncclient], [rfbInitClient], [VNC_LIBS="$VNC_LIBS -lvncclient"], [have_libvncserver=no])
AM_CONDITIONAL([ENABLE_VNC], [test "x${have_libvncserver}" = "xyes"]) AM_CONDITIONAL([ENABLE_VNC], [test "x${have_libvncserver}" = "xyes"])
AC_SUBST(VNC_LIBS) AC_SUBST(VNC_LIBS)
# #
@ -297,130 +351,175 @@ fi
# FreeRDP # FreeRDP
# #
have_winpr=yes have_freerdp=disabled
have_freerdp=yes
legacy_freerdp_extensions=no
rdpsettings_interface=unknown
rdpsettings_fastpath=yes
freerdp_interface=unknown
event_interface=unknown
RDP_LIBS= RDP_LIBS=
AC_ARG_WITH([rdp],
[AS_HELP_STRING([--with-rdp],
[support RDP @<:@default=check@:>@])],
[],
[with_rdp=check])
# libfreerdp-cache if test "x$with_rdp" != "xno"
AC_CHECK_LIB([freerdp-cache], [glyph_cache_register_callbacks], then
[RDP_LIBS="$RDP_LIBS -lfreerdp-cache"], have_winpr=yes
[AC_MSG_WARN([ have_freerdp=yes
-------------------------------------------- legacy_freerdp_extensions=no
Unable to find libfreerdp-cache rdpsettings_interface=unknown
RDP will be disabled. rdpsettings_fastpath=yes
--------------------------------------------]) freerdp_interface=unknown
have_freerdp=no]) event_interface=unknown
# libfreerdp-core # libfreerdp-core
AC_CHECK_LIB([freerdp-core], [freerdp_new], AC_CHECK_LIB([freerdp-core], [freerdp_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-core"], [RDP_LIBS="$RDP_LIBS -lfreerdp-core"],
[AC_MSG_WARN([ [AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find libfreerdp-core Unable to find libfreerdp-core
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no]) have_freerdp=no])
fi
# libfreerdp-cache
if test "x${have_libfreerdp}" = "xyes"
then
AC_CHECK_LIB([freerdp-cache], [glyph_cache_register_callbacks],
[RDP_LIBS="$RDP_LIBS -lfreerdp-cache"],
[AC_MSG_WARN([
--------------------------------------------
Unable to find libfreerdp-cache
RDP will be disabled.
--------------------------------------------])
have_freerdp=no])
fi
# libfreerdp-channels (1.0) / libfreerdp-client (1.1) # libfreerdp-channels (1.0) / libfreerdp-client (1.1)
AC_CHECK_LIB([freerdp-client], [freerdp_channels_new], if test "x${have_libfreerdp}" = "xyes"
[RDP_LIBS="$RDP_LIBS -lfreerdp-client"], then
[AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new], AC_CHECK_LIB([freerdp-client], [freerdp_channels_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-channels" [RDP_LIBS="$RDP_LIBS -lfreerdp-client"],
legacy_freerdp_extensions=yes])]) [AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-channels"
legacy_freerdp_extensions=yes])])
fi
# libfreerdp-utils # libfreerdp-utils
AC_CHECK_LIB([freerdp-utils], [svc_plugin_init], if test "x${have_libfreerdp}" = "xyes"
[RDP_LIBS="$RDP_LIBS -lfreerdp-utils"], then
[AC_MSG_WARN([ AC_CHECK_LIB([freerdp-utils], [svc_plugin_init],
[RDP_LIBS="$RDP_LIBS -lfreerdp-utils"],
[AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find libfreerdp-utils Unable to find libfreerdp-utils
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no]) have_freerdp=no])
fi
# libfreerdp-codec # libfreerdp-codec
AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert], if test "x${have_libfreerdp}" = "xyes"
[RDP_LIBS="$RDP_LIBS -lfreerdp-codec"], then
[AC_MSG_WARN([ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],
[RDP_LIBS="$RDP_LIBS -lfreerdp-codec"],
[AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find libfreerdp-codec Unable to find libfreerdp-codec
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no]) have_freerdp=no])
fi
# Check for interval polling in plugins # Check for interval polling in plugins
AC_CHECK_MEMBERS([rdpSvcPlugin.interval_ms],,, if test "x${have_libfreerdp}" = "xyes"
[[#include <freerdp/utils/svc_plugin.h>]]) then
AC_CHECK_MEMBERS([rdpSvcPlugin.interval_ms],,,
[[#include <freerdp/utils/svc_plugin.h>]])
fi
# Keyboard layout header # Keyboard layout header
AC_CHECK_HEADERS([freerdp/locale/keyboard.h],, if test "x${have_libfreerdp}" = "xyes"
[AC_CHECK_HEADERS([freerdp/kbd/layouts.h],, then
[AC_MSG_WARN([ AC_CHECK_HEADERS([freerdp/locale/keyboard.h],,
[AC_CHECK_HEADERS([freerdp/kbd/layouts.h],,
[AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find keyboard layout headers Unable to find keyboard layout headers
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no])]) have_freerdp=no])])
fi
# New headers defining addins # New headers defining addins
AC_CHECK_HEADERS([freerdp/addin.h freerdp/client/channels.h]) if test "x${have_libfreerdp}" = "xyes"
then
AC_CHECK_HEADERS([freerdp/addin.h freerdp/client/channels.h])
fi
# Header defining cliprdr # Header defining cliprdr
AC_CHECK_HEADERS([freerdp/client/cliprdr.h],, if test "x${have_libfreerdp}" = "xyes"
[AC_CHECK_HEADERS([freerdp/plugins/cliprdr.h],, then
[AC_MSG_WARN([ AC_CHECK_HEADERS([freerdp/client/cliprdr.h],,
[AC_CHECK_HEADERS([freerdp/plugins/cliprdr.h],,
[AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find cliprdr headers Unable to find cliprdr headers
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no], have_freerdp=no],
[#include <freerdp/types.h>])], [#include <freerdp/types.h>])],
[#include <winpr/wtypes.h> [#include <winpr/wtypes.h>
#include <winpr/collections.h>]) #include <winpr/collections.h>])
fi
AC_CHECK_DECL([freerdp_register_addin_provider], # Addin registration variations
[AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER],, if test "x${have_libfreerdp}" = "xyes"
[Whether freerdp_register_addin_provider() is defined])],, then
[#include <freerdp/addin.h>]) AC_CHECK_DECL([freerdp_register_addin_provider],
[AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER],,
[Whether freerdp_register_addin_provider() is defined])],,
[#include <freerdp/addin.h>])
AC_CHECK_DECL([freerdp_channels_global_init], AC_CHECK_DECL([freerdp_channels_global_init],
[AC_DEFINE([HAVE_FREERDP_CHANNELS_GLOBAL_INIT],, [AC_DEFINE([HAVE_FREERDP_CHANNELS_GLOBAL_INIT],,
[Whether freerdp_channels_global_init() is defined])],, [Whether freerdp_channels_global_init() is defined])],,
[#include <freerdp/channels/channels.h>]) [#include <freerdp/channels/channels.h>])
fi
# #
# FreeRDP: WinPR # FreeRDP: WinPR
# #
# Check for stream support via WinPR # Check for stream support via WinPR
AC_CHECK_HEADER(winpr/stream.h,, if test "x${have_libfreerdp}" = "xyes"
[have_winpr=no, then
AC_CHECK_DECL([stream_write_uint8],, AC_CHECK_HEADER(winpr/stream.h,,
[AC_MSG_WARN([ [have_winpr=no,
AC_CHECK_DECL([stream_write_uint8],,
[AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find stream support Unable to find stream support
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no], have_freerdp=no],
[#include <freerdp/utils/stream.h>])]) [#include <freerdp/utils/stream.h>])])
fi
# Check for types in WinPR # Check for types in WinPR
AC_CHECK_HEADER(winpr/wtypes.h,, if test "x${have_libfreerdp}" = "xyes"
[have_winpr=no, then
AC_CHECK_HEADER(freerdp/types.h,, AC_CHECK_HEADER(winpr/wtypes.h,,
[AC_MSG_WARN([ [have_winpr=no,
AC_CHECK_HEADER(freerdp/types.h,,
[AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unable to find type definitions Unable to find type definitions
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no])]) have_freerdp=no])])
fi
if test "x${have_winpr}" = "xyes" if test "x${have_libfreerdp}" = "xyes" -a "x${have_winpr}" = "xyes"
then then
AC_DEFINE([ENABLE_WINPR],, AC_DEFINE([ENABLE_WINPR],,
[Whether library support for WinPR types was found]) [Whether library support for WinPR types was found])
@ -430,166 +529,188 @@ fi
# FreeRDP: freerdp # FreeRDP: freerdp
# #
# Check for current (as of 1.1) freerdp interface if test "x${have_libfreerdp}" = "xyes"
AC_CHECK_MEMBERS([freerdp.ContextSize],
[freerdp_interface=stable],,
[[#include <freerdp/freerdp.h>]])
# If not current, check for legacy interface
if test "x${freerdp_interface}" = "xunknown"
then then
AC_CHECK_MEMBERS([freerdp.context_size], # Check for current (as of 1.1) freerdp interface
[freerdp_interface=legacy],, AC_CHECK_MEMBERS([freerdp.ContextSize],
[freerdp_interface=stable],,
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
fi
# Set defines based on interface type, warn if unknown # If not current, check for legacy interface
if test "x${freerdp_interface}" = "xlegacy"; then if test "x${freerdp_interface}" = "xunknown"
AC_DEFINE([LEGACY_FREERDP],, then
[Whether the older version of the FreeRDP API was found]) AC_CHECK_MEMBERS([freerdp.context_size],
elif test "x${freerdp_interface}" = "xunknown"; then [freerdp_interface=legacy],,
AC_MSG_WARN([ [[#include <freerdp/freerdp.h>]])
fi
# Set defines based on interface type, warn if unknown
if test "x${freerdp_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_FREERDP],,
[Whether the older version of the FreeRDP API was found])
elif test "x${freerdp_interface}" = "xunknown"; then
AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unknown FreeRDP interface Unknown FreeRDP interface
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no have_freerdp=no
fi
fi fi
# #
# FreeRDP: rdpSettings # FreeRDP: rdpSettings
# #
# Check for current (as of 1.1) rdpSettings interface if test "x${have_libfreerdp}" = "xyes"
AC_CHECK_MEMBERS([rdpSettings.Width,
rdpSettings.Height,
rdpSettings.FastPathInput,
rdpSettings.FastPathOutput,
rdpSettings.OrderSupport],
[rdpsettings_interface=stable],,
[[#include <freerdp/freerdp.h>]])
# If not current, check for legacy interface
if test "x${rdpsettings_interface}" = "xunknown"
then then
AC_CHECK_MEMBERS([rdpSettings.width, # Check for current (as of 1.1) rdpSettings interface
rdpSettings.height, AC_CHECK_MEMBERS([rdpSettings.Width,
rdpSettings.order_support], rdpSettings.Height,
[rdpsettings_interface=legacy],, rdpSettings.FastPathInput,
[[#include <freerdp/freerdp.h>]]) rdpSettings.FastPathOutput,
fi rdpSettings.OrderSupport],
[rdpsettings_interface=stable],,
# Set defines based on interface type, warn if unknown
if test "x${rdpsettings_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_RDPSETTINGS],,
[Whether the legacy version of the rdpSettings API was found])
# Legacy interface may not have FastPath settings
AC_CHECK_MEMBERS([rdpSettings.fast_path_input,
rdpSettings.fast_path_output],,
[rdpsettings_fastpath=no],
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
elif test "x${rdpsettings_interface}" = "xunknown"; then # If not current, check for legacy interface
AC_MSG_WARN([ if test "x${rdpsettings_interface}" = "xunknown"
then
AC_CHECK_MEMBERS([rdpSettings.width,
rdpSettings.height,
rdpSettings.order_support],
[rdpsettings_interface=legacy],,
[[#include <freerdp/freerdp.h>]])
fi
# Set defines based on interface type, warn if unknown
if test "x${rdpsettings_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_RDPSETTINGS],,
[Whether the legacy version of the rdpSettings API was found])
# Legacy interface may not have FastPath settings
AC_CHECK_MEMBERS([rdpSettings.fast_path_input,
rdpSettings.fast_path_output],,
[rdpsettings_fastpath=no],
[[#include <freerdp/freerdp.h>]])
elif test "x${rdpsettings_interface}" = "xunknown"; then
AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unknown rdpSettings interface Unknown rdpSettings interface
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no have_freerdp=no
fi
fi fi
# Activate FastPath settings if present # Activate FastPath settings if present
if test "x${rdpsettings_fastpath}" = "xyes"; then if test "x${have_libfreerdp}" = "xyes" -a "x${rdpsettings_fastpath}" = "xyes"; then
AC_DEFINE([HAVE_RDPSETTINGS_FASTPATH],, AC_DEFINE([HAVE_RDPSETTINGS_FASTPATH],,
[Whether the rdpSettings structure has FastPath settings]) [Whether the rdpSettings structure has FastPath settings])
fi fi
# Check if the type CHANNEL_ENTRY_POINTS_FREERDP exists, if not define it to CHANNEL_ENTRY_POINTS_EX # Check if the type CHANNEL_ENTRY_POINTS_FREERDP exists, if not define it to CHANNEL_ENTRY_POINTS_EX
AC_CHECK_TYPE([CHANNEL_ENTRY_POINTS_FREERDP],, if test "x${have_libfreerdp}" = "xyes"
AC_DEFINE([CHANNEL_ENTRY_POINTS_FREERDP],[CHANNEL_ENTRY_POINTS_EX], [Type compatibility]), then
[[#include <freerdp/svc.h>]]) AC_CHECK_TYPE([CHANNEL_ENTRY_POINTS_FREERDP],,
AC_DEFINE([CHANNEL_ENTRY_POINTS_FREERDP],[CHANNEL_ENTRY_POINTS_EX], [Type compatibility]),
[[#include <freerdp/svc.h>]])
fi
# Check if the freerdp version header exists # Check if the freerdp version header exists
AC_CHECK_HEADERS([freerdp/version.h]) if test "x${have_libfreerdp}" = "xyes"
then
AC_CHECK_HEADERS([freerdp/version.h])
fi
# #
# FreeRDP: rdpBitmap # FreeRDP: rdpBitmap
# #
AC_MSG_CHECKING([whether rdpBitmap.Decompress() requires the codec_id]) if test "x${have_libfreerdp}" = "xyes"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h> then
#include <freerdp/freerdp.h> AC_MSG_CHECKING([whether rdpBitmap.Decompress() requires the codec_id])
void __decompress(rdpContext* context, AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
rdpBitmap* bitmap, #include <freerdp/freerdp.h>
UINT8* data, void __decompress(rdpContext* context,
int width, rdpBitmap* bitmap,
int height, UINT8* data,
int bpp, int width,
int length, int height,
BOOL compressed, int bpp,
int codec_id); int length,
rdpBitmap b = { .Decompress = __decompress };]])], BOOL compressed,
[AC_MSG_RESULT([yes])], int codec_id);
[AC_MSG_RESULT([no]) rdpBitmap b = { .Decompress = __decompress };]])],
AC_DEFINE([LEGACY_RDPBITMAP],, [AC_MSG_RESULT([yes])],
[Whether the legacy rdpBitmap API was found])]) [AC_MSG_RESULT([no])
AC_DEFINE([LEGACY_RDPBITMAP],,
[Whether the legacy rdpBitmap API was found])])
fi
# #
# FreeRDP: rdpPalette # FreeRDP: rdpPalette
# #
AC_MSG_CHECKING([whether rdpPalette.entries is static]) if test "x${have_libfreerdp}" = "xyes"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <freerdp/update.h> then
rdpPalette p; AC_MSG_CHECKING([whether rdpPalette.entries is static])
PALETTE_ENTRY* foo = p.entries;]])], AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <freerdp/update.h>
[AC_MSG_RESULT([yes])], rdpPalette p;
[AC_MSG_RESULT([no]) PALETTE_ENTRY* foo = p.entries;]])],
AC_DEFINE([LEGACY_RDPPALETTE],, [AC_MSG_RESULT([yes])],
[Whether the legacy rdpPalette API was found])]) [AC_MSG_RESULT([no])
AC_DEFINE([LEGACY_RDPPALETTE],,
[Whether the legacy rdpPalette API was found])])
fi
# #
# FreeRDP: rdpPointer # FreeRDP: rdpPointer
# #
# Check for SetDefault and SetNull members of rdpPointer # Check for SetDefault and SetNull members of rdpPointer
AC_CHECK_MEMBERS([rdpPointer.SetDefault, if test "x${have_libfreerdp}" = "xyes"
rdpPointer.SetNull], then
,, AC_CHECK_MEMBERS([rdpPointer.SetDefault,
[[#include <freerdp/freerdp.h>]]) rdpPointer.SetNull],
,,
[[#include <freerdp/freerdp.h>]])
fi
# #
# FreeRDP: wMessage / RDP_EVENT # FreeRDP: wMessage / RDP_EVENT
# #
# Check for current (as of 1.1) wMessage interface # Check for current (as of 1.1) wMessage interface
AC_CHECK_MEMBERS([wMessage.id], if test "x${have_libfreerdp}" = "xyes"
[event_interface=stable],,
[[#include <winpr/collections.h>]])
# If not current, check for legacy (RDP_EVENT) interface
if test "x${event_interface}" = "xunknown"
then then
AC_CHECK_MEMBERS([RDP_EVENT.event_class], AC_CHECK_MEMBERS([wMessage.id],
[event_interface=legacy],, [event_interface=stable],,
[[#include <freerdp/types.h>]]) [[#include <winpr/collections.h>]])
fi
# Set defines based on interface type, warn if unknown # If not current, check for legacy (RDP_EVENT) interface
if test "x${event_interface}" = "xlegacy"; then if test "x${event_interface}" = "xunknown"
AC_DEFINE([LEGACY_EVENT],, then
[Whether the legacy RDP_EVENT API was found]) AC_CHECK_MEMBERS([RDP_EVENT.event_class],
elif test "x${event_interface}" = "xunknown"; then [event_interface=legacy],,
AC_MSG_WARN([ [[#include <freerdp/types.h>]])
fi
# Set defines based on interface type, warn if unknown
if test "x${event_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_EVENT],,
[Whether the legacy RDP_EVENT API was found])
elif test "x${event_interface}" = "xunknown"; then
AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
Unknown event interface Unknown event interface
RDP will be disabled. RDP will be disabled.
--------------------------------------------]) --------------------------------------------])
have_freerdp=no have_freerdp=no
fi
fi fi
AM_CONDITIONAL([LEGACY_FREERDP_EXTENSIONS], [test "x${legacy_freerdp_extensions}" = "xyes"]) AM_CONDITIONAL([LEGACY_FREERDP_EXTENSIONS], [test "x${legacy_freerdp_extensions}" = "xyes"])
AM_CONDITIONAL([ENABLE_WINPR], [test "x${have_winpr}" = "xyes"]) AM_CONDITIONAL([ENABLE_WINPR], [test "x${have_winpr}" = "xyes"])
AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"]) AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"])
@ -600,12 +721,28 @@ AC_SUBST(RDP_LIBS)
# libssh2 # libssh2
# #
have_libssh2=yes have_libssh2=disabled
SSH_LIBS= SSH_LIBS=
AC_ARG_WITH([ssh],
[AS_HELP_STRING([--with-ssh],
[support SSH @<:@default=check@:>@])],
[],
[with_ssh=check])
AC_ARG_ENABLE(ssh_agent,
[AS_HELP_STRING([--enable-ssh-agent],
[enable built-in ssh-agent])
],enable_ssh_agent=yes)
if test "x$with_ssh" != "xno"
then
have_libssh2=yes
AC_CHECK_LIB([ssh2], [libssh2_session_init_ex],
[SSH_LIBS="$SSH_LIBS -lssh2"],
[have_libssh2=no])
fi
AC_CHECK_LIB([ssh2], [libssh2_session_init_ex],
[SSH_LIBS="$SSH_LIBS -lssh2"],
[have_libssh2=no])
AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh2}" = "xyes" \ AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh2}" = "xyes" \
-a "x${have_terminal}" = "xyes" \ -a "x${have_terminal}" = "xyes" \
-a "x${have_ssl}" = "xyes"]) -a "x${have_ssl}" = "xyes"])
@ -667,12 +804,22 @@ AM_CONDITIONAL([ENABLE_SSH_AGENT],
# libtelnet # libtelnet
# #
have_libtelnet=yes have_libtelnet=disabled
TELNET_LIBS= TELNET_LIBS=
AC_ARG_WITH([telnet],
[AS_HELP_STRING([--with-telnet],
[support Telnet @<:@default=check@:>@])],
[],
[with_telnet=check])
if test "x$with_telnet" != "xno"
then
have_libtelnet=yes
AC_CHECK_LIB([telnet], [telnet_init],
[TELNET_LIBS="$TELNET_LIBS -ltelnet"],
[have_libtelnet=no])
fi
AC_CHECK_LIB([telnet], [telnet_init],
[TELNET_LIBS="$TELNET_LIBS -ltelnet"],
[have_libtelnet=no])
AM_CONDITIONAL([ENABLE_TELNET], [test "x${have_libtelnet}" = "xyes" \ AM_CONDITIONAL([ENABLE_TELNET], [test "x${have_libtelnet}" = "xyes" \
-a "x${have_terminal}" = "xyes"]) -a "x${have_terminal}" = "xyes"])