aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-05-13 13:46:13 +0000
committerAdam Tkac <atkac@redhat.com>2010-05-13 13:46:13 +0000
commitfee65d5e7ddf80b0d02fdc2d0996cec7fc7e27e3 (patch)
treee687c008fb66b47c78f8e1baea7da5150446e288
parente1f2a52f9031f2517d5e912eddf05e8f2c98f0b8 (diff)
downloadtigervnc-fee65d5e7ddf80b0d02fdc2d0996cec7fc7e27e3.tar.gz
tigervnc-fee65d5e7ddf80b0d02fdc2d0996cec7fc7e27e3.zip
[Bugfix] Use AC_CHECK_LIB instead of pkgconfig, it is not available on OS X.
Enable gnutls by default if it is present. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4053 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--common/rdr/Makefile.am2
-rw-r--r--common/rfb/Makefile.am2
-rw-r--r--configure.ac15
3 files changed, 8 insertions, 11 deletions
diff --git a/common/rdr/Makefile.am b/common/rdr/Makefile.am
index 593b6196..ff741c8b 100644
--- a/common/rdr/Makefile.am
+++ b/common/rdr/Makefile.am
@@ -11,7 +11,7 @@ librdr_la_SOURCES = $(HDRS) Exception.cxx FdInStream.cxx FdOutStream.cxx \
TLSException.cxx TLSInStream.cxx TLSOutStream.cxx ZlibInStream.cxx \
ZlibOutStream.cxx
-librdr_la_CPPFLAGS = -I$(top_srcdir)/common @GNUTLS_CFLAGS@
+librdr_la_CPPFLAGS = -I$(top_srcdir)/common
librdr_la_LIBADD = @GNUTLS_LIBS@
if INCLUDED_ZLIB
diff --git a/common/rfb/Makefile.am b/common/rfb/Makefile.am
index 401b4317..c683fe0c 100644
--- a/common/rfb/Makefile.am
+++ b/common/rfb/Makefile.am
@@ -52,7 +52,7 @@ if HAVE_GNUTLS
librfb_la_SOURCES += $(VENCRYPT_HDRS) $(VENCRYPT_SRCS)
endif
-librfb_la_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/win @GNUTLS_CFLAGS@
+librfb_la_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/win
librfb_la_LIBADD = @GNUTLS_LIBS@
if INCLUDED_JPEG
diff --git a/configure.ac b/configure.ac
index 3a9ad926..5acd7627 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,18 +72,15 @@ dnl Check gnutls availability
AC_ARG_ENABLE([gnutls],
AS_HELP_STRING([--enable-gnutls],
[build in GNUTLS based encryption support (default yes)]),
- [enable_gnutls="$enableval"], [enable_gnutls=no])
-GNUTLS_CFLAGS=
+ [enable_gnutls="$enableval"], [enable_gnutls=yes])
GNUTLS_LIBS=
if test "x$enable_gnutls" = xyes; then
- PKG_CHECK_MODULES([gnutls], [gnutls >= 1.0.0],
- [AC_DEFINE(HAVE_GNUTLS, 1, [GNUTLS available])], [])
+ AC_CHECK_LIB([gnutls], [gnutls_global_init],
+ [GNUTLS_LIBS='-lgnutls'
+ AC_DEFINE([HAVE_GNUTLS], 1, [Is gnutls present? ])])
fi
-AC_SUBST([GNUTLS_CFLAGS], ["$gnutls_CFLAGS"])
-AC_SUBST([GNUTLS_LIBS], ["$gnutls_LIBS"])
-dnl If --enable-gnutls is passed and gnutls is not installed PKG_CHECK_MODULES
-dnl check above fails so it's safe to assume enable_gnutls == HAVE_GNUTLS
-AM_CONDITIONAL([HAVE_GNUTLS], [ test "x$enable_gnutls" = xyes ])
+AC_SUBST([GNUTLS_LIBS])
+AM_CONDITIONAL([HAVE_GNUTLS], [ ! test "x$GNUTLS_LIBS" = x ])
VNCCONFIG_DIR='vncconfig'
AC_ARG_ENABLE([vncconfig],