Hello!
Bernd Lachner wrote:
Hi,
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:
--enable-option=yes
--with-option
--enable-option[=xyz]
--with-option[=xyz]
But I want more this two types of arguments for the configure script:
1)
--device=x where x can be devicea, deviceb, ....
--enable-devicea or --enable-deviceb
or
--enable-devicea_or_b=devicea (Here device_a_or_b is a good
description for the group. Example --enable-sounddevice=/dev/sound1)
2)
--devicexresoluton=x
--deviceyresolution=y
--enable-devicexresolution=x
or even better
--deviceres=x*y
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 configure.ac? 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.
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf