From: Francesco M. <fr...@us...> - 2008-01-14 12:11:35
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23335 Modified Files: utils.m4 Log Message: added the UTILS_YESNOAUTO_OPTCHECK macro Index: utils.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/utils.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** utils.m4 26 Jul 2007 22:08:11 -0000 1.1 --- utils.m4 14 Jan 2008 12:11:32 -0000 1.2 *************** *** 30,33 **** --- 30,66 ---- dnl --------------------------------------------------------------------------- + dnl UTILS_YESNOAUTO_OPTCHECK([name of the boolean variable to set], + dnl [name of the --enable-option variable with yes/no/auto values], + dnl [name of the --enable option]) + dnl + dnl Converts the $3 variable, suppose to contain a yes/no/auto value to a 1/0 + dnl boolean variable and saves the result into $1. + dnl Outputs also the standard checking-option message. + dnl --------------------------------------------------------------------------- + AC_DEFUN([UTILS_YESNOAUTO_OPTCHECK], + [ + AC_MSG_CHECKING([for the $3 option]) + if [[ "x$$2" = "xyes" ]]; then + AC_MSG_RESULT([yes]) + $1=1 + elif [[ "x$$2" = "xauto" ]]; then + AC_MSG_RESULT([auto]) + + dnl We set $1 variable to "1" even if the user given the 'auto' option + dnl value because the configure script is supposed to check for the + dnl correctness of this option both in case "automatic" configuration + dnl is enabled both in case the user explicitely gives a "yes" value + dnl (think to external library checks: both in case 'auto' or 'yes' is + dnl given, the configure script will need to check the external library + dnl do exists and disable $1 variable if it does not). + $1=1 + else + AC_MSG_RESULT([no]) + $1=0 + fi + ]) + + + dnl --------------------------------------------------------------------------- dnl UTILS_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], dnl [what to print when var is 1], |