@@ -704,6 +704,7 @@ LDFLAGS_EX
704704ELF_SYS
705705EGREP
706706GREP
707+ with_zstd
707708with_zlib
708709with_system_tzdata
709710with_libxslt
@@ -847,6 +848,7 @@ with_libxml
847848with_libxslt
848849with_system_tzdata
849850with_zlib
851+ with_zstd
850852with_gnu_ld
851853enable_largefile
852854enable_float4_byval
@@ -1540,6 +1542,7 @@ Optional Packages:
15401542 --with-system-tzdata=DIR
15411543 use system time zone data in DIR
15421544 --without-zlib do not use Zlib
1545+ --with-zstd build with libzstd
15431546 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
15441547
15451548Some influential environment variables:
@@ -2751,7 +2754,7 @@ else
27512754fi
27522755
27532756
2754- PGPRO_VERSION="$PACKAGE_VERSION.1 "
2757+ PGPRO_VERSION="$PACKAGE_VERSION.2 "
27552758PGPRO_PACKAGE_NAME="PostgresPro"
27562759PGPRO_EDITION="enterprise"
27572760
@@ -6174,6 +6177,88 @@ fi
61746177
61756178
61766179
6180+ #
6181+ # ZStd
6182+ #
6183+
6184+
6185+
6186+ # Check whether --with-zstd was given.
6187+ if test "${with_zstd+set}" = set; then :
6188+ withval=$with_zstd;
6189+ case $withval in
6190+ yes)
6191+
6192+ $as_echo "#define CFS_COMPRESSOR 6" >>confdefs.h
6193+
6194+ ;;
6195+ no)
6196+ :
6197+ ;;
6198+ *)
6199+ as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
6200+ ;;
6201+ esac
6202+
6203+ else
6204+ with_zstd=no
6205+
6206+ fi
6207+
6208+
6209+
6210+
6211+ if test "$with_zstd" = yes ; then
6212+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
6213+ $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
6214+ if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
6215+ $as_echo_n "(cached) " >&6
6216+ else
6217+ ac_check_lib_save_LIBS=$LIBS
6218+ LIBS="-lzstd $LIBS"
6219+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6220+ /* end confdefs.h. */
6221+
6222+ /* Override any GCC internal prototype to avoid an error.
6223+ Use char because int might match the return type of a GCC
6224+ builtin and then its argument prototype would still apply. */
6225+ #ifdef __cplusplus
6226+ extern "C"
6227+ #endif
6228+ char ZSTD_compress ();
6229+ int
6230+ main ()
6231+ {
6232+ return ZSTD_compress ();
6233+ ;
6234+ return 0;
6235+ }
6236+ _ACEOF
6237+ if ac_fn_c_try_link "$LINENO"; then :
6238+ ac_cv_lib_zstd_ZSTD_compress=yes
6239+ else
6240+ ac_cv_lib_zstd_ZSTD_compress=no
6241+ fi
6242+ rm -f core conftest.err conftest.$ac_objext \
6243+ conftest$ac_exeext conftest.$ac_ext
6244+ LIBS=$ac_check_lib_save_LIBS
6245+ fi
6246+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
6247+ $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
6248+ if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
6249+ cat >>confdefs.h <<_ACEOF
6250+ #define HAVE_LIBZSTD 1
6251+ _ACEOF
6252+
6253+ LIBS="-lzstd $LIBS"
6254+
6255+ else
6256+ as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
6257+ fi
6258+
6259+ fi
6260+
6261+
61776262#
61786263# Elf
61796264#