[Top][All Lists]

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

Re: Autoconf and optional arguments for the configure script

From: Andre Caldas
Subject: Re: Autoconf and optional arguments for the configure script
Date: Sat, 25 Jun 2005 11:23:56 +0900
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)


Bernd Lachner wrote:

I need some optional arguments for a configure script. I have seen the macros AC_ARG_WITH and AC_ARG_ENABLE in the autoconf manual. As far I can see, I can add arguments like this to the configure script:


But I want more this two types of arguments for the configure script:

--device=x where x can be devicea, deviceb, ....

--enable-devicea or --enable-deviceb
--enable-devicea_or_b=devicea (Here device_a_or_b is a good description for the group. Example --enable-sounddevice=/dev/sound1)



or even better


This is up to you. But '*' is spaned by the shell, and your users will have to escape it: --deviceres=x\*y.
Probably you want: --devicers=AxB

where x and y is an integer value. This should lead for example to a #define xres 320 and #define yres 240 in config.h.

Is there an easy way to add such kind of arguments to Or ist the only way for arguments AC_ARG_WITH and AC_ARG_ENABLE?

There are probably lots of ways... but it seems to me that the "Autoconf Way [tm]" is using AC_ARG_WITH and AC_ARG_ENABLE.

Andre Caldas.

reply via email to

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