Skip to content

Commit 0c9db51

Browse files
committed
config.m4 md5 switch
1 parent cf9bdb9 commit 0c9db51

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

config.m4

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ PHP_ARG_WITH(libxlsxio, system libxlsxio,
1010
PHP_ARG_ENABLE(reader, enable xlsx reader support,
1111
[ --enable-reader Enable xlsx reader?], yes, yes)
1212

13+
PHP_ARG_ENABLE(md5, MD5 support,
14+
[ --enable-md5 Use third party MD5?], no, no)
15+
1316
if test "$PHP_XLSWRITER" != "no"; then
1417
xls_writer_sources="
1518
xlswriter.c \
@@ -37,9 +40,12 @@ if test "$PHP_XLSWRITER" != "no"; then
3740
library/libxlsxwriter/third_party/minizip/zip.c \
3841
"
3942

43+
md5_sources="
44+
library/libxlsxwriter/third_party/md5/md5.c \
45+
"
46+
4047
libxlsxwriter_sources="
4148
library/libxlsxwriter/third_party/tmpfileplus/tmpfileplus.c \
42-
library/libxlsxwriter/third_party/md5/md5.c \
4349
library/libxlsxwriter/src/app.c \
4450
library/libxlsxwriter/src/chart.c \
4551
library/libxlsxwriter/src/chartsheet.c \
@@ -78,8 +84,13 @@ if test "$PHP_XLSWRITER" != "no"; then
7884
"
7985

8086
AC_MSG_CHECKING([Check libxlsxwriter library])
81-
if test "$PHP_LIBXLSXWRITER" != "no"; then
8287

88+
if test "$PHP_MD5" != "no"; then
89+
AC_MSG_RESULT([use the bundled md5 library])
90+
xls_writer_sources="$xls_writer_sources $md5_sources"
91+
fi
92+
93+
if test "$PHP_LIBXLSXWRITER" != "no"; then
8394
for i in $PHP_LIBXLSXWRITER /usr/local /usr; do
8495
if test -r $i/include/xlsxwriter.h; then
8596
XLSXWRITER_DIR=$i

0 commit comments

Comments
 (0)