autoconf
[Top][All Lists]
Advanced

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

AC_DEFUN: default values of optional arguments


From: Sam Steingold
Subject: AC_DEFUN: default values of optional arguments
Date: Fri, 18 Sep 2009 13:49:04 -0400
User-agent: Thunderbird 2.0.0.22 (X11/20090625)

How do I give an optional argument its default value?
e.g.,
AC_DEFUN([FOO],[...])
FOO() should be equivalent to FOO([true])
do I write something like
AC_DEFUN([FOO],[
opt=$2;
test -z "$opt" && opt=true
])
??

thanks.
Sam.





reply via email to

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