Do not unnecessarily link libraries.
This commit is contained in:
parent
0f609cb666
commit
2b93deaac6
29
configure.ac
29
configure.ac
@ -56,16 +56,31 @@ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h time.h sys/time.h syslo
|
|||||||
AC_DEFINE([_POSIX_C_SOURCE], [199309L], [Uses POSIX APIs])
|
AC_DEFINE([_POSIX_C_SOURCE], [199309L], [Uses POSIX APIs])
|
||||||
AC_DEFINE([_BSD_SOURCE], [], [Uses BSD APIs])
|
AC_DEFINE([_BSD_SOURCE], [], [Uses BSD APIs])
|
||||||
|
|
||||||
# Libraries
|
# libdl
|
||||||
AC_CHECK_LIB([dl], [dlopen],, AC_MSG_ERROR("libdl is required for loading client plugins"))
|
AC_CHECK_LIB([dl], [dlopen], [DL_LIBS=-lpng],
|
||||||
AC_CHECK_LIB([png], [png_write_png],, AC_MSG_ERROR("libpng is required for writing png messages"))
|
AC_MSG_ERROR("libdl is required for loading client plugins"))
|
||||||
AC_CHECK_LIB([cairo], [cairo_create],, AC_MSG_ERROR("cairo is required for drawing instructions"))
|
|
||||||
AC_CHECK_LIB([pthread], [pthread_create],
|
# libpng
|
||||||
[PTHREAD_LIBS=-lpthread
|
AC_CHECK_LIB([png], [png_write_png], [PNG_LIBS=-lpng],
|
||||||
|
AC_MSG_ERROR("libpng is required for writing png messages"))
|
||||||
|
|
||||||
|
# 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
|
||||||
AC_DEFINE([HAVE_LIBPTHREAD])])
|
AC_DEFINE([HAVE_LIBPTHREAD])])
|
||||||
AC_CHECK_LIB([cunit], [CU_run_test], [CUNIT_LIBS=-lcunit])
|
|
||||||
|
# cunit
|
||||||
|
AC_CHECK_LIB([cunit], [CU_run_test], [CUNIT_LIBS=-lcunit])
|
||||||
|
|
||||||
|
# WinSock
|
||||||
AC_CHECK_LIB([wsock32], [main])
|
AC_CHECK_LIB([wsock32], [main])
|
||||||
|
|
||||||
|
AC_SUBST(DL_LIBS)
|
||||||
|
AC_SUBST(PNG_LIBS)
|
||||||
|
AC_SUBST(CAIRO_LIBS)
|
||||||
AC_SUBST(PTHREAD_LIBS)
|
AC_SUBST(PTHREAD_LIBS)
|
||||||
AC_SUBST(CUNIT_LIBS)
|
AC_SUBST(CUNIT_LIBS)
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ man_MANS = man/guacd.8
|
|||||||
noinst_HEADERS = client.h log.h
|
noinst_HEADERS = client.h log.h
|
||||||
guacd_SOURCES = daemon.c client.c log.c
|
guacd_SOURCES = daemon.c client.c log.c
|
||||||
guacd_LDADD = @LIBGUAC_LTLIB@
|
guacd_LDADD = @LIBGUAC_LTLIB@
|
||||||
guacd_LDFLAGS = @PTHREAD_LIBS@
|
guacd_LDFLAGS = @PTHREAD_LIBS@ @DL_LIBS@
|
||||||
|
|
||||||
EXTRA_DIST = init.d/guacd.in man/guacd.8
|
EXTRA_DIST = init.d/guacd.in man/guacd.8
|
||||||
CLEANFILES = $(init_SCRIPTS)
|
CLEANFILES = $(init_SCRIPTS)
|
||||||
|
@ -74,5 +74,5 @@ libguac_la_SOURCES = \
|
|||||||
unicode.c
|
unicode.c
|
||||||
|
|
||||||
lib_LTLIBRARIES = libguac.la
|
lib_LTLIBRARIES = libguac.la
|
||||||
libguac_la_LDFLAGS = -version-info 5:0:0 @PTHREAD_LIBS@
|
libguac_la_LDFLAGS = -version-info 5:0:0 @PTHREAD_LIBS@ @CAIRO_LIBS@ @PNG_LIBS@
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ if ENABLE_OGG
|
|||||||
noinst_HEADERS += ogg_encoder.h
|
noinst_HEADERS += ogg_encoder.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libguac_client_rdp_la_LDFLAGS = -version-info 0:0:0 @RDP_LIBS@ @VORBIS_LIBS@ @PTHREAD_LIBS@
|
libguac_client_rdp_la_LDFLAGS = -version-info 0:0:0 @RDP_LIBS@ @VORBIS_LIBS@ @PTHREAD_LIBS@ @CAIRO_LIBS@
|
||||||
guac_rdpsnd_la_LDFLAGS = -module -avoid-version -shared @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@
|
guac_rdpdr_la_LDFLAGS = -module -avoid-version -shared @RDP_LIBS@ @PTHREAD_LIBS@
|
||||||
|
|
||||||
|
@ -71,6 +71,6 @@ noinst_HEADERS = \
|
|||||||
types.h
|
types.h
|
||||||
|
|
||||||
libguac_client_ssh_la_CFLAGS = -Werror -Wall -pedantic -Iinclude @PANGO_CFLAGS@ @PANGOCAIRO_CFLAGS@ @LIBGUAC_INCLUDE@
|
libguac_client_ssh_la_CFLAGS = -Werror -Wall -pedantic -Iinclude @PANGO_CFLAGS@ @PANGOCAIRO_CFLAGS@ @LIBGUAC_INCLUDE@
|
||||||
libguac_client_ssh_la_LIBADD = @PANGO_LIBS@ @PANGOCAIRO_LIBS@ @LIBGUAC_LTLIB@
|
libguac_client_ssh_la_LIBADD = @LIBGUAC_LTLIB@
|
||||||
libguac_client_ssh_la_LDFLAGS = -version-info 0:0:0 @SSH_LIBS@ @PTHREAD_LIBS@
|
libguac_client_ssh_la_LDFLAGS = -version-info 0:0:0 @SSH_LIBS@ @PTHREAD_LIBS@ @PANGO_LIBS@ @PANGOCAIRO_LIBS@ @CAIRO_LIBS@
|
||||||
|
|
||||||
|
@ -44,6 +44,6 @@ lib_LTLIBRARIES = libguac-client-vnc.la
|
|||||||
libguac_client_vnc_la_SOURCES = client.c vnc_handlers.c guac_handlers.c convert.c
|
libguac_client_vnc_la_SOURCES = client.c vnc_handlers.c guac_handlers.c convert.c
|
||||||
noinst_HEADERS = client.h vnc_handlers.h guac_handlers.h convert.h
|
noinst_HEADERS = client.h vnc_handlers.h guac_handlers.h convert.h
|
||||||
|
|
||||||
libguac_client_vnc_la_LDFLAGS = -version-info 0:0:0 @VNC_LIBS@
|
libguac_client_vnc_la_LDFLAGS = -version-info 0:0:0 @VNC_LIBS@ @CAIRO_LIBS@
|
||||||
libguac_client_vnc_la_LIBADD = @LIBGUAC_LTLIB@
|
libguac_client_vnc_la_LIBADD = @LIBGUAC_LTLIB@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user