cmake: build&run tests (sortof)
[awesomized/libmemcached] / libtest / has.cc
index 0983f070301f6668f7ae97d5d3a4f8657ae6eded..6048bacf24cd806e955779459b5b347da06924d1 100644 (file)
@@ -75,13 +75,15 @@ bool has_libdrizzle(void)
 bool has_postgres_support(void)
 {
   char *getenv_ptr;
-  if (bool((getenv_ptr= getenv("POSTGES_IS_RUNNING_AND_SETUP"))))
+  if (bool((getenv_ptr= getenv("POSTGRES_IS_RUNNING_AND_SETUP"))))
   {
     (void)(getenv_ptr);
+#if defined(HAVE_LIBPQ) && HAVE_LIBPQ
     if (HAVE_LIBPQ)
     {
       return true;
     }
+#endif
   }
 
   return false;