]> www.ginac.de Git - ginac.git/commitdiff
- cint/*: Revamped the launch-scheme for ginaccint.bin. It must be done
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 15 Jun 2000 22:46:10 +0000 (22:46 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Thu, 15 Jun 2000 22:46:10 +0000 (22:46 +0000)
  by a binary executable and not by a script to ensure users can write
  shebang-scripts.
- cint/*:  Added a testsuite which hopefully passes (some lucky day).
- cint/ginaccint.bin: For this to work we needed a --silent command line
  switch.
- configure.in, Makefile.am, cint/Makefile.am: account for new launchers.
- ginac/matrix.cpp, ginac/matrix.h: removed confusing ffe_get() and ffe_set()
  routines since they counted the non-standard way.
- config.guess, config.sub: Updated to new versions from FSF.
- others files: Changes triggered.

27 files changed:
INSTALL
Makefile.am
Makefile.in
aclocal.m4
check/Makefile.in
cint/Makefile.am
cint/Makefile.in
cint/exam_mansamples.cpp [new file with mode: 0755]
cint/exam_paranoia.cpp [new file with mode: 0755]
cint/ginaccint.bin.cpp
cint/ginaccint.cpp [new file with mode: 0644]
cint/ginaccint.in [deleted file]
cint/launch.h.in [new file with mode: 0644]
cint/run_exams.cpp [new file with mode: 0644]
config.guess
config.sub
configure
configure.in
doc/Makefile.in
doc/reference/Makefile.in
doc/tutorial/Makefile.in
ginac/Makefile.in
ginac/matrix.cpp
ginac/matrix.h
ginac/numeric.cpp
ginsh/Makefile.in
tools/Makefile.in

diff --git a/INSTALL b/INSTALL
index 0c629b5af7bea61732b3b0287de285abce88b41e..e4da1d79c0c79be1a0d4933d9d287f2529b07354 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -107,7 +107,7 @@ Here is an overview to gives you an idea if you can expect GiNaCcint
 to compile, install and work properly:
 
  Cint version |   is known to work with   |  is known not to work with
---------------+---------------------------+------------------------------
+--------------+---------------------------+-------------------------------
  < 5.14.39    | `verboten' by license (please bite your favorite lawyer)
-   5.14.39    | egcs 1.1.1, gcc.2.95.2    | gcc <= 2.7.2.3
-   5.14.40    | egcs 1.1.1, gcc.2.95.2    | gcc <= 2.7.2.3
+ < 5.14.39,40 | egcs 1.1.1, gcc 2.95.2    | COMPILES BUT DOES NOT WORK OK
+   5.14.41    | We all wait for it...
index 82502dbe15014e346bf7c6434c4edce3945bf02d..192308cef7b1b17b50c987b59fcbedce778709a8 100644 (file)
@@ -15,8 +15,8 @@ EXTRA_DIST = autogen.sh ginac.m4
 m4datadir = $(datadir)/aclocal
 m4data_DATA = ginac.m4
 
-# Rule to build tar-gzipped distribution package
-$(PACKAGE)-$(VERSION).tar.gz: dist
+# Rule to build tar-bzipped distribution package
+$(PACKAGE)-$(VERSION).tar.bz2: dist
 
 # Rule to build RPM distribution package
 rpm: $(PACKAGE)-$(VERSION).tar.gz
index d5088ebb1a0725c8143ae4eb67524cbe5c01b66c..605257fc447b1a3f3e9756761c1913e75fb646d4 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -360,7 +358,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -455,8 +453,8 @@ installdirs mostlyclean-generic distclean-generic clean-generic \
 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
-# Rule to build tar-gzipped distribution package
-$(PACKAGE)-$(VERSION).tar.gz: dist
+# Rule to build tar-bzipped distribution package
+$(PACKAGE)-$(VERSION).tar.bz2: dist
 
 # Rule to build RPM distribution package
 rpm: $(PACKAGE)-$(VERSION).tar.gz
index 85b54087fff67575ed03412b5b6c8edf1671ad7b..12c39ff7a1658ff498e2869c0883838e3f8b9f32 100644 (file)
@@ -297,7 +297,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
 || AC_MSG_ERROR([libtool configure failed])
 
 # Reload cache, that may have been modified by ltconfig
@@ -329,6 +329,11 @@ AC_REQUIRE([AC_PROG_NM])dnl
 AC_REQUIRE([AC_PROG_LN_S])dnl
 dnl
 
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
 # Check for any special flags to pass to ltconfig.
 libtool_flags="--cache-file=$cache_file"
 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -347,7 +352,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
-case "$host" in
+case "$lt_target" in
 *-*-irix6*)
   # Find out which ABI we are using.
   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -563,7 +568,6 @@ else
   AC_MSG_RESULT(no)
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
 AC_PROG_LD_GNU
 ])
 
@@ -609,14 +613,13 @@ else
 fi])
 NM="$ac_cv_path_NM"
 AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
 ])
 
 # AC_CHECK_LIBM - check for math library
 AC_DEFUN(AC_CHECK_LIBM,
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
-case "$host" in
+case "$lt_target" in
 *-*-beos* | *-*-cygwin*)
   # These system don't have libm
   ;;
index a49b71a93380ecca228951aee6424783d78e5708..a834eef25d6d9f5ca62f4cb38e344794465f4794 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -287,7 +285,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 107537f039157a287f88e9d7d648414a6ce44541..5af0bca0b9982b4e6d927b23a9c7ae3c1f6b86ea 100644 (file)
@@ -1,14 +1,18 @@
 ## Process this file with automake to produce Makefile.in
 
-bin_PROGRAMS = ginaccint.bin
-bin_SCRIPTS = ginaccint
+bin_PROGRAMS = ginaccint.bin ginaccint
+check_PROGRAMS = run_exams
+run_exams_SOURCES = run_exams.cpp
+ginaccint_SOURCES = ginaccint.cpp
 ginaccint_bin_SOURCES = ginaccint.bin.cpp
 man_MANS = ginaccint.1
 
 ginaccint.bin: ginaccint.bin.cpp
        (export CINTSYSDIR=$(CINTSYSDIR); $(MAKE) -f Makefile.makecint PATH=$(PATH):$(CINTSYSDIR))
 
-EXTRA_DIST = $(man_MANS)
+TESTS = exam_paranoia.cpp exam_mansamples.cpp
+
+EXTRA_DIST = $(man_MANS) $(TESTS)
 
 # Force targets clean and distclean to call Makecint's own Makefile
 makecint_clean:
index 9625ec2f9e65b79a4658a032e893786d49dea2b8..89fcfce9b8f90869ac7363195766223b13e43275 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -104,15 +102,19 @@ TUTORIAL_TARGETS = @TUTORIAL_TARGETS@
 VERSION = @VERSION@
 YACC = @YACC@
 
-bin_PROGRAMS = ginaccint.bin
-bin_SCRIPTS = ginaccint
+bin_PROGRAMS = ginaccint.bin ginaccint
+check_PROGRAMS = run_exams
+run_exams_SOURCES = run_exams.cpp
+ginaccint_SOURCES = ginaccint.cpp
 ginaccint_bin_SOURCES = ginaccint.bin.cpp
 man_MANS = ginaccint.1
 
-EXTRA_DIST = $(man_MANS)
+TESTS = exam_paranoia.cpp exam_mansamples.cpp
+
+EXTRA_DIST = $(man_MANS) $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = ../config.h
-CONFIG_CLEAN_FILES =  ginaccint
+CONFIG_CLEAN_FILES =  launch.h
 PROGRAMS =  $(bin_PROGRAMS)
 
 
@@ -124,8 +126,14 @@ ginaccint_bin_OBJECTS =  ginaccint.bin.o
 ginaccint_bin_LDADD = $(LDADD)
 ginaccint_bin_DEPENDENCIES = 
 ginaccint_bin_LDFLAGS = 
-SCRIPTS =  $(bin_SCRIPTS)
-
+ginaccint_OBJECTS =  ginaccint.o
+ginaccint_LDADD = $(LDADD)
+ginaccint_DEPENDENCIES = 
+ginaccint_LDFLAGS = 
+run_exams_OBJECTS =  run_exams.o
+run_exams_LDADD = $(LDADD)
+run_exams_DEPENDENCIES = 
+run_exams_LDFLAGS = 
 CXXFLAGS = @CXXFLAGS@
 CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -135,16 +143,16 @@ man1dir = $(mandir)/man1
 MANS = $(man_MANS)
 
 NROFF = nroff
-DIST_COMMON =  Makefile.am Makefile.in ginaccint.in
+DIST_COMMON =  Makefile.am Makefile.in launch.h.in
 
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
 TAR = tar
 GZIP_ENV = --best
-DEP_FILES =  .deps/ginaccint.bin.P
-SOURCES = $(ginaccint_bin_SOURCES)
-OBJECTS = $(ginaccint_bin_OBJECTS)
+DEP_FILES =  .deps/ginaccint.P .deps/ginaccint.bin.P .deps/run_exams.P
+SOURCES = $(ginaccint_bin_SOURCES) $(ginaccint_SOURCES) $(run_exams_SOURCES)
+OBJECTS = $(ginaccint_bin_OBJECTS) $(ginaccint_OBJECTS) $(run_exams_OBJECTS)
 
 all: all-redirect
 .SUFFIXES:
@@ -156,7 +164,7 @@ Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-ginaccint: $(top_builddir)/config.status ginaccint.in
+launch.h: $(top_builddir)/config.status launch.h.in
        cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
 mostlyclean-binPROGRAMS:
@@ -184,6 +192,15 @@ uninstall-binPROGRAMS:
          rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
        done
 
+mostlyclean-checkPROGRAMS:
+
+clean-checkPROGRAMS:
+       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+
+distclean-checkPROGRAMS:
+
+maintainer-clean-checkPROGRAMS:
+
 .s.o:
        $(COMPILE) -c $<
 
@@ -216,24 +233,13 @@ distclean-libtool:
 
 maintainer-clean-libtool:
 
-install-binSCRIPTS: $(bin_SCRIPTS)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(bindir)
-       @list='$(bin_SCRIPTS)'; for p in $$list; do \
-         if test -f $$p; then \
-           echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
-           $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
-         else if test -f $(srcdir)/$$p; then \
-           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
-           $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
-         else :; fi; fi; \
-       done
+ginaccint: $(ginaccint_OBJECTS) $(ginaccint_DEPENDENCIES)
+       @rm -f ginaccint
+       $(CXXLINK) $(ginaccint_LDFLAGS) $(ginaccint_OBJECTS) $(ginaccint_LDADD) $(LIBS)
 
-uninstall-binSCRIPTS:
-       @$(NORMAL_UNINSTALL)
-       list='$(bin_SCRIPTS)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
-       done
+run_exams: $(run_exams_OBJECTS) $(run_exams_DEPENDENCIES)
+       @rm -f run_exams
+       $(CXXLINK) $(run_exams_LDFLAGS) $(run_exams_OBJECTS) $(run_exams_LDADD) $(LIBS)
 .cpp.o:
        $(CXXCOMPILE) -c $<
 .cpp.lo:
@@ -320,7 +326,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -378,15 +384,42 @@ maintainer-clean-depend:
          | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
            >> .deps/$(*F).P; \
        rm -f .deps/$(*F).pp
+check-TESTS: $(TESTS)
+       @failed=0; all=0; \
+       srcdir=$(srcdir); export srcdir; \
+       for tst in $(TESTS); do \
+         if test -f $$tst; then dir=.; \
+         else dir="$(srcdir)"; fi; \
+         if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
+           all=`expr $$all + 1`; \
+           echo "PASS: $$tst"; \
+         elif test $$? -ne 77; then \
+           all=`expr $$all + 1`; \
+           failed=`expr $$failed + 1`; \
+           echo "FAIL: $$tst"; \
+         fi; \
+       done; \
+       if test "$$failed" -eq 0; then \
+         banner="All $$all tests passed"; \
+       else \
+         banner="$$failed of $$all tests failed"; \
+       fi; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"; \
+       test "$$failed" -eq 0
 info-am:
 info: info-am
 dvi-am:
 dvi: dvi-am
 check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
 installcheck-am:
 installcheck: installcheck-am
-install-exec-am: install-binPROGRAMS install-binSCRIPTS
+install-exec-am: install-binPROGRAMS
 install-exec: install-exec-am
 
 install-data-am: install-man
@@ -395,15 +428,14 @@ install-data: install-data-am
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 install: install-am
-uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man
+uninstall-am: uninstall-binPROGRAMS uninstall-man
 uninstall: uninstall-am
-all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
+all-am: Makefile $(PROGRAMS) $(MANS)
 all-redirect: all-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs:
-       $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \
-               $(DESTDIR)$(mandir)/man1
+       $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
 
 
 mostlyclean-generic:
@@ -415,28 +447,30 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
-               mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
-               mostlyclean-generic
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-checkPROGRAMS \
+               mostlyclean-compile mostlyclean-libtool \
+               mostlyclean-tags mostlyclean-depend mostlyclean-generic
 
 mostlyclean: mostlyclean-am
 
-clean-am:  clean-binPROGRAMS clean-compile clean-libtool clean-tags \
-               clean-depend clean-generic mostlyclean-am
+clean-am:  clean-binPROGRAMS clean-checkPROGRAMS clean-compile \
+               clean-libtool clean-tags clean-depend clean-generic \
+               mostlyclean-am
 
 clean: clean-am
 
-distclean-am:  distclean-binPROGRAMS distclean-compile distclean-libtool \
-               distclean-tags distclean-depend distclean-generic \
-               clean-am
+distclean-am:  distclean-binPROGRAMS distclean-checkPROGRAMS \
+               distclean-compile distclean-libtool distclean-tags \
+               distclean-depend distclean-generic clean-am
        -rm -f libtool
 
 distclean: distclean-am
 
 maintainer-clean-am:  maintainer-clean-binPROGRAMS \
-               maintainer-clean-compile maintainer-clean-libtool \
-               maintainer-clean-tags maintainer-clean-depend \
-               maintainer-clean-generic distclean-am
+               maintainer-clean-checkPROGRAMS maintainer-clean-compile \
+               maintainer-clean-libtool maintainer-clean-tags \
+               maintainer-clean-depend maintainer-clean-generic \
+               distclean-am
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
 
@@ -444,13 +478,14 @@ maintainer-clean: maintainer-clean-am
 
 .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
 maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool uninstall-binSCRIPTS \
-install-binSCRIPTS install-man1 uninstall-man1 install-man \
-uninstall-man tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
-clean-depend maintainer-clean-depend info-am info dvi-am dvi check \
+mostlyclean-checkPROGRAMS distclean-checkPROGRAMS clean-checkPROGRAMS \
+maintainer-clean-checkPROGRAMS mostlyclean-compile distclean-compile \
+clean-compile maintainer-clean-compile mostlyclean-libtool \
+distclean-libtool clean-libtool maintainer-clean-libtool install-man1 \
+uninstall-man1 install-man uninstall-man tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend check-TESTS info-am info dvi-am dvi check \
 check-am installcheck-am installcheck install-exec-am install-exec \
 install-data-am install-data install-am install uninstall-am uninstall \
 all-redirect all-am all installdirs mostlyclean-generic \
diff --git a/cint/exam_mansamples.cpp b/cint/exam_mansamples.cpp
new file mode 100755 (executable)
index 0000000..d26ad35
--- /dev/null
@@ -0,0 +1,15 @@
+#! ./run_exams --silent
+int result = 0;
+symbol x("x"), y("y"), z("z");
+{
+    ex a = pow(x,2)-x-2;
+    ex b = pow(x+1,2);
+    ex s = a/b;
+    if (!(s.diff(x)-2*pow(1+x,-3)*(-2-x+pow(x,2))-(-1+2*x)*pow(1+x,-2)).is_zero()) {
+        ++result;
+    }
+    if (!(s.normal()-(-2+x)/(1+x)).is_zero()) {
+        ++result;
+    }
+}
+exit(result);
diff --git a/cint/exam_paranoia.cpp b/cint/exam_paranoia.cpp
new file mode 100755 (executable)
index 0000000..4fc7b98
--- /dev/null
@@ -0,0 +1,23 @@
+#! ./run_exams --silent
+int result = 0;
+/*
+ * Old Cint versions messed up unary and binary operators:
+ */
+{
+    symbol x;
+    ex a = x-x;
+    if (!a.is_zero()) {
+        ++result;
+    }
+}
+/*
+ * Some problems with objects of class relational when cast to bool:
+ */
+{
+    symbol x;
+    ex a = x;
+    if (bool(a != a)) {
+        ++result;
+    }
+}
+exit(result);
index 065c27c8396b83c96a7d454d940da80e84cbc614..db27e2b8adfe0b5f8604d360075509b5fbce7672 100644 (file)
@@ -1,3 +1,6 @@
+/* ginaccint.bin.cpp:  Binary depends on CINTSYSDIR, better don't call it
+ * directly.  Use the launcher (compiled from ginaccint.cpp) instead. */
+
 #include "G__ci.h"   /* G__atpause is defined in G__ci.h */
 
 #if (!defined(G__CINTVERSION)) || (G__CINTVERSION < 501438)
