Procházet zdrojové kódy

Fix: minizip multiple definition

viest před 5 roky
rodič
revize
0c10ea3896
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6 2
      config.m4

+ 6 - 2
config.m4

@@ -114,7 +114,7 @@ if test "$PHP_XLSWRITER" != "no"; then
         AC_DEFINE(HAVE_LIBXLSXWRITER, 1, [ use system libxlsxwriter ])
     else
         AC_MSG_RESULT([use the bundled library])
-        xls_writer_sources="$xls_writer_sources $libxlsxwriter_sources $minizip_sources"
+        xls_writer_sources="$xls_writer_sources $libxlsxwriter_sources"
         PHP_ADD_INCLUDE([$srcdir/library/libxlsxwriter/include])
 
         XLSXWRITER_VERSION=`$EGREP "define LXW_VERSION" $srcdir/library/include/libxlsxwriter/xlsxwriter.h | $SED -e 's/[[^0-9\.]]//g'`
@@ -135,7 +135,7 @@ if test "$PHP_XLSWRITER" != "no"; then
     fi
 
     if test "$PHP_READER" = "yes"; then
-        xls_writer_sources="$xls_writer_sources $xls_read_sources $minizip_sources"
+        xls_writer_sources="$xls_writer_sources $xls_read_sources"
 
         AC_DEFINE(ENABLE_READER, 1, [enable reader])
 
@@ -150,6 +150,10 @@ if test "$PHP_XLSWRITER" != "no"; then
         LIBOPT="$LIBOPT -DUSE_MINIZIP"
     fi
 
+    if test "$PHP_READER" = "yes" || test "$PHP_LIBXLSXWRITER" = "no"; then
+        xls_writer_sources="$xls_writer_sources $minizip_sources"
+    fi
+
     if test -z "$PHP_DEBUG"; then
         AC_ARG_ENABLE(debug, [--enable-debug compile with debugging system], [PHP_DEBUG=$enableval],[PHP_DEBUG=no])
     fi