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
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([ 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
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([ 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
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([ 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=yes
if test "x${have_pango}" = "xno"
then
have_terminal=no 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,27 +351,26 @@ 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([
-------------------------------------------- --------------------------------------------
@ -325,16 +378,36 @@ AC_CHECK_LIB([freerdp-core], [freerdp_new],
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"
then
AC_CHECK_LIB([freerdp-client], [freerdp_channels_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-client"], [RDP_LIBS="$RDP_LIBS -lfreerdp-client"],
[AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new], [AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-channels" [RDP_LIBS="$RDP_LIBS -lfreerdp-channels"
legacy_freerdp_extensions=yes])]) legacy_freerdp_extensions=yes])])
fi
# libfreerdp-utils # libfreerdp-utils
AC_CHECK_LIB([freerdp-utils], [svc_plugin_init], if test "x${have_libfreerdp}" = "xyes"
then
AC_CHECK_LIB([freerdp-utils], [svc_plugin_init],
[RDP_LIBS="$RDP_LIBS -lfreerdp-utils"], [RDP_LIBS="$RDP_LIBS -lfreerdp-utils"],
[AC_MSG_WARN([ [AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
@ -342,9 +415,12 @@ AC_CHECK_LIB([freerdp-utils], [svc_plugin_init],
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"
then
AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],
[RDP_LIBS="$RDP_LIBS -lfreerdp-codec"], [RDP_LIBS="$RDP_LIBS -lfreerdp-codec"],
[AC_MSG_WARN([ [AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
@ -352,13 +428,19 @@ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],
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"
then
AC_CHECK_MEMBERS([rdpSvcPlugin.interval_ms],,,
[[#include <freerdp/utils/svc_plugin.h>]]) [[#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"
then
AC_CHECK_HEADERS([freerdp/locale/keyboard.h],,
[AC_CHECK_HEADERS([freerdp/kbd/layouts.h],, [AC_CHECK_HEADERS([freerdp/kbd/layouts.h],,
[AC_MSG_WARN([ [AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
@ -366,12 +448,18 @@ AC_CHECK_HEADERS([freerdp/locale/keyboard.h],,
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"
then
AC_CHECK_HEADERS([freerdp/client/cliprdr.h],,
[AC_CHECK_HEADERS([freerdp/plugins/cliprdr.h],, [AC_CHECK_HEADERS([freerdp/plugins/cliprdr.h],,
[AC_MSG_WARN([ [AC_MSG_WARN([
-------------------------------------------- --------------------------------------------
@ -382,23 +470,30 @@ AC_CHECK_HEADERS([freerdp/client/cliprdr.h],,
[#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
if test "x${have_libfreerdp}" = "xyes"
then
AC_CHECK_DECL([freerdp_register_addin_provider],
[AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER],, [AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER],,
[Whether freerdp_register_addin_provider() is defined])],, [Whether freerdp_register_addin_provider() is defined])],,
[#include <freerdp/addin.h>]) [#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"
then
AC_CHECK_HEADER(winpr/stream.h,,
[have_winpr=no, [have_winpr=no,
AC_CHECK_DECL([stream_write_uint8],, AC_CHECK_DECL([stream_write_uint8],,
[AC_MSG_WARN([ [AC_MSG_WARN([
@ -408,9 +503,12 @@ AC_CHECK_HEADER(winpr/stream.h,,
--------------------------------------------]) --------------------------------------------])
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"
then
AC_CHECK_HEADER(winpr/wtypes.h,,
[have_winpr=no, [have_winpr=no,
AC_CHECK_HEADER(freerdp/types.h,, AC_CHECK_HEADER(freerdp/types.h,,
[AC_MSG_WARN([ [AC_MSG_WARN([
@ -419,8 +517,9 @@ AC_CHECK_HEADER(winpr/wtypes.h,,
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,38 +529,43 @@ 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], then
# Check for current (as of 1.1) freerdp interface
AC_CHECK_MEMBERS([freerdp.ContextSize],
[freerdp_interface=stable],, [freerdp_interface=stable],,
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
# If not current, check for legacy interface # If not current, check for legacy interface
if test "x${freerdp_interface}" = "xunknown" if test "x${freerdp_interface}" = "xunknown"
then then
AC_CHECK_MEMBERS([freerdp.context_size], AC_CHECK_MEMBERS([freerdp.context_size],
[freerdp_interface=legacy],, [freerdp_interface=legacy],,
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
fi fi
# Set defines based on interface type, warn if unknown # Set defines based on interface type, warn if unknown
if test "x${freerdp_interface}" = "xlegacy"; then if test "x${freerdp_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_FREERDP],, AC_DEFINE([LEGACY_FREERDP],,
[Whether the older version of the FreeRDP API was found]) [Whether the older version of the FreeRDP API was found])
elif test "x${freerdp_interface}" = "xunknown"; then elif test "x${freerdp_interface}" = "xunknown"; then
AC_MSG_WARN([ 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, then
# Check for current (as of 1.1) rdpSettings interface
AC_CHECK_MEMBERS([rdpSettings.Width,
rdpSettings.Height, rdpSettings.Height,
rdpSettings.FastPathInput, rdpSettings.FastPathInput,
rdpSettings.FastPathOutput, rdpSettings.FastPathOutput,
@ -469,18 +573,18 @@ AC_CHECK_MEMBERS([rdpSettings.Width,
[rdpsettings_interface=stable],, [rdpsettings_interface=stable],,
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
# If not current, check for legacy interface # If not current, check for legacy interface
if test "x${rdpsettings_interface}" = "xunknown" if test "x${rdpsettings_interface}" = "xunknown"
then then
AC_CHECK_MEMBERS([rdpSettings.width, AC_CHECK_MEMBERS([rdpSettings.width,
rdpSettings.height, rdpSettings.height,
rdpSettings.order_support], rdpSettings.order_support],
[rdpsettings_interface=legacy],, [rdpsettings_interface=legacy],,
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
fi fi
# Set defines based on interface type, warn if unknown # Set defines based on interface type, warn if unknown
if test "x${rdpsettings_interface}" = "xlegacy"; then if test "x${rdpsettings_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_RDPSETTINGS],, AC_DEFINE([LEGACY_RDPSETTINGS],,
[Whether the legacy version of the rdpSettings API was found]) [Whether the legacy version of the rdpSettings API was found])
@ -490,36 +594,44 @@ if test "x${rdpsettings_interface}" = "xlegacy"; then
[rdpsettings_fastpath=no], [rdpsettings_fastpath=no],
[[#include <freerdp/freerdp.h>]]) [[#include <freerdp/freerdp.h>]])
elif test "x${rdpsettings_interface}" = "xunknown"; then elif test "x${rdpsettings_interface}" = "xunknown"; then
AC_MSG_WARN([ 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"
then
AC_CHECK_TYPE([CHANNEL_ENTRY_POINTS_FREERDP],,
AC_DEFINE([CHANNEL_ENTRY_POINTS_FREERDP],[CHANNEL_ENTRY_POINTS_EX], [Type compatibility]), AC_DEFINE([CHANNEL_ENTRY_POINTS_FREERDP],[CHANNEL_ENTRY_POINTS_EX], [Type compatibility]),
[[#include <freerdp/svc.h>]]) [[#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
AC_MSG_CHECKING([whether rdpBitmap.Decompress() requires the codec_id])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
#include <freerdp/freerdp.h> #include <freerdp/freerdp.h>
void __decompress(rdpContext* context, void __decompress(rdpContext* context,
rdpBitmap* bitmap, rdpBitmap* bitmap,
@ -535,61 +647,70 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
[AC_MSG_RESULT([no]) [AC_MSG_RESULT([no])
AC_DEFINE([LEGACY_RDPBITMAP],, AC_DEFINE([LEGACY_RDPBITMAP],,
[Whether the legacy rdpBitmap API was found])]) [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
AC_MSG_CHECKING([whether rdpPalette.entries is static])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <freerdp/update.h>
rdpPalette p; rdpPalette p;
PALETTE_ENTRY* foo = p.entries;]])], PALETTE_ENTRY* foo = p.entries;]])],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no]) [AC_MSG_RESULT([no])
AC_DEFINE([LEGACY_RDPPALETTE],, AC_DEFINE([LEGACY_RDPPALETTE],,
[Whether the legacy rdpPalette API was found])]) [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"
then
AC_CHECK_MEMBERS([rdpPointer.SetDefault,
rdpPointer.SetNull], rdpPointer.SetNull],
,, ,,
[[#include <freerdp/freerdp.h>]]) [[#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"
then
AC_CHECK_MEMBERS([wMessage.id],
[event_interface=stable],, [event_interface=stable],,
[[#include <winpr/collections.h>]]) [[#include <winpr/collections.h>]])
# If not current, check for legacy (RDP_EVENT) interface # If not current, check for legacy (RDP_EVENT) interface
if test "x${event_interface}" = "xunknown" if test "x${event_interface}" = "xunknown"
then then
AC_CHECK_MEMBERS([RDP_EVENT.event_class], AC_CHECK_MEMBERS([RDP_EVENT.event_class],
[event_interface=legacy],, [event_interface=legacy],,
[[#include <freerdp/types.h>]]) [[#include <freerdp/types.h>]])
fi fi
# Set defines based on interface type, warn if unknown # Set defines based on interface type, warn if unknown
if test "x${event_interface}" = "xlegacy"; then if test "x${event_interface}" = "xlegacy"; then
AC_DEFINE([LEGACY_EVENT],, AC_DEFINE([LEGACY_EVENT],,
[Whether the legacy RDP_EVENT API was found]) [Whether the legacy RDP_EVENT API was found])
elif test "x${event_interface}" = "xunknown"; then elif test "x${event_interface}" = "xunknown"; then
AC_MSG_WARN([ 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_CHECK_LIB([ssh2], [libssh2_session_init_ex], 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"], [SSH_LIBS="$SSH_LIBS -lssh2"],
[have_libssh2=no]) [have_libssh2=no])
fi
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])
AC_CHECK_LIB([telnet], [telnet_init], if test "x$with_telnet" != "xno"
then
have_libtelnet=yes
AC_CHECK_LIB([telnet], [telnet_init],
[TELNET_LIBS="$TELNET_LIBS -ltelnet"], [TELNET_LIBS="$TELNET_LIBS -ltelnet"],
[have_libtelnet=no]) [have_libtelnet=no])
fi
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"])