libyang REFACTOR config.h code split

... into compat.h and version.h.
diff --git a/compat/compat.h.in b/compat/compat.h.in
index b69a339..bc84305 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -37,6 +37,14 @@
 #  endif
 #endif
 
+#if (@CMAKE_C_COMPILER_ID@ == GNU) || (@CMAKE_C_COMPILER_ID@ == Clang)
+# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
+# define _PACKED __attribute__((__packed__))
+#else
+# define UNUSED(x) UNUSED_ ## x
+# define _PACKED
+#endif
+
 #cmakedefine HAVE_VDPRINTF
 #cmakedefine HAVE_ASPRINTF
 #cmakedefine HAVE_VASPRINTF