@@ -56,12 +59,13 @@ void restart(void);
 bool is_command(string const & command, string & preprocessed,
                 string const & comparevalue, bool substr=false);
 bool readlines(istream * is, string & allcommands);
-bool readfile(string const & filename, string & allcommands);
+bool readfile(string const & filename, string & allcommands, bool shutup=false);
 void savefile(string const & filename, string const & allcommands);
 
 typedef list<char *> cplist;
 cplist filenames;
-bool redirect_output=false;
+bool redirect_output = false;
+bool silent = false;
 
 G__value exec_tempfile(string const & command)
 {
@@ -119,12 +123,9 @@ void process_tempfile(string const & command)
             // => this is not a temporary ex, but one that resides safely in memory
             
             // cout << "warning: using ex from retval (experimental)" << endl;
-            ex::dummy_bp=((ex *)(void *)(retval.obj.i))->bp;
+            ex::dummy_bp = ((ex *)(void *)(retval.obj.i))->bp;
             exec_tempfile("ex "+varname+"(*ex::dummy_bp);");
         } else if (ex::last_created_or_assigned_bp_can_be_converted_to_ex()) {
-            //string varfill;
-            //for (int i=4-int(log10(out_count)); i>0; --i)
-            //    varfill += ' ';
             exec_tempfile("ex "+varname+"(*ex::last_created_or_assigned_bp);");
         } else {
             cout << "warning: last_created_or_assigned_bp modified 0 or not evaluated or not dynallocated" << endl;
@@ -163,85 +164,74 @@ void process_tempfile(string const & command)
 
 void greeting(void)
 {
-    cout << "Welcome to GiNaC-cint (" << PACKAGE << " V" << VERSION << ")" << endl;
-    cout << "  __,  _______  GiNaC: (C) 1999-2000 Johannes Gutenberg University Mainz," << endl
-         << " (__) *       | Germany.  Cint C/C++ interpreter: (C) 1995-2000 Masaharu" << endl
-         << "  ._) i N a C | Goto and Agilent Technologies, Japan.  This is free software" << endl
-         << "<-------------' with ABSOLUTELY NO WARRANTY.  For details, type `.warranty'" << endl
-         << "Type .help for help." << endl
-         << endl;
+    cout << "Welcome to GiNaC-cint (" << PACKAGE << " V" << VERSION
+         << ", Cint V" << G__CINTVERSION << ")\n";
+    cout << "  __,  _______  GiNaC: (C) 1999-2000 Johannes Gutenberg University Mainz,\n"
+         << " (__) *       | Germany.  Cint C/C++ interpreter: (C) 1995-2000 Masaharu\n"
+         << "  ._) i N a C | Goto and Agilent Technologies, Japan.  This is free software\n"
+         << "<-------------' with ABSOLUTELY NO WARRANTY.  For details, type `.warranty'\n"
+         << "Type .help for help.\n\n";
     return;
 }
 
 void helpmessage(void)
 {
-    cout << "GiNaC-cint recognizes some special commands which start with a dot:" << endl << endl
-         << "  .cint                    switch to cint interactive mode (see cint" << endl
-         << "                           documentation for further details)" << endl
-         << "  .function                define the body of a function (necessary due to a" << endl
-         << "                           cint limitation)" << endl
-         << "  .help                    the text you are currently reading" << endl
-         << "  .q, .quit, .exit, .bye   quit GiNaC-cint" << endl
-         << "  .read filename           read a file from disk and execute it in GiNaC-cint" << endl
-         << "                           (recursive call is possible)" << endl
-         << "  .redirect [filename]     redirect 'OutXY = ...' output to a file" << endl
-         << "                           (.redirect alone redirects output back to console)" << endl
-         << "  .restart                 restart GiNaC-cint (does not re-read command line" << endl
-         << "                           files)" << endl
-         << "  .save filename           save the commands you have entered so far in a file" << endl
-         << "  .silent                  suppress 'OutXY = ...' output (variables are still" << endl
-         << "                           accessible)" << endl
-         << "  .warranty                information on redistribution and warranty" << endl
-         << "  .> [filename]            same as .redirect [filename]" << endl << endl
-         << "Instead of '.cmd' you can also write '//GiNaC-cint.cmd' to be compatible with" << endl
-         << "programs that will be compiled later." << endl
-         << "Additionally you can exit GiNaC-cint with quit; exit; or bye;" << endl
-         << endl;
+    cout << "GiNaC-cint recognizes some special commands which start with a dot:\n\n"
+         << "  .cint                    switch to cint interactive mode (see cint\n"
+         << "                           documentation for further details)\n"
+         << "  .function                define the body of a function (necessary due to a\n"
+         << "                           cint limitation)\n"
+         << "  .help                    the text you are currently reading\n"
+         << "  .q, .quit, .exit, .bye   quit GiNaC-cint\n"
+         << "  .read filename           read a file from disk and execute it in GiNaC-cint\n"
+         << "                           (recursive call is possible)\n"
+         << "  .redirect [filename]     redirect 'OutXY = ...' output to a file\n"
+         << "                           (.redirect alone redirects output back to console)\n"
+         << "  .restart                 restart GiNaC-cint (does not re-read command line\n"
+         << "                           files)\n"
+         << "  .save filename           save the commands you have entered so far in a file\n"
+         << "  .silent                  suppress 'OutXY = ...' output (variables are still\n"
+         << "                           accessible)\n"
+         << "  .warranty                information on redistribution and warranty\n"
+         << "  .> [filename]            same as .redirect [filename]\n\n"
+         << "Instead of '.cmd' you can also write '//GiNaC-cint.cmd' to be compatible with\n"
+         << "programs that will be compiled later.\n"
+         << "Additionally you can exit GiNaC-cint with quit; exit; or bye;\n\n";
     return;
 }
 
 void warrantymessage(void)
 {
-    cout << "GiNaC is free software; you can redistribute it and/or modify it under the" << endl
-         << "the terms of the GNU General Public License as published by the Free Software" << endl
-         << "Foundation; either version 2 of the License, or (at your option) any later" << endl
-         << "version." << endl
-         << "This program is distributed in the hope that it will be useful, but WITHOUT" << endl
-         << "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS" << endl
-         << "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more" << endl
-         << "details." << endl
-         << "You should have received a copy of the GNU General Public License along with" << endl
-         << "this program. If not, write to the Free Software Foundation, 675 Mass Ave," << endl
-         << "Cambridge, MA 02139, USA." << endl << endl;
-    cout << "Cint and associated tools are copyright by Agilent Technologies Japan Company" << endl
-         << "and Masaharu Goto <MXJ02154@niftyserve.or.jp>." << endl
-         << "Source code, binary executable or library of Cint and associated tools can be" << endl
-         << "used, modified and distributed with no royalty for any purpose provided that" << endl
-         << "the copyright notice appear in all copies and that both that copyright notice" << endl
-         << "and this permission notice appear in supporting documentation." << endl
-         << "Agilent Technologies Japan and the author make no representations about the" << endl
-         << "suitability of this software for any purpose.  It is provided \"AS IS\"" << endl
-         << "without express or implied warranty." << endl;
+    cout << "GiNaC is free software; you can redistribute it and/or modify it under the\n"
+         << "the terms of the GNU General Public License as published by the Free Software\n"
+         << "Foundation; either version 2 of the License, or (at your option) any later\n"
+         << "version.\n"
+         << "This program is distributed in the hope that it will be useful, but WITHOUT\n"
+         << "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
+         << "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n"
+         << "details.\n"
+         << "You should have received a copy of the GNU General Public License along with\n"
+         << "this program. If not, write to the Free Software Foundation, 675 Mass Ave,\n"
+         << "Cambridge, MA 02139, USA.\n\n";
+    cout << "Cint and associated tools are copyright by Agilent Technologies Japan Company\n"
+         << "and Masaharu Goto <MXJ02154@niftyserve.or.jp>.\n"
+         << "Source code, binary executable or library of Cint and associated tools can be\n"
+         << "used, modified and distributed with no royalty for any purpose provided that\n"
+         << "the copyright notice appear in all copies and that both that copyright notice\n"
+         << "and this permission notice appear in supporting documentation.\n"
+         << "Agilent Technologies Japan and the author make no representations about the\n"
+         << "suitability of this software for any purpose.  It is provided \"AS IS\"\n"
+         << "without express or implied warranty.\n";
     return;
 }
 
+/** "preprocess" the line entered to be able to decide if the command shall be
+ *  executed directly or more input is needed or this is a special command.
+ *  All whitespace will be removed.  All comments will be removed.  Open and
+ *  close braces ( { and } ) outside strings will be counted. */
 string preprocess(char const * const line, bool & comment, bool & single_quote,
                   bool & double_quote, unsigned & open_braces)
 {
-    // "preprocess" the line entered to be able to decide if the command shall be
-    // executed directly or more input is needed or this is a special command
-
-    // ALL whitespace will be removed
-    // all comments (/* */ and //) will be removed
-    // open and close braces ( { and } ) outside strings will be counted 
-
-    /*
-    cout << "line=" << line << endl;
-    cout << "comment=" << comment << ", single_quote=" << single_quote
-         << ",double_quote=" << double_quote << ", open_braces=" << open_braces
-         << endl;
-    */
-    
     string preprocessed;
     int pos = 0;
     bool end = false;
@@ -282,7 +272,7 @@ string preprocess(char const * const line, bool & comment, bool & single_quote,
                 break;
             case '\\':
                 // escape character, ignore next
-                escape=true;
+                escape = true;
                 break;
             case '"':
                 if ((!single_quote)&&(!comment)) {
@@ -296,12 +286,12 @@ string preprocess(char const * const line, bool & comment, bool & single_quote,
                     break;
             case '{':
                 if ((!single_quote)&&(!double_quote)&&(!comment)) {
-                    open_braces++;
+                    ++open_braces;
                 }
                 break;
             case '}':
                 if ((!single_quote)&&(!double_quote)&&(!comment)&&(open_braces>0)) {
-                    open_braces--;
+                    --open_braces;
                 }
                 break;
             case '/':
@@ -314,15 +304,8 @@ string preprocess(char const * const line, bool & comment, bool & single_quote,
                 preprocessed += line[pos];
             }
         }
-        pos++;
+        ++pos;
     }
-
-    /*
-    cout << "preprocessed=" << preprocessed << endl;
-    cout << "comment=" << comment << ", single_quote=" << single_quote
-         << ",double_quote=" << double_quote << ", open_braces=" << open_braces
-         << endl;
-    */
     
     return preprocessed;
 }
@@ -343,9 +326,6 @@ void sigterm_handler(int n)
 
 void initialize(void)
 {
-    if (isatty(0))
-        greeting();
-
     atexit(cleanup);
     signal(SIGTERM,sigterm_handler);
     initialize_cint();
@@ -354,10 +334,7 @@ void initialize(void)
 void initialize_cint(void)
 {
     G__init_cint("cint");    /* initialize cint */
-
-    // no longer needed as of cint 5.14.31:
-    // exec_tempfile("#include <string>\n");
-
+    
 #ifndef NO_NAMESPACE_GINAC
     exec_tempfile("using namespace GiNaC;");
 #endif // ndef NO_NAMESPACE_GINAC
@@ -374,23 +351,54 @@ void restart(void)
     initialize_cint();
 }
 
-void redirect(string const & filename)
+void redirect(string const & filename,
+              bool shutup=false)
 {
     if (filename=="") {
-        cout << "Redirecting output back to console..." << endl;
+        if (!shutup)
+            cout << "Redirecting output back to console..." << endl;
         exec_tempfile( string()
                       +"ginac_cint_internal_redirect_output=false;\n"
                       +"ginac_cint_internal_fout.close();");
     } else {
-        cout << "Redirecting output to " << filename << "..." << endl;
+        if (!shutup)
+            cout << "Redirecting output to " << filename << "..." << endl;
         exec_tempfile( string()
                       +"ginac_cint_internal_redirect_output=true;\n"
                       +"ginac_cint_internal_fout.open(\""+filename+"\");\n");
     }
 }
 
-bool is_command(string const & command, string & preprocessed,
-                string const & comparevalue, bool substr)
+/** Sort out command line options and evaluate them.  Returns true if it
+ *  succeeds and false otherwise. */
+bool evaloption(const string & option)
+{
+    if (option=="--version") {
+        cout << "GiNaC-cint (" << PACKAGE << " V" << VERSION
+             << ", Cint V" << G__CINTVERSION << ")\n";
+        exit(0);
+    }
+    if (option=="--help") {
+        cout << "GiNaC-cint (" << PACKAGE << " V" << VERSION
+             << ", Cint V" << G__CINTVERSION << ")\n";
+        cout << "usage: ginaccint [option] [file ...]\n";
+        cout << " --help           print this help message and exit\n"
+             << " --silent         invoke ginaccint in silent mode\n"
+             << " --version        print GiNaC version and Cint version and exit\n";
+        exit(0);
+    }
+    if (option=="--silent") {
+        redirect("/dev/null",true);
+        silent = true;
+        return true;
+    }
+    return false;
+}
+
+bool is_command(string const & command,
+                string & preprocessed,
+                string const & comparevalue,
+                bool substr)
 {
     bool single_quote = false;
     bool double_quote = false;
@@ -411,7 +419,8 @@ bool is_command(string const & command, string & preprocessed,
     return false;
 }       
 
-bool readlines(istream * is, string & allcommands)
+bool readlines(istream * is,
+               string & allcommands)
 {
     char const * line;
     char prompt[G__ONELINE];
@@ -462,7 +471,7 @@ bool readlines(istream * is, string & allcommands)
             quit = true;
         } else if (is_command(command,preprocessed,"function")) {
             cout << "next expression can be a function definition" << endl;
-            next_command_is_function=true;
+            next_command_is_function = true;
         } else if (is_command(command,preprocessed,"cint")) {
             cout << endl << "switching to cint interactive mode" << endl;
             cout << "'h' for help, 'q' to quit, '{ statements }' or 'p [expression]' to evaluate" << endl;
@@ -471,7 +480,7 @@ bool readlines(istream * is, string & allcommands)
         } else if (is_command(command,preprocessed,"help")) {
             helpmessage();
         } else if (is_command(command,preprocessed,"read",true)) {
-            quit=readfile(preprocessed.substr(5),allcommands);
+            quit = readfile(preprocessed.substr(5),allcommands);
         } else if (is_command(command,preprocessed,"save",true)) {
             command = "/* "+command+" */"; // we do not want the .save command itself in saved files
             savefile(preprocessed.substr(5),allcommands);
@@ -482,7 +491,13 @@ bool readlines(istream * is, string & allcommands)
         } else if (is_command(command,preprocessed,">",true)) {
             redirect(preprocessed.substr(2));
         } else if (is_command(command,preprocessed,"silent")) {
-            redirect("/dev/null");
+            if (!silent) {
+                redirect("/dev/null");
+                silent = true;
+            } else {
+                redirect("");
+                silent = false;
+            }
         } else if (is_command(command,preprocessed,"warranty")) {
             warrantymessage();
         /* test for more special commands
@@ -502,7 +517,7 @@ bool readlines(istream * is, string & allcommands)
         }
         if (is!=NULL) {
             // test for end of file if reading from a stream
-            eof=is->eof();
+            eof = is->eof();
         } else {
             // save commands only when reading from keyboard
             allcommands += command;
@@ -512,17 +527,19 @@ bool readlines(istream * is, string & allcommands)
     return quit;
 }    
 
-bool readfile(string const & filename, string & allcommands)
+bool readfile(string const & filename,
+              string & allcommands,
+              bool shutup=false)
 {
-    cout << "Reading commands from file " << filename << "." << endl;
+    if (!shutup)
+        cout << "Reading commands from file " << filename << "." << endl;
     bool quit = false;
     ifstream fin;
     fin.open(filename.c_str());
-    if (fin.good()) {
+    if (fin.good())
         quit = readlines(&fin,allcommands);
-    } else {
+    else
         cout << "Cannot open " << filename << " for reading." << endl;
-    }
     fin.close();
     return quit;
 }
@@ -543,33 +560,40 @@ void savefile(string const & filename, string const & allcommands)
     fout.close();
 }
 
-int main(int argc, char *argv) 
+int main(int argc, char * *argv) 
 {
     string allcommands;
     initialize();
-
+    
     bool quit = false;
+    // sort out and evaluate recognized options from the argument list
+    for (int i=1; i<argc; ++i)
+        if (evaloption(argv[i])) {
+            for (int j=i; j<argc-1; ++j)
+                argv[j] = argv[j+1];
+            --argc;
+        }
     bool argsexist = argc>1;
-
-    if (argsexist) {
-        allcommands = "/* Files given as command line arguments:\n";
-    }
     
-    argc--; argv++;
-    while (argc && !quit) {
-        allcommands += *argv;
-        allcommands += "\n";
-        quit=readfile(*argv,allcommands);
-        argc--; argv++;
-    }
-
+    // greet the user if it makes sense
+    if (isatty(0) && !silent)
+        greeting();
+    
+    // evaluate files given as command line arguments
     if (argsexist) {
+        allcommands = "/* Files given as command line arguments:\n";
+        --argc;
+        while (argc && !quit) {
+            allcommands += string(argv[argc])+'\n';
+            quit = readfile(argv[argc], allcommands, silent);
+            --argc;
+        }
         allcommands += "*/\n";
     }
-
-    if (!quit) {
-        readlines(NULL,allcommands);
-    }
-
+    
+    // evaluate input from command line or script
+    if (!quit)
+        readlines(NULL, allcommands);
+    
     return 0;
 }
diff --git a/cint/ginaccint.cpp b/cint/ginaccint.cpp
new file mode 100644 (file)
index 0000000..4d25c44
--- /dev/null
@@ -0,0 +1,43 @@
+/* ginaccint.cpp, a launcher that sets variables to start ginaccint.bin.
+ * This is necessary because Cint is not libtoolized and so may need to have 
+ * LD_LIBRARY_PATH and CINTSYSDIR set.  This cannot be done by a shell-script
+ * because the #!-mechanism works only once and we want to enable the user to
+ * write scripts using that mechanism. */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string>
+#include <iostream>
+#include "launch.h"
+
+extern char **environ;
+
+int main(int argc, char * *argv)
+{
+    // manually "expand" autoconf-style variables
+    if (exec_prefix=="${prefix}")
+        exec_prefix = prefix;
+    if (bindir=="${exec_prefix}/bin")
+        bindir = exec_prefix + "/bin";
+    if (libdir=="${exec_prefix}/lib")
+        libdir = exec_prefix + "/lib";
+    // now we can guess what to start
+    string binprog = bindir + "/ginaccint.bin";
+    
+    // extend LD_LIBRARY_PATH by libdir, so ginaccint.bin really finds libginac
+    const char * LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
+    if (LD_LIBRARY_PATH == NULL)
+        setenv("LD_LIBRARY_PATH", libdir.c_str(), 1);
+    else
+        setenv("LD_LIBRARY_PATH", (string(LD_LIBRARY_PATH)+':'+libdir).c_str(), 1);
+    
+    // hard-wire CINTSYSDIR, inherited from configure, if it is not set
+    setenv("CINTSYSDIR", CINTSYSDIR.c_str(), 0);
+    
+    // execute the real thing
+    int error = execve(binprog.c_str(), argv, environ);
+    
+    // only gets here on error
+    cerr << argv[0] << ": cannot exec " << binprog << endl;
+    return error;
+}
diff --git a/cint/ginaccint.in b/cint/ginaccint.in
deleted file mode 100644 (file)
index b4aed36..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-
-binprog=`basename $0`".bin"
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-bindir=@bindir@
-libdir=@libdir@
-config_cintsysdir=@CINTSYSDIR@
-program=${bindir}/${binprog}
-
-# Unless the user doesn't override $CINTSYSDIR, assume the value
-# given at configuration time:
-CINTSYSDIR=${CINTSYSDIR-$config_cintsysdir}
-export CINTSYSDIR
-
-# Extend LD_LIBRARY_PATH, needed because Cint isn't libtoolized:
-LD_LIBRARY_PATH=${libdir}:${LD_LIBRARY_PATH}
-export LD_LIBRARY_PATH
-
-# Execute ginaccint.bin with all arguments given:
-exec ${program} ${1+"$@"}
-
-echo "$0: cannot exec ${program} ${1+"$@"}"
-exit 1
diff --git a/cint/launch.h.in b/cint/launch.h.in
new file mode 100644 (file)
index 0000000..88c33ff
--- /dev/null
@@ -0,0 +1,12 @@
+/* config.h.in  -->  config.h  (configure)
+ * ginaccint.bin shouldn't be invoked directly because CINTSYSDIR or other
+ * variables might not be in place when some user invokes it.  Instead, we need
+ * a little launcher binary.  This file should be included by those launchers
+ * so they know about some variables. */
+
+// set some variables inherited from configure
+string prefix = "@prefix@";
+string exec_prefix = "@exec_prefix@";
+string bindir = "@bindir@";
+string libdir = "@libdir@";
+string CINTSYSDIR = "@CINTSYSDIR@";
diff --git a/cint/run_exams.cpp b/cint/run_exams.cpp
new file mode 100644 (file)
index 0000000..dabf467
--- /dev/null
@@ -0,0 +1,36 @@
+/* run_exams.cpp, a launcher that sets variables to start ginaccint.bin.
+ * This is necessary because Cint is not libtoolized and so may need to have 
+ * LD_LIBRARY_PATH and CINTSYSDIR set. (This cannot be done by a shell-script
+ * because the #!-mechanism works only once and we want to enable the user to
+ * write scripts using that mechanism.) */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string>
+#include <iostream>
+#include "launch.h"
+
+extern char **environ;
+
+int main(int argc, char * *argv)
+{
+    // what to start
+    string binprog = "./ginaccint.bin";
+    
+    // extend LD_LIBRARY_PATH by ../ginac/.libs, so ginaccint.bin really finds libginac
+    const char * LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
+    if (LD_LIBRARY_PATH == NULL)
+        setenv("LD_LIBRARY_PATH", "../ginac/.libs", 1);
+    else
+        setenv("LD_LIBRARY_PATH", (string(LD_LIBRARY_PATH)+':'+"../ginac/.libs").c_str(), 1);
+    
+    // hard-wire CINTSYSDIR, inherited from configure
+    setenv("CINTSYSDIR", CINTSYSDIR.c_str(), 1);
+    
+    // execute the real thing
+    int error = execve(binprog.c_str(), argv, environ);
+    
+    // only gets here on error
+    cerr << argv[0] << ": cannot exec " << binprog << endl;
+    return error;
+}
index b4faaedca09e18d70bd66fdf2bed48bc798b91f7..499496436cd502d1fbd4861bd479191222eb825e 100755 (executable)
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
 
-version='2000-05-30'
+version='2000-06-13'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -687,6 +687,9 @@ EOF
     *:GNU:*:*)
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit 0 ;;
     *:Linux:*:*)
 
        # The BFD linker knows what the default object file format is, so
index f414a431e8140ec77a6e7c0eb70f19174d1a831a..8fa14be27e16d4a8d8df2f1c4c0abc2ee1a71a47 100755 (executable)
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
 
-version='2000-05-30'
+version='2000-06-13'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,6 @@ version='2000-05-30'
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
 # Please send patches to <config-patches@gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
@@ -132,7 +131,7 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple)
+       -apple | -axis)
                os=
                basic_machine=$1
                ;;
