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"])
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
#
have_ssl=yes
have_ssl=disabled
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])
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"
if test "x$with_ssl" != "xno"
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([
--------------------------------------------
Unable to find libssl.
guacd will not support SSL connections.
--------------------------------------------])
else
else
AC_DEFINE([ENABLE_SSL],, [Whether SSL-related support is enabled])
fi
fi
AM_CONDITIONAL([ENABLE_SSL], [test "x${have_ssl}" = "xyes"])
AC_SUBST(SSL_LIBS)
@ -163,68 +168,108 @@ AC_SUBST(SSL_LIBS)
# Ogg Vorbis
#
have_vorbis=yes
have_vorbis=disabled
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])
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"
if test "x$with_vorbis" != "xno"
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([
--------------------------------------------
Unable to find libogg / libvorbis / libvorbisenc.
Sound will not be encoded with Ogg Vorbis.
--------------------------------------------])
else
else
AC_DEFINE([ENABLE_OGG],,
[Whether support for Ogg Vorbis is enabled])
fi
fi
AM_CONDITIONAL([ENABLE_OGG], [test "x${have_vorbis}" = "xyes"])
AC_SUBST(VORBIS_LIBS)
#
# PulseAudio
#
have_pulse=yes
have_pulse=disabled
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])
AM_CONDITIONAL([ENABLE_PULSE], [test "x${have_pulse}" = "xyes"])
if test "x${have_pulse}" = "xno"
if test "x$with_pulse" != "xno"
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([
--------------------------------------------
Unable to find libpulse
Sound support for VNC will be disabled
--------------------------------------------])
else
else
AC_DEFINE([ENABLE_PULSE],, [Whether PulseAudio support is enabled])
fi
fi
AM_CONDITIONAL([ENABLE_PULSE], [test "x${have_pulse}" = "xyes"])
AC_SUBST(PULSE_LIBS)
#
# PANGO
#
have_pango=yes
PKG_CHECK_MODULES([PANGO], [pango],, [have_pango=no]);
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo],, [have_pango=no]);
have_pango=disabled
AC_ARG_WITH([pango],
[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
#
have_terminal=yes
if test "x${have_pango}" = "xno"
have_terminal=disabled
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
have_terminal=yes
if test "x${have_pango}" = "xno"
then
have_terminal=no
fi
fi
AM_CONDITIONAL([ENABLE_TERMINAL], [test "x${have_terminal}" = "xyes"])
@ -233,12 +278,21 @@ AM_CONDITIONAL([ENABLE_TERMINAL], [test "x${have_terminal}" = "xyes"])
# libVNCServer
#
have_libvncserver=yes
have_libvncserver=disabled
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"])
AC_SUBST(VNC_LIBS)
#
@ -297,27 +351,26 @@ fi
# FreeRDP
#
have_winpr=yes
have_freerdp=yes
legacy_freerdp_extensions=no
rdpsettings_interface=unknown
rdpsettings_fastpath=yes
freerdp_interface=unknown
event_interface=unknown
have_freerdp=disabled
RDP_LIBS=
AC_ARG_WITH([rdp],
[AS_HELP_STRING([--with-rdp],
[support RDP @<:@default=check@:>@])],
[],
[with_rdp=check])
# libfreerdp-cache
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])
if test "x$with_rdp" != "xno"
then
have_winpr=yes
have_freerdp=yes
legacy_freerdp_extensions=no
rdpsettings_interface=unknown
rdpsettings_fastpath=yes
freerdp_interface=unknown
event_interface=unknown
# libfreerdp-core
AC_CHECK_LIB([freerdp-core], [freerdp_new],
# libfreerdp-core
AC_CHECK_LIB([freerdp-core], [freerdp_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-core"],
[AC_MSG_WARN([
--------------------------------------------
@ -325,16 +378,36 @@ AC_CHECK_LIB([freerdp-core], [freerdp_new],
RDP will be disabled.
--------------------------------------------])
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)
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"],
[AC_CHECK_LIB([freerdp-channels], [freerdp_channels_new],
[RDP_LIBS="$RDP_LIBS -lfreerdp-channels"
legacy_freerdp_extensions=yes])])
fi
# 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"],
[AC_MSG_WARN([
--------------------------------------------
@ -342,9 +415,12 @@ AC_CHECK_LIB([freerdp-utils], [svc_plugin_init],
RDP will be disabled.
--------------------------------------------])
have_freerdp=no])
fi
# 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"],
[AC_MSG_WARN([
--------------------------------------------
@ -352,13 +428,19 @@ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],
RDP will be disabled.
--------------------------------------------])
have_freerdp=no])
fi
# 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>]])
fi
# 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_MSG_WARN([
--------------------------------------------
@ -366,12 +448,18 @@ AC_CHECK_HEADERS([freerdp/locale/keyboard.h],,
RDP will be disabled.
--------------------------------------------])
have_freerdp=no])])
fi
# 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
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_MSG_WARN([
--------------------------------------------
@ -382,23 +470,30 @@ AC_CHECK_HEADERS([freerdp/client/cliprdr.h],,
[#include <freerdp/types.h>])],
[#include <winpr/wtypes.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],,
[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],,
[Whether freerdp_channels_global_init() is defined])],,
[#include <freerdp/channels/channels.h>])
fi
#
# FreeRDP: 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,
AC_CHECK_DECL([stream_write_uint8],,
[AC_MSG_WARN([
@ -408,9 +503,12 @@ AC_CHECK_HEADER(winpr/stream.h,,
--------------------------------------------])
have_freerdp=no],
[#include <freerdp/utils/stream.h>])])
fi
# 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,
AC_CHECK_HEADER(freerdp/types.h,,
[AC_MSG_WARN([
@ -419,8 +517,9 @@ AC_CHECK_HEADER(winpr/wtypes.h,,
RDP will be disabled.
--------------------------------------------])
have_freerdp=no])])
fi
if test "x${have_winpr}" = "xyes"
if test "x${have_libfreerdp}" = "xyes" -a "x${have_winpr}" = "xyes"
then
AC_DEFINE([ENABLE_WINPR],,
[Whether library support for WinPR types was found])
@ -430,38 +529,43 @@ fi
# FreeRDP: freerdp
#
# Check for current (as of 1.1) freerdp interface
AC_CHECK_MEMBERS([freerdp.ContextSize],
if test "x${have_libfreerdp}" = "xyes"
then
# Check for current (as of 1.1) freerdp interface
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
# If not current, check for legacy interface
if test "x${freerdp_interface}" = "xunknown"
then
AC_CHECK_MEMBERS([freerdp.context_size],
[freerdp_interface=legacy],,
[[#include <freerdp/freerdp.h>]])
fi
fi
# Set defines based on interface type, warn if unknown
if test "x${freerdp_interface}" = "xlegacy"; then
# 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
elif test "x${freerdp_interface}" = "xunknown"; then
AC_MSG_WARN([
--------------------------------------------
Unknown FreeRDP interface
RDP will be disabled.
--------------------------------------------])
have_freerdp=no
fi
fi
#
# FreeRDP: rdpSettings
#
# Check for current (as of 1.1) rdpSettings interface
AC_CHECK_MEMBERS([rdpSettings.Width,
if test "x${have_libfreerdp}" = "xyes"
then
# Check for current (as of 1.1) rdpSettings interface
AC_CHECK_MEMBERS([rdpSettings.Width,
rdpSettings.Height,
rdpSettings.FastPathInput,
rdpSettings.FastPathOutput,
@ -469,18 +573,18 @@ AC_CHECK_MEMBERS([rdpSettings.Width,
[rdpsettings_interface=stable],,
[[#include <freerdp/freerdp.h>]])
# If not current, check for legacy interface
if test "x${rdpsettings_interface}" = "xunknown"
then
# If not current, check for legacy interface
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
fi
# Set defines based on interface type, warn if unknown
if test "x${rdpsettings_interface}" = "xlegacy"; then
# 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])
@ -490,36 +594,44 @@ if test "x${rdpsettings_interface}" = "xlegacy"; then
[rdpsettings_fastpath=no],
[[#include <freerdp/freerdp.h>]])
elif test "x${rdpsettings_interface}" = "xunknown"; then
elif test "x${rdpsettings_interface}" = "xunknown"; then
AC_MSG_WARN([
--------------------------------------------
Unknown rdpSettings interface
RDP will be disabled.
--------------------------------------------])
have_freerdp=no
fi
fi
# 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],,
[Whether the rdpSettings structure has FastPath settings])
fi
# 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]),
[[#include <freerdp/svc.h>]])
fi
# 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
#
AC_MSG_CHECKING([whether rdpBitmap.Decompress() requires the codec_id])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
if test "x${have_libfreerdp}" = "xyes"
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>
void __decompress(rdpContext* context,
rdpBitmap* bitmap,
@ -535,61 +647,70 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
[AC_MSG_RESULT([no])
AC_DEFINE([LEGACY_RDPBITMAP],,
[Whether the legacy rdpBitmap API was found])])
fi
#
# FreeRDP: rdpPalette
#
AC_MSG_CHECKING([whether rdpPalette.entries is static])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <freerdp/update.h>
if test "x${have_libfreerdp}" = "xyes"
then
AC_MSG_CHECKING([whether rdpPalette.entries is static])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <freerdp/update.h>
rdpPalette p;
PALETTE_ENTRY* foo = p.entries;]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_DEFINE([LEGACY_RDPPALETTE],,
[Whether the legacy rdpPalette API was found])])
fi
#
# FreeRDP: 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],
,,
[[#include <freerdp/freerdp.h>]])
fi
#
# FreeRDP: wMessage / RDP_EVENT
#
# 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],,
[[#include <winpr/collections.h>]])
# If not current, check for legacy (RDP_EVENT) interface
if test "x${event_interface}" = "xunknown"
then
# If not current, check for legacy (RDP_EVENT) interface
if test "x${event_interface}" = "xunknown"
then
AC_CHECK_MEMBERS([RDP_EVENT.event_class],
[event_interface=legacy],,
[[#include <freerdp/types.h>]])
fi
fi
# Set defines based on interface type, warn if unknown
if test "x${event_interface}" = "xlegacy"; then
# 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
elif test "x${event_interface}" = "xunknown"; then
AC_MSG_WARN([
--------------------------------------------
Unknown event interface
RDP will be disabled.
--------------------------------------------])
have_freerdp=no
fi
fi
AM_CONDITIONAL([LEGACY_FREERDP_EXTENSIONS], [test "x${legacy_freerdp_extensions}" = "xyes"])
AM_CONDITIONAL([ENABLE_WINPR], [test "x${have_winpr}" = "xyes"])
AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"])
@ -600,12 +721,28 @@ AC_SUBST(RDP_LIBS)
# libssh2
#
have_libssh2=yes
have_libssh2=disabled
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"],
[have_libssh2=no])
fi
AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh2}" = "xyes" \
-a "x${have_terminal}" = "xyes" \
-a "x${have_ssl}" = "xyes"])
@ -667,12 +804,22 @@ AM_CONDITIONAL([ENABLE_SSH_AGENT],
# libtelnet
#
have_libtelnet=yes
have_libtelnet=disabled
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"],
[have_libtelnet=no])
fi
AM_CONDITIONAL([ENABLE_TELNET], [test "x${have_libtelnet}" = "xyes" \
-a "x${have_terminal}" = "xyes"])