Re: AC_DEFUN: default values of optional arguments

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Sam Steingold on 9/18/2009 11:49 AM:
> How do I give an optional argument its default value?

m4_default([$2],[default text])

expands to $2 if it was provided, or default text otherwise.

AC_DEFUN([FOO], [...
opt=m4_default([$2],[true])
])

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@xxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqzzK0ACgkQ84KuGfSFAYCUWACgrLZzUnclwXO8XgAH8f5l+3cd
ifQAmwUfJwieVH4ObuTyuxZglBagOxhJ
=7+yj
-----END PGP SIGNATURE-----


_______________________________________________
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