configure: Fix the check for _Static_assert
configure: Fix the check for _Static_assert

The check for whether the compiler supports _Static_assert didn't work
properly because the AC_TRY_COMPILE function puts the source
definition in its own main function. The test therefore ends up
declaring a nested main function which GCC allows. If _Static_assert
isn't available then it just looks like an implicit declaration of a
function which only causes a warning in GCC so it would still compile.

This patch changes it to use AC_COMPILE_IFELSE instead. This macro
makes it possible to specify the complete source code so
_Static_assert can be called from the global scope. AC_LANG_PROGRAM is
used to generate the program. For extra aesthetics it now also
generates a 'checking for...' message while the script is running.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 9657938c3083a782234e1e9f05ab5ae88a6bc5ab)

Distrotech/cogl,Distrotech/cogl,Distrotech/cogl,Distrotech/cogl