Checking whether program foo supports option --bar

2022-03-01 Thread Sébastien Hinderer
Dear all, Is there a conventional / recommended way to test whether a program supports a given command-line option? I understand the test needs to be somehow program-specific but I still wonder whether there are some macros around that can be used to make writing this test simpler. To be more sp

Re: Checking whether program foo supports option --bar

2022-03-01 Thread Paul Eggert
On 3/1/22 09:08, Sébastien Hinderer wrote: Is there a conventional / recommended way to test whether a program supports a given command-line option? You can use either AS_IF or plain sh 'if', depending on how complicated the then- and else- parts are.

Re: Checking whether program foo supports option --bar

2022-03-01 Thread Peter Johansson
Hi Sebasien, On 2/3/22 04:23, Paul Eggert wrote: On 3/1/22 09:08, Sébastien Hinderer wrote: Is there a conventional / recommended way to test whether a program supports a given command-line option? You can use either AS_IF or plain sh 'if', depending on how complicated the then- and else- pa