@@ -7,11 +7,8 @@ PHP_ARG_WITH(libxlsxwriter, system libxlsxwriter,
77PHP_ARG_WITH(libxlsxio, system libxlsxio,
88[ --with-libxlsxio=DIR Use system libxlsxio] , no, no)
99
10- PHP_ARG_WITH(openssl_md5, openssl MD5,
11- [ --with-openssl-md5=DIR Use openssl MD5] , no, no)
12-
13- PHP_ARG_WITH(bundled_md5, bundled MD5,
14- [ --with-bundled-md5 Use bundled MD5] , no, no)
10+ PHP_ARG_WITH(openssl, openssl MD5,
11+ [ --with-openssl=DIR Use openssl MD5] , no, no)
1512
1613PHP_ARG_ENABLE(reader, enable xlsx reader support,
1714[ --enable-reader Enable xlsx reader?] , yes, yes)
@@ -88,9 +85,9 @@ if test "$PHP_XLSWRITER" != "no"; then
8885
8986 AC_MSG_CHECKING ( [ Check libxlsxwriter library] )
9087
91- if test "$PHP_OPENSSL_MD5 " != "no"; then
88+ if test "$PHP_OPENSSL " != "no"; then
9289 AC_MSG_RESULT ( [ use the openssl md5 library] )
93- for i in $PHP_OPENSSL_MD5 /usr/local /usr /usr/local/opt; do
90+ for i in $PHP_OPENSSL /usr/local /usr /usr/local/opt; do
9491 if test -r $i/include/openssl/md5.h; then
9592 OPENSSL_DIR=$i
9693 AC_MSG_RESULT ( [ found in $i] )
@@ -99,7 +96,12 @@ if test "$PHP_XLSWRITER" != "no"; then
9996 done
10097
10198 if test -z "$OPENSSL_DIR"; then
102- AC_MSG_ERROR ( [ openssl library not found] )
99+ PHP_SETUP_OPENSSL(XLSWRITER_SHARED_LIBADD,
100+ [
101+ AC_DEFINE ( USE_OPENSSL_MD5 , 1 , [ use openssl md5 ] )
102+ ] , [
103+ AC_MSG_ERROR ( [ openssl library not found] )
104+ ] )
103105 else
104106 PHP_ADD_INCLUDE($OPENSSL_DIR/include)
105107
@@ -114,11 +116,7 @@ if test "$PHP_XLSWRITER" != "no"; then
114116
115117 AC_DEFINE ( USE_OPENSSL_MD5 , 1 , [ use openssl md5 ] )
116118 fi
117-
118- PHP_BUNDLED_MD5=no
119- fi
120-
121- if test "$PHP_BUNDLED_MD5" != "no"; then
119+ else
122120 AC_MSG_RESULT ( [ use the bundled md5 library] )
123121 xls_writer_sources="$xls_writer_sources $md5_sources"
124122 fi
0 commit comments