Skip to content

Commit

Permalink
Autotools: Refactor configure options
Browse files Browse the repository at this point in the history
- The AS_HELP_STRING prettifies the `./configure -h` output
- Argument quoted
- Configure options that are by default enabled have the opposite option
  in the help output
- --enable-reader option 5th argument has been removed because that is
  meant only to the main argument to set additional ext_shared variables
  and some other internal handling
- Check messages adjusted a bit
  • Loading branch information
petk authored and viest committed Oct 7, 2024
1 parent f0c6300 commit 33070cd
Showing 1 changed file with 32 additions and 14 deletions.
46 changes: 32 additions & 14 deletions config.m4
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
PHP_ARG_WITH(xlswriter, xlswriter support,
[ --with-xlswriter Include xlswriter support], yes)

PHP_ARG_WITH(libxlsxwriter, system libxlsxwriter,
[ --with-libxlsxwriter=DIR Use system libxlsxwriter], no, no)

PHP_ARG_WITH(libxlsxio, system libxlsxio,
[ --with-libxlsxio=DIR Use system libxlsxio], 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)
PHP_ARG_WITH([xlswriter],
[xlswriter support],
[AS_HELP_STRING([--without-xlswriter],
[Disable xlswriter support])],
[yes])

PHP_ARG_WITH([libxlsxwriter],
[system libxlsxwriter],
[AS_HELP_STRING([[--with-libxlsxwriter[=DIR]]],
[Use system libxlsxwriter])],
[no],
[no])

PHP_ARG_WITH([libxlsxio],
[system libxlsxio],
[AS_HELP_STRING([[--with-libxlsxio[=DIR]]],
[Use system libxlsxio])],
[no],
[no])

PHP_ARG_WITH([openssl],
[openssl MD5],
[AS_HELP_STRING([[--with-openssl[=DIR]]],
[Use openssl MD5])],
[no],
[no])

PHP_ARG_ENABLE([reader],
[whether to enable the xlsx reader support],
[AS_HELP_STRING([--disable-reader],
[Disable xlsx reader])],
[yes])

if test "$PHP_XLSWRITER" != "no"; then
xls_writer_sources="
Expand Down

0 comments on commit 33070cd

Please sign in to comment.