Description: allow to link executables with ASIS shared library
 Passing -XLIBRARY_KIND=dynamic lets the project build ASIS as a
 shared library and link the tools with it.
 .
 The resulting project is not very readable because I attempt to avoid
 intrusive changes and ensure that the default behaviour does not change.
Author: Nicolas Boulenguez <nicolas@debian.org>
Forwarded: no

--- a/asis.gpr
+++ b/asis.gpr
@@ -37,6 +37,19 @@
    for Library_Dir use "lib";
    for Library_Kind use "static";
 
+   type A_Library_Kind is ("dynamic", "relocatable", "static");
+   Library_Kind : A_Library_Kind := External ("LIBRARY_KIND", "static");
+   case Library_Kind is
+      when "static" =>
+         null;
+      when "dynamic" | "relocatable" =>
+         for Object_Dir use Project'Object_Dir & "-dynamic";
+         for Library_Dir use Project'Library_Dir & "-dynamic";
+         for Library_Kind use "dynamic";
+         for Library_Version use "libasis.so." & External ("soversion", "unset");
+         for Library_Options use Common.Ldflags;
+   end case;
+
    package Builder renames Common.Builder;
    package Ide renames Common.Ide;
 
