#!/bin/sh
set -C -e -f -u
cd "$ADTTMP"
cat > p.gpr <<EOF
with "plplotada";
project Proj is
  for Source_Dirs use (".");
  for Main use ("demo.adb");
end Proj;
EOF
cat > proc.adb <<EOF
with Ada.Text_IO;
with PLplot_Standard; 
procedure Proc is
begin
   Ada.Text_IO.Put_Line (Integer'Image (PLplot_Standard.Max_Lines_For_Multiplot));
end Proc;
EOF
gprbuild -v proj.gpr
./proc