@@ -212,7 +211,8 @@ case $basic_machine in
                | hppa64 \
                | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
                | alphaev6[78] \
-               | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+               | we32k | ns16k | clipper | i370 | sh | sh[34] \
+               | powerpc | powerpcle \
                | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
@@ -227,7 +227,7 @@ case $basic_machine in
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
-       i[34567]86)
+       i[234567]86)
          basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
@@ -237,7 +237,7 @@ case $basic_machine in
                ;;
        # Recognize the basic CPU types with company name.
        # FIXME: clean up the formatting here.
-       vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+       vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
              | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
@@ -355,6 +355,9 @@ case $basic_machine in
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
@@ -666,7 +669,7 @@ case $basic_machine in
        pentium | p5 | k5 | k6 | nexen)
                basic_machine=i586-pc
                ;;
-       pentiumpro | p6 | 6x86)
+       pentiumpro | p6 | 6x86 | athlon)
                basic_machine=i686-pc
                ;;
        pentiumii | pentium2)
@@ -675,7 +678,7 @@ case $basic_machine in
        pentium-* | p5-* | k5-* | k6-* | nexen-*)
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
-       pentiumpro-* | p6-* | 6x86-*)
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumii-* | pentium2-*)
@@ -891,6 +894,9 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
+       sh3 | sh4)
+               base_machine=sh-unknown
+               ;;
        sparc | sparcv9)
                basic_machine=sparc-sun
                ;;
