--- a/configure.ac	2017-06-13 02:47:58.000000000 +0200
+++ b/configure.ac	2017-06-13 02:47:58.000000000 +0200
@@ -61,7 +61,7 @@
 
 # check for libtls
 AC_SEARCH_LIBS([tls_config_set_ca_mem],[tls],
-	       [LIBS="$LIBS -ltls -lssl -lcrypto"],,[-lssl -lcrypto])
+	       [LIBS="$LIBS -ltls"],,)
 AC_CHECK_FUNCS([tls_config_set_ca_mem])
 
 # check if libtls uses 3-argument tls_write
