Skip to content

Commit b57c299

Browse files
committed
Introduce --with-rst2man and --with-rst2html
The idea is quite simple: let allow the user who builds it to suggest which `rst2man` and `rst2html` should be used, instead of guessing. I've also extended the guess list to python 3.10.
1 parent 4f78065 commit b57c299

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

configure.ac

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,20 @@ AM_CONDITIONAL([RUN_TXT2CSTR], [test "${perl_found}" = "yes"])
363363
# can be installed using pip ("pip install docutils"). On some
364364
# systems, rst2man and rst2html are actually installed as rst2man.py
365365
# and rst2html.py - create a symlink of that's the case.
366-
AC_PATH_PROGS(RST2MAN, [rst2man rst2man.py rst2man-3 rst2man-3.6 rst2man-3.7 rst2man-3.8 rst2man-3.9], [no])
366+
# Also, allow to define path as "--with-rst2man" and "--with-rst2html".
367+
AC_ARG_WITH([rst2man],
368+
AS_HELP_STRING([--with-rst2man=PATH], [Location of rst2man (auto)]),
369+
[RST2MAN="$withval"],
370+
[AC_PATH_PROGS(RST2MAN,
371+
[rst2man rst2man.py rst2man-3 rst2man-3.6 rst2man-3.7 rst2man-3.8 rst2man-3.9, rst2man-3.10],
372+
[no])])
367373
AM_CONDITIONAL([HAVE_RST2MAN], [test "x$RST2MAN" != "xno"])
368-
AC_PATH_PROGS(RST2HTML, [rst2html rst2html.py rst2html-3 rst2html-3.6 rst2html-3.7 rst2html-3.8 rst2html-3.9], [no])
374+
AC_ARG_WITH([rst2html],
375+
AS_HELP_STRING([--with-rst2html=PATH], [Location of rst2html (auto)]),
376+
[RST2HTML="$withval"],
377+
[AC_PATH_PROGS(RST2HTML,
378+
[rst2html rst2html.py rst2html-3 rst2html-3.6 rst2html-3.7 rst2html-3.8 rst2html-3.9, rst2html-3.10],
379+
[no])])
369380
AM_CONDITIONAL([HAVE_RST2HTML], [test "x$RST2HTML" != "xno"])
370381

371382
# rst2pdf is a separate tool and can also be installed via pip (e.g.,

0 commit comments

Comments
 (0)