Skip to content

Commit

Permalink
Merge pull request #483 from viest/dev
Browse files Browse the repository at this point in the history
config.m4 default bundled md5
  • Loading branch information
viest authored May 14, 2023
2 parents 372ed72 + 053e05d commit 03f8b36
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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], no, no)
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)
Expand Down Expand Up @@ -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])
Expand All @@ -99,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)

Expand All @@ -114,11 +116,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
Expand Down

1 comment on commit 03f8b36

@jatyPeng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6点钟合并代码,太感谢了。👍

Please sign in to comment.