additional cleanups for pgport find_my_exec support
authorSteve Singer <ssinger@ca.afilias.info>
Fri, 7 Dec 2012 20:27:39 +0000 (15:27 -0500)
committerSteve Singer <ssinger@ca.afilias.info>
Fri, 7 Dec 2012 20:27:39 +0000 (15:27 -0500)
Clean up configure messaging and avoid a compiler warning by
checking for HAVE_PGPORT after config.h is included
(cherry picked from commit be933801d527caa7c88df622b6ec351668189281)

Conflicts:

RELEASE
src/slonik/slonik.c

RELEASE
config/acx_libpq.m4
src/slonik/slonik.c

diff --git a/RELEASE b/RELEASE
index a8373b45be3941bb49824d0d81a288fc0fc8bc9c..7c35602e813f9619f27730dc5d3196f5be17c9c9 100644 (file)
--- a/RELEASE
+++ b/RELEASE
@@ -1,6 +1,9 @@
 #+OPTIONS: ^:{}
 * Slony-I Release Notes
 
+- No bug :: add --with-pgport option to configure and when set to yes let slonik use these functions to determine
+            the PGSHARE directory at runtime. This defaults to no 
+
 - Bug #240 :: Improve notes on VACUUM
 
 - Bug #278 :: assorted spelling fixes
index 7ee9d80002fc8940c97f466a86ef125737b10d72..c3018aaebefd9ce3147828d41109e93af90df3e4 100644 (file)
@@ -510,7 +510,9 @@ if test "$with_pgport" = "yes"; then
    AC_MSG_CHECKING(for pgport)
    AC_DEFINE(HAVE_PGPORT)
    LIBS="$LIBS -lpgport"
-   AC_TRY_LINK_FUNC(find_my_exec,HAVE_PGPORT=1, AC_MSG_ERROR("pgport was not found. build without --with-pgport=yes to disable"))
+   AC_TRY_LINK_FUNC(find_my_exec,[HAVE_PGPORT=1
+                                  AC_MSG_RESULT(yes)], 
+                    AC_MSG_ERROR("pgport was not found. build without --with-pgport=yes to disable"))
 fi
 
 AC_LANG_RESTORE
index 6fd2e4743104b60f87a9c072de1598323da28f58..e3c53735a8590b127d98064881f748e4be730c1c 100644 (file)
 #include "libpq-fe.h"
 #include "slonik.h"
 
-#ifdef HAVE_PGPORT
-#undef USE_REPL_SNPRINTF
-#include "port.h"
-#endif
 
 #ifdef MSVC
 #include "config_msvc.h"
 #include "../parsestatements/scanner.h"
 extern int     STMTS[MAXSTATEMENTS];
 
+
+#ifdef HAVE_PGPORT
+#undef USE_REPL_SNPRINTF
+#include "port.h"
+#endif
+
 #define MAXPGPATH 256
 
 /*