Re: Command-line option processing

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

 



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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux