Index: Makefile.in
===================================================================
--- Makefile.in	(revision a94090d0cd2313d6f7feaf0908fb3c4da5fe3352)
+++ Makefile.in	(revision 9ead313dbb7fd46c67238eead96c3efc1d873c1c)
@@ -19,4 +19,6 @@
 PERL		= @PERL@
 TMP_DIR		= @TMP_DIR@
+MYGZIP		= @MYGZIP@
+GUNZIP		= @GUNZIP@
 
 ##############################################################
@@ -156,24 +158,23 @@
 dist: ${SHAREDIST_NAME}.tgz  ${BINDIST_NAME}.tgz 
 
-sharedist ${SHAREDIST_NAME}.tgz:
+sharedist ${SHAREDIST_NAME}.tar.gz:
 	if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
 	${MAKE} install-sharedist localdir=${TMPDIR}
-	cd ${TMPDIR}; tar cf - Singular| gzip -c > ${SHAREDIST_NAME}.tgz
-	mv ${TMPDIR}/${SHAREDIST_NAME}.tgz .
-	rm -rf ${TMPDIR}
-
-bindist ${BINDIST_NAME}.tgz: 
+	cd ${TMPDIR}; tar cf ${SHAREDIST_NAME}.tar Singular; ${MYGZIP} ${SHAREDIST_NAME}.tar
+	mv ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
+	rm -rf ${TMPDIR}
+
+bindist ${BINDIST_NAME}.tar.gz: 
 	if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
 	${MAKE} install-bindist localdir=${TMPDIR}
