THRIFT-3369 Provide SSL/TLS client for c_glib
Client: c_glib
Patch: Gonzalo Aguilar Delgado <gaguilar@level2crm.com>

This closes #1185
diff --git a/configure.ac b/configure.ac
index 8a15ede..09c6d9e 100755
--- a/configure.ac
+++ b/configure.ac
@@ -132,7 +132,6 @@
   with_rs="no"
 fi
 
-
 AX_THRIFT_LIB(cpp, [C++], yes)
 have_cpp=no
 if test "$with_cpp" = "yes";  then
@@ -147,8 +146,6 @@
     have_cpp="yes"
   fi
 
-  AX_CHECK_OPENSSL()
-
   AX_LIB_EVENT([1.0])
   have_libevent=$success
 
@@ -199,6 +196,12 @@
 fi
 AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"])
 
+echo "OpenSSL check"
+if test "$have_cpp" = "yes" -o "$have_c_glib" = "yes";  then
+	echo "Have cpp or c so we check for OpenSSL"
+	AX_CHECK_OPENSSL()
+fi
+
 AX_THRIFT_LIB(csharp, [C#], yes)
 if test "$with_csharp" = "yes";  then
   PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)