diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 1 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 6 | ||||
-rw-r--r-- | src/tools/msvc/Solution.pm | 13 | ||||
-rw-r--r-- | src/tools/msvc/config_default.pl | 1 | ||||
-rw-r--r-- | src/tools/msvc/vcregress.pl | 1 |
5 files changed, 22 insertions, 0 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 9dcd54fcbd5..c980444233f 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -351,6 +351,7 @@ XGETTEXT = @XGETTEXT@ GZIP = gzip BZIP2 = bzip2 LZ4 = @LZ4@ +ZSTD = @ZSTD@ DOWNLOAD = wget -O $@ --no-use-server-timestamps #DOWNLOAD = curl -o $@ diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 12aac8616e2..635fbb2181c 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -352,6 +352,9 @@ /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ +/* Define to 1 if you have the `zstd' library (-lzstd). */ +#undef HAVE_LIBZSTD + /* Define to 1 if you have the `link' function. */ #undef HAVE_LINK @@ -952,6 +955,9 @@ /* Define to select Win32-style shared memory. */ #undef USE_WIN32_SHARED_MEMORY +/* Define to 1 to build with ZSTD support. (--with-zstd) */ +#undef USE_ZSTD + /* Define to 1 if `wcstombs_l' requires <xlocale.h>. */ #undef WCSTOMBS_L_IN_XLOCALE diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 439809fcd00..a21ea9bef90 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -311,6 +311,7 @@ sub GenerateFiles HAVE_LIBXML2 => undef, HAVE_LIBXSLT => undef, HAVE_LIBZ => $self->{options}->{zlib} ? 1 : undef, + HAVE_LIBZSTD => undef, HAVE_LINK => undef, HAVE_LOCALE_T => 1, HAVE_LONG_INT_64 => undef, @@ -507,6 +508,7 @@ sub GenerateFiles USE_UNNAMED_POSIX_SEMAPHORES => undef, USE_WIN32_SEMAPHORES => 1, USE_WIN32_SHARED_MEMORY => 1, + USE_ZSTD => undef, WCSTOMBS_L_IN_XLOCALE => undef, WORDS_BIGENDIAN => undef, XLOG_BLCKSZ => 1024 * $self->{options}->{wal_blocksize}, @@ -540,6 +542,11 @@ sub GenerateFiles $define{HAVE_LZ4_H} = 1; $define{USE_LZ4} = 1; } + if ($self->{options}->{zstd}) + { + $define{HAVE_LIBZSTD} = 1; + $define{USE_ZSTD} = 1; + } if ($self->{options}->{openssl}) { $define{USE_OPENSSL} = 1; @@ -1082,6 +1089,11 @@ sub AddProject $proj->AddIncludeDir($self->{options}->{lz4} . '\include'); $proj->AddLibrary($self->{options}->{lz4} . '\lib\liblz4.lib'); } + if ($self->{options}->{zstd}) + { + $proj->AddIncludeDir($self->{options}->{zstd} . '\include'); + $proj->AddLibrary($self->{options}->{zstd} . '\lib\libzstd.lib'); + } if ($self->{options}->{uuid}) { $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); @@ -1194,6 +1206,7 @@ sub GetFakeConfigure $cfg .= ' --with-libxml' if ($self->{options}->{xml}); $cfg .= ' --with-libxslt' if ($self->{options}->{xslt}); $cfg .= ' --with-lz4' if ($self->{options}->{lz4}); + $cfg .= ' --with-zstd' if ($self->{options}->{zstd}); $cfg .= ' --with-gssapi' if ($self->{options}->{gss}); $cfg .= ' --with-icu' if ($self->{options}->{icu}); $cfg .= ' --with-tcl' if ($self->{options}->{tcl}); diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index 7a9b00be720..186849a09ad 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl @@ -15,6 +15,7 @@ our $config = { gss => undef, # --with-gssapi=<path> icu => undef, # --with-icu=<path> lz4 => undef, # --with-lz4=<path> + zstd => undef, # --with-zstd=<path> nls => undef, # --enable-nls=<path> tap_tests => undef, # --enable-tap-tests tcl => undef, # --with-tcl=<path> diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index a9946262398..e2b0db0879b 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -36,6 +36,7 @@ do './src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl'); $ENV{GZIP_PROGRAM} ||= 'gzip'; $ENV{LZ4} ||= 'lz4'; $ENV{TAR} ||= 'tar'; +$ENV{ZSTD} ||= 'zstd'; # buildenv.pl is for specifying the build environment settings # it should contain lines like: |