index fd5f1856ef530438d831c6703ce864a5a7e91add..578329507ed33926b40916450036d0f176d9afb7 100755 (executable)
--- a/configure
+++ b/configure
@@ -1550,9 +1550,8 @@ else
   echo "$ac_t""no" 1>&6
 fi
 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1556: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1555: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1568,7 +1567,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
 
 
 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1572: checking for BSD-compatible nm" >&5
+echo "configure:1571: checking for BSD-compatible nm" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1603,9 +1602,8 @@ fi
 NM="$ac_cv_path_NM"
 echo "$ac_t""$NM" 1>&6
 
-
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1609: checking whether ln -s works" >&5
+echo "configure:1607: 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
 else
@@ -1626,6 +1624,11 @@ else
 fi
 
 
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
 # Check for any special flags to pass to ltconfig.
 libtool_flags="--cache-file=$cache_file"
 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
@@ -1646,11 +1649,11 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
-case "$host" in
+case "$lt_target" in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 1653 "configure"' > conftest.$ac_ext
-  if { (eval echo configure:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  echo '#line 1656 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case "`/usr/bin/file conftest.o`" in
     *32-bit*)
       LD="${LD-ld} -32"
@@ -1671,19 +1674,19 @@ case "$host" in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1675: checking whether the C compiler needs -belf" >&5
+echo "configure:1678: checking whether the C compiler needs -belf" >&5
 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1680 "configure"
+#line 1683 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_cc_needs_belf=yes
 else
@@ -1761,7 +1764,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
 
 # Reload cache, that may have been modified by ltconfig
@@ -1785,7 +1788,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 exec 5>>./config.log
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1789: checking how to run the C preprocessor" >&5
+echo "configure:1792: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1800,13 +1803,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1804 "configure"
+#line 1807 "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:1810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1813: \"$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
   :
@@ -1817,13 +1820,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1821 "configure"
+#line 1824 "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:1827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1830: \"$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
   :
@@ -1834,13 +1837,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1838 "configure"
+#line 1841 "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:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1847: \"$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
   :
@@ -1870,7 +1873,7 @@ 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:1874: checking for $ac_word" >&5
+echo "configure:1877: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1903,7 +1906,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
 # Extract the first word of "flex", so it can be a program name with args.
 set dummy flex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1907: checking for $ac_word" >&5
+echo "configure:1910: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1937,7 +1940,7 @@ then
   *) ac_lib=l ;;
   esac
   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:1941: checking for yywrap in -l$ac_lib" >&5
