mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Initial support for BDR-only build
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -34,6 +34,7 @@ lib*.pc
|
|||||||
/Makefile.global
|
/Makefile.global
|
||||||
/config.log
|
/config.log
|
||||||
/config.status
|
/config.status
|
||||||
|
/config.h
|
||||||
|
|
||||||
# other
|
# other
|
||||||
/.lineno
|
/.lineno
|
||||||
|
|||||||
22
config.h.in
Normal file
22
config.h.in
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* Only build repmgr for BDR */
|
||||||
|
#undef BDR_ONLY
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the home page for this package. */
|
||||||
|
#undef PACKAGE_URL
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
220
configure
vendored
220
configure
vendored
@@ -633,6 +633,7 @@ SHELL'
|
|||||||
ac_subst_files=''
|
ac_subst_files=''
|
||||||
ac_user_opts='
|
ac_user_opts='
|
||||||
enable_option_checking
|
enable_option_checking
|
||||||
|
with_bdr_only
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
@@ -1243,6 +1244,11 @@ if test -n "$ac_init_help"; then
|
|||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
Optional Packages:
|
||||||
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
|
--with-bdr-only BDR-only build
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
PG_CONFIG Location to find pg_config for target PostgreSQL (default PATH)
|
PG_CONFIG Location to find pg_config for target PostgreSQL (default PATH)
|
||||||
|
|
||||||
@@ -1683,6 +1689,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ac_config_headers="$ac_config_headers config.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --with-bdr_only was given.
|
||||||
|
if test "${with_bdr_only+set}" = set; then :
|
||||||
|
withval=$with_bdr_only;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$with_bdr_only" != "x"; then :
|
||||||
|
|
||||||
|
$as_echo "#define BDR_ONLY \"1\"" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
|
||||||
@@ -1938,43 +1961,7 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
|||||||
# Let make expand exec_prefix.
|
# Let make expand exec_prefix.
|
||||||
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||||
|
|
||||||
# Transform confdefs.h into DEFS.
|
DEFS=-DHAVE_CONFIG_H
|
||||||
# Protect against shell expansion while executing Makefile rules.
|
|
||||||
# Protect against Makefile macro expansion.
|
|
||||||
#
|
|
||||||
# If the first sed substitution is executed (which looks for macros that
|
|
||||||
# take arguments), then branch to the quote section. Otherwise,
|
|
||||||
# look for a macro that doesn't take arguments.
|
|
||||||
ac_script='
|
|
||||||
:mline
|
|
||||||
/\\$/{
|
|
||||||
N
|
|
||||||
s,\\\n,,
|
|
||||||
b mline
|
|
||||||
}
|
|
||||||
t clear
|
|
||||||
:clear
|
|
||||||
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
|
|
||||||
t quote
|
|
||||||
s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
|
|
||||||
t quote
|
|
||||||
b any
|
|
||||||
:quote
|
|
||||||
s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
|
|
||||||
s/\[/\\&/g
|
|
||||||
s/\]/\\&/g
|
|
||||||
s/\$/$$/g
|
|
||||||
H
|
|
||||||
:any
|
|
||||||
${
|
|
||||||
g
|
|
||||||
s/^\n//
|
|
||||||
s/\n/ /g
|
|
||||||
p
|
|
||||||
}
|
|
||||||
'
|
|
||||||
DEFS=`sed -n "$ac_script" confdefs.h`
|
|
||||||
|
|
||||||
|
|
||||||
ac_libobjs=
|
ac_libobjs=
|
||||||
ac_ltlibobjs=
|
ac_ltlibobjs=
|
||||||
@@ -2408,11 +2395,15 @@ case $ac_config_files in *"
|
|||||||
"*) set x $ac_config_files; shift; ac_config_files=$*;;
|
"*) set x $ac_config_files; shift; ac_config_files=$*;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case $ac_config_headers in *"
|
||||||
|
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
# Files that config.status was made for.
|
# Files that config.status was made for.
|
||||||
config_files="$ac_config_files"
|
config_files="$ac_config_files"
|
||||||
|
config_headers="$ac_config_headers"
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
@@ -2433,10 +2424,15 @@ Usage: $0 [OPTION]... [TAG]...
|
|||||||
--recheck update $as_me by reconfiguring in the same conditions
|
--recheck update $as_me by reconfiguring in the same conditions
|
||||||
--file=FILE[:TEMPLATE]
|
--file=FILE[:TEMPLATE]
|
||||||
instantiate the configuration file FILE
|
instantiate the configuration file FILE
|
||||||
|
--header=FILE[:TEMPLATE]
|
||||||
|
instantiate the configuration header FILE
|
||||||
|
|
||||||
Configuration files:
|
Configuration files:
|
||||||
$config_files
|
$config_files
|
||||||
|
|
||||||
|
Configuration headers:
|
||||||
|
$config_headers
|
||||||
|
|
||||||
Report bugs to <pgsql-bugs@postgresql.org>.
|
Report bugs to <pgsql-bugs@postgresql.org>.
|
||||||
repmgr4 home page: <https://2ndquadrant.com/en/resources/repmgr/>."
|
repmgr4 home page: <https://2ndquadrant.com/en/resources/repmgr/>."
|
||||||
|
|
||||||
@@ -2498,7 +2494,18 @@ do
|
|||||||
esac
|
esac
|
||||||
as_fn_append CONFIG_FILES " '$ac_optarg'"
|
as_fn_append CONFIG_FILES " '$ac_optarg'"
|
||||||
ac_need_defaults=false;;
|
ac_need_defaults=false;;
|
||||||
--he | --h | --help | --hel | -h )
|
--header | --heade | --head | --hea )
|
||||||
|
$ac_shift
|
||||||
|
case $ac_optarg in
|
||||||
|
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
|
||||||
|
esac
|
||||||
|
as_fn_append CONFIG_HEADERS " '$ac_optarg'"
|
||||||
|
ac_need_defaults=false;;
|
||||||
|
--he | --h)
|
||||||
|
# Conflict between --help and --header
|
||||||
|
as_fn_error $? "ambiguous option: \`$1'
|
||||||
|
Try \`$0 --help' for more information.";;
|
||||||
|
--help | --hel | -h )
|
||||||
$as_echo "$ac_cs_usage"; exit ;;
|
$as_echo "$ac_cs_usage"; exit ;;
|
||||||
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
|
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
|
||||||
| -silent | --silent | --silen | --sile | --sil | --si | --s)
|
| -silent | --silent | --silen | --sile | --sil | --si | --s)
|
||||||
@@ -2554,6 +2561,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
for ac_config_target in $ac_config_targets
|
for ac_config_target in $ac_config_targets
|
||||||
do
|
do
|
||||||
case $ac_config_target in
|
case $ac_config_target in
|
||||||
|
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||||
"Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;;
|
"Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;;
|
||||||
|
|
||||||
@@ -2568,6 +2576,7 @@ done
|
|||||||
# bizarre bug on SunOS 4.1.3.
|
# bizarre bug on SunOS 4.1.3.
|
||||||
if $ac_need_defaults; then
|
if $ac_need_defaults; then
|
||||||
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
|
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
|
||||||
|
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Have a temporary directory for convenience. Make it in the build tree
|
# Have a temporary directory for convenience. Make it in the build tree
|
||||||
@@ -2755,8 +2764,116 @@ fi
|
|||||||
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
fi # test -n "$CONFIG_FILES"
|
fi # test -n "$CONFIG_FILES"
|
||||||
|
|
||||||
|
# Set up the scripts for CONFIG_HEADERS section.
|
||||||
|
# No need to generate them if there are no CONFIG_HEADERS.
|
||||||
|
# This happens for instance with `./config.status Makefile'.
|
||||||
|
if test -n "$CONFIG_HEADERS"; then
|
||||||
|
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
|
||||||
|
BEGIN {
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
eval set X " :F $CONFIG_FILES "
|
# Transform confdefs.h into an awk script `defines.awk', embedded as
|
||||||
|
# here-document in config.status, that substitutes the proper values into
|
||||||
|
# config.h.in to produce config.h.
|
||||||
|
|
||||||
|
# Create a delimiter string that does not exist in confdefs.h, to ease
|
||||||
|
# handling of long lines.
|
||||||
|
ac_delim='%!_!# '
|
||||||
|
for ac_last_try in false false :; do
|
||||||
|
ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
|
||||||
|
if test -z "$ac_tt"; then
|
||||||
|
break
|
||||||
|
elif $ac_last_try; then
|
||||||
|
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
|
||||||
|
else
|
||||||
|
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# For the awk script, D is an array of macro values keyed by name,
|
||||||
|
# likewise P contains macro parameters if any. Preserve backslash
|
||||||
|
# newline sequences.
|
||||||
|
|
||||||
|
ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
|
||||||
|
sed -n '
|
||||||
|
s/.\{148\}/&'"$ac_delim"'/g
|
||||||
|
t rset
|
||||||
|
:rset
|
||||||
|
s/^[ ]*#[ ]*define[ ][ ]*/ /
|
||||||
|
t def
|
||||||
|
d
|
||||||
|
:def
|
||||||
|
s/\\$//
|
||||||
|
t bsnl
|
||||||
|
s/["\\]/\\&/g
|
||||||
|
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
|
||||||
|
D["\1"]=" \3"/p
|
||||||
|
s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
|
||||||
|
d
|
||||||
|
:bsnl
|
||||||
|
s/["\\]/\\&/g
|
||||||
|
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
|
||||||
|
D["\1"]=" \3\\\\\\n"\\/p
|
||||||
|
t cont
|
||||||
|
s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
|
||||||
|
t cont
|
||||||
|
d
|
||||||
|
:cont
|
||||||
|
n
|
||||||
|
s/.\{148\}/&'"$ac_delim"'/g
|
||||||
|
t clear
|
||||||
|
:clear
|
||||||
|
s/\\$//
|
||||||
|
t bsnlc
|
||||||
|
s/["\\]/\\&/g; s/^/"/; s/$/"/p
|
||||||
|
d
|
||||||
|
:bsnlc
|
||||||
|
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
|
||||||
|
b cont
|
||||||
|
' <confdefs.h | sed '
|
||||||
|
s/'"$ac_delim"'/"\\\
|
||||||
|
"/g' >>$CONFIG_STATUS || ac_write_fail=1
|
||||||
|
|
||||||
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
|
for (key in D) D_is_set[key] = 1
|
||||||
|
FS = ""
|
||||||
|
}
|
||||||
|
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
|
||||||
|
line = \$ 0
|
||||||
|
split(line, arg, " ")
|
||||||
|
if (arg[1] == "#") {
|
||||||
|
defundef = arg[2]
|
||||||
|
mac1 = arg[3]
|
||||||
|
} else {
|
||||||
|
defundef = substr(arg[1], 2)
|
||||||
|
mac1 = arg[2]
|
||||||
|
}
|
||||||
|
split(mac1, mac2, "(") #)
|
||||||
|
macro = mac2[1]
|
||||||
|
prefix = substr(line, 1, index(line, defundef) - 1)
|
||||||
|
if (D_is_set[macro]) {
|
||||||
|
# Preserve the white space surrounding the "#".
|
||||||
|
print prefix "define", macro P[macro] D[macro]
|
||||||
|
next
|
||||||
|
} else {
|
||||||
|
# Replace #undef with comments. This is necessary, for example,
|
||||||
|
# in the case of _POSIX_SOURCE, which is predefined and required
|
||||||
|
# on some systems where configure will not decide to define it.
|
||||||
|
if (defundef == "undef") {
|
||||||
|
print "/*", prefix defundef, macro, "*/"
|
||||||
|
next
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{ print }
|
||||||
|
_ACAWK
|
||||||
|
_ACEOF
|
||||||
|
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
|
as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
|
||||||
|
fi # test -n "$CONFIG_HEADERS"
|
||||||
|
|
||||||
|
|
||||||
|
eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
|
||||||
shift
|
shift
|
||||||
for ac_tag
|
for ac_tag
|
||||||
do
|
do
|
||||||
@@ -2964,7 +3081,30 @@ which seems to be undefined. Please make sure it is defined" >&2;}
|
|||||||
esac \
|
esac \
|
||||||
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
|
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
|
||||||
;;
|
;;
|
||||||
|
:H)
|
||||||
|
#
|
||||||
|
# CONFIG_HEADER
|
||||||
|
#
|
||||||
|
if test x"$ac_file" != x-; then
|
||||||
|
{
|
||||||
|
$as_echo "/* $configure_input */" \
|
||||||
|
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
|
||||||
|
} >"$ac_tmp/config.h" \
|
||||||
|
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
|
||||||
|
if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
|
||||||
|
$as_echo "$as_me: $ac_file is unchanged" >&6;}
|
||||||
|
else
|
||||||
|
rm -f "$ac_file"
|
||||||
|
mv "$ac_tmp/config.h" "$ac_file" \
|
||||||
|
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
$as_echo "/* $configure_input */" \
|
||||||
|
&& eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|
||||||
|
|| as_fn_error $? "could not create -" "$LINENO" 5
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -2,8 +2,16 @@ AC_INIT([repmgr4], [4.0], [pgsql-bugs@postgresql.org], [repmgr4], [https://2ndqu
|
|||||||
|
|
||||||
AC_COPYRIGHT([Copyright (c) 2010-2017, 2ndQuadrant Ltd.])
|
AC_COPYRIGHT([Copyright (c) 2010-2017, 2ndQuadrant Ltd.])
|
||||||
|
|
||||||
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_ARG_VAR([PG_CONFIG], [Location to find pg_config for target PostgreSQL (default PATH)])
|
AC_ARG_VAR([PG_CONFIG], [Location to find pg_config for target PostgreSQL (default PATH)])
|
||||||
|
|
||||||
|
AC_ARG_WITH([bdr_only], [AS_HELP_STRING([--with-bdr-only], [BDR-only build])])
|
||||||
|
AS_IF([test "x$with_bdr_only" != "x"],
|
||||||
|
[AC_DEFINE([BDR_ONLY], ["1"], [Only build repmgr for BDR])]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
|
|
||||||
if test -z "$PG_CONFIG"; then
|
if test -z "$PG_CONFIG"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user