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...
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
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
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
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
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"
# 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
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
AC_PROG_LD_GNU
])
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
;;
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
## 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:
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
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)
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)
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:
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:
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 $<
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:
@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 \
| 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
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:
-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."
.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 \
--- /dev/null
+#! ./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);
--- /dev/null
+#! ./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);
+/* 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)
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)
{
// => 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;
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;
break;
case '\\':
// escape character, ignore next
- escape=true;
+ escape = true;
break;
case '"':
if ((!single_quote)&&(!comment)) {
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 '/':
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;
}
void initialize(void)
{
- if (isatty(0))
- greeting();
-
atexit(cleanup);
signal(SIGTERM,sigterm_handler);
initialize_cint();
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
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;
return false;
}
-bool readlines(istream * is, string & allcommands)
+bool readlines(istream * is,
+ string & allcommands)
{
char const * line;
char prompt[G__ONELINE];
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;
} 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);
} 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
}
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;
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;
}
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;
}
--- /dev/null
+/* 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;
+}
+++ /dev/null
-#! /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
--- /dev/null
+/* 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@";
--- /dev/null
+/* 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;
+}
# 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
*: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
# 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
# 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.
-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
;;
| 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 \
# 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.
;;
# 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-* \
crds | unos)
basic_machine=m68k-crds
;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
pentium | p5 | k5 | k6 | nexen)
basic_machine=i586-pc
;;
- pentiumpro | p6 | 6x86)
+ pentiumpro | p6 | 6x86 | athlon)
basic_machine=i686-pc
;;
pentiumii | pentium2)
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-*)
we32k)
basic_machine=we32k-att
;;
+ sh3 | sh4)
+ base_machine=sh-unknown
+ ;;
sparc | sparcv9)
basic_machine=sparc-sun
;;
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
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
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
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"
# 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"
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
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
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=
# 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
:
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
:
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
:
# 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
# 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
*) 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
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
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
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
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
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
# 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
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
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 2114 "configure"
+#line 2117 "configure"
#include "confdefs.h"
#include <stdio.h>
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
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
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()
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
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
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()
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
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*
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*
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. */
; 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
:
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
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
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
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
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
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
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
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
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
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*
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*
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*
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*
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
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
;;
*)
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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
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
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
doc/tutorial/Makefile
doc/reference/Makefile
cint/Makefile
-cint/ginaccint
+cint/launch.h
"}
EOF
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
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
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
}
-// 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.
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;
// 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
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:
// 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().
//
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \
GINACLIB_VERSION = @GINACLIB_VERSION@
GINSH_LIBS = @GINSH_LIBS@
LATEX = @LATEX@
-LD = @LD@
LEX = @LEX@
LIBTERMCAP = @LIBTERMCAP@
LIBTOOL = @LIBTOOL@
MAKECINT = @MAKECINT@
MAKEINDEX = @MAKEINDEX@
MAKEINFO = @MAKEINFO@
-NM = @NM@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
@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 \