+echo "configure:1944: checking for yywrap in -l$ac_lib" >&5
 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1945,7 +1948,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-l$ac_lib  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1949 "configure"
+#line 1952 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1956,7 +1959,7 @@ int main() {
 yywrap()
 ; return 0; }
 EOF
-if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1963: \"$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"
 else
@@ -1979,7 +1982,7 @@ fi
 fi
 
 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:1983: checking lex output file root" >&5
+echo "configure:1986: checking lex output file root" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2000,7 +2003,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
 
 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2004: checking whether yytext is a pointer" >&5
+echo "configure:2007: checking whether yytext is a pointer" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2012,14 +2015,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
 ac_save_LIBS="$LIBS"
 LIBS="$LIBS $LEXLIB"
 cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 2019 "configure"
 #include "confdefs.h"
 `cat $LEX_OUTPUT_ROOT.c`
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_prog_lex_yytext_pointer=yes
 else
@@ -2045,7 +2048,7 @@ 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:2049: checking for $ac_word" >&5
+echo "configure:2052: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2102,7 +2105,7 @@ fi
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2106: checking size of long" >&5
+echo "configure:2109: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2110,7 +2113,7 @@ else
   ac_cv_sizeof_long=4
 else
   cat > conftest.$ac_ext <<EOF
-#line 2114 "configure"
+#line 2117 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2121,7 +2124,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -2141,7 +2144,7 @@ EOF
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:2145: checking size of long long" >&5
+echo "configure:2148: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2149,7 +2152,7 @@ else
   ac_cv_sizeof_long_long=8
 else
   cat > conftest.$ac_ext <<EOF
-#line 2153 "configure"
+#line 2156 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2160,7 +2163,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
 else
@@ -2180,7 +2183,7 @@ EOF
 
 
 echo $ac_n "checking size of long double""... $ac_c" 1>&6
-echo "configure:2184: checking size of long double" >&5
+echo "configure:2187: checking size of long double" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2188,7 +2191,7 @@ else
   ac_cv_sizeof_long_double=12
 else
   cat > conftest.$ac_ext <<EOF
-#line 2192 "configure"
+#line 2195 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -2199,7 +2202,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_double=`cat conftestval`
 else
@@ -2231,17 +2234,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2235: checking for $ac_hdr" >&5
+echo "configure:2238: 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 2240 "configure"
+#line 2243 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2248: \"$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*
@@ -2271,17 +2274,17 @@ for ac_hdr in readline/readline.h readline/history.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2275: checking for $ac_hdr" >&5
+echo "configure:2278: 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 2280 "configure"
+#line 2283 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2288: \"$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*
@@ -2318,12 +2321,12 @@ LIBTERMCAP=
 for ac_func in tgetent
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2322: checking for $ac_func" >&5
+echo "configure:2325: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2327 "configure"
+#line 2330 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2349,7 +2352,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2377,7 +2380,7 @@ if test "x$ac_cv_func_tgetent" = "xyes"; then
     :
 else
     echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:2381: checking for tgetent in -lncurses" >&5
+echo "configure:2384: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2385,7 +2388,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2389 "configure"
+#line 2392 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2399,7 +2402,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2406: \"$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"
 else
@@ -2421,7 +2424,7 @@ fi
 
     if test -z "$LIBTERMCAP"; then
         echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:2425: checking for tgetent in -ltermcap" >&5
+echo "configure:2428: checking for tgetent in -ltermcap" >&5
 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2429,7 +2432,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2433 "configure"
+#line 2436 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2443,7 +2446,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:2447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2450: \"$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"
 else
@@ -2470,7 +2473,7 @@ fi
 save_LIBS=$LIBS
 LIBS="$LIBTERMCAP $LIBS"
 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:2474: checking for readline in -lreadline" >&5
+echo "configure:2477: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2478,7 +2481,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2482 "configure"
+#line 2485 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2492,7 +2495,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2499: \"$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"
 else
@@ -2534,17 +2537,17 @@ for ac_hdr in iostream vector map string list typeinfo iterator stdexcept algori
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2538: checking for $ac_hdr" >&5
+echo "configure:2541: 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 2543 "configure"
+#line 2546 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2551: \"$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*
@@ -2575,17 +2578,17 @@ for ac_hdr in sstream strstream
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2579: checking for $ac_hdr" >&5
+echo "configure:2582: 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 2584 "configure"
+#line 2587 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2592: \"$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*
@@ -2617,17 +2620,17 @@ done
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2621: checking for $ac_hdr" >&5
+echo "configure:2624: 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 2626 "configure"
+#line 2629 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2634: \"$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*
@@ -2654,17 +2657,17 @@ for ac_hdr in cln.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2658: checking for $ac_hdr" >&5
+echo "configure:2661: 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 2663 "configure"
+#line 2666 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2671: \"$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*
@@ -2699,7 +2702,7 @@ done
 
 
     echo $ac_n "checking for doublefactorial in -lcln""... $ac_c" 1>&6
-echo "configure:2703: checking for doublefactorial in -lcln" >&5
+echo "configure:2706: checking for doublefactorial in -lcln" >&5
     saved_LIBS="${LIBS}"
     if eval "test \"`echo '$''{'ginac_cv_lib_cln_link'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2708,14 +2711,14 @@ else
         case "${ac_cv_header_cln_cln_h}" in
         "yes")
             cat > conftest.$ac_ext <<EOF
-#line 2712 "configure"
+#line 2715 "configure"
 #include "confdefs.h"
 #include <cln/cl_integer.h>
 int main() {
 doublefactorial(2);
 ; return 0; }
 EOF
-if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ginac_cv_lib_cln_link="-lcln"
 else
