From affea192f49b039206377e7f4b0d231e7b0a6f0f Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Wed, 22 Apr 2015 14:21:19 +0800 Subject: [PATCH] Fix incorrect AC_ARG_VAR usage, make PATH a precious var with decription This makes configure consider the PATH important and documents that it affects where we find pg_config . --- configure | 13 +++++++++---- configure.in | 6 ++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 5e368d4396..000b4cb5bb 100755 --- a/configure +++ b/configure @@ -592,6 +592,7 @@ LIBOBJS vpath_build BUILDING_BDR BUILDING_UDR +PATH OBJEXT EXEEXT ac_ct_CC @@ -653,6 +654,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +PATH BUILDING_UDR BUILDING_BDR' @@ -1275,10 +1277,11 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + PATH PATH for target PostgreSQL install pg_config BUILDING_UDR - 1 + Compile UDR only BUILDING_BDR - 1 + Compile BDR (requires patched PostgreSQL 9.4 Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2734,10 +2737,13 @@ fi done + + + + if test "$ac_cv_header_replication_replication_identifier_h" != 'yes'; then { $as_echo "$as_me:${as_lineno-$LINENO}: postgres-bdr patches missing, forcing UDR build" >&5 $as_echo "$as_me: postgres-bdr patches missing, forcing UDR build" >&6;} - BUILDING_UDR=1 @@ -2749,7 +2755,6 @@ $as_echo "#define BUILDING_UDR 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: building against appropriately patched PostgreSQL" >&5 $as_echo "$as_me: building against appropriately patched PostgreSQL" >&6;} - BUILDING_BDR=1 diff --git a/configure.in b/configure.in index 97d4147ff1..0ec47592ff 100644 --- a/configure.in +++ b/configure.in @@ -38,9 +38,12 @@ AC_CHECK_HEADERS([replication/replication_identifier.h], [], [], [#include "postgres.h" ]) +AC_ARG_VAR([PATH], [PATH for target PostgreSQL install pg_config]) +AC_ARG_VAR([BUILDING_UDR], [Compile UDR only]) +AC_ARG_VAR([BUILDING_BDR], [Compile BDR (requires patched PostgreSQL 9.4]) + if test "$ac_cv_header_replication_replication_identifier_h" != 'yes'; then AC_MSG_NOTICE([postgres-bdr patches missing, forcing UDR build]) - AC_ARG_VAR([BUILDING_UDR], 1) AC_SUBST([BUILDING_UDR], 1) AC_DEFINE([BUILDING_UDR], 1, ['Building UDR']) if test "$enable_bdr" = "yes"; then @@ -48,7 +51,6 @@ if test "$ac_cv_header_replication_replication_identifier_h" != 'yes'; then fi else AC_MSG_NOTICE([building against appropriately patched PostgreSQL]) - AC_ARG_VAR([BUILDING_BDR], 1) AC_SUBST([BUILDING_BDR], 1) AC_DEFINE([BUILDING_BDR], 1, ['Building BDR']) if test "$enable_bdr" = "no"; then -- 2.39.5