Here is a patch for running ./configure on a checked out repository of Agar. I
used ActivePerl perl, v5.10.0 built for MSWin32-x86-multi-thread. I used MinGW
and MSYS to compile AGAR.
The bug was that ./configure would fail, and if run again it would give a false
success message. The reason it would fail was that the path to the header file
passed to the perl program was of the form: "'./ada-core/ctxt.h'" and so I strip
out the outer "'" characters and it works. So you can do
../configure && make && make install, and it will compile.
perl mk/gen-declspecs.pl "'./ada-core/ctxt.h'" #this fails
perl mk/gen-declspecs.pl './ada-core/ctxt.h' #this works
perl mk/gen-declspecs.pl "./ada-core/ctxt.h" #this works
The patch makes all three above work.
Before you apply the patch, it might be better to root out the problem from its
source and try to find out why those "'" characters are attached to the path in
the first place. Also, this patch is really just a simple hack to make it work.
There is probably a better way to accomplish the same effect more efficiently.
Eric
Index: mk/gen-declspecs.pl
===================================================================
--- mk/gen-declspecs.pl (revision 8209)
+++ mk/gen-declspecs.pl (working copy)
@@ -72,6 +72,19 @@
exit(1);
}
+#
+#A patch to remove the outer single quotes in the $ARGV[0] path string.
+#For example "'./ada-core/ctxt.h'" fails due to the extra single quotes.
+#There is a better way of doing this, but here is a hack.
+#This hack makes ./configure work using MSYS and MinWG and ActivePerl.
+#By Eric R. Dunstan 6-23-2009
+#
+$argvPathLenVar = length($ARGV[0]);
+if ($argvPathLenVar > 2 && substr($ARGV[0], 0, 1) eq "'"
+ && substr($ARGV[0], $argvPathLenVar - 1, 1) eq "'"){
+ $ARGV[0] = substr($ARGV[0], 1, $argvPathLenVar - 2);
+}
+
open(F, $ARGV[0]) || die "$ARGV[0]: $!";
#
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html