@@ -2728,14 +2731,14 @@ rm -f conftest*
             ;;
         *)
             cat > conftest.$ac_ext <<EOF
-#line 2732 "configure"
+#line 2735 "configure"
 #include "confdefs.h"
 #include <cl_integer.h>
 int main() {
 doublefactorial(2);
 ; return 0; }
 EOF
-if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ginac_cv_lib_cln_link="-lcln"
 else
@@ -2776,7 +2779,7 @@ GINACLIB_LIBS=$LIBS
 # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2780: checking for $ac_word" >&5
+echo "configure:2783: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_DOXYGEN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2812,7 +2815,7 @@ fi
 # Extract the first word of "latex", so it can be a program name with args.
 set dummy latex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2816: checking for $ac_word" >&5
+echo "configure:2819: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_LATEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2848,7 +2851,7 @@ fi
 # Extract the first word of "makeindex", so it can be a program name with args.
 set dummy makeindex; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2852: checking for $ac_word" >&5
+echo "configure:2855: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKEINDEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2884,7 +2887,7 @@ fi
 # Extract the first word of "dvips", so it can be a program name with args.
 set dummy dvips; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2888: checking for $ac_word" >&5
+echo "configure:2891: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_DVIPS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2920,7 +2923,7 @@ fi
 # Extract the first word of "fig2dev", so it can be a program name with args.
 set dummy fig2dev; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2924: checking for $ac_word" >&5
+echo "configure:2927: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_FIG2DEV'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2984,7 +2987,7 @@ if test "x$with_cint" != "xno"; then
   # Extract the first word of "cint", so it can be a program name with args.
 set dummy cint; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2988: checking for $ac_word" >&5
+echo "configure:2991: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_CINT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3020,7 +3023,7 @@ fi
   # Extract the first word of "makecint", so it can be a program name with args.
 set dummy makecint; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3024: checking for $ac_word" >&5
+echo "configure:3027: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MAKECINT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3185,7 +3188,7 @@ doc/Makefile
 doc/tutorial/Makefile
 doc/reference/Makefile
 cint/Makefile
-cint/ginaccint
+cint/launch.h
  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
@@ -3258,8 +3261,6 @@ s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
 s%@RANLIB@%$RANLIB%g
 s%@CC@%$CC%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
 s%@LN_S@%$LN_S%g
 s%@LIBTOOL@%$LIBTOOL%g
 s%@LEX@%$LEX%g
@@ -3335,7 +3336,7 @@ doc/Makefile
 doc/tutorial/Makefile
 doc/reference/Makefile
 cint/Makefile
-cint/ginaccint
+cint/launch.h
 "}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
@@ -3509,7 +3510,7 @@ cat >> $CONFIG_STATUS <<EOF
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-chmod +x ginac-config cint/ginaccint
+chmod +x ginac-config
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
index f1212483a0b0b7e95cd52172571861787c589bd5..a9c3f3bb2c77f45e16976d5a8c1db636986f541f 100644 (file)
@@ -192,7 +192,7 @@ doc/Makefile
 doc/tutorial/Makefile
 doc/reference/Makefile
 cint/Makefile
-cint/ginaccint
-], [chmod +x ginac-config cint/ginaccint])
+cint/launch.h
+], [chmod +x ginac-config])
 dnl Display a final warning if there has been a GINAC_ERROR or a GINAC_WARNING
 GINAC_CHECK_ERRORS
index 79a4760bf06cc62ac85a0b1bd5e8f54a95576635..5e9d536f6ae63d663e6dd60d0bb66c730c66643d 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -274,7 +272,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 6685e2eea4190b7d27b1f27f8a500b381e6e80ee..7d610ec7a686603811940a65587afbfa94ef8bb1 100644 (file)
@@ -85,7 +85,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -98,7 +97,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -170,7 +168,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 255742932c946de6735f6e926e293c01c77b49b5..2bad576a3261f7e006795111d99fcf58ea99a437 100644 (file)
@@ -84,7 +84,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -97,7 +96,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -327,7 +325,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 1911f6c91b568a9db70dc61dcae0f1275733001d..4677e72658dcc89b404a722ab7b96b838e070d25 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -316,7 +314,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index 54917a275bc3a0ccda20d996f9d050d373d66e25..1c4b6dd52873209c53206099e50fa50f45cf8655 100644 (file)
@@ -649,28 +649,6 @@ matrix matrix::inverse(void) const
 }
 
 
-// superfluous helper function, to be removed:
-void matrix::ffe_swap(unsigned r1, unsigned c1, unsigned r2 ,unsigned c2)
-{
-    ensure_if_modifiable();
-    
-    ex tmp = ffe_get(r1,c1);
-    ffe_set(r1,c1,ffe_get(r2,c2));
-    ffe_set(r2,c2,tmp);
-}
-
-// superfluous helper function, to be removed:
-void matrix::ffe_set(unsigned r, unsigned c, ex e)
-{
-    set(r-1,c-1,e);
-}
-
-// superfluous helper function, to be removed:
-ex matrix::ffe_get(unsigned r, unsigned c) const
-{
-    return operator()(r-1,c-1);
-}
-
 /** Solve a set of equations for an m x n matrix by fraction-free Gaussian
  *  elimination.  Based on algorithm 9.1 from 'Algorithms for Computer Algebra'
  *  by Keith O. Geddes et al.
@@ -694,52 +672,46 @@ matrix matrix::fraction_free_elim(const matrix & vars,
     unsigned n = a.col;
     int sign = 1;
     ex divisor = 1;
-    unsigned r = 1;
+    unsigned r = 0;
     
     // eliminate below row r, with pivot in column k
-    for (unsigned k=1; (k<=n)&&(r<=m); ++k) {
+    for (unsigned k=0; (k<n)&&(r<m); ++k) {
         // find a nonzero pivot
         unsigned p;
-        for (p=r; (p<=m)&&(a.ffe_get(p,k).is_equal(_ex0())); ++p) {}
+        for (p=r; (p<m)&&(a.m[p*a.cols()+k].is_zero()); ++p) {}
         // pivot is in row p
-        if (p<=m) {
+        if (p<m) {
             if (p!=r) {
-                // switch rows p and r
-                for (unsigned j=k; j<=n; ++j)
-                    a.ffe_swap(p,j,r,j);
-                b.ffe_swap(p,1,r,1);
+                // swap rows p and r
+                for (unsigned j=k; j<n; ++j)
+                    a.m[p*a.cols()+j].swap(a.m[r*a.cols()+j]);
+                a.m[p*a.cols()].swap(a.m[r*a.cols()]);
                 // keep track of sign changes due to row exchange
                 sign = -sign;
             }
-            for (unsigned i=r+1; i<=m; ++i) {
-                for (unsigned j=k+1; j<=n; ++j) {
-                    a.ffe_set(i,j,(a.ffe_get(r,k)*a.ffe_get(i,j)
-                                  -a.ffe_get(r,j)*a.ffe_get(i,k))/divisor);
-                    a.ffe_set(i,j,a.ffe_get(i,j).normal() /*.normal() */ );
+            for (unsigned i=r+1; i<m; ++i) {
+                for (unsigned j=k+1; j<n; ++j) {
+                    a.set(i,j,(a.m[r*a.cols()+k]*a.m[i*a.cols()+j]
+                              -a.m[r*a.cols()+j]*a.m[i*a.cols()+k])/divisor);
+                    a.set(i,j,a.m[i*a.cols()+j].normal());
                 }
-                b.ffe_set(i,1,(a.ffe_get(r,k)*b.ffe_get(i,1)
-                              -b.ffe_get(r,1)*a.ffe_get(i,k))/divisor);
-                b.ffe_set(i,1,b.ffe_get(i,1).normal() /*.normal() */ );
-                a.ffe_set(i,k,0);
+                b.set(i,0,(a.m[r*a.cols()+k]*b.m[i*b.cols()]
+                          -b.m[r*b.cols()]*a.m[i*a.cols()+k])/divisor);
+                b.set(i,0,b.m[i*b.cols()].normal());
+                a.set(i,k,0);
             }
-            divisor = a.ffe_get(r,k);
+            divisor = a.m[r*a.cols()+k];
             r++;
         }
-    }    
-//     for (unsigned r=1; r<=m; ++r) {
-//         for (unsigned c=1; c<=n; ++c) {
-//             cout << a.ffe_get(r,c) << "\t";
-//         }
-//         cout << " | " <<  b.ffe_get(r,1) << endl;
-//     }
+    }
     
 #ifdef DO_GINAC_ASSERT
     // test if we really have an upper echelon matrix
     int zero_in_last_row = -1;
