diff --git a/clients/tools/common.c b/clients/tools/common.c
index e0a6c0c8cc9b6ff4567b52ea640b0338cfe6246d..38f844152064043e4f6705f81c200edf729de332 100644
--- a/clients/tools/common.c
+++ b/clients/tools/common.c
@@ -1263,6 +1263,7 @@ dnssrv_free:;
 			exit( EXIT_FAILURE );
 		}
 
+#ifdef HAVE_CYRUS_SASL
 		/* canon */
 		if( ldap_set_option( ld, LDAP_OPT_X_SASL_NOCANON,
 			nocanon ? LDAP_OPT_ON : LDAP_OPT_OFF ) != LDAP_OPT_SUCCESS )
@@ -1271,6 +1272,7 @@ dnssrv_free:;
 				nocanon ? "on" : "off" );
 			exit( EXIT_FAILURE );
 		}
+#endif
 		if( ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &protocol )
 			!= LDAP_OPT_SUCCESS )
 		{