Re: [PATCH] Cygwin: Conditionally build documentation

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <YbDvnQLgjJyKFUEI@vapier>
On 08 Dec 2021 15:03, Jon Turney wrote:
> +AC_ARG_ENABLE(doc,
> +	      [AS_HELP_STRING([--enable-doc], [Build documentation])],
> +	      enable_doc=$enableval,
> +	      enable_doc=yes)

the 3rd arg is redundant.  you can just write ,, to use the default iirc.

> +AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi])
> +AC_CHECK_PROGS([XMLTO], [xmlto])
> +
> +if test "x$enable_doc" != "xno"; then
> +   if test -z "$DOCBOOK2XTEXI" || test -z "$XMLTO"; then
> +       AC_MSG_ERROR([Required documentation tools not found])
> +   fi
> +fi

i think AM_MISSING_PROG would be more appropriate.  then you don't need
the `test` logic.
https://www.gnu.org/software/automake/manual/html_node/Public-Macros.html#index-AM_005fMISSING_005fPROG
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmGw750ACgkQQWM7n+g3
9YG5fg//Z+DGRX3h2+ASZYH2AumrEbQCctHr7NQor8rZ+qbk0gvGePF7NQD1MlIg
ih5fH81JAFH9ZQYPSzvfWpSDVtF8RDDkkAy5a74FtFQI4mM4slXF/ZHvHttmmPIw
d2HCCOyD9JVTEoRpqF8eg9jHBjpdJ64+l+oTya3dA4czVxyGSQ2sHxYaIG3vF3f9
WRmJRxF67OMOI9dM+fgflNiiChxmyz5Rb89KvrkiwDo2jyybbF2Qj7ciIQi357Fa
jUzsBsOz7kdNrze9rWwJJ+SindTgPG816EIGDk2WARfSQgSetHRIFV7VpdHOPPr1
3ZfFZqpwOGdoZBOSnUUDxj1iV1Vg1rcojWRTF4YB1vw1JIpgB9kK1Y1AHJO0JCNh
Igi9vcmiHqzEK2yiw8ejFFk7yAtSs2ISF5cSsCpH1I+R5XjV37cnFlx4y2wbZp+O
3tjdTdniW/BRGaBP1pH25dtuNEqmAjdQFEDm5pp8XcjXbRdSYvPD7RXYhM021cSC
5+UajlTFWkAEPFt53vtn/oPskXa6FqQNZ5CuJzujgxF7/f1yNiO36siyLsquJbPw
gUKM/1Ju4xRXtm14OU5glUbiQV/92fOF1KVOfE2nHWyme/H8Xr4sbt3/6MMc+U9E
0jXCWpa9kFsupvDFdy+ZPnjpxodCW9HrKw3b6qhk2mfDgNhCZa4=
=2gFR
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.