URL: <https://savannah.gnu.org/support/?111256>
Summary: provide AC_CHECK_TOOL* variants that support a
custom test
Group: Autoconf
Submitter: haible
Submitted: Do 12 Jun 2025 18:54:49 CEST
Priority: 5 - Unprioritized
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Do 12 Jun 2025 18:54:49 CEST By: Bruno Haible <haible>
The macros AC_CHECK_PROGS, AC_CHECK_TOOL, AC_CHECK_TOOLS, AC_PATH_PROG,
AC_PATH_PROGS, documented in
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Generic-Programs.html
, search for the programs under different names or (in case of AC_PATH_*) in
different directories. It would be useful to be able to add a custom test to
the search, for example
- a version number test, or
- a sanity check.
For the AC_PATH_PROG, AC_PATH_PROGS macros this can already be done through
AC_PATH_PROGS_FEATURE_CHECK, or through the AM_PATH_PROG_WITH_TEST macro (from
gnulib/m4/progtest.m4) that predates AC_PATH_PROGS_FEATURE_CHECK.
Can we have similar variants also for AC_CHECK_PROGS, AC_CHECK_TOOL,
AC_CHECK_TOOLS ?
My immediate use-case is that I have a macro that looks for a D compiler:
AC_CHECK_TOOLS([DC], [gdc ldc2 dmd egdc])
and I want to not use a compiler that has installation problems, like the one
in current Cygwin, through a test like:
echo > empty.d
${DC} -c empty.d; rc=$?
rm -f empty.d empty.o empty.obj
exit $rc
Without copying gobs of code from Autoconf's implementation of AC_CHECK_TOOLS,
I need to decompose the AC_CHECK_TOOLS invocation into 8 checks:
${host_alias}-gdc
${host_alias}-ldc2
${host_alias}-dmd
${host_alias}-egdc
gdc
ldc2
dmd
egdc
and add my custom test after each. I would like to have a simpler way of
writing the same thing.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111256>
_______________________________________________
Nachricht gesendet über Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
