summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2018-01-07 17:52:24 +0800
committerChristophe Fergeau <cfergeau@redhat.com>2018-01-08 12:24:03 +0100
commit03d3ea2fa96566dfb413c7f53854390b089f9eed (patch)
treef810139395f2000683686f06883827217c89efbd /configure.ac
parent0f588eb3fdfc17394c7d5bdf23cb1d0ea6e3c190 (diff)
build-sys: Workaround missing openssl.pc for FreeBSD
FreeBSD has OpenSSL installed in base, but .pc files are not available. We can still successfully build spice-gtk by setting SSL_CFLAGS and SSL_LIBS variables manually, but openssl will still be recorded to Requires.private field of spice-client-glib-2.0.pc, causing problems for applications using spice-gtk. To workaround the issue, we do the check again without using SSL_CFLAGS and SSL_LIBS variables and put SSL_LIBS into Libs.private field when openssl.pc cannot be found. https://bugs.freedesktop.org/show_bug.cgi?id=104524
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6101c22..2a14055 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,7 @@ dnl =========================================================================
dnl Chek optional features
SPICE_GLIB_REQUIRES=""
+SPICE_GLIB_LIBS=""
SPICE_GTK_REQUIRES=""
PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
@@ -115,7 +116,9 @@ SPICE_GLIB_REQUIRES="${SPICE_GLIB_REQUIRES} pixman-1 >= 0.17.7"
PKG_CHECK_MODULES(SSL, openssl)
-SPICE_GLIB_REQUIRES="${SPICE_GLIB_REQUIRES} openssl"
+PKG_CHECK_EXISTS(openssl,
+ [SPICE_GLIB_REQUIRES="${SPICE_GLIB_REQUIRES} openssl"],
+ [SPICE_GLIB_LIBS="${SPICE_GLIB_LIBS} ${SSL_LIBS}"])
SPICE_CHECK_SASL
@@ -588,6 +591,7 @@ AC_SUBST(SPICE_GLIB_CFLAGS)
AC_SUBST(SPICE_GTK_CFLAGS)
AC_SUBST(SPICE_GLIB_REQUIRES)
+AC_SUBST(SPICE_GLIB_LIBS)
AC_SUBST(SPICE_GTK_REQUIRES)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])