-----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             e...@byu.net
-----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@gnu.org
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to