From cd7e3846fc18ef3f4b00d3d6738de308464a1456 Mon Sep 17 00:00:00 2001 From: viest Date: Sun, 14 May 2023 20:35:49 +0800 Subject: [PATCH 1/3] config.m4 default bundled md5 --- config.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.m4 b/config.m4 index d70db81..670c404 100644 --- a/config.m4 +++ b/config.m4 @@ -11,7 +11,7 @@ PHP_ARG_WITH(openssl_md5, openssl MD5, [ --with-openssl-md5=DIR Use openssl MD5], no, no) PHP_ARG_WITH(bundled_md5, bundled MD5, -[ --with-bundled-md5 Use bundled MD5], no, no) +[ --with-bundled-md5 Use bundled MD5], yes, yes) PHP_ARG_ENABLE(reader, enable xlsx reader support, [ --enable-reader Enable xlsx reader?], yes, yes) From 76c143f62069815cb1eef08a6030fbe04ab62154 Mon Sep 17 00:00:00 2001 From: viest Date: Sun, 14 May 2023 20:45:10 +0800 Subject: [PATCH 2/3] config.m4 default bundled md5 --- config.m4 | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/config.m4 b/config.m4 index 670c404..5cce488 100644 --- a/config.m4 +++ b/config.m4 @@ -7,11 +7,8 @@ PHP_ARG_WITH(libxlsxwriter, system libxlsxwriter, PHP_ARG_WITH(libxlsxio, system libxlsxio, [ --with-libxlsxio=DIR Use system libxlsxio], no, no) -PHP_ARG_WITH(openssl_md5, openssl MD5, -[ --with-openssl-md5=DIR Use openssl MD5], no, no) - -PHP_ARG_WITH(bundled_md5, bundled MD5, -[ --with-bundled-md5 Use bundled MD5], yes, yes) +PHP_ARG_WITH(openssl, openssl MD5, +[ --with-openssl=DIR Use openssl MD5], no, no) PHP_ARG_ENABLE(reader, enable xlsx reader support, [ --enable-reader Enable xlsx reader?], yes, yes) @@ -88,9 +85,9 @@ if test "$PHP_XLSWRITER" != "no"; then AC_MSG_CHECKING([Check libxlsxwriter library]) - if test "$PHP_OPENSSL_MD5" != "no"; then + if test "$PHP_OPENSSL" != "no"; then AC_MSG_RESULT([use the openssl md5 library]) - for i in $PHP_OPENSSL_MD5 /usr/local /usr /usr/local/opt; do + for i in $PHP_OPENSSL /usr/local /usr /usr/local/opt; do if test -r $i/include/openssl/md5.h; then OPENSSL_DIR=$i AC_MSG_RESULT([found in $i]) @@ -114,11 +111,7 @@ if test "$PHP_XLSWRITER" != "no"; then AC_DEFINE(USE_OPENSSL_MD5, 1, [ use openssl md5 ]) fi - - PHP_BUNDLED_MD5=no - fi - - if test "$PHP_BUNDLED_MD5" != "no"; then + else AC_MSG_RESULT([use the bundled md5 library]) xls_writer_sources="$xls_writer_sources $md5_sources" fi From 053e05d8db68c8b1076f6ba666287848d3262c66 Mon Sep 17 00:00:00 2001 From: viest Date: Sun, 14 May 2023 21:49:02 +0800 Subject: [PATCH 3/3] config.m4 PHP openssl parameters --- config.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.m4 b/config.m4 index 5cce488..1ac56bd 100644 --- a/config.m4 +++ b/config.m4 @@ -96,7 +96,12 @@ if test "$PHP_XLSWRITER" != "no"; then done if test -z "$OPENSSL_DIR"; then - AC_MSG_ERROR([openssl library not found]) + PHP_SETUP_OPENSSL(XLSWRITER_SHARED_LIBADD, + [ + AC_DEFINE(USE_OPENSSL_MD5, 1, [ use openssl md5 ]) + ], [ + AC_MSG_ERROR([openssl library not found]) + ]) else PHP_ADD_INCLUDE($OPENSSL_DIR/include)