2011-03-02 09:19:24 +00:00
|
|
|
#
|
2016-03-25 20:03:33 +00:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
2011-03-02 09:19:24 +00:00
|
|
|
#
|
2016-03-25 20:03:33 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2011-03-02 09:19:24 +00:00
|
|
|
#
|
2016-03-25 20:03:33 +00:00
|
|
|
# Unless required by applicable law or agreed to in writing,
|
|
|
|
# software distributed under the License is distributed on an
|
|
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
# KIND, either express or implied. See the License for the
|
|
|
|
# specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2011-03-02 09:19:24 +00:00
|
|
|
#
|
2010-12-08 21:14:04 +00:00
|
|
|
|
2013-06-04 23:29:31 +00:00
|
|
|
AC_PREREQ([2.61])
|
2019-02-09 19:18:26 +00:00
|
|
|
AC_INIT([guacamole-server], [1.1.0])
|
2018-11-13 21:26:43 +00:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2013-10-26 00:18:58 +00:00
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
|
2014-01-01 22:44:28 +00:00
|
|
|
AM_SILENT_RULES([yes])
|
2010-12-08 21:14:04 +00:00
|
|
|
|
2013-06-04 23:29:31 +00:00
|
|
|
LT_PREREQ([2.2])
|
|
|
|
LT_INIT([dlopen])
|
2011-02-28 04:27:12 +00:00
|
|
|
|
2014-01-01 22:44:28 +00:00
|
|
|
AC_CONFIG_HEADER([config.h])
|
2013-06-04 23:29:31 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2018-11-13 21:26:43 +00:00
|
|
|
# Use TAP test driver for tests (part of automake)
|
|
|
|
AC_REQUIRE_AUX_FILE([tap-driver.sh])
|
|
|
|
|
2013-06-05 17:45:07 +00:00
|
|
|
# Programs
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CC_C99
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
# Headers
|
|
|
|
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h time.h sys/time.h syslog.h unistd.h cairo/cairo.h pngstruct.h])
|
|
|
|
|
|
|
|
# Source characteristics
|
2014-04-11 19:56:06 +00:00
|
|
|
AC_DEFINE([_XOPEN_SOURCE], [700], [Uses X/Open and POSIX APIs])
|
2019-01-24 02:38:20 +00:00
|
|
|
AC_DEFINE([__BSD_VISIBLE], [1], [Uses BSD-specific APIs (if available)])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2014-06-02 22:34:48 +00:00
|
|
|
# Check for whether math library is required
|
|
|
|
AC_CHECK_LIB([m], [cos],
|
|
|
|
[MATH_LIBS=-lm],
|
|
|
|
[AC_CHECK_DECL([cos],,
|
|
|
|
AC_MSG_ERROR("Complex math functions are missing and no libm was found")
|
|
|
|
[#include <math.h>])])
|
|
|
|
|
2013-07-09 00:40:20 +00:00
|
|
|
# libpng
|
|
|
|
AC_CHECK_LIB([png], [png_write_png], [PNG_LIBS=-lpng],
|
|
|
|
AC_MSG_ERROR("libpng is required for writing png messages"))
|
|
|
|
|
2015-07-31 22:05:52 +00:00
|
|
|
# libjpeg
|
|
|
|
AC_CHECK_LIB([jpeg], [jpeg_start_compress], [JPEG_LIBS=-ljpeg],
|
|
|
|
AC_MSG_ERROR("libjpeg is required for writing jpeg messages"))
|
|
|
|
|
2013-07-09 00:40:20 +00:00
|
|
|
# Cairo
|
|
|
|
AC_CHECK_LIB([cairo], [cairo_create], [CAIRO_LIBS=-lcairo],
|
|
|
|
AC_MSG_ERROR("Cairo is required for drawing instructions"))
|
|
|
|
|
|
|
|
# libpthread
|
|
|
|
AC_CHECK_LIB([pthread], [pthread_create], [PTHREAD_LIBS=-lpthread
|
2014-01-01 22:44:28 +00:00
|
|
|
AC_DEFINE([HAVE_LIBPTHREAD],,
|
|
|
|
[Whether libpthread was found])])
|
2013-07-09 00:40:20 +00:00
|
|
|
|
2017-06-10 21:39:03 +00:00
|
|
|
# Include libdl for dlopen() if necessary
|
|
|
|
AC_CHECK_LIB([dl], [dlopen],
|
|
|
|
[DL_LIBS=-ldl],
|
|
|
|
[AC_CHECK_DECL([dlopen],,
|
|
|
|
AC_MSG_ERROR("libdl is required on systems which do not otherwise provide dlopen()"),
|
|
|
|
[#include <dlfcn.h>])])
|
|
|
|
|
2014-06-26 23:28:26 +00:00
|
|
|
# OSSP UUID
|
|
|
|
AC_CHECK_LIB([ossp-uuid], [uuid_make], [UUID_LIBS=-lossp-uuid],
|
|
|
|
AC_CHECK_LIB([uuid], [uuid_make], [UUID_LIBS=-luuid],
|
|
|
|
AC_MSG_ERROR("The OSSP UUID library is required")))
|
2014-06-26 22:09:44 +00:00
|
|
|
|
2014-07-02 20:33:47 +00:00
|
|
|
# Check for and validate OSSP uuid.h header
|
|
|
|
AC_CHECK_HEADERS([ossp/uuid.h])
|
|
|
|
AC_CHECK_DECL([uuid_make],,
|
|
|
|
AC_MSG_ERROR("No OSSP uuid.h found in include path"),
|
|
|
|
[#ifdef HAVE_OSSP_UUID_H
|
|
|
|
#include <ossp/uuid.h>
|
|
|
|
#else
|
|
|
|
#include <uuid.h>
|
|
|
|
#endif
|
|
|
|
])
|
|
|
|
|
2013-07-09 00:40:20 +00:00
|
|
|
# cunit
|
|
|
|
AC_CHECK_LIB([cunit], [CU_run_test], [CUNIT_LIBS=-lcunit])
|
|
|
|
|
2017-06-10 21:39:03 +00:00
|
|
|
AC_SUBST(DL_LIBS)
|
2014-06-02 22:34:48 +00:00
|
|
|
AC_SUBST(MATH_LIBS)
|
2013-07-09 00:40:20 +00:00
|
|
|
AC_SUBST(PNG_LIBS)
|
2015-07-31 22:05:52 +00:00
|
|
|
AC_SUBST(JPEG_LIBS)
|
2013-07-09 00:40:20 +00:00
|
|
|
AC_SUBST(CAIRO_LIBS)
|
2013-06-05 17:45:07 +00:00
|
|
|
AC_SUBST(PTHREAD_LIBS)
|
2014-06-26 22:09:44 +00:00
|
|
|
AC_SUBST(UUID_LIBS)
|
2013-06-05 17:45:07 +00:00
|
|
|
AC_SUBST(CUNIT_LIBS)
|
|
|
|
|
|
|
|
# Library functions
|
2013-07-16 18:27:46 +00:00
|
|
|
AC_CHECK_FUNCS([clock_gettime gettimeofday memmove memset select strdup nanosleep])
|
|
|
|
|
|
|
|
AC_CHECK_DECL([png_get_io_ptr],
|
2014-01-01 22:44:28 +00:00
|
|
|
[AC_DEFINE([HAVE_PNG_GET_IO_PTR],,
|
|
|
|
[Whether png_get_io_ptr() is defined])],,
|
2013-07-16 18:27:46 +00:00
|
|
|
[#include <png.h>])
|
|
|
|
|
|
|
|
AC_CHECK_DECL([cairo_format_stride_for_width],
|
2014-01-01 22:44:28 +00:00
|
|
|
[AC_DEFINE([HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH],,
|
|
|
|
[Whether cairo_format_stride_for_width() is defined])],,
|
2013-07-16 18:27:46 +00:00
|
|
|
[#include <cairo/cairo.h>])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2017-06-12 20:38:26 +00:00
|
|
|
AC_CHECK_DECL([poll],
|
|
|
|
[AC_DEFINE([HAVE_POLL],,
|
|
|
|
[Whether poll() is defined])],,
|
|
|
|
[#include <poll.h>])
|
|
|
|
|
2018-10-19 16:49:23 +00:00
|
|
|
AC_CHECK_DECL([strlcpy],
|
|
|
|
[AC_DEFINE([HAVE_STRLCPY],,
|
|
|
|
[Whether strlcpy() is defined])],,
|
|
|
|
[#include <string.h>])
|
|
|
|
|
2018-10-19 19:28:04 +00:00
|
|
|
AC_CHECK_DECL([strlcat],
|
|
|
|
[AC_DEFINE([HAVE_STRLCAT],,
|
|
|
|
[Whether strlcat() is defined])],,
|
|
|
|
[#include <string.h>])
|
|
|
|
|
2013-06-05 17:45:07 +00:00
|
|
|
# Typedefs
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_SSIZE_T
|
|
|
|
|
2013-06-05 18:50:48 +00:00
|
|
|
# Bundled libguac
|
|
|
|
AC_SUBST([LIBGUAC_LTLIB], '$(top_builddir)/src/libguac/libguac.la')
|
|
|
|
AC_SUBST([LIBGUAC_INCLUDE], '-I$(top_srcdir)/src/libguac')
|
2014-05-05 22:35:37 +00:00
|
|
|
|
|
|
|
# Common non-libguac utility library
|
|
|
|
AC_SUBST([COMMON_LTLIB], '$(top_builddir)/src/common/libguac_common.la')
|
|
|
|
AC_SUBST([COMMON_INCLUDE], '-I$(top_srcdir)/src/common')
|
|
|
|
|
2016-12-25 09:13:40 +00:00
|
|
|
# Common PulseAudio utility library
|
|
|
|
AC_SUBST([PULSE_LTLIB], '$(top_builddir)/src/pulse/libguac_pulse.la')
|
|
|
|
AC_SUBST([PULSE_INCLUDE], '-I$(top_srcdir)/src/pulse')
|
|
|
|
|
2015-07-08 00:02:13 +00:00
|
|
|
# Common base SSH client
|
|
|
|
AC_SUBST([COMMON_SSH_LTLIB], '$(top_builddir)/src/common-ssh/libguac_common_ssh.la')
|
|
|
|
AC_SUBST([COMMON_SSH_INCLUDE], '-I$(top_srcdir)/src/common-ssh')
|
|
|
|
|
2019-04-07 20:55:15 +00:00
|
|
|
# RDP support
|
|
|
|
AC_SUBST([LIBGUAC_CLIENT_RDP_LTLIB], '$(top_builddir)/src/protocols/rdp/libguac-client-rdp.la')
|
|
|
|
AC_SUBST([LIBGUAC_CLIENT_RDP_INCLUDE], '-I$(top_srcdir)/src/protocols/rdp')
|
|
|
|
|
2014-05-05 22:35:37 +00:00
|
|
|
# Terminal emulator
|
|
|
|
AC_SUBST([TERMINAL_LTLIB], '$(top_builddir)/src/terminal/libguac_terminal.la')
|
2014-05-06 01:58:53 +00:00
|
|
|
AC_SUBST([TERMINAL_INCLUDE], '-I$(top_srcdir)/src/terminal $(PANGO_CFLAGS) $(PANGOCAIRO_CFLAGS) $(COMMON_INCLUDE)')
|
2013-06-05 18:50:48 +00:00
|
|
|
|
2014-09-08 21:41:49 +00:00
|
|
|
# Init directory
|
2013-07-08 17:35:56 +00:00
|
|
|
AC_ARG_WITH(init_dir,
|
|
|
|
[AS_HELP_STRING([--with-init-dir=<path>],
|
|
|
|
[install init scripts to the given directory])
|
|
|
|
],init_dir=$withval)
|
|
|
|
AM_CONDITIONAL([ENABLE_INIT], [test "x${init_dir}" != "x"])
|
|
|
|
AC_SUBST(init_dir)
|
|
|
|
|
2018-03-15 10:52:41 +00:00
|
|
|
# Systemd directory
|
|
|
|
AC_ARG_WITH(systemd_dir,
|
|
|
|
[AS_HELP_STRING([--with-systemd-dir=<path>],
|
|
|
|
[install systemd units to the given directory])
|
|
|
|
],systemd_dir=$withval)
|
|
|
|
AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x${systemd_dir}" != "x"])
|
|
|
|
AC_SUBST(systemd_dir)
|
|
|
|
|
2014-09-08 21:41:49 +00:00
|
|
|
# guacd config file
|
|
|
|
AC_ARG_WITH(guacd_conf,
|
|
|
|
[AS_HELP_STRING([--with-guacd-conf=<path>],
|
|
|
|
[the full path to the guacd config file @<:@default=/etc/guacamole/guacd.conf@:>@])],
|
|
|
|
[guacd_conf=$withval],
|
|
|
|
[guacd_conf=/etc/guacamole/guacd.conf])
|
|
|
|
AC_DEFINE_UNQUOTED([GUACD_CONF_FILE], ["$guacd_conf"], [The full path to the guacd config file])
|
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
#
|
|
|
|
# libavcodec
|
|
|
|
#
|
|
|
|
|
|
|
|
have_libavcodec=disabled
|
|
|
|
AC_ARG_WITH([libavcodec],
|
|
|
|
[AS_HELP_STRING([--with-libavcodec],
|
|
|
|
[use libavcodec when encoding video @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_libavcodec=check])
|
|
|
|
|
|
|
|
if test "x$with_libavcodec" != "xno"
|
|
|
|
then
|
|
|
|
have_libavcodec=yes
|
|
|
|
PKG_CHECK_MODULES([AVCODEC], [libavcodec],, [have_libavcodec=no]);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_AVCODEC], [test "x${have_libavcodec}" = "xyes"])
|
|
|
|
|
2016-03-11 20:28:21 +00:00
|
|
|
#
|
|
|
|
# libavutil
|
|
|
|
#
|
|
|
|
|
|
|
|
have_libavutil=disabled
|
|
|
|
AC_ARG_WITH([libavutil],
|
|
|
|
[AS_HELP_STRING([--with-libavutil],
|
|
|
|
[use libavutil when encoding video @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_libavutil=check])
|
|
|
|
|
|
|
|
if test "x$with_libavutil" != "xno"
|
|
|
|
then
|
|
|
|
have_libavutil=yes
|
|
|
|
PKG_CHECK_MODULES([AVUTIL], [libavutil],, [have_libavutil=no]);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_AVUTIL], [test "x${have_libavutil}" = "xyes"])
|
|
|
|
|
2016-03-12 01:42:49 +00:00
|
|
|
#
|
|
|
|
# libswscale
|
|
|
|
#
|
|
|
|
|
|
|
|
have_libswscale=disabled
|
|
|
|
AC_ARG_WITH([libswscale],
|
|
|
|
[AS_HELP_STRING([--with-libswscale],
|
|
|
|
[use libswscale when encoding video @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_libswscale=check])
|
|
|
|
|
|
|
|
if test "x$with_libswscale" != "xno"
|
|
|
|
then
|
|
|
|
have_libswscale=yes
|
|
|
|
PKG_CHECK_MODULES([SWSCALE], [libswscale],, [have_libswscale=no]);
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_SWSCALE], [test "x${have_libswscale}" = "xyes"])
|
|
|
|
|
2013-07-22 02:56:03 +00:00
|
|
|
#
|
|
|
|
# libssl
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
have_ssl=disabled
|
2013-07-22 02:56:03 +00:00
|
|
|
SSL_LIBS=
|
2014-08-12 21:37:48 +00:00
|
|
|
AC_ARG_WITH([ssl],
|
|
|
|
[AS_HELP_STRING([--with-ssl],
|
|
|
|
[support SSL encryption @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_ssl=check])
|
2013-07-22 02:56:03 +00:00
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
if test "x$with_ssl" != "xno"
|
2013-07-22 02:56:03 +00:00
|
|
|
then
|
2014-08-12 21:37:48 +00:00
|
|
|
have_ssl=yes
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(openssl/ssl.h,, [have_ssl=no])
|
2016-11-20 07:10:14 +00:00
|
|
|
AC_CHECK_LIB([ssl], [SSL_CTX_new], [SSL_LIBS="$SSL_LIBS -lssl -lcrypto"], [have_ssl=no])
|
2014-08-12 21:37:48 +00:00
|
|
|
|
|
|
|
if test "x${have_ssl}" = "xno"
|
|
|
|
then
|
|
|
|
AC_MSG_WARN([
|
2013-07-22 02:56:03 +00:00
|
|
|
--------------------------------------------
|
|
|
|
Unable to find libssl.
|
|
|
|
guacd will not support SSL connections.
|
|
|
|
--------------------------------------------])
|
2014-08-12 21:37:48 +00:00
|
|
|
else
|
|
|
|
AC_DEFINE([ENABLE_SSL],, [Whether SSL-related support is enabled])
|
2017-02-27 18:40:18 +00:00
|
|
|
|
|
|
|
# OpenSSL 1.1 accessor function for DSA signature values
|
|
|
|
AC_CHECK_DECL([DSA_SIG_get0],
|
|
|
|
[AC_DEFINE([HAVE_DSA_SIG_GET0],,
|
|
|
|
[Whether libssl provides DSA_SIG_get0()])],,
|
|
|
|
[#include <openssl/dsa.h>])
|
|
|
|
|
|
|
|
# OpenSSL 1.1 accessor function for DSA public key parameters
|
|
|
|
AC_CHECK_DECL([DSA_get0_pqg],
|
|
|
|
[AC_DEFINE([HAVE_DSA_GET0_PQG],,
|
|
|
|
[Whether libssl provides DSA_get0_pqg()])],,
|
|
|
|
[#include <openssl/dsa.h>])
|
|
|
|
|
|
|
|
# OpenSSL 1.1 accessor function for DSA public/private key values
|
|
|
|
AC_CHECK_DECL([DSA_get0_key],
|
|
|
|
[AC_DEFINE([HAVE_DSA_GET0_KEY],,
|
|
|
|
[Whether libssl provides DSA_get0_key()])],,
|
|
|
|
[#include <openssl/dsa.h>])
|
|
|
|
|
|
|
|
# OpenSSL 1.1 accessor function for RSA public/private key values
|
|
|
|
AC_CHECK_DECL([RSA_get0_key],
|
|
|
|
[AC_DEFINE([HAVE_RSA_GET0_KEY],,
|
|
|
|
[Whether libssl provides RSA_get0_key()])],,
|
|
|
|
[#include <openssl/rsa.h>])
|
|
|
|
|
2017-02-28 20:01:43 +00:00
|
|
|
# OpenSSL 1.1 does away with explicit threading callbacks
|
|
|
|
AC_MSG_CHECKING([whether libssl requires threading callbacks])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
|
|
|
|
|
|
#include <openssl/opensslv.h>
|
|
|
|
|
|
|
|
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
|
|
#error Threading callbacks required.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
]])],
|
|
|
|
[AC_MSG_RESULT([no])],
|
|
|
|
[AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE([OPENSSL_REQUIRES_THREADING_CALLBACKS],,
|
|
|
|
[Whether OpenSSL requires explicit threading callbacks for threadsafety])])
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
fi
|
2013-07-22 02:56:03 +00:00
|
|
|
fi
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_SSL], [test "x${have_ssl}" = "xyes"])
|
2013-07-22 02:56:03 +00:00
|
|
|
AC_SUBST(SSL_LIBS)
|
|
|
|
|
2017-06-12 21:27:22 +00:00
|
|
|
#
|
|
|
|
# Winsock
|
|
|
|
#
|
|
|
|
|
|
|
|
have_winsock=disabled
|
|
|
|
WINSOCK_LIBS=
|
|
|
|
AC_ARG_WITH([winsock],
|
|
|
|
[AS_HELP_STRING([--with-winsock],
|
|
|
|
[support Windows Sockets API @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_winsock=check])
|
|
|
|
|
|
|
|
if test "x$with_winsock" != "xno"
|
|
|
|
then
|
|
|
|
have_winsock=yes
|
|
|
|
AC_CHECK_LIB([wsock32], [main],
|
|
|
|
[WINSOCK_LIBS="-lwsock32"]
|
|
|
|
[AC_DEFINE([ENABLE_WINSOCK],,
|
|
|
|
[Whether Windows Socket API support is enabled])],
|
|
|
|
[have_winsock=no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_WINSOCK], [test "x${have_winsock}" = "xyes"])
|
|
|
|
AC_SUBST(WINSOCK_LIBS)
|
2013-07-22 02:56:03 +00:00
|
|
|
|
2013-06-05 17:45:07 +00:00
|
|
|
#
|
|
|
|
# Ogg Vorbis
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
have_vorbis=disabled
|
2013-06-05 17:45:07 +00:00
|
|
|
VORBIS_LIBS=
|
2014-08-12 21:37:48 +00:00
|
|
|
AC_ARG_WITH([vorbis],
|
|
|
|
[AS_HELP_STRING([--with-vorbis],
|
|
|
|
[support Ogg Vorbis @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_vorbis=check])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
if test "x$with_vorbis" != "xno"
|
2013-07-02 19:14:19 +00:00
|
|
|
then
|
2014-08-12 21:37:48 +00:00
|
|
|
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([
|
2013-07-02 19:14:19 +00:00
|
|
|
--------------------------------------------
|
2013-07-09 08:14:29 +00:00
|
|
|
Unable to find libogg / libvorbis / libvorbisenc.
|
2013-07-02 19:14:19 +00:00
|
|
|
Sound will not be encoded with Ogg Vorbis.
|
|
|
|
--------------------------------------------])
|
2014-08-12 21:37:48 +00:00
|
|
|
else
|
|
|
|
AC_DEFINE([ENABLE_OGG],,
|
|
|
|
[Whether support for Ogg Vorbis is enabled])
|
|
|
|
fi
|
2013-07-02 19:14:19 +00:00
|
|
|
fi
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_OGG], [test "x${have_vorbis}" = "xyes"])
|
2013-06-12 05:41:23 +00:00
|
|
|
AC_SUBST(VORBIS_LIBS)
|
|
|
|
|
2013-08-09 00:14:17 +00:00
|
|
|
#
|
|
|
|
# PulseAudio
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
have_pulse=disabled
|
2013-08-09 00:14:17 +00:00
|
|
|
PULSE_LIBS=
|
2014-08-12 21:37:48 +00:00
|
|
|
AC_ARG_WITH([pulse],
|
|
|
|
[AS_HELP_STRING([--with-pulse],
|
|
|
|
[support PulseAudio @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_pulse=check])
|
2013-08-09 00:14:17 +00:00
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
if test "x$with_pulse" != "xno"
|
2013-08-09 00:14:17 +00:00
|
|
|
then
|
2014-08-12 21:37:48 +00:00
|
|
|
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([
|
2013-08-09 00:14:17 +00:00
|
|
|
--------------------------------------------
|
2013-08-09 22:16:59 +00:00
|
|
|
Unable to find libpulse
|
2013-08-09 00:14:17 +00:00
|
|
|
Sound support for VNC will be disabled
|
|
|
|
--------------------------------------------])
|
2014-08-12 21:37:48 +00:00
|
|
|
else
|
|
|
|
AC_DEFINE([ENABLE_PULSE],, [Whether PulseAudio support is enabled])
|
|
|
|
fi
|
2013-08-09 00:14:17 +00:00
|
|
|
fi
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_PULSE], [test "x${have_pulse}" = "xyes"])
|
2013-08-09 00:14:17 +00:00
|
|
|
AC_SUBST(PULSE_LIBS)
|
|
|
|
|
2013-06-12 18:47:44 +00:00
|
|
|
#
|
|
|
|
# PANGO
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
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
|
2013-06-12 18:47:44 +00:00
|
|
|
|
2014-05-05 22:35:37 +00:00
|
|
|
#
|
|
|
|
# Terminal emulator
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
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"
|
2014-05-05 22:35:37 +00:00
|
|
|
then
|
2014-08-12 21:37:48 +00:00
|
|
|
have_terminal=yes
|
2018-02-07 04:21:14 +00:00
|
|
|
if test "x${have_pango}" != "xyes"
|
2014-08-12 21:37:48 +00:00
|
|
|
then
|
|
|
|
have_terminal=no
|
|
|
|
fi
|
2014-05-05 22:35:37 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_TERMINAL], [test "x${have_terminal}" = "xyes"])
|
|
|
|
|
2013-06-05 17:45:07 +00:00
|
|
|
#
|
|
|
|
# libVNCServer
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
have_libvncserver=disabled
|
2013-06-05 17:45:07 +00:00
|
|
|
VNC_LIBS=
|
2014-08-12 21:37:48 +00:00
|
|
|
AC_ARG_WITH([vnc],
|
|
|
|
[AS_HELP_STRING([--with-vnc],
|
|
|
|
[support VNC @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_vnc=check])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
if test "x$with_vnc" != "xno"
|
|
|
|
then
|
|
|
|
have_libvncserver=yes
|
|
|
|
AC_CHECK_LIB([vncclient], [rfbInitClient], [VNC_LIBS="$VNC_LIBS -lvncclient"], [have_libvncserver=no])
|
|
|
|
fi
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_VNC], [test "x${have_libvncserver}" = "xyes"])
|
2013-06-12 05:41:23 +00:00
|
|
|
AC_SUBST(VNC_LIBS)
|
|
|
|
|
2013-07-08 20:03:04 +00:00
|
|
|
#
|
|
|
|
# Repeater support within libVNCServer
|
|
|
|
#
|
|
|
|
|
|
|
|
if test "x${have_libvncserver}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
have_vnc_repeater=yes
|
|
|
|
AC_CHECK_MEMBERS([rfbClient.destHost, rfbClient.destPort],
|
|
|
|
[], [have_vnc_repeater=no],
|
2013-07-18 18:35:40 +00:00
|
|
|
[[#include <rfb/rfbclient.h>]])
|
2013-07-08 20:03:04 +00:00
|
|
|
|
|
|
|
if test "x${have_vnc_repeater}" = "xno"
|
|
|
|
then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
--------------------------------------------
|
|
|
|
No repeater support found in libvncclient.
|
|
|
|
Support for VNC repeaters will not be built.
|
|
|
|
--------------------------------------------])
|
|
|
|
else
|
2014-01-01 22:44:28 +00:00
|
|
|
AC_DEFINE([ENABLE_VNC_REPEATER],,
|
|
|
|
[Whether support for VNC repeaters is enabled.])
|
2013-07-08 20:03:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2013-10-26 00:49:22 +00:00
|
|
|
#
|
|
|
|
# Listening support within libVNCServer
|
|
|
|
#
|
|
|
|
|
|
|
|
if test "x${have_libvncserver}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
have_vnc_listen=yes
|
|
|
|
AC_CHECK_DECL([listenForIncomingConnectionsNoFork],
|
|
|
|
[], [have_vnc_listen=no],
|
|
|
|
[[#include <rfb/rfbclient.h>]])
|
|
|
|
|
|
|
|
if test "x${have_vnc_listen}" = "xno"
|
|
|
|
then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
--------------------------------------------
|
|
|
|
No listening support found in libvncclient.
|
|
|
|
Support for listen-mode connections will not be built.
|
|
|
|
--------------------------------------------])
|
|
|
|
else
|
2014-01-01 22:44:28 +00:00
|
|
|
AC_DEFINE([ENABLE_VNC_LISTEN],,
|
|
|
|
[Whether support for listen-mode VNC connections is enabled.])
|
2013-10-26 00:49:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2013-06-05 17:45:07 +00:00
|
|
|
#
|
2019-10-11 23:42:30 +00:00
|
|
|
# FreeRDP 2 (libfreerdp2, libfreerdp-client2, and libwinpr2)
|
2013-06-05 17:45:07 +00:00
|
|
|
#
|
|
|
|
|
2019-09-21 19:25:06 +00:00
|
|
|
have_freerdp2=disabled
|
2020-01-16 19:57:14 +00:00
|
|
|
FREERDP2_PLUGIN_DIR=
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
AC_ARG_WITH([rdp],
|
|
|
|
[AS_HELP_STRING([--with-rdp],
|
|
|
|
[support RDP @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_rdp=check])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2020-01-16 19:57:14 +00:00
|
|
|
# FreeRDP plugin directory
|
|
|
|
AC_ARG_WITH(freerdp_plugin_dir,
|
|
|
|
[AS_HELP_STRING([--with-freerdp-plugin-dir=<path>],
|
|
|
|
[install FreeRDP plugins to the given directory @<:@default=check@:>@])
|
|
|
|
],FREERDP2_PLUGIN_DIR=$withval)
|
|
|
|
|
2020-01-14 02:17:32 +00:00
|
|
|
# Preserve CPPFLAGS so it can be restored later, following the addition of
|
|
|
|
# options specific to FreeRDP tests
|
|
|
|
OLDCPPFLAGS="$CPPFLAGS"
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
if test "x$with_rdp" != "xno"
|
|
|
|
then
|
2019-09-21 19:25:06 +00:00
|
|
|
have_freerdp2=yes
|
2020-01-13 23:42:27 +00:00
|
|
|
PKG_CHECK_MODULES([RDP], [freerdp2 freerdp-client2 winpr2],
|
2020-01-16 05:52:41 +00:00
|
|
|
[CPPFLAGS="${RDP_CFLAGS} -Werror $CPPFLAGS"]
|
2020-01-16 19:57:14 +00:00
|
|
|
[AS_IF([test "x${FREERDP2_PLUGIN_DIR}" = "x"],
|
|
|
|
[FREERDP2_PLUGIN_DIR="`$PKG_CONFIG --variable=libdir freerdp2`/freerdp2"])],
|
2019-10-11 23:42:30 +00:00
|
|
|
[AC_MSG_WARN([
|
2013-07-19 04:38:07 +00:00
|
|
|
--------------------------------------------
|
2019-10-11 23:42:30 +00:00
|
|
|
Unable to find FreeRDP (libfreerdp2 / libfreerdp-client2 / libwinpr2)
|
2013-07-19 04:38:07 +00:00
|
|
|
RDP will be disabled.
|
|
|
|
--------------------------------------------])
|
2019-10-11 23:42:30 +00:00
|
|
|
have_freerdp2=no])
|
2013-07-18 18:54:22 +00:00
|
|
|
fi
|
|
|
|
|
2020-01-13 23:42:27 +00:00
|
|
|
# Available color conversion functions
|
|
|
|
if test "x$have_freerdp2" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
# FreeRDP 2.0.0-rc3 and older referred to FreeRDPConvertColor() as
|
|
|
|
# ConvertColor()
|
|
|
|
AC_CHECK_DECL([FreeRDPConvertColor],
|
|
|
|
[AC_DEFINE([HAVE_FREERDPCONVERTCOLOR],,
|
|
|
|
[Whether FreeRDPConvertColor() is defined])],,
|
|
|
|
[#include <freerdp/codec/color.h>])
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2020-01-21 22:53:57 +00:00
|
|
|
# Variation in memory internal allocation/free behavior
|
|
|
|
if test "x${have_freerdp2}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
# FreeRDP 2.0.0-rc0 and older automatically free rdpBitmap and its
|
|
|
|
# associated data member within Bitmap_Free(), relying on the
|
|
|
|
# implementation-specific free handler to free only implementation-specific
|
|
|
|
# data. This changed in commit 2cf10cc, and implementations must now
|
|
|
|
# manually free all data associated with the rdpBitmap, even data which
|
|
|
|
# was not allocated by the implementation.
|
|
|
|
AC_MSG_CHECKING([whether Bitmap_Free() frees the rdpBitmap and its image data])
|
2020-01-22 06:26:28 +00:00
|
|
|
AC_EGREP_CPP([\"2\\.0\\.0-dev\"], [
|
2020-01-21 22:53:57 +00:00
|
|
|
|
|
|
|
#include <freerdp/version.h>
|
2020-01-22 01:00:44 +00:00
|
|
|
FREERDP_VERSION_FULL
|
2020-01-21 22:53:57 +00:00
|
|
|
|
2020-01-22 01:00:44 +00:00
|
|
|
],
|
2020-01-21 22:53:57 +00:00
|
|
|
[AC_MSG_RESULT([yes])]
|
|
|
|
[AC_DEFINE([FREERDP_BITMAP_FREE_FREES_BITMAP],,
|
|
|
|
[Whether Bitmap_Free() frees the rdpBitmap and its image data])],
|
2020-01-22 01:00:44 +00:00
|
|
|
[AC_MSG_RESULT([no])])
|
2020-01-21 22:53:57 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
2020-01-14 00:09:44 +00:00
|
|
|
# Glyph callback variants
|
|
|
|
if test "x${have_freerdp2}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
# FreeRDP 2.0.0-rc3 and older used UINT32 for integer parameters to all
|
|
|
|
# rdpGlyph callbacks
|
|
|
|
AC_MSG_CHECKING([whether rdpGlyph callbacks accept INT32 integer parameters])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
|
|
|
|
|
|
#include <freerdp/freerdp.h>
|
|
|
|
#include <freerdp/graphics.h>
|
|
|
|
#include <winpr/wtypes.h>
|
|
|
|
|
|
|
|
BOOL test_begindraw(rdpContext* context, INT32 x, INT32 y,
|
|
|
|
INT32 width, INT32 height, UINT32 fgcolor, UINT32 bgcolor,
|
|
|
|
BOOL redundant);
|
|
|
|
|
|
|
|
rdpGlyph glyph = {
|
|
|
|
.BeginDraw = test_begindraw
|
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
return (int) glyph.BeginDraw(NULL, 0, 0, 0, 0, 0, 0, FALSE);
|
|
|
|
}
|
|
|
|
|
|
|
|
]])],
|
|
|
|
[AC_MSG_RESULT([yes])]
|
|
|
|
[AC_DEFINE([FREERDP_GLYPH_CALLBACKS_ACCEPT_INT32],,
|
|
|
|
[Whether rdpGlyph callbacks accept INT32 integer parameters])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2020-01-14 00:22:50 +00:00
|
|
|
# CLIPRDR callback variants
|
|
|
|
if test "x${have_freerdp2}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
# FreeRDP 2.0.0-rc3 and older did not use const for CLIPRDR callbacks
|
|
|
|
AC_MSG_CHECKING([whether CLIPRDR callbacks require const for their final parameter])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
|
|
|
|
|
|
#include <freerdp/client/cliprdr.h>
|
|
|
|
#include <winpr/wtypes.h>
|
|
|
|
|
|
|
|
UINT test_monitor_ready(CliprdrClientContext* cliprdr,
|
|
|
|
const CLIPRDR_MONITOR_READY* monitor_ready);
|
|
|
|
|
|
|
|
CliprdrClientContext context = {
|
|
|
|
.MonitorReady = test_monitor_ready
|
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
return (int) context.MonitorReady(NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
]])],
|
|
|
|
[AC_MSG_RESULT([yes])]
|
|
|
|
[AC_DEFINE([FREERDP_CLIPRDR_CALLBACKS_REQUIRE_CONST],,
|
|
|
|
[Whether CLIPRDR callbacks require const for the final parameter])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2020-01-14 00:32:38 +00:00
|
|
|
# RAIL callback variants
|
|
|
|
if test "x${have_freerdp2}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
# FreeRDP 2.0.0-rc3 and older did not use const for RAIL callbacks
|
|
|
|
AC_MSG_CHECKING([whether RAIL callbacks require const for their final parameter])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
|
|
|
|
|
|
#include <freerdp/client/rail.h>
|
|
|
|
#include <winpr/wtypes.h>
|
|
|
|
|
|
|
|
UINT test_server_handshake(RailClientContext* rail,
|
|
|
|
const RAIL_HANDSHAKE_ORDER* handshake);
|
|
|
|
|
|
|
|
RailClientContext context = {
|
|
|
|
.ServerHandshake = test_server_handshake
|
|
|
|
};
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
return (int) context.ServerHandshake(NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
]])],
|
|
|
|
[AC_MSG_RESULT([yes])]
|
|
|
|
[AC_DEFINE([FREERDP_RAIL_CALLBACKS_REQUIRE_CONST],,
|
|
|
|
[Whether RAIL callbacks require const for the final parameter])],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2020-01-14 02:17:32 +00:00
|
|
|
# Restore CPPFLAGS, removing FreeRDP-specific options needed for testing
|
|
|
|
CPPFLAGS="$OLDCPPFLAGS"
|
|
|
|
|
2020-01-16 05:52:41 +00:00
|
|
|
AC_SUBST(FREERDP2_PLUGIN_DIR)
|
2019-09-21 19:25:06 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp2}" = "xyes"])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
|
|
|
#
|
2013-12-01 23:08:42 +00:00
|
|
|
# libssh2
|
2013-06-05 17:45:07 +00:00
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
have_libssh2=disabled
|
2013-06-05 17:45:07 +00:00
|
|
|
SSH_LIBS=
|
2014-08-12 21:37:48 +00:00
|
|
|
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
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2015-07-08 00:02:13 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_COMMON_SSH], [test "x${have_libssh2}" = "xyes" \
|
|
|
|
-a "x${have_ssl}" = "xyes"])
|
2015-07-11 03:39:33 +00:00
|
|
|
AM_COND_IF([ENABLE_COMMON_SSH],
|
|
|
|
[AC_DEFINE([ENABLE_COMMON_SSH],,
|
|
|
|
[Whether support for the common SSH core is enabled])])
|
2015-07-08 00:02:13 +00:00
|
|
|
|
2014-05-05 22:35:37 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh2}" = "xyes" \
|
|
|
|
-a "x${have_terminal}" = "xyes" \
|
|
|
|
-a "x${have_ssl}" = "xyes"])
|
2013-06-05 17:45:07 +00:00
|
|
|
|
2013-06-12 05:41:23 +00:00
|
|
|
AC_SUBST(SSH_LIBS)
|
|
|
|
|
2014-07-21 17:27:39 +00:00
|
|
|
#
|
|
|
|
# Underlying crypto library usage of libssh2
|
|
|
|
#
|
|
|
|
|
|
|
|
if test "x${have_libssh2}" = "xyes"
|
|
|
|
then
|
|
|
|
|
|
|
|
# Whether libssh2 was built against libgcrypt
|
|
|
|
AC_CHECK_LIB([ssh2], [gcry_control],
|
|
|
|
[AC_CHECK_HEADER(gcrypt.h,
|
|
|
|
[AC_DEFINE([LIBSSH2_USES_GCRYPT],,
|
|
|
|
[Whether libssh2 was built against libgcrypt])],
|
|
|
|
[AC_MSG_WARN([
|
|
|
|
--------------------------------------------
|
|
|
|
libssh2 appears to be built against libgcrypt, but the libgcrypt headers
|
|
|
|
could not be found. SSH will be disabled.
|
|
|
|
--------------------------------------------])
|
|
|
|
have_libssh2=no])])
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2013-12-02 01:05:55 +00:00
|
|
|
#
|
|
|
|
# Agent forwarding support within libssh2
|
|
|
|
#
|
|
|
|
|
2014-01-04 02:33:54 +00:00
|
|
|
have_ssh_agent=no
|
|
|
|
if test "x${have_libssh2}" = "xyes" -a "x${enable_ssh_agent}" = "xyes"
|
2013-12-02 01:05:55 +00:00
|
|
|
then
|
|
|
|
|
|
|
|
AC_CHECK_DECL([libssh2_channel_request_auth_agent],
|
2014-01-04 02:33:54 +00:00
|
|
|
[have_ssh_agent=yes], [],
|
2013-12-02 01:05:55 +00:00
|
|
|
[[#include <libssh2.h>]])
|
|
|
|
|
2014-01-04 02:33:54 +00:00
|
|
|
if test "x${have_ssh_agent}" = "xno"
|
2013-12-02 01:05:55 +00:00
|
|
|
then
|
2014-01-04 02:33:54 +00:00
|
|
|
AC_MSG_ERROR([
|
|
|
|
--------------------------------------------
|
|
|
|
Agent forwarding support was requested but no such support was found
|
|
|
|
in libssh2.
|
|
|
|
--------------------------------------------])
|
|
|
|
else
|
|
|
|
AC_DEFINE([ENABLE_SSH_AGENT],,
|
|
|
|
[Whether agent forwarding support for SSH is enabled])
|
2013-12-02 01:05:55 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
2014-01-04 02:33:54 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_SSH_AGENT],
|
|
|
|
[test "x${have_ssh_agent}" = "xyes" \
|
|
|
|
-a "x${enable_ssh_agent}" = "xyes"])
|
2013-12-02 01:05:55 +00:00
|
|
|
|
2014-05-07 18:32:19 +00:00
|
|
|
#
|
|
|
|
# libtelnet
|
|
|
|
#
|
|
|
|
|
2014-08-12 21:37:48 +00:00
|
|
|
have_libtelnet=disabled
|
2014-05-07 22:36:35 +00:00
|
|
|
TELNET_LIBS=
|
2014-08-12 21:37:48 +00:00
|
|
|
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
|
2014-05-07 18:32:19 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_TELNET], [test "x${have_libtelnet}" = "xyes" \
|
2014-05-07 22:39:00 +00:00
|
|
|
-a "x${have_terminal}" = "xyes"])
|
2014-05-07 18:32:19 +00:00
|
|
|
|
|
|
|
AC_SUBST(TELNET_LIBS)
|
|
|
|
|
2015-09-21 01:12:41 +00:00
|
|
|
#
|
|
|
|
# libwebp
|
|
|
|
#
|
|
|
|
|
|
|
|
have_webp=disabled
|
|
|
|
WEBP_LIBS=
|
|
|
|
AC_ARG_WITH([webp],
|
|
|
|
[AS_HELP_STRING([--with-webp],
|
|
|
|
[support WebP image encoding @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_webp=check])
|
|
|
|
|
|
|
|
if test "x$with_webp" != "xno"
|
|
|
|
then
|
|
|
|
have_webp=yes
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(webp/encode.h,, [have_webp=no])
|
|
|
|
AC_CHECK_LIB([webp], [WebPEncode], [WEBP_LIBS="$WEBP_LIBS -lwebp"], [have_webp=no])
|
|
|
|
|
|
|
|
if test "x${have_webp}" = "xno"
|
|
|
|
then
|
|
|
|
AC_MSG_WARN([
|
|
|
|
--------------------------------------------
|
|
|
|
Unable to find libwebp.
|
2015-09-21 01:24:34 +00:00
|
|
|
Images will not be encoded using WebP.
|
2015-09-21 01:12:41 +00:00
|
|
|
--------------------------------------------])
|
|
|
|
else
|
|
|
|
AC_DEFINE([ENABLE_WEBP],, [Whether WebP support is enabled])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_WEBP], [test "x${have_webp}" = "xyes"])
|
|
|
|
AC_SUBST(WEBP_LIBS)
|
|
|
|
|
2018-09-10 03:03:40 +00:00
|
|
|
#
|
|
|
|
# libwebsockets
|
|
|
|
#
|
|
|
|
|
|
|
|
have_libwebsockets=disabled
|
|
|
|
WEBSOCKETS_LIBS=
|
|
|
|
AC_ARG_WITH([websockets],
|
|
|
|
[AS_HELP_STRING([--with-websockets],
|
|
|
|
[support WebSockets @<:@default=check@:>@])],
|
|
|
|
[],
|
|
|
|
[with_websockets=check])
|
|
|
|
|
|
|
|
if test "x$with_websockets" != "xno"
|
|
|
|
then
|
|
|
|
have_libwebsockets=yes
|
|
|
|
AC_CHECK_LIB([websockets],
|
|
|
|
[lws_create_context],
|
|
|
|
[WEBSOCKETS_LIBS="$WEBSOCKETS_LIBS -lwebsockets"],
|
2018-09-11 03:09:36 +00:00
|
|
|
[AC_MSG_WARN([
|
|
|
|
--------------------------------------------
|
|
|
|
Unable to find libwebsockets.
|
|
|
|
Support for Kubernetes will be disabled.
|
|
|
|
--------------------------------------------])
|
|
|
|
have_libwebsockets=no])
|
2018-09-10 03:03:40 +00:00
|
|
|
fi
|
|
|
|
|
2018-09-11 03:00:44 +00:00
|
|
|
if test "x$with_websockets" != "xno"
|
|
|
|
then
|
2018-09-27 04:50:19 +00:00
|
|
|
|
|
|
|
# Check for client-specific closed event, which must be used in favor of
|
|
|
|
# the generic closed event if libwebsockets is recent enough to provide
|
|
|
|
# this
|
2018-09-11 03:00:44 +00:00
|
|
|
AC_CHECK_DECL([LWS_CALLBACK_CLIENT_CLOSED],
|
|
|
|
[AC_DEFINE([HAVE_LWS_CALLBACK_CLIENT_CLOSED],,
|
|
|
|
[Whether LWS_CALLBACK_CLIENT_CLOSED is defined])],,
|
|
|
|
[#include <libwebsockets.h>])
|
2018-09-27 04:50:19 +00:00
|
|
|
|
|
|
|
# Older versions of libwebsockets may not define a flag for requesting
|
|
|
|
# global initialization of OpenSSL, instead performing that initialization
|
|
|
|
# by default
|
|
|
|
AC_CHECK_DECL([LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT],
|
|
|
|
[AC_DEFINE([HAVE_LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT],,
|
|
|
|
[Whether LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT is defined])],,
|
|
|
|
[#include <libwebsockets.h>])
|
|
|
|
|
|
|
|
# Older versions of libwebsockets do not define special macros for SSL
|
|
|
|
# connection flags, instead relying on documented integer values
|
|
|
|
AC_CHECK_DECL([LCCSCF_USE_SSL],
|
|
|
|
[AC_DEFINE([HAVE_LCCSCF_USE_SSL],,
|
|
|
|
[Whether LCCSCF_USE_SSL is defined])],,
|
|
|
|
[#include <libwebsockets.h>])
|
|
|
|
|
2018-09-27 04:51:07 +00:00
|
|
|
# Older versions of libwebsockets do not define a dummy callback which
|
|
|
|
# must be invoked after the main event callback is invoked; the main event
|
|
|
|
# callback must instead manually return zero
|
|
|
|
AC_CHECK_DECL([lws_callback_http_dummy],
|
|
|
|
[AC_DEFINE([HAVE_LWS_CALLBACK_HTTP_DUMMY],,
|
|
|
|
[Whether lws_callback_http_dummy() is defined])],,
|
|
|
|
[#include <libwebsockets.h>])
|
|
|
|
|
2018-09-11 03:00:44 +00:00
|
|
|
fi
|
|
|
|
|
2018-09-10 03:03:40 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_WEBSOCKETS],
|
|
|
|
[test "x${have_libwebsockets}" = "xyes"])
|
|
|
|
|
|
|
|
AC_SUBST(WEBSOCKETS_LIBS)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Kubernetes
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([kubernetes],
|
|
|
|
[AS_HELP_STRING([--disable-kubernetes],
|
|
|
|
[do not build support for attaching to Kubernetes pods])],
|
|
|
|
[],
|
|
|
|
[enable_kubernetes=yes])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_KUBERNETES], [test "x${enable_kubernetes}" = "xyes" \
|
|
|
|
-a "x${have_libwebsockets}" = "xyes" \
|
2018-09-11 10:03:17 +00:00
|
|
|
-a "x${have_ssl}" = "xyes" \
|
2018-09-10 03:03:40 +00:00
|
|
|
-a "x${have_terminal}" = "xyes"])
|
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
#
|
|
|
|
# guacd
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([guacd],
|
|
|
|
[AS_HELP_STRING([--disable-guacd],
|
|
|
|
[do not build the Guacamole proxy daemon])],
|
|
|
|
[],
|
|
|
|
[enable_guacd=yes])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_GUACD], [test "x${enable_guacd}" = "xyes"])
|
|
|
|
|
|
|
|
#
|
|
|
|
# guacenc
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([guacenc],
|
|
|
|
[AS_HELP_STRING([--disable-guacenc],
|
|
|
|
[do not build the Guacamole video encoding tool])],
|
|
|
|
[],
|
|
|
|
[enable_guacenc=yes])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_GUACENC], [test "x${enable_guacenc}" = "xyes" \
|
2016-03-11 20:28:21 +00:00
|
|
|
-a "x${have_libavcodec}" = "xyes" \
|
2016-03-12 01:42:49 +00:00
|
|
|
-a "x${have_libavutil}" = "xyes" \
|
|
|
|
-a "x${have_libswscale}" = "xyes"])
|
2016-03-09 23:43:57 +00:00
|
|
|
|
2017-11-26 23:44:03 +00:00
|
|
|
#
|
|
|
|
# guaclog
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([guaclog],
|
|
|
|
[AS_HELP_STRING([--disable-guaclog],
|
|
|
|
[do not build the Guacamole input logging tool])],
|
|
|
|
[],
|
|
|
|
[enable_guaclog=yes])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_GUACLOG], [test "x${enable_guaclog}" = "xyes"])
|
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
#
|
|
|
|
# Output Makefiles
|
|
|
|
#
|
2014-05-07 18:32:19 +00:00
|
|
|
|
2013-06-05 18:50:48 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2017-12-06 08:34:47 +00:00
|
|
|
doc/Doxyfile
|
2014-01-06 23:53:22 +00:00
|
|
|
src/common/Makefile
|
2018-11-13 21:26:43 +00:00
|
|
|
src/common/tests/Makefile
|
2015-07-08 00:02:13 +00:00
|
|
|
src/common-ssh/Makefile
|
2019-04-07 20:41:24 +00:00
|
|
|
src/common-ssh/tests/Makefile
|
2014-05-05 22:35:37 +00:00
|
|
|
src/terminal/Makefile
|
2013-06-05 18:50:48 +00:00
|
|
|
src/libguac/Makefile
|
2018-11-13 21:26:43 +00:00
|
|
|
src/libguac/tests/Makefile
|
2013-06-05 19:05:39 +00:00
|
|
|
src/guacd/Makefile
|
2017-12-06 08:44:34 +00:00
|
|
|
src/guacd/man/guacd.8
|
|
|
|
src/guacd/man/guacd.conf.5
|
2016-02-26 23:04:30 +00:00
|
|
|
src/guacenc/Makefile
|
2017-12-06 08:44:34 +00:00
|
|
|
src/guacenc/man/guacenc.1
|
2017-11-26 23:44:03 +00:00
|
|
|
src/guaclog/Makefile
|
|
|
|
src/guaclog/man/guaclog.1
|
2016-12-25 09:13:40 +00:00
|
|
|
src/pulse/Makefile
|
2018-09-10 03:03:40 +00:00
|
|
|
src/protocols/kubernetes/Makefile
|
2013-06-05 19:05:39 +00:00
|
|
|
src/protocols/rdp/Makefile
|
2019-04-07 20:55:15 +00:00
|
|
|
src/protocols/rdp/tests/Makefile
|
2013-06-05 19:05:39 +00:00
|
|
|
src/protocols/ssh/Makefile
|
2014-05-07 18:32:19 +00:00
|
|
|
src/protocols/telnet/Makefile
|
2013-06-05 19:05:39 +00:00
|
|
|
src/protocols/vnc/Makefile])
|
2010-12-08 21:14:04 +00:00
|
|
|
AC_OUTPUT
|
2013-06-04 23:29:31 +00:00
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
#
|
|
|
|
# Protocol build status
|
|
|
|
#
|
|
|
|
|
2018-09-10 03:03:40 +00:00
|
|
|
AM_COND_IF([ENABLE_KUBERNETES], [build_kubernetes=yes], [build_kubernetes=no])
|
|
|
|
AM_COND_IF([ENABLE_RDP], [build_rdp=yes], [build_rdp=no])
|
|
|
|
AM_COND_IF([ENABLE_SSH], [build_ssh=yes], [build_ssh=no])
|
|
|
|
AM_COND_IF([ENABLE_TELNET], [build_telnet=yes], [build_telnet=no])
|
|
|
|
AM_COND_IF([ENABLE_VNC], [build_vnc=yes], [build_vnc=no])
|
2013-07-08 17:35:56 +00:00
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
#
|
|
|
|
# Service / tool build status
|
|
|
|
#
|
|
|
|
|
|
|
|
AM_COND_IF([ENABLE_GUACD], [build_guacd=yes], [build_guacd=no])
|
|
|
|
AM_COND_IF([ENABLE_GUACENC], [build_guacenc=yes], [build_guacenc=no])
|
2017-11-26 23:44:03 +00:00
|
|
|
AM_COND_IF([ENABLE_GUACLOG], [build_guaclog=yes], [build_guaclog=no])
|
2016-03-09 23:43:57 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Init scripts
|
|
|
|
#
|
|
|
|
|
2013-07-08 17:35:56 +00:00
|
|
|
AM_COND_IF([ENABLE_INIT], [build_init="${init_dir}"], [build_init=no])
|
2013-06-12 18:47:44 +00:00
|
|
|
|
2018-03-15 10:52:41 +00:00
|
|
|
#
|
|
|
|
# Systemd units
|
|
|
|
#
|
|
|
|
|
|
|
|
AM_COND_IF([ENABLE_SYSTEMD], [build_systemd="${systemd_dir}"], [build_systemd=no])
|
|
|
|
|
2020-01-16 05:52:41 +00:00
|
|
|
#
|
|
|
|
# FreeRDP plugins
|
|
|
|
#
|
|
|
|
|
|
|
|
AM_COND_IF([ENABLE_RDP], [build_rdp_plugins="${FREERDP2_PLUGIN_DIR}"], [build_rdp_plugins=no])
|
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
#
|
|
|
|
# Display summary
|
|
|
|
#
|
|
|
|
|
2013-06-05 22:18:53 +00:00
|
|
|
echo "
|
|
|
|
------------------------------------------------
|
|
|
|
$PACKAGE_NAME version $PACKAGE_VERSION
|
|
|
|
------------------------------------------------
|
|
|
|
|
2013-06-12 18:47:44 +00:00
|
|
|
Library status:
|
|
|
|
|
2019-09-21 19:25:06 +00:00
|
|
|
freerdp2 ............ ${have_freerdp2}
|
2013-06-12 18:47:44 +00:00
|
|
|
pango ............... ${have_pango}
|
2016-03-09 23:43:57 +00:00
|
|
|
libavcodec .......... ${have_libavcodec}
|
2016-03-11 20:28:21 +00:00
|
|
|
libavutil ........... ${have_libavutil}
|
2013-12-01 23:08:42 +00:00
|
|
|
libssh2 ............. ${have_libssh2}
|
2013-07-22 02:56:03 +00:00
|
|
|
libssl .............. ${have_ssl}
|
2016-03-12 01:42:49 +00:00
|
|
|
libswscale .......... ${have_libswscale}
|
2014-05-07 18:32:19 +00:00
|
|
|
libtelnet ........... ${have_libtelnet}
|
2013-06-12 18:47:44 +00:00
|
|
|
libVNCServer ........ ${have_libvncserver}
|
2013-07-09 07:58:14 +00:00
|
|
|
libvorbis ........... ${have_vorbis}
|
2013-08-09 22:16:59 +00:00
|
|
|
libpulse ............ ${have_pulse}
|
2018-09-11 03:09:36 +00:00
|
|
|
libwebsockets ....... ${have_libwebsockets}
|
2015-09-21 01:12:41 +00:00
|
|
|
libwebp ............. ${have_webp}
|
2017-06-12 21:27:22 +00:00
|
|
|
wsock32 ............. ${have_winsock}
|
2013-06-12 18:47:44 +00:00
|
|
|
|
2013-06-05 22:18:53 +00:00
|
|
|
Protocol support:
|
|
|
|
|
2018-09-10 03:03:40 +00:00
|
|
|
Kubernetes .... ${build_kubernetes}
|
|
|
|
RDP ........... ${build_rdp}
|
|
|
|
SSH ........... ${build_ssh}
|
|
|
|
Telnet ........ ${build_telnet}
|
|
|
|
VNC ........... ${build_vnc}
|
2013-06-05 22:18:53 +00:00
|
|
|
|
2016-03-09 23:43:57 +00:00
|
|
|
Services / tools:
|
|
|
|
|
|
|
|
guacd ...... ${build_guacd}
|
|
|
|
guacenc .... ${build_guacenc}
|
2017-11-26 23:44:03 +00:00
|
|
|
guaclog .... ${build_guaclog}
|
2016-03-09 23:43:57 +00:00
|
|
|
|
2020-01-16 05:52:41 +00:00
|
|
|
FreeRDP plugins: ${build_rdp_plugins}
|
2013-07-08 17:35:56 +00:00
|
|
|
Init scripts: ${build_init}
|
2018-03-15 10:52:41 +00:00
|
|
|
Systemd units: ${build_systemd}
|
2013-07-08 17:35:56 +00:00
|
|
|
|
2013-06-05 22:18:53 +00:00
|
|
|
Type \"make\" to compile $PACKAGE_NAME.
|
|
|
|
"
|
|
|
|
|