X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fhas.cc;h=72441819552e24315858192afe3d81e67f9d2918;hb=53b79318cea42a1cd7bf19a29f4308091961021b;hp=17427d41b89fbfd6171193776bb2e9fa14ccf18e;hpb=a7df49566dd006c5725eabcd11aab958cf8e5600;p=m6w6%2Flibmemcached diff --git a/libtest/has.cc b/libtest/has.cc index 17427d41..72441819 100644 --- a/libtest/has.cc +++ b/libtest/has.cc @@ -82,7 +82,7 @@ bool has_gearmand() { std::stringstream arg_buffer; - if (getenv("PWD")) + if (getenv("PWD") and strcmp(MEMCACHED_BINARY, "gearmand/gearmand") == 0) { arg_buffer << getenv("PWD"); arg_buffer << "/"; @@ -111,13 +111,28 @@ bool has_drizzled() return false; } +bool has_mysqld() +{ +#if defined(HAVE_MYSQL_BUILD) && HAVE_MYSQL_BUILD + if (HAVE_MYSQL_BUILD) + { + if (access(HAVE_MYSQL, X_OK) == 0) + { + return true; + } + } +#endif + + return false; +} + bool has_memcached() { if (HAVE_MEMCACHED_BINARY) { std::stringstream arg_buffer; - if (getenv("PWD")) + if (getenv("PWD") and strcmp(MEMCACHED_BINARY, "memcached/memcached") == 0) { arg_buffer << getenv("PWD"); arg_buffer << "/"; @@ -135,6 +150,7 @@ bool has_memcached() bool has_memcached_sasl() { +#if defined(HAVE_MEMCACHED_SASL_BINARY) && HAVE_MEMCACHED_SASL_BINARY if (HAVE_MEMCACHED_SASL_BINARY) { if (access(MEMCACHED_SASL_BINARY, X_OK) == 0) @@ -142,6 +158,7 @@ bool has_memcached_sasl() return true; } } +#endif return false; }