Permalink
Browse files

Merge pull request #58 from jasonish/ish/pqping

Test for PQping by attempting to link it.
  • Loading branch information...
2 parents fec25ae + db5a2b7 commit 07174fc0acd537a3c037083ff2ecd5ce2a27b846 @firnsy committed Jan 18, 2013
Showing with 2 additions and 28 deletions.
  1. +2 −28 configure.in
View
@@ -901,34 +901,8 @@ if test "x$with_postgresql" != "xno"; then
fi
fi
-AC_DEFUN([AC_CHECK_PGSQL_PQPING],
-[
-AC_MSG_CHECKING([PGSQL_API_VERSION for PQping support])
-AC_LINK_IFELSE([
-AC_LANG_SOURCE(
-[[
-#include <$2/pg_config.h>
-int main()
-{
-#ifdef PG_VERSION_NUM
-if(PG_VERSION_NUM >= $1)
-{
-return 0;
-}
-#endif
-return 1;
-}]])],
-[
-AC_DEFINE([HAVE_PQPING], 1,[libpq support PQping()])
-AC_MSG_RESULT([yes])
-],
-[
-AC_DEFINE([HAVE_PQPING],[0],[libpq does not support PQping()])
-AC_MSG_RESULT([no])
-])
-])
-
-AC_CHECK_PGSQL_PQPING([90100],[$POSTGRESQL_INC_DIR])
+AC_CHECK_FUNC([PQping], [AC_DEFINE([HAVE_PQPING], [1],
+ [Define if PQping exists.])])
fi

0 comments on commit 07174fc

Please sign in to comment.