Hello,

here is a patch that should allow to download the aldor interface files 
at configure time.

Please tell me whether you like it or not. If it is OK, I will modify 
src/aldor/Makefile.in to work with that patch, i.e. assume that the 
aldor files are available at build-time. (Note that if configure finds 
out about any missing prerequisite for the aldor interface, then "make" 
will not be run in src/aldor.)

Ralf



=== configure.ac
==================================================================
--- configure.ac        (revision 2553)
+++ configure.ac        (local)
@@ -652,10 +652,52 @@
  # have a free license.
  # Not having svn, curl, or wget is not a show stopper, because the files
  # can be obtained manually via a webbrowser.
-AC_CHECK_PROGS([SVN], [svn])
-AC_CHECK_PROGS([CURL], [curl])
-AC_CHECK_PROGS([WGET], [wget])
+AC_CHECK_PROGS([SVN],  [svn],    [false])
+AC_CHECK_PROGS([CURL], [curl],   [false])
+AC_CHECK_PROGS([WGET], [wget],   [false])
+AC_CHECK_PROGS([MD5],  [md5sum], [false])

+## Where can the sourcefiles be obtained from
+ALDORLIBDIR=https://svn.origo.ethz.ch/algebraist/trunk/aldor/lib
+
+## Make sure the src/aldor subdir exists.
+if ! test -d src; then mkdir src; fi;
+if ! test -d src/aldor; then mkdir src/aldor; fi;
+
+AC_DEFUN([ALDOR_CHECKSUM_FILE],
+   [H2=`$MD5 $2 2>/dev/null`;
+    if test "$1  $2" = "$H2"; then
+    AC_MSG_NOTICE([Checksum of $2 ... OK])
+      OK="true"
+    else
+      AC_MSG_NOTICE([Checksum of $2 ... failed])
+      OK="false"
+    fi])
+
+
+AC_DEFUN([ALDOR_CHECK_FILE],
+   [R=src/aldor/$3.remote
+    H1=$1
+    F=$ALDORLIBDIR/$2/$3
+    ALDOR_CHECKSUM_FILE([$H1], [$R])
+    if test "$OK" != "true"; then
+      AC_MSG_NOTICE([Trying to download missing $R])
+      ($CURL $F ||$SVN cat $F ||$WGET -O - $F) 2>/dev/null > $R
+      ALDOR_CHECKSUM_FILE([$H1], [$R])
+      if test "$OK" != "true"; then
+        BUILD_ALDOR_INTERFACE=
+      fi
+    fi
+])
+
+ALDOR_CHECK_FILE([1a2cdb4d15c1177a070a6cf56f45b5fc],[libax0],[axextend.as])
+ALDOR_CHECK_FILE([71e7f9a02bbef51e77c4a195febad56e],[libax0],[axiom.as])
+ALDOR_CHECK_FILE([f08a07820467c452df048341798ee8a8],[libax0],[axlit.as])
+ALDOR_CHECK_FILE([c0a981c5a719e63ce289e74d4681b29f],[libax0],[minimach.as])
+ALDOR_CHECK_FILE([f9983e9d145f912928a13cbafa8bc6aa],[libax0],[stub.as])
+ALDOR_CHECK_FILE([a39358720dc7318fc60e9dd9661cd719],[axllib/src],[lang.as])
+
+
  ## check for $ALDORROOT/include/aldor.conf
  if test -z $ALDORROOT || ! test -f $ALDORROOT/include/aldor.conf; then
    AC_MSG_WARN([The environment variable ALDORROOT is not set.])

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to