configure.ac |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit c1e4a484bce2fe8044232bf1c0b47205f01f9ad4
Author:     Taichi Haradaguchi <vdnznn...@mozmail.com>
AuthorDate: Tue Dec 31 16:44:47 2024 +0900
Commit:     Taichi Haradaguchi <vdnznn...@mozmail.com>
CommitDate: Tue Dec 31 13:54:55 2024 +0100

    Fix build --with-system-bzip2
    
    Fix the following errors:
    
    > configure: error: Package requirements (bzip2) were not met:
    >
    > Package 'bzip2', required by 'virtual:world', not found
    >
    > Consider adjusting the PKG_CONFIG_PATH environment variable if you
    > installed software in a non-standard prefix.
    >
    > Alternatively, you may set the environment variables BZIP2_CFLAGS
    > and BZIP2_LIBS to avoid the need to call pkg-config.
    > See the pkg-config man page for more details.
    > Error running configure at ./autogen.sh line 333.
    
    Change-Id: Iaa06f7c527330395fecca649ea1b77d277c26ad5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179576
    Tested-by: Jenkins
    Reviewed-by: Taichi Haradaguchi <vdnznn...@mozmail.com>

diff --git a/configure.ac b/configure.ac
index 39391223a6f1..099bb0031389 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14176,14 +14176,15 @@ dnl 
===================================================================
 dnl Test whether we need bzip2
 dnl ===================================================================
 SYSTEM_BZIP2=
-if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE" -o "$enable_python" = internal; 
then
+if test "$ENABLE_ONLINE_UPDATE_MAR" = TRUE -o "$enable_python" = internal; then
     AC_MSG_CHECKING([whether to use system bzip2])
     if test "$with_system_bzip2" = yes; then
         SYSTEM_BZIP2=TRUE
         AC_MSG_RESULT([yes])
-        PKG_CHECK_MODULES(BZIP2, bzip2)
-        FilterLibs "${BZIP2_LIBS}"
-        BZIP2_LIBS="${filteredlibs}"
+        AC_CHECK_HEADER(bzlib.h, [],
+            [AC_MSG_ERROR(bzlib.h not found. install bzip2)], [])
+        AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, [BZIP2_LIBS=-lbz2],
+            [AC_MSG_ERROR(bzip2 not found or functional)], [])
     else
         AC_MSG_RESULT([no])
         BUILD_TYPE="$BUILD_TYPE BZIP2"

Reply via email to