add configure option to suppress pg version check in ./configure

baby_step_pg_15-ci
Nils Dijk 2022-06-24 15:34:35 +02:00
parent e4298153d1
commit 5eef8a99c3
No known key found for this signature in database
GPG Key ID: CA1177EF9434F241
2 changed files with 42 additions and 2 deletions

36
configure vendored
View File

@ -644,6 +644,7 @@ LDFLAGS
CFLAGS
CC
vpath_build
with_pg_version_check
PATH
PG_CONFIG
FLEX
@ -692,6 +693,7 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
with_extra_version
with_pg_version_check
enable_coverage
with_libcurl
with_reports_hostname
@ -1337,6 +1339,8 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-extra-version=STRING
append STRING to version
--without-pg-version-check
do not check postgres version during build
--without-libcurl do not use libcurl for anonymous statistics
collection
--with-reports-hostname=HOSTNAME
@ -2555,7 +2559,37 @@ if test -z "$version_num"; then
as_fn_error $? "Could not detect PostgreSQL version from pg_config." "$LINENO" 5
fi
if test "$version_num" != '13' -a "$version_num" != '14'; then
# Check whether --with-pg-version-check was given.
if test ${with_pg_version_check+y}
then :
withval=$with_pg_version_check;
case $withval in
yes)
:
;;
no)
:
;;
*)
as_fn_error $? "no argument expected for --with-pg-version-check option" "$LINENO" 5
;;
esac
else $as_nop
with_pg_version_check=yes
fi
if test "$with_pg_version_check" = no; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: building against PostgreSQL $version_num (skipped compatibility check)" >&5
printf "%s\n" "$as_me: building against PostgreSQL $version_num (skipped compatibility check)" >&6;}
elif test "$version_num" != '13' -a "$version_num" != '14'; then
as_fn_error $? "Citus is not compatible with the detected PostgreSQL version ${version_num}." "$LINENO" 5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: building against PostgreSQL $version_num" >&5

View File

@ -74,7 +74,13 @@ if test -z "$version_num"; then
AC_MSG_ERROR([Could not detect PostgreSQL version from pg_config.])
fi
if test "$version_num" != '13' -a "$version_num" != '14'; then
PGAC_ARG_BOOL(with, pg-version-check, yes,
[do not check postgres version during build])
AC_SUBST(with_pg_version_check)
if test "$with_pg_version_check" = no; then
AC_MSG_NOTICE([building against PostgreSQL $version_num (skipped compatibility check)])
elif test "$version_num" != '13' -a "$version_num" != '14'; then
AC_MSG_ERROR([Citus is not compatible with the detected PostgreSQL version ${version_num}.])
else
AC_MSG_NOTICE([building against PostgreSQL $version_num])