-    for (unsigned r=1; r<=m; ++r) {
+    for (unsigned r=0; r<m; ++r) {
         int zero_in_this_row=0;
-        for (unsigned c=1; c<=n; ++c) {
-            if (a.ffe_get(r,c).is_zero())
+        for (unsigned c=0; c<n; ++c) {
+            if (a.m[r*a.cols()+c].is_zero())
                zero_in_this_row++;
             else
                 break;
@@ -752,69 +724,67 @@ matrix matrix::fraction_free_elim(const matrix & vars,
     // assemble solution
     matrix sol(n,1);
     unsigned last_assigned_sol = n+1;
-    for (unsigned r=m; r>0; --r) {
+    for (int r=m-1; r>=0; --r) {
         unsigned first_non_zero = 1;
-        while ((first_non_zero<=n)&&(a.ffe_get(r,first_non_zero).is_zero()))
+        while ((first_non_zero<=n)&&(a.m[r*a.cols()+(first_non_zero-1)].is_zero()))
             first_non_zero++;
         if (first_non_zero>n) {
             // row consists only of zeroes, corresponding rhs must be 0 as well
-            if (!b.ffe_get(r,1).is_zero()) {
+            if (!b.m[r*b.cols()].is_zero()) {
                 throw (std::runtime_error("matrix::fraction_free_elim(): singular matrix"));
             }
         } else {
             // assign solutions for vars between first_non_zero+1 and
             // last_assigned_sol-1: free parameters
-            for (unsigned c=first_non_zero+1; c<=last_assigned_sol-1; ++c) {
-                sol.ffe_set(c,1,vars.ffe_get(c,1));
-            }
-            ex e = b.ffe_get(r,1);
-            for (unsigned c=first_non_zero+1; c<=n; ++c) {
-                e=e-a.ffe_get(r,c)*sol.ffe_get(c,1);
-            }
-            sol.ffe_set(first_non_zero,1,
-                        (e/a.ffe_get(r,first_non_zero)).normal());
+            for (unsigned c=first_non_zero; c<last_assigned_sol-1; ++c)
+                sol.set(c,0,vars.m[c*vars.cols()]);
+            ex e = b.m[r*b.cols()];
+            for (unsigned c=first_non_zero; c<n; ++c)
+                e -= a.m[r*a.cols()+c]*sol.m[c*sol.cols()];
+            sol.set(first_non_zero-1,0,
+                    (e/a.m[r*a.cols()+(first_non_zero-1)]).normal());
             last_assigned_sol = first_non_zero;
         }
     }
     // assign solutions for vars between 1 and
     // last_assigned_sol-1: free parameters
-    for (unsigned c=1; c<=last_assigned_sol-1; ++c)
-        sol.ffe_set(c,1,vars.ffe_get(c,1));
+    for (unsigned c=0; c<last_assigned_sol-1; ++c)
+        sol.set(c,0,vars.m[c*vars.cols()]);
     
 #ifdef DO_GINAC_ASSERT
     // test solution with echelon matrix
-    for (unsigned r=1; r<=m; ++r) {
+    for (unsigned r=0; r<m; ++r) {
         ex e = 0;
-        for (unsigned c=1; c<=n; ++c)
-            e = e+a.ffe_get(r,c)*sol.ffe_get(c,1);
-        if (!(e-b.ffe_get(r,1)).normal().is_zero()) {
+        for (unsigned c=0; c<n; ++c)
+            e += a.m[r*a.cols()+c]*sol.m[c*sol.cols()];
+        if (!(e-b.m[r*b.cols()]).normal().is_zero()) {
             cout << "e=" << e;
-            cout << "b.ffe_get(" << r<<",1)=" << b.ffe_get(r,1) << endl;
-            cout << "diff=" << (e-b.ffe_get(r,1)).normal() << endl;
+            cout << "b(" << r <<",0)=" << b.m[r*b.cols()] << endl;
+            cout << "diff=" << (e-b.m[r*b.cols()]).normal() << endl;
         }
-        GINAC_ASSERT((e-b.ffe_get(r,1)).normal().is_zero());
+        GINAC_ASSERT((e-b.m[r*b.cols()]).normal().is_zero());
     }
     
     // test solution with original matrix
-    for (unsigned r=1; r<=m; ++r) {
+    for (unsigned r=0; r<m; ++r) {
         ex e = 0;
-        for (unsigned c=1; c<=n; ++c)
-            e = e+ffe_get(r,c)*sol.ffe_get(c,1);
+        for (unsigned c=0; c<n; ++c)
+            e += this->m[r*cols()+c]*sol.m[c*sol.cols()];
         try {
-            if (!(e-rhs.ffe_get(r,1)).normal().is_zero()) {
-                cout << "e=" << e << endl;
+            if (!(e-rhs.m[r*rhs.cols()]).normal().is_zero()) {
+                cout << "e==" << e << endl;
                 e.printtree(cout);
                 ex en = e.normal();
                 cout << "e.normal()=" << en << endl;
                 en.printtree(cout);
-                cout << "rhs.ffe_get(" << r<<",1)=" << rhs.ffe_get(r,1) << endl;
-                cout << "diff=" << (e-rhs.ffe_get(r,1)).normal() << endl;
+                cout << "rhs(" << r <<",0)=" << rhs.m[r*rhs.cols()] << endl;
+                cout << "diff=" << (e-rhs.m[r*rhs.cols()]).normal() << endl;
             }
         } catch (...) {
-            ex xxx = e - rhs.ffe_get(r,1);
+            ex xxx = e - rhs.m[r*rhs.cols()];
             cerr << "xxx=" << xxx << endl << endl;
         }
-        GINAC_ASSERT((e-rhs.ffe_get(r,1)).normal().is_zero());
+        GINAC_ASSERT((e-rhs.m[r*rhs.cols()]).normal().is_zero());
     }
 #endif // def DO_GINAC_ASSERT
     
index 208b63031df6027616d9df34b4b99b4fbfa9fede..dc8eb48246542e9ace9c50b9b96dde8060552a67 100644 (file)
@@ -100,10 +100,6 @@ protected:
     int division_free_elimination(void);
     int fraction_free_elimination(bool det = false);
     int pivot(unsigned ro, bool symbolic=true);
-private:  // FIXME: these should be obsoleted
-    void ffe_swap(unsigned r1, unsigned c1, unsigned r2 ,unsigned c2);
-    void ffe_set(unsigned r, unsigned c, ex e);
-    ex ffe_get(unsigned r, unsigned c) const;
     
 // member variables
 protected:
index f1a073aa61ebf37af51a4170ac3d3cbcfec5cdd0..b322b1bd2870a38445a393479750a933f87d632f 100644 (file)
@@ -1504,7 +1504,7 @@ const numeric bernoulli(const numeric & nn)
     // return Bern;
     // 
     // But if somebody works with the n'th Bernoulli number she is likely to
-    // also need all previous Bernoulli numbers we need a complete remember
+    // also need all previous Bernoulli numbers. So we need a complete remember
     // table and above divide and conquer algorithm is not suited to build one
     // up.  The code below is adapted from Pari's function bernvec().
     // 
index fe97d7da8ad73c435128b8361c3576c9ff99d1d8..2ab86bd07784138d4d559109c12e32bbbc680edd 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -317,7 +315,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
index fdfe02c77f1cfb87c1e087558a41c150d99d888d..e12b3036dc1c4d440a8090ba8a496af710f23bf8 100644 (file)
@@ -82,7 +82,6 @@ GINACLIB_MINOR_VERSION = @GINACLIB_MINOR_VERSION@
 GINACLIB_VERSION = @GINACLIB_VERSION@
 GINSH_LIBS = @GINSH_LIBS@
 LATEX = @LATEX@
-LD = @LD@
 LEX = @LEX@
 LIBTERMCAP = @LIBTERMCAP@
 LIBTOOL = @LIBTOOL@
@@ -95,7 +94,6 @@ MAINT = @MAINT@
 MAKECINT = @MAKECINT@
 MAKEINDEX = @MAKEINDEX@
 MAKEINFO = @MAKEINFO@
-NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -300,7 +298,7 @@ distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pr $$/$$file $(distdir)/$$file; \
+           cp -pr $$d/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
            || ln $$d/$$file $(distdir)/$$file 2> /dev/null \