autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command-line option processing


From: Benoit SIGOURE
Subject: Re: Command-line option processing
Date: Mon, 29 Oct 2007 14:47:44 +0100

On Oct 29, 2007, at 1:37 PM, Sébastien Hinderer wrote:

Dear all,

Is it possible, in a configure script as produced by autoconf, to detect that the script was invoked with option of the form -with-foo=bar, where
foo or bar take values not understood by the script ?

Any help warmly appreciated.
Thanks,

Hi Sébastien,

AC_ARG_WITH([foo],
            [AC_HELP_STRING([--with-foo=whatever],
[Specifies something for foo @<:@default value here@:>@])],
            [], [with_foo=no])

case $with_foo in
   no) echo some default action
       ;;
  bar) echo do whatever you want
       ;;
    *) AC_MSG_ERROR([Invalid value for --with-foo: `$with_foo'])
       ;;
esac

Is that what you want?

Cheers,

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]