-	cd ${TMPDIR}; tar cf - Singular | gzip -c > ${BINDIST_NAME}.tgz
-	mv ${TMPDIR}/Singular-${S_VERSION}-${SINGUNAME}.tgz .
-	rm -rf ${TMPDIR}
-
-install-local-dist: ${SHAREDIST_NAME}.tgz ${BINDIST_NAME}.tgz
-	cp ${SHAREDIST_NAME}.tgz ${BINDIST_NAME}.tgz ${localdir}
-	cd ${localdir}
-	gunzip -c ${SHAREDIST_NAME}.tgz | tar xf - 
-	gunzip -c ${BINDIST_NAME}.tgz | tar xf -
-	rm -rf ${localdir}/${SHAREDIST_NAME}.tgz ${localdir}/${BINDIST_NAME}.tgz
+	cd ${TMPDIR}; tar cf ${BINDIST_NAME}.tar Singular; ${MYGZIP} ${BINDIST_NAME}.tar
+	mv ${TMPDIR}/Singular-${S_VERSION}-${SINGUNAME}.tar.gz
+	rm -rf ${TMPDIR}
+
+install-local-dist: ${SHAREDIST_NAME}.tar.gz ${BINDIST_NAME}.tar.gz
+	cp ${SHAREDIST_NAME}.tar.gz ${BINDIST_NAME}.tar.gz ${localdir}
+	cd ${localdir}; ${GUNZIP} ${SHAREDIST_NAME}.tar.gz; tar xf ${SHAREDIST_NAME}.tar
+	cd ${localdir}; ${GUNZIP} ${BINDIST_NAME}.tar.gz; tar xf ${BINDIST_NAME}.tar
+	rm -rf ${localdir}/${SHAREDIST_NAME}.tar.gz ${localdir}/${BINDIST_NAME}.tar.gz
 	${MKINSTALLDIRS} ${localdir}/bin
 	${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/Singular ${localdir}/bin/Singular-${S_VERSION}
@@ -181,4 +182,8 @@
 
 
+
+##
+## old targets -- need to be updated
+##
 
 BINDIR_NAME	= Singular/${S_VERSION}/${SINGUNAME}
@@ -196,47 +201,5 @@
 
 .PHONY: sharedist bindist static-bindist infodist win-sharedist
-_sharedist: ${SINGULAR}
-	cd doc; ${MAKE} all ps
-	cd emacs; ${MAKE} all
-	rm -rf ${TMPDIR}/
-	${MKINSTALLDIRS} ${TMPDIR}/${LIBDIR_NAME}
-	${MKINSTALLDIRS} ${TMPDIR}/${GFTABLESDIR_NAME}
-	${MKINSTALLDIRS} ${TMPDIR}/${DOCDIR_NAME}
-	${MKINSTALLDIRS} ${TMPDIR}/${HTMLDIR_NAME}
-	${MKINSTALLDIRS} ${TMPDIR}/${INFODIR_NAME}
-	${MKINSTALLDIRS} ${TMPDIR}/${EMACSDIR_NAME}
-	cp Singular/LIB/*.lib ${TMPDIR}/${LIBDIR_NAME}
-	rm -f ${TMPDIR}/${LIBDIR_NAME}/tst.lib 
-	cp Singular/LIB/gftables/[0-9]* ${TMPDIR}/${GFTABLESDIR_NAME}
-	cp doc/singular.idx doc/manual.ps doc/usercard.ps \
-           doc/manual.dvi doc/usercard.dvi \
-           ${TMPDIR}/${DOCDIR_NAME}
-	cp doc/singular.hlp ${TMPDIR}/${INFODIR_NAME}
-	cp -R doc/html/* ${TMPDIR}/${HTMLDIR_NAME}
-	cp emacs/*.el ${TMPDIR}/${EMACSDIR_NAME}
-	cp emacs/.emacs-singular ${TMPDIR}/${EMACSDIR_NAME}
-	chmod -R  a+rX  ${TMPDIR}/Singular
-	cd ${TMPDIR}; \
-	    ${ZIP} -r ${SHAREDIST_NAME} Singular; \
-	    tar cf ${SHAREDIST_NAME}.tar Singular; gzip ${SHAREDIST_NAME}.tar
-	mv ${TMPDIR}/${SHAREDIST_NAME}.zip ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
-	rm -rf ${TMPDIR}/
-
-
-_bindist: ${SINGULAR}
-	cd Singular; ${MAKE} Singular-$@ libparse
-	rm -rf ${TMPDIR}
-	${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
-	cp Singular/Singular-$@ ${TMPDIR}/${BINDIR_NAME}/Singular
-	cp Singular/ESingular ${TMPDIR}/${BINDIR_NAME}/ESingular
-	cp Singular/libparse ${TMPDIR}/${BINDIR_NAME}
-	-strip ${TMPDIR}/${BINDIR_NAME}/*
-	cd ${TMPDIR}; chmod -R a+rX *;\
-           tar cf ${BINDIST_NAME}.tar Singular; \
-           gzip ${BINDIST_NAME}.tar
-	mv ${TMPDIR}/${BINDIST_NAME}.tar.gz .
-	rm -rf ${TMPDIR}
-
-static-bindist: ${SINGULAR}
+_static-bindist: ${SINGULAR}
 	cd Singular; ${MAKE} Singular-$@ libparse
 	rm -rf ${TMPDIR}
@@ -249,9 +212,9 @@
 	cd ${TMPDIR}; chmod -R a+rX *;\
            tar cf ${BINDIST_NAME}-static.tar Singular; \
-           gzip ${BINDIST_NAME}-static.tar
+           ${MYGZIP} ${BINDIST_NAME}-static.tar
 	mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
 	rm -rf ${TMPDIR}
 
-infodist: 
+_infodist: 
 	rm -rf ${TMPDIR}
 	${MKINSTALLDIRS} ${TMPDIR}/${SINGUNAME}/bin/
@@ -259,5 +222,5 @@
 	-strip ${TMPDIR}/${SINGUNAME}/bin/info
 	cd ${TMPDIR}; tar cf info-${SINGUNAME}.tar ${SINGUNAME}; \
-                      gzip info-${SINGUNAME}.tar
+                      ${MYGZIP} info-${SINGUNAME}.tar
 	mv ${TMPDIR}/info-${SINGUNAME}.tar.gz .
 	rm -rf ${TMPDIR}
@@ -290,5 +253,5 @@
 	cd  ${TMPDIR}; \
 	tar cf Singular-${S_VERSION}.tar Singular-${S_VERSION}; \
-	gzip Singular-${S_VERSION}.tar
+	${MYGZIP} Singular-${S_VERSION}.tar
 	cp ${TMPDIR}/Singular-${S_VERSION}.tar.gz .
 	rm -rf ${TMPDIR}
Index: configure
===================================================================
--- configure	(revision a94090d0cd2313d6f7feaf0908fb3c4da5fe3352)
+++ configure	(revision 9ead313dbb7fd46c67238eead96c3efc1d873c1c)
@@ -2,5 +2,5 @@
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
+# Generated automatically using autoconf version 2.13 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
@@ -102,4 +102,5 @@
 subdirs=
 MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 # Maximum number of lines to put in a shell here document.
 ac_max_here_lines=12
@@ -385,5 +386,5 @@
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
+    echo "configure generated by autoconf version 2.13"
     exit 0 ;;
 
@@ -555,7 +556,9 @@
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
+ac_exeext=
+ac_objext=o
 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -587,6 +590,8 @@
 fi
 
+pwd=`pwd`
+
 echo $ac_n "checking uname for singular""... $ac_c" 1>&6
-echo "configure:591: checking uname for singular" >&5
+echo "configure:596: checking uname for singular" >&5
 if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -633,5 +638,5 @@
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:636: checking for $ac_word" >&5
+echo "configure:641: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -640,6 +645,7 @@
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -662,5 +668,5 @@
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:665: checking for $ac_word" >&5
+echo "configure:671: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -669,7 +675,8 @@
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-  for ac_dir in $PATH; do
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -706,9 +713,43 @@
 fi
 
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:722: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
@@ -716,13 +757,15 @@
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
-cat > conftest.$ac_ext <<EOF
-#line 723 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 765 "configure"
 #include "confdefs.h"
+
 main(){return(0);}
 EOF
-if { (eval echo configure:727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
@@ -738,4 +781,10 @@
 fi
 rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
@@ -744,10 +793,10 @@
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:752: checking whether we are using GNU C" >&5
+echo "configure:801: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -758,5 +807,5 @@
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
@@ -769,9 +818,13 @@
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS=
-  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:776: checking whether ${CC-cc} accepts -g" >&5
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:829: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -788,18 +841,22 @@
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
     CFLAGS="-g -O2"
   else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
     CFLAGS="-O2"
-  fi
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
+  else
+    CFLAGS=
+  fi
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:804: checking how to run the C preprocessor" >&5
+echo "configure:861: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -816,5 +873,5 @@
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 819 "configure"
+#line 876 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -822,6 +879,6 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -833,5 +890,5 @@
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 836 "configure"
+#line 893 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -839,6 +896,23 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 910 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -849,4 +923,6 @@
   rm -rf conftest*
   CPP=/lib/cpp
+fi
+rm -f conftest*
 fi
 rm -f conftest*
@@ -887,14 +963,15 @@
 # IRIX /sbin/install
 # AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:894: checking for a BSD compatible install" >&5
+echo "configure:971: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
   for ac_dir in $PATH; do
     # Account for people who put trailing slashes in PATH elements.
@@ -903,10 +980,11 @@
     *)
       # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
         if test -f $ac_dir/$ac_prog; then
 	  if test $ac_prog = install &&
             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
-	    # OSF/1 installbsd also uses dspmsg, but is usable.
 	    :
 	  else
@@ -938,10 +1016,12 @@
 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:944: checking for AIX" >&5
+echo "configure:1024: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 946 "configure"
+#line 1026 "configure"
 #include "confdefs.h"
 #ifdef _AIX
@@ -970,5 +1050,5 @@
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:973: checking for $ac_word" >&5
+echo "configure:1053: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -977,6 +1057,7 @@
   ac_cv_prog_PERL="$PERL" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -998,8 +1079,79 @@
 done
 
+for ac_prog in __gunzip
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1087: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_GUNZIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$GUNZIP"; then
+  ac_cv_prog_GUNZIP="$GUNZIP" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_GUNZIP="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+GUNZIP="$ac_cv_prog_GUNZIP"
+if test -n "$GUNZIP"; then
+  echo "$ac_t""$GUNZIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$GUNZIP" && break
+done
+test -n "$GUNZIP" || GUNZIP="${pwd}/warn_not_found.sh gunzip"
+
+# don't use GZIP this breaks configure
+for ac_prog in __gzip
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1123: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MYGZIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$MYGZIP"; then
+  ac_cv_prog_MYGZIP="$MYGZIP" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_MYGZIP="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+MYGZIP="$ac_cv_prog_MYGZIP"
+if test -n "$MYGZIP"; then
+  echo "$ac_t""$MYGZIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$MYGZIP" && break
+done
+test -n "$MYGZIP" || MYGZIP="${pwd}/warn_not_found.sh gzip"
+
 # Extract the first word of "latex2html", so it can be a program name with args.
 set dummy latex2html; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1004: checking for $ac_word" >&5
+echo "configure:1156: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LATEX2HTML'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1008,6 +1160,7 @@
   ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -1027,5 +1180,5 @@
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1030: checking whether ln -s works" >&5
+echo "configure:1183: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1059,5 +1212,5 @@
 set dummy texi2html; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1062: checking for $ac_word" >&5
+echo "configure:1215: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_TEXI2HTML'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1066,6 +1219,7 @@
   ac_cv_prog_TEXI2HTML="$TEXI2HTML" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -1132,10 +1286,10 @@
 # check for AIX
 echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6
-echo "configure:1135: checking whether _AIX is defined" >&5
+echo "configure:1289: checking whether _AIX is defined" >&5
 if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1140 "configure"
+#line 1294 "configure"
 #include "confdefs.h"
 #ifdef _AIX
@@ -1163,5 +1317,5 @@
 
 echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6
-echo "configure:1166: checking for atof in -lm" >&5
+echo "configure:1320: checking for atof in -lm" >&5
 ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1171,5 +1325,5 @@
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1174 "configure"
+#line 1328 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1182,5 +1336,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1210,5 +1364,5 @@
 
 echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6
-echo "configure:1213: checking for socket in -lbsd" >&5
+echo "configure:1367: checking for socket in -lbsd" >&5
 ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1218,5 +1372,5 @@
 LIBS="-lbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1221 "configure"
+#line 1375 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1229,5 +1383,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1257,5 +1411,5 @@
 
 echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6
-echo "configure:1260: checking for listen in -lsocket" >&5
+echo "configure:1414: checking for listen in -lsocket" >&5
 ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1265,5 +1419,5 @@
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1268 "configure"
+#line 1422 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1276,5 +1430,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1304,5 +1458,5 @@
 
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1307: checking for gethostbyname in -lnsl" >&5
+echo "configure:1461: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1312,5 +1466,5 @@
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1315 "configure"
+#line 1469 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1323,5 +1477,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1351,5 +1505,5 @@
 
 echo $ac_n "checking for mpq_init in -lgmp""... $ac_c" 1>&6
-echo "configure:1354: checking for mpq_init in -lgmp" >&5
+echo "configure:1508: checking for mpq_init in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpq_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1359,5 +1513,5 @@
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1362 "configure"
+#line 1516 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1370,5 +1524,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1398,5 +1552,5 @@
 
 echo $ac_n "checking for mpz_init in -lsmallgmp""... $ac_c" 1>&6
-echo "configure:1401: checking for mpz_init in -lsmallgmp" >&5
+echo "configure:1555: checking for mpz_init in -lsmallgmp" >&5
 ac_lib_var=`echo smallgmp'_'mpz_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1406,5 +1560,5 @@
 LIBS="-lsmallgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1409 "configure"
+#line 1563 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1417,5 +1571,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1445,5 +1599,5 @@
 
 echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6
-echo "configure:1448: checking for IMP_PutGmpInt in -lMP" >&5
+echo "configure:1602: checking for IMP_PutGmpInt in -lMP" >&5
 ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1453,5 +1607,5 @@
 LIBS="-lMP  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1456 "configure"
+#line 1610 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1464,5 +1618,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1492,5 +1646,5 @@
 
 echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6
-echo "configure:1495: checking for MPT_GetTree in -lMPT" >&5
+echo "configure:1649: checking for MPT_GetTree in -lMPT" >&5
 ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1500,5 +1654,5 @@
 LIBS="-lMPT  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1503 "configure"
+#line 1657 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1511,5 +1665,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1539,5 +1693,5 @@
 
 echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6
-echo "configure:1542: checking for atof in -lsingcf" >&5
+echo "configure:1696: checking for atof in -lsingcf" >&5
 ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1547,5 +1701,5 @@
 LIBS="-lsingcf  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1550 "configure"
+#line 1704 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1558,5 +1712,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1586,5 +1740,5 @@
 
 echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6
-echo "configure:1589: checking for atof in -lsingfac" >&5
+echo "configure:1743: checking for atof in -lsingfac" >&5
 ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1594,5 +1748,5 @@
 LIBS="-lsingfac  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1597 "configure"
+#line 1751 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1605,5 +1759,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1637,16 +1791,16 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1640: checking for $ac_hdr" >&5
+echo "configure:1794: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1645 "configure"
+#line 1799 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1789,5 +1943,5 @@
 
 echo $ac_n "checking which tmp dir to use""... $ac_c" 1>&6
-echo "configure:1792: checking which tmp dir to use" >&5
+echo "configure:1946: checking which tmp dir to use" >&5
 if test "${with_tmpdir+set}" = set && test -d ${with_tmpdir}; then
   if (echo "${with_tmpdir}" | egrep "\." >/dev/null 2>&1)
@@ -1806,5 +1960,5 @@
 if test "${with_perl5+set}" != set; then
   echo $ac_n "checking for perl5""... $ac_c" 1>&6
-echo "configure:1809: checking for perl5" >&5
+echo "configure:1963: checking for perl5" >&5
     if eval "test \"`echo '$''{'ac_cv_prog_perl5'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1843,5 +1997,5 @@
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1846: checking for $ac_word" >&5
+echo "configure:2000: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PERL5'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1850,6 +2004,7 @@
   ac_cv_prog_PERL5="$PERL5" # Let the user override the test.
 else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
@@ -1878,5 +2033,5 @@
 
 echo $ac_n "checking whether to configure and build texinfo""... $ac_c" 1>&6
-echo "configure:1881: checking whether to configure and build texinfo" >&5
+echo "configure:2036: checking whether to configure and build texinfo" >&5
 if test "$enable_texinfo" != no && test -d Texinfo; then
   echo "$ac_t""yes" 1>&6
@@ -1886,19 +2041,106 @@
   MAKEINFO="${bindir}/makeinfo --force"
   TEXINDEX=${bindir}/texindex
+  
+  
+  
 else
   echo "$ac_t""no" 1>&6
   echo "configure: warning: Building of doc might fail. Need Texinfo" 1>&2
   enable_texinfo=no
-  TEXI2DVI=texi2dvi
-  MAKEINFO=makeinfo
-  TEXINDEX=${bindir}/texindex
+  # Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2054: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$MAKEINFO"; then
+  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_MAKEINFO="makeinfo"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="${pwd}/warn_not_found.sh makeinfo"
+fi
+fi
+MAKEINFO="$ac_cv_prog_MAKEINFO"
+if test -n "$MAKEINFO"; then
+  echo "$ac_t""$MAKEINFO" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  # Extract the first word of "texi2dvi", so it can be a program name with args.
+set dummy texi2dvi; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2084: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_TEXI2DVI'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$TEXI2DVI"; then
+  ac_cv_prog_TEXI2DVI="$TEXI2DVI" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_TEXI2DVI="texi2dvi"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_TEXI2DVI" && ac_cv_prog_TEXI2DVI="${pwd}/warn_not_found.sh texi2dvi"
+fi
+fi
+TEXI2DVI="$ac_cv_prog_TEXI2DVI"
+if test -n "$TEXI2DVI"; then
+  echo "$ac_t""$TEXI2DVI" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  # Extract the first word of "texindex", so it can be a program name with args.
+set dummy texindex; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2114: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_TEXINDEX'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$TEXINDEX"; then
+  ac_cv_prog_TEXINDEX="$TEXINDEX" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_TEXINDEX="texindex"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_TEXINDEX" && ac_cv_prog_TEXINDEX="${pwd}/warn_not_found.sh texindex"
+fi
+fi
+TEXINDEX="$ac_cv_prog_TEXINDEX"
+if test -n "$TEXINDEX"; then
+  echo "$ac_t""$TEXINDEX" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 fi  
 
 
-
-
-
 echo $ac_n "checking whether to configure and build gmp lib""... $ac_c" 1>&6
-echo "configure:1903: checking whether to configure and build gmp lib" >&5
+echo "configure:2145: checking whether to configure and build gmp lib" >&5
 if test "$enable_gmp" != yes && test "$enable_gmp" != no; then
   if test "$ac_gmp_ok" != yes && test -d gmp; then
@@ -1926,5 +2168,5 @@
 
 echo $ac_n "checking whether to configure and build smallgmp lib""... $ac_c" 1>&6
-echo "configure:1929: checking whether to configure and build smallgmp lib" >&5
+echo "configure:2171: checking whether to configure and build smallgmp lib" >&5
 if test "$enable_smallgmp" != yes && test "$enable_smallgmp" != no; then
   if test "$ac_smallgmp_ok" != yes && test "$ac_gmp_ok" != yes && \
@@ -1965,5 +2207,5 @@
 
 echo $ac_n "checking whether to configure and build MP lib""... $ac_c" 1>&6
-echo "configure:1968: checking whether to configure and build MP lib" >&5
+echo "configure:2210: checking whether to configure and build MP lib" >&5
 if test "$enable_MP" != yes && test "$enable_MP" != no; then
   if test "$with_MP" != no && test "$ac_MP_ok" != yes && test -d MP && \
@@ -1994,5 +2236,5 @@
   
 echo $ac_n "checking whether to configure and build factory lib""... $ac_c" 1>&6
-echo "configure:1997: checking whether to configure and build factory lib" >&5
+echo "configure:2239: checking whether to configure and build factory lib" >&5
 if test "$enable_factory" != yes && test "$enable_factory" != no; then
   if test "$with_factory" != no && test "$ac_factory_ok" != yes && \
@@ -2019,5 +2261,5 @@
 
 echo $ac_n "checking whether to configure and build libfac lib""... $ac_c" 1>&6
-echo "configure:2022: checking whether to configure and build libfac lib" >&5
+echo "configure:2264: checking whether to configure and build libfac lib" >&5
 if test "$enable_libfac" != yes && test "$enable_libfac" != no; then
   if test "$with_libfac" != no && test "$ac_libfac_ok" != yes && \
@@ -2049,5 +2291,5 @@
 
 echo $ac_n "checking whether to configure and build sgroup lib""... $ac_c" 1>&6
-echo "configure:2052: checking whether to configure and build sgroup lib" >&5
+echo "configure:2294: checking whether to configure and build sgroup lib" >&5
 if test "$enable_sgroup" != yes && test "$enable_sgroup" != no; then
   if test "$with_sgroup" != no && test "$ac_sgroup_ok" != yes && \
@@ -2079,5 +2321,5 @@
 
 echo $ac_n "checking whether to configure and build Singular""... $ac_c" 1>&6
-echo "configure:2082: checking whether to configure and build Singular" >&5
+echo "configure:2324: checking whether to configure and build Singular" >&5
 if test "$enable_Singular" != yes && test "$enable_Singular" != no; then
   if test "$with_Singular" != no && test -d Singular; then
@@ -2104,5 +2346,5 @@
 
 echo $ac_n "checking which apint package to use""... $ac_c" 1>&6
-echo "configure:2107: checking which apint package to use" >&5
+echo "configure:2349: checking which apint package to use" >&5
 if test "$with_apint" = gmp; then
   if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then
@@ -2128,5 +2370,5 @@
 
 echo $ac_n "checking whether to use with MP""... $ac_c" 1>&6
-echo "configure:2131: checking whether to use with MP" >&5
+echo "configure:2373: checking whether to use with MP" >&5
 if test "$with_MP" = yes; then
   if test "$ac_MP_ok" = yes || test "$enable_MP" = yes; then
@@ -2147,5 +2389,5 @@
 
 echo $ac_n "checking whether to use with factory""... $ac_c" 1>&6
-echo "configure:2150: checking whether to use with factory" >&5
+echo "configure:2392: checking whether to use with factory" >&5
 if test "$with_factory" = yes; then
   if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then
@@ -2166,5 +2408,5 @@
   
 echo $ac_n "checking whether to use with libfac""... $ac_c" 1>&6
-echo "configure:2169: checking whether to use with libfac" >&5
+echo "configure:2411: checking whether to use with libfac" >&5
 if test "$with_libfac" = yes; then
   if test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes; then
@@ -2185,5 +2427,5 @@
 
 echo $ac_n "checking whether to use mtrack""... $ac_c" 1>&6
-echo "configure:2188: checking whether to use mtrack" >&5
+echo "configure:2430: checking whether to use mtrack" >&5
 if test -d mpr && test "$ac_cv_singuname" = ix86-Linux; then
    echo "$ac_t""yes" 1>&6
@@ -2194,5 +2436,5 @@
 
 echo $ac_n "checking whether to use with Singular""... $ac_c" 1>&6
-echo "configure:2197: checking whether to use with Singular" >&5
+echo "configure:2439: checking whether to use with Singular" >&5
 if test "$with_Singular" != no && test "$with_Singular" != yes; then
   if test "$enable_Singular" = yes; then
@@ -2253,5 +2495,5 @@
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2256: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2498: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
@@ -2308,5 +2550,5 @@
 # and sets the high bit in the cache file unless we assign to the vars.
 (set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1` in
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
   *ac_space=\ *)
     # `set' does not quote correctly, so add quotes (double-quote substitution
@@ -2387,5 +2629,5 @@
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
@@ -2407,7 +2649,9 @@
 $ac_vpsub
 $extrasub
+s%@SHELL@%$SHELL%g
 s%@CFLAGS@%$CFLAGS%g
 s%@CPPFLAGS@%$CPPFLAGS%g
 s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
 s%@DEFS@%$DEFS%g
 s%@LDFLAGS@%$LDFLAGS%g
@@ -2435,6 +2679,9 @@
 s%@CPP@%$CPP%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@PERL@%$PERL%g
+s%@GUNZIP@%$GUNZIP%g
+s%@MYGZIP@%$MYGZIP%g
 s%@LATEX2HTML@%$LATEX2HTML%g
 s%@LN_S@%$LN_S%g
Index: configure.in
===================================================================
--- configure.in	(revision a94090d0cd2313d6f7feaf0908fb3c4da5fe3352)
+++ configure.in	(revision 9ead313dbb7fd46c67238eead96c3efc1d873c1c)
@@ -16,4 +16,6 @@
    OUTPUT_MAKEFILES=$OUTPUT_MAKEFILES" emacs/Makefile"
 fi
+
+pwd=`pwd`
 
 dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
@@ -71,4 +73,7 @@
 
 AC_CHECK_PROGS(PERL, perl5 perl)
+AC_CHECK_PROGS(GUNZIP, gunzip,  ${pwd}/warn_not_found.sh gunzip)
+# don't use GZIP this breaks configure
+AC_CHECK_PROGS(MYGZIP, gzip, ${pwd}/warn_not_found.sh gzip)
 AC_CHECK_PROG(LATEX2HTML, latex2html, latex2html)
 AC_PROG_LN_S
@@ -308,15 +313,15 @@
   MAKEINFO="${bindir}/makeinfo --force"
   TEXINDEX=${bindir}/texindex
+  AC_SUBST(TEXI2DVI)
+  AC_SUBST(MAKEINFO)
+  AC_SUBST(TEXINDEX)
 else
   AC_MSG_RESULT(no)
   AC_MSG_WARN(Building of doc might fail. Need Texinfo)
   enable_texinfo=no
-  TEXI2DVI=texi2dvi
-  MAKEINFO=makeinfo
-  TEXINDEX=${bindir}/texindex
+  AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ${pwd}/warn_not_found.sh makeinfo)
+  AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, ${pwd}/warn_not_found.sh texi2dvi)
+  AC_CHECK_PROG(TEXINDEX, texindex, texindex, ${pwd}/warn_not_found.sh texindex)
 fi  
-AC_SUBST(TEXI2DVI)
-AC_SUBST(MAKEINFO)
-AC_SUBST(TEXINDEX)
 
 
Index: doc/Makefile.in
===================================================================
--- doc/Makefile.in	(revision a94090d0cd2313d6f7feaf0908fb3c4da5fe3352)
+++ doc/Makefile.in	(revision 9ead313dbb7fd46c67238eead96c3efc1d873c1c)
@@ -2,5 +2,5 @@
 ### 
 ### Makefile for Singular documentation 
-### $Id: Makefile.in,v 1.48 1999-12-08 12:47:55 obachman Exp $
+### $Id: Makefile.in,v 1.49 1999-12-08 14:47:00 obachman Exp $
 #####################################################################
 SHELL=/bin/sh
@@ -35,4 +35,5 @@
 INSTALL_DATA	= ${INSTALL} -m 644
 MKINSTALLDIRS   = ../mkinstalldirs
+GZIP		= @GZIP@
 
 PERL5		= @PERL5@
@@ -289,5 +290,5 @@
 	cp pl2doc.pl doc2tex.pl ${texi2html} lib2doc
 	tar cf lib2doc.tar lib2doc
-	gzip lib2doc.tar
+	${GZIP} lib2doc.tar
 
 clean: mostlyclean
Index: warn_not_found.sh
===================================================================
--- warn_not_found.sh	(revision 9ead313dbb7fd46c67238eead96c3efc1d873c1c)
+++ warn_not_found.sh	(revision 9ead313dbb7fd46c67238eead96c3efc1d873c1c)
@@ -0,0 +1,21 @@
+#! /bin/sh
+# This script emulates some programs so that make does not fail
+# 
+
+echo "***Warning: Program '$1' not found. Make might be incomplete or fail."
+
+case $1 in
+  gzip) 
+    echo "cp $2 $2.gz"; 
+    cp $2 $2.gz;;
+  gunzip) 
+    filename=`echo $2 | sed -e "s/\.gz//"`; 
+    echo  "cp $2 $filename"; 
+    cp $2 $filename;;
+  makeinfo) 
+    dest=`echo $* | sed -e 's/.*-o *\([^ ]*\).*/\1/'`; 
+    src=`echo $* | sed -e 's/.* \([^ ]*\)/\1/'`; 
+    echo "cp $src $dest";
+    cp $src $dest;;
+esac
+
