configure: use LIB_EXT rather than hardcoded .so

Some platforms different library extension - dll, dylib, a.
Honor that when we are creating the required links.

Rename LIB_EXTENSION to LIB_EXT while we're here.

With libglapi linking aside, building classic drivers on
non-linux platforms should be possible now.

v2: Resolve conflicts.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
diff --git a/configure.ac b/configure.ac
index 6141a54..5e1d091 100644
--- a/configure.ac
+++ b/configure.ac
@@ -320,19 +320,22 @@
 dnl library names
 dnl
 if test "$enable_static" = yes; then
-    LIB_EXTENSION='a'
+    LIB_EXT='a'
 else
     case "$host_os" in
     darwin* )
-        LIB_EXTENSION='dylib' ;;
+        LIB_EXT='dylib' ;;
     cygwin* )
-        LIB_EXTENSION='dll' ;;
+        LIB_EXT='dll' ;;
     aix* )
-        LIB_EXTENSION='a' ;;
+        LIB_EXT='a' ;;
     * )
-        LIB_EXTENSION='so' ;;
+        LIB_EXT='so' ;;
     esac
 fi
+
+AC_SUBST([LIB_EXT])
+
 AC_ARG_WITH([gl-lib-name],
   [AS_HELP_STRING([--with-gl-lib-name@<:@=NAME@:>@],
     [specify GL library name @<:@default=GL@:>@])],