Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,8 @@ with_gp_stats_collector
with_diskquota
with_libbz2
with_zstd
LZO_LIBS
with_lzo
LZ4_LIBS
LZ4_CFLAGS
with_lz4
Expand Down Expand Up @@ -944,6 +946,7 @@ with_zlib
with_lz4
with_zstd
with_libbz2
with_lzo
with_diskquota
with_gp_stats_collector
with_rt
Expand Down Expand Up @@ -1697,6 +1700,7 @@ Optional Packages:
--with-zstd build with ZSTD support
--without-libbz2 do not use bzip2
--with-zstd do not build with Zstandard
--with-lzo build with LZO support
--with-diskquota build with diskquota extension
--with-gp-stats-collector
build with stats collector extension
Expand Down Expand Up @@ -11574,6 +11578,115 @@ fi
$as_echo "$with_zstd" >&6; }


#
# LZO
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZO support" >&5
$as_echo_n "checking whether to build with LZO support... " >&6; }



# Check whether --with-lzo was given.
if test "${with_lzo+set}" = set; then :
withval=$with_lzo;
case $withval in
yes)

$as_echo "#define USE_LZO 1" >>confdefs.h

;;
no)
:
;;
*)
as_fn_error $? "no argument expected for --with-lzo option" "$LINENO" 5
;;
esac

else
with_lzo=no

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzo" >&5
$as_echo "$with_lzo" >&6; }


if test "$with_lzo" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lzo/lzo1x.h usability" >&5
$as_echo_n "checking lzo/lzo1x.h usability... " >&6; }
if ${ac_cv_header_lzo_lzo1x_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
#include <lzo/lzo1x.h>
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_lzo_lzo1x_h=yes
else
ac_cv_header_lzo_lzo1x_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_lzo_lzo1x_h" >&5
$as_echo "$ac_cv_header_lzo_lzo1x_h" >&6; }


if test "x$ac_cv_header_lzo_lzo1x_h" = x""yes; then :
:
else
as_fn_error $? "lzo/lzo1x.h header not found. Please install liblzo2-dev." "$LINENO" 5
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzo1x_decompress_safe in -llzo2" >&5
$as_echo_n "checking for lzo1x_decompress_safe in -llzo2... " >&6; }
if ${ac_cv_lib_lzo2_lzo1x_decompress_safe+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-llzo2 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Suppress warnings for systems that declare it in a header. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char lzo1x_decompress_safe ();
int
main ()
{
return lzo1x_decompress_safe ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_lzo2_lzo1x_decompress_safe=yes
else
ac_cv_lib_lzo2_lzo1x_decompress_safe=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzo2_lzo1x_decompress_safe" >&5
$as_echo "$ac_cv_lib_lzo2_lzo1x_decompress_safe" >&6; }
if test "x$ac_cv_lib_lzo2_lzo1x_decompress_safe" = x""yes; then :
LZO_LIBS="-llzo2"
else
as_fn_error $? "liblzo2 library not found. Please install liblzo2-dev." "$LINENO" 5
fi

fi


#
# diskquota
#
Expand Down
17 changes: 17 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,23 @@ PGAC_ARG_BOOL(with, zstd, yes, [do not build with Zstandard],
AC_MSG_RESULT([$with_zstd])
AC_SUBST(with_zstd)

#
# LZO
#
AC_MSG_CHECKING([whether to build with LZO support])
AH_TEMPLATE([USE_LZO], [Define to 1 to build with LZO support. (--with-lzo)])
PGAC_ARG_BOOL(with, lzo, no, [build with LZO support],
[AC_DEFINE([USE_LZO], 1)])
AC_MSG_RESULT([$with_lzo])
AC_SUBST(with_lzo)

if test "$with_lzo" = yes; then
AC_CHECK_HEADER([lzo/lzo1x.h], [], [AC_MSG_ERROR([lzo/lzo1x.h header not found. Please install liblzo2-dev.])])
AC_CHECK_LIB([lzo2], [lzo1x_decompress_safe], [LZO_LIBS="-llzo2"],
[AC_MSG_ERROR([liblzo2 library not found. Please install liblzo2-dev.])])
AC_SUBST(LZO_LIBS)
fi

#
# diskquota
#
Expand Down
1 change: 1 addition & 0 deletions devops/deploy/docker/build/rocky10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ RUN dnf makecache && \
libxml2-devel \
libuuid-devel \
libzstd-devel \
lzo-devel \
lz4 \
lz4-devel \
openldap-devel \
Expand Down
1 change: 1 addition & 0 deletions devops/deploy/docker/build/rocky8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ RUN dnf makecache && \
libuuid-devel \
libxml2-devel \
libzstd-devel \
lzo-devel \
lsof \
lz4 \
lz4-devel \
Expand Down
1 change: 1 addition & 0 deletions devops/deploy/docker/build/rocky9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ RUN dnf makecache && \
libxml2-devel \
libuuid-devel \
libzstd-devel \
lzo-devel \
lz4 \
lz4-devel \
openldap-devel \
Expand Down
1 change: 1 addition & 0 deletions devops/sandbox/Dockerfile.RELEASE.rockylinux9
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ RUN dnf makecache && \
libxml2-devel \
libuuid-devel \
libzstd-devel \
lzo-devel \
lz4 \
lz4-devel \
openldap-devel \
Expand Down
1 change: 1 addition & 0 deletions devops/sandbox/Dockerfile.main.rockylinux9
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ RUN dnf makecache && \
libxml2-devel \
libuuid-devel \
libzstd-devel \
lzo-devel \
lz4 \
lz4-devel \
openldap-devel \
Expand Down
6 changes: 4 additions & 2 deletions src/Makefile.global.in
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ YAML_LIBS = @YAML_LIBS@
with_zstd = @with_zstd@
ZSTD_CFLAGS = @ZSTD_CFLAGS@
ZSTD_LIBS = @ZSTD_LIBS@
with_lzo = @with_lzo@
LZO_LIBS = @LZO_LIBS@
EVENT_LIBS = @EVENT_LIBS@
with_diskquota = @with_diskquota@
with_gp_stats_collector = @with_gp_stats_collector@
Expand Down Expand Up @@ -335,8 +337,8 @@ LDAP_LIBS_BE = @LDAP_LIBS_BE@
UUID_LIBS = @UUID_LIBS@
LLVM_LIBS=@LLVM_LIBS@

# Cloudberry uses zstd in frontend and backend
LIBS := $(LIBS) $(ZSTD_LIBS)
# Cloudberry uses zstd and lzo in frontend and backend
LIBS := $(LIBS) $(ZSTD_LIBS) $(LZO_LIBS)

# It's critical that within LDFLAGS, all -L switches pointing to build-tree
# directories come before any -L switches pointing to external directories.
Expand Down
Loading
Loading