mainAutoconf - Support: sr #111256, provide AC_CHECK_TOOL* variants...

 
 

sr #111256: provide AC_CHECK_TOOL* variants that support a custom test

Submitter:  Bruno Haible <haible>
Submitted:  Thu 12 Jun 2025 04:54:49 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Thu 12 Jun 2025 04:54:49 PM UTC, original submission:  

The macros AC_CHECK_PROGS, AC_CHECK_TOOL, AC_CHECK_TOOLS, AC_PATH_PROG, AC_PATH_PROGS, documented in https://www.gnu.o ... ric-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.

Bruno Haible <haible>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by haible (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-11ef.
    Corresponding source code