diff -ur --exclude=configure /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/config/locatelib pari-2.3.5/config/locatelib
--- /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/config/locatelib	2008-03-31 07:43:59.000000000 -0400
+++ pari-2.3.5/config/locatelib	2010-08-24 00:10:44.000000000 -0400
@@ -17,6 +17,10 @@
         if test -z "$try"; then
           try=`ls $dir/lib$lib.a 2> /dev/null`
         fi
+        # for .dll.a
+        if test -z "$try"; then
+          try=`ls $dir/lib$lib.dll.a 2> /dev/null`
+        fi
       else
         try=
       fi;;
diff -ur --exclude=configure /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/src/language/anal.c pari-2.3.5/src/language/anal.c
--- /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/src/language/anal.c	2008-07-08 16:02:09.000000000 -0400
+++ pari-2.3.5/src/language/anal.c	2010-08-24 00:10:44.000000000 -0400
@@ -2616,10 +2616,11 @@
   return *table = ep;
 }
 
+long max_avail; /* initialized in init.c when memory is allocated */
+
 long
 manage_var(long n, entree *ep)
 {
-  static long max_avail = MAXVARN; /* max variable not yet used */
   static long nvar; /* first GP free variable */
   long var;
   GEN p;
diff -ur --exclude=configure /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/src/language/anal.h pari-2.3.5/src/language/anal.h
--- /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/src/language/anal.h	2008-06-10 11:43:14.000000000 -0400
+++ pari-2.3.5/src/language/anal.h	2010-08-24 00:10:44.000000000 -0400
@@ -20,6 +20,8 @@
 /*************************************************************************/
 BEGINEXTERN
 
+extern long max_avail;
+
 /* GP control structures */
 typedef struct {
   entree *ep;
diff -ur --exclude=configure /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/src/language/init.c pari-2.3.5/src/language/init.c
--- /Users/dan/src/M2/trunk/BUILD/dan/builds.tmp/mac64.debug/libraries/pari/tmp/pari-2.3.5/src/language/init.c	2008-03-31 07:43:58.000000000 -0400
+++ pari-2.3.5/src/language/init.c	2010-08-24 00:10:44.000000000 -0400
@@ -612,6 +612,7 @@
   polvar = (GEN) gpmalloc((MAXVARN+1)*sizeof(long));
   pol_x = (GEN*) gpmalloc((MAXVARN+1)*sizeof(GEN));
   pol_1 = (GEN*) gpmalloc((MAXVARN+1)*sizeof(GEN));
+  max_avail = MAXVARN;
   polvar[0] = evaltyp(t_VEC) | evallg(1);
   for (u=0; u <= MAXVARN; u++) { ordvar[u] = u; varentries[u] = NULL; }
   pari_init_floats();
