diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -4226,9 +4226,14 @@ AC_ARG_WITH(computed-gotos, [ if test "$withval" = yes then - AC_DEFINE(USE_COMPUTED_GOTOS, 1, - [Define if you want to use computed gotos in ceval.c.]) - AC_MSG_RESULT(yes) + if test "$ac_cv_computed_gotos" = yes + then + AC_DEFINE(USE_COMPUTED_GOTOS, 1, + [Define if you want to use computed gotos in ceval.c.]) + AC_MSG_RESULT(yes) + else + AC_MSG_ERROR([--with-computed-gotos was specified, but the compiler does not support computed gotos]) + fi fi if test "$withval" = no then @@ -4237,7 +4242,14 @@ then AC_MSG_RESULT(no) fi ], -[AC_MSG_RESULT(no value specified)]) +[ +if test "$ac_cv_computed_gotos" = yes +then + AC_DEFINE(USE_COMPUTED_GOTOS, 1, + [Define if you want to use computed gotos in ceval.c.]) + AC_MSG_RESULT(yes) +fi +]) case $ac_sys_system in AIX*)