diff --git a/configure b/configure
index e3cf0b9f8f354a204c83b8e1ea2c799c66839c38..4866894d75fcc3fbbe8b48e386572bf01f6cc028 100755
--- a/configure
+++ b/configure
@@ -911,6 +911,7 @@ static void sighandler(int sig){
 int foo(void){
     $code
 }
+int (*func_ptr)(void) = foo;
 int main(void){
     signal(SIGILL, sighandler);
     signal(SIGFPE, sighandler);
@@ -918,7 +919,7 @@ int main(void){
 #ifdef SIGBUS
     signal(SIGBUS, sighandler);
 #endif
-    foo();
+    return func_ptr();
 }
 EOF
 }