Back to the Main Page. | ac_numeric_namedlevel |
Download the M4 Source. |
AC_NUMERIC_NAMEDLEVEL(VARNAME [,FROMVAR [,DEFAULT [,YESLEVEL]]])
1.1 (2001/10/12) 0.5.65 : guidod
Guido Draheim <guidod@gmx.de>
9| insane |ultrasome|experimentalplus
8| ultra |ultra|experimental)
7| all |muchmore|somemanymore|manymoreplus
6| most |manymore|most)
5| strict |somemore|almost
4| more |more
3| extra |manyplus|plusmuch|somemany|plusmany
2| many |many|much|(yes)
1| some |some|plus
AC_NUMERIC_NAMEDLEVEL(OPTLEVEL,with_optlevel,1,3)
AC_DEFINE(OPTLEVEL)
test "$GCC" = "yes" && CFLAGS="$CFLAGS -O$OPTLEVEL)
AC_DEFUN([AC_NUMERIC_NAMEDLEVEL], [dnl the names to be defined... $1="ifelse($1,,[$]$2,[$]$1)" ; $1="[$]$1" $1="[$]$1" ; $1="[$]$1" if test "_[$]$1" = "_" ; then $1="ifelse([$3],,0,[$3])" elif test "_[$]$1" = "_yes" ; then $1="ifelse([$4],,2,[$4])" else $1=`echo [$]$1 | sed -e 's,some,plus,' -e 's,experimental,ultra,' -e 's,over,ultra,' -e 's,much,many,'` case "[$]$1" in 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*|-*|+*) ;; # leave as is insane|ultraplus|plusultra) $1="9" ;; ultra) $1="8" ;; manymoreplus|manyplusmore|plusmanymore|all) $1="7" ;; moremanyplus|moreplusmany|plusmoremany) $1="7" ;; manymore|moremany|most) $1="6" ;; somemore|moresome|almost) $1="5" ;; more) $1="4" ;; manyplus|plusmany|extra) $1="3" ;; many) $1="2" ;; plus) $1="1" ;; no) $1="0" ;; yes) $1="ifelse([$4],,2,[$4])" ;; *) $1="ifelse([$3],,1,[$3])" ;; # for other unkown stuff. esac fi ])