From ad050208b960aad6f767a7673abacc0e67d6a75c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 27 Jun 2013 11:20:10 -0700 Subject: [PATCH] Add libgs dependency, only compile guac_rdpdr if libgs found. --- configure.ac | 13 +++++ src/protocols/rdp/Makefile.am | 99 +++++++++++++++++++---------------- 2 files changed, 68 insertions(+), 44 deletions(-) diff --git a/configure.ac b/configure.ac index defb541a..faa069eb 100644 --- a/configure.ac +++ b/configure.ac @@ -103,6 +103,18 @@ have_pango=yes PKG_CHECK_MODULES([PANGO], [pango],, [have_pango=no]); PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo],, [have_pango=no]); +# +# GhostScript +# + +have_libgs=yes +GS_LIBS= + +AC_CHECK_LIB([gs], [gsapi_new_instance], [GS_LIBS="$GS_LIBS -lgs"], [have_libgs=no]) +AM_CONDITIONAL([ENABLE_GS], [test "x${have_libgs}" = "xyes"]) + +AC_SUBST(GS_LIBS) + # # libVNCServer # @@ -165,6 +177,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION freerdp ............. ${have_freerdp} pango ............... ${have_pango} + libgs ............... ${have_libgs} libssh .............. ${have_libssh} libVNCServer ........ ${have_libvncserver} libvorbisenc ........ ${have_vorbisenc} diff --git a/src/protocols/rdp/Makefile.am b/src/protocols/rdp/Makefile.am index e7795779..c9662731 100644 --- a/src/protocols/rdp/Makefile.am +++ b/src/protocols/rdp/Makefile.am @@ -40,54 +40,46 @@ ACLOCAL_AMFLAGS = -I m4 AM_CFLAGS = -Werror -Wall -Iinclude @LIBGUAC_INCLUDE@ lib_LTLIBRARIES = libguac-client-rdp.la -freerdp_LTLIBRARIES = guac_rdpsnd.la guac_rdpdr.la +freerdp_LTLIBRARIES = guac_rdpsnd.la libguac_client_rdp_la_SOURCES = \ - audio.c \ - client.c \ - default_pointer.c \ - guac_handlers.c \ - rdp_bitmap.c \ - rdp_cliprdr.c \ - rdp_gdi.c \ - rdp_glyph.c \ - rdp_keymap_base.c \ - rdp_keymap.c \ - rdp_keymap_de_de.c \ - rdp_keymap_failsafe.c \ - rdp_keymap_fr_fr.c \ - rdp_keymap_en_us.c \ - rdp_pointer.c \ - wav_encoder.c + audio.c \ + client.c \ + default_pointer.c \ + guac_handlers.c \ + rdp_bitmap.c \ + rdp_cliprdr.c \ + rdp_gdi.c \ + rdp_glyph.c \ + rdp_keymap_base.c \ + rdp_keymap.c \ + rdp_keymap_de_de.c \ + rdp_keymap_failsafe.c \ + rdp_keymap_fr_fr.c \ + rdp_keymap_en_us.c \ + rdp_pointer.c \ + wav_encoder.c guac_rdpsnd_la_SOURCES = \ - guac_rdpsnd/rdpsnd_messages.c \ - guac_rdpsnd/rdpsnd_service.c \ - audio.c - -guac_rdpdr_la_SOURCES = \ - guac_rdpdr/rdpdr_messages.c \ - guac_rdpdr/rdpdr_printer.c \ - guac_rdpdr/rdpdr_service.c + guac_rdpsnd/rdpsnd_messages.c \ + guac_rdpsnd/rdpsnd_service.c \ + audio.c noinst_HEADERS = \ - guac_rdpdr/rdpdr_messages.h \ - guac_rdpdr/rdpdr_printer.h \ - guac_rdpdr/rdpdr_service.h \ - guac_rdpsnd/rdpsnd_messages.h \ - guac_rdpsnd/rdpsnd_service.h \ - audio.h \ - client.h \ - config.h \ - default_pointer.h \ - guac_handlers.h \ - rdp_bitmap.h \ - rdp_cliprdr.h \ - rdp_gdi.h \ - rdp_glyph.h \ - rdp_keymap.h \ - rdp_pointer.h \ - wav_encoder.h + guac_rdpsnd/rdpsnd_messages.h \ + guac_rdpsnd/rdpsnd_service.h \ + audio.h \ + client.h \ + config.h \ + default_pointer.h \ + guac_handlers.h \ + rdp_bitmap.h \ + rdp_cliprdr.h \ + rdp_gdi.h \ + rdp_glyph.h \ + rdp_keymap.h \ + rdp_pointer.h \ + wav_encoder.h # Compile OGG support if available if ENABLE_OGG @@ -95,13 +87,32 @@ if ENABLE_OGG noinst_HEADERS += ogg_encoder.h endif +# Compile guac_rdpdr if PDF support available +if ENABLE_GS + + freerdp_LTLIBRARIES += guac_rdpdr.la + + guac_rdpdr_la_SOURCES = \ + guac_rdpdr/rdpdr_messages.c \ + guac_rdpdr/rdpdr_printer.c \ + guac_rdpdr/rdpdr_service.c + + + noinst_HEADERS += \ + guac_rdpdr/rdpdr_messages.h \ + guac_rdpdr/rdpdr_printer.h \ + guac_rdpdr/rdpdr_service.h + + guac_rdpdr_la_LDFLAGS = -module -avoid-version -shared @RDP_LIBS@ @PTHREAD_LIBS@ + guac_rdpdr_la_LIBADD = @LIBGUAC_LTLIB@ + +endif + libguac_client_rdp_la_LDFLAGS = -version-info 0:0:0 @RDP_LIBS@ @VORBIS_LIBS@ @PTHREAD_LIBS@ guac_rdpsnd_la_LDFLAGS = -module -avoid-version -shared @RDP_LIBS@ @VORBIS_LIBS@ @PTHREAD_LIBS@ -guac_rdpdr_la_LDFLAGS = -module -avoid-version -shared @RDP_LIBS@ @PTHREAD_LIBS@ libguac_client_rdp_la_LIBADD = @LIBGUAC_LTLIB@ guac_rdpsnd_la_LIBADD = @LIBGUAC_LTLIB@ -guac_rdpdr_la_LIBADD = @LIBGUAC_LTLIB@ freerdpdir = ${libdir}/freerdp