GUAC-236: Add libavcodec to guacenc build. Conditionally compile guacenc and guacd.

This commit is contained in:
Michael Jumper 2016-03-09 15:43:57 -08:00
parent 0676a7a51c
commit 09a4f4da39
3 changed files with 85 additions and 5 deletions

View File

@ -39,8 +39,6 @@ DIST_SUBDIRS = \
SUBDIRS = \
src/libguac \
src/common \
src/guacd \
src/guacenc \
tests
if ENABLE_COMMON_SSH
@ -67,6 +65,14 @@ if ENABLE_VNC
SUBDIRS += src/protocols/vnc
endif
if ENABLE_GUACD
SUBDIRS += src/guacd
endif
if ENABLE_GUACENC
SUBDIRS += src/guacenc
endif
EXTRA_DIST = \
LICENSE \
bin/guacctl \

View File

@ -146,6 +146,25 @@ AC_ARG_WITH(guacd_conf,
[guacd_conf=/etc/guacamole/guacd.conf])
AC_DEFINE_UNQUOTED([GUACD_CONF_FILE], ["$guacd_conf"], [The full path to the guacd config file])
#
# 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"])
#
# libssl
#
@ -966,6 +985,34 @@ fi
AM_CONDITIONAL([ENABLE_WEBP], [test "x${have_webp}" = "xyes"])
AC_SUBST(WEBP_LIBS)
#
# 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" \
-a "x${have_libavcodec}" = "xyes"])
#
# Output Makefiles
#
AC_CONFIG_FILES([Makefile
tests/Makefile
@ -981,13 +1028,32 @@ AC_CONFIG_FILES([Makefile
src/protocols/vnc/Makefile])
AC_OUTPUT
#
# Protocol build status
#
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])
#
# 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])
#
# Init scripts
#
AM_COND_IF([ENABLE_INIT], [build_init="${init_dir}"], [build_init=no])
#
# Display summary
#
echo "
------------------------------------------------
$PACKAGE_NAME version $PACKAGE_VERSION
@ -997,6 +1063,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION
freerdp ............. ${have_freerdp}
pango ............... ${have_pango}
libavcodec .......... ${have_libavcodec}
libssh2 ............. ${have_libssh2}
libssl .............. ${have_ssl}
libtelnet ........... ${have_libtelnet}
@ -1012,6 +1079,11 @@ $PACKAGE_NAME version $PACKAGE_VERSION
Telnet .... ${build_telnet}
VNC ....... ${build_vnc}
Services / tools:
guacd ...... ${build_guacd}
guacenc .... ${build_guacenc}
Init scripts: ${build_init}
Type \"make\" to compile $PACKAGE_NAME.

View File

@ -73,13 +73,15 @@ endif
guacenc_CFLAGS = \
-Werror -Wall -pedantic \
@AVCODEC_CFLAGS@ \
@LIBGUAC_INCLUDE@
guacenc_LDADD = \
@LIBGUAC_LTLIB@
guacenc_LDFLAGS = \
@CAIRO_LIBS@ \
@JPEG_LIBS@ \
guacenc_LDFLAGS = \
@AVCODEC_LIBS@ \
@CAIRO_LIBS@ \
@JPEG_LIBS@ \
@WEBP_LIBS@