eclib-2013-01-01/0000755000175200017520000000000012071070655010163 500000000000000eclib-2013-01-01/progs/0000755000175200017520000000000012071070657011317 500000000000000eclib-2013-01-01/progs/h1curve.cc0000644000175200017520000001400411774563612013131 00000000000000// FILE H1CURVE.CC: Program to list curves ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include #include #include #include #include #include #include #include //from qcurves #include //from qcurves, for computing conductors #include #include #ifndef SINGLE // so Makefile can override #define AUTOLOOP #endif #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output // If this is defined, the fisc6 output is placed in subdirectory // fixc6 in file fixc6/fixc6.N (one per level); otherwise it is all // put in ./fixc6.extra //#define FIXC6_OUTPUT_TO_SUBDIR #define BOOKORDER // if defined, sorts newforms/curves into order // in the Book (relevant up to 500 only) #include vector > bad_ones; // holds bad (n,i) list int checkap(const level* iN, const newform& nf, CurveRed& CR, long pmax=100); int main(void) { int prec0 = 25; int maxprec = 100; int prec = prec0; set_precision(prec); // set_precision("Enter number of decimal places"); int verb=0; #ifdef SINGLE verb=1; #else cout<<"See detail? "; cin>>verb; #endif int limit,n=1; #ifdef AUTOLOOP cout<<"Enter first and last N: ";cin>>n>>limit; n--; cout<0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { newforms nf(n,verb); int noldap=25; nf.createfromdata(1,noldap,0); // do not create from scratch if data absent #ifdef LMFDB_ORDER nf.sort(); #endif int nnf = nf.n1ds; int inf = 1; #ifndef SINGLE if(verb>1) nf.display(); #else // if(nnf>1) { cout << "Enter form number (between 1 and "<>inf; if((inf<1)||(inf>nnf)) { cout << "Not in range!\n"; inf=1; nnf=0; } else nnf=inf; } #endif for(int xi=inf-1; xi(n,i+1)); } else { if(getdiscr(Curvedata(C,0))!=getdiscr(CD)) { cout << "Non-minimal curve = \t" << C << ", minimal curve = \t"; } else if(verb) cout << "Curve = \t"; cout << (Curve)CD << "\t"; cout << "N = " << nc; if(n!=nc) { cout<<" ------WRONG CONDUCTOR!"; } else { if(!checkap(&nf, nf.nflist[i], CR)) cout<<" ----- a_p do not agree!"; // else // cout<<" ----- a_p agree for p<100"; } cout<0) { cout<<"\nNumber of bad curves: "< aplist = nf.aplist; vector primelist = primes(aplist.size()); unsigned int i; bigint ap, p=BIGINT(0); int ok=1, ok1; for(i=0; (i>n>>limit; n--; cout<0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { newforms nf(n,0); int noldap=25; nf.createfromdata(1,noldap,0); // do not create from scratch if data absent for(int i=0; i>verbose; cout << "How many primes for Hecke eigenvalues? "; cin >> stopp; cout << endl; output=1; cout << "Output newforms to file? (0/1) "; cin >> output; #ifdef AUTOLOOP int limit; cout<<"Enter first and last N: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { cout << "\n>>>Level " << n; // Temporary code to skip non-square-free levels // // if(!is_squarefree(n)) {cout<<" --not square-free, skipping!\n"; continue;} // if(verbose)cout<1)) cout<<"c4 factor " << fac << endl; int* success=new int[nnf]; long nsucc=0; for(inf=0; infdotplus=1; // This will have been set correctly nfi->dotminus=1; bigfloat x0=to_bigfloat(10), y0=to_bigfloat(10); int have_both = nf.find_matrix( inf, dmax, rp_known, x0, y0); if(!have_both) cout<<"Problem! find_matrix() returns 0!"<a<<","<b<<";"<c<<","<d<<"):\t"; cout << "dotplus = "<< nfi->dotplus << ", dotminus = "<< nfi->dotminus<< "\n"; cout << "Searching for scaling factors.\n"; } long nx, ny; long maxnx=maxn; if(rp_known) maxnx=1; int found = get_curve(n, fac, maxnx, maxn, x0, y0, nx, ny, nfi->type, verbose); if(found) { success[inf]=1; nsucc++; nfi->dotplus *= nx; nfi->dotminus *= ny; cout << "[(" <a<<","<b<<";"<c <<","<d<<"),"<dotplus<<","<dotminus <<";"<type<<"]"<MAXNAP) { cout<<"Cannot compute more ap, something must be wrong in newform data"<0) } // end of while(n>0) or while(n $${prog}.testout 2>/dev/null && diff $${prog}.testout $(test_output_dir)/$${prog}.out || exit $$? test_input_dir = $(srcdir)/in test_output_dir = $(srcdir)/out ################ PROCS (conics & cubics programs) ################# PROCS_PROGS = solve_conic solve_legendre reduce_cubics list_cubics PROCS_PROGS_SUFFIXED = $(PROCS_PROGS:=$(EXEEXT)) solve_conic_SOURCES = solve_conic.cc solve_legendre_SOURCES = solve_legendre.cc reduce_cubics_SOURCES = reduce_cubics.cc list_cubics_SOURCES = list_cubics.cc ################ QCURVES (elliptic curves programs, excluding two-descent) ################# QCURVES_PROGS = point_search indep_test QCURVES_PROGS_SUFFIXED = $(QCURVES_PROGS:=$(EXEEXT)) point_search_SOURCES = point_search.cc indep_test_SOURCES = indep_test.cc ################ QCURVES (elliptic curves two-descent programs) ################# # When allprogs is disabled the only binary to be built and installed # is mwrank, but we want "make check" to build and test all. QRANK_PROGS = mwrank reduce_quartics quartic_points QRANK_CHECK_PROGS = reduce_quartics quartic_points QRANK_PROGS_SUFFIXED = $(QRANK_PROGS:=$(EXEEXT)) QRANK_CHECK_PROGS_SUFFIXED = $(QRANK_CHECK_PROGS:=$(EXEEXT)) mwrank_SOURCES = mwrank.cc reduce_quartics_SOURCES = reduce_quartics.cc quartic_points_SOURCES = quartic_points.cc ################ G0N (modular symbols programs) ################# G0N_PROGS = ecnf nfhpcurve nfhpmcurve h1first h1clist h1bsdcurisog qexp h1bsd h1curve pcurve checkap moreap nfcount aplist G0N_PROGS_SUFFIXED = $(G0N_PROGS:=$(EXEEXT)) h1bsd_SOURCES = h1bsd.cc h1curve_SOURCES = h1curve.cc pcurve_SOURCES = pcurve.cc nfhpcurve_SOURCES = nfhpcurve.cc nfhpmcurve_SOURCES = nfhpmcurve.cc h1clist_SOURCES = h1clist.cc checkap_SOURCES = checkap.cc h1bsdcurisog_SOURCES = h1bsdcurisog.cc nfcount_SOURCES = nfcount.cc ecnf_SOURCES = ecnf.cc h1first_SOURCES = h1first.cc moreap_SOURCES = moreap.cc qexp_SOURCES = qexp.cc aplist_SOURCES = aplist.cc # We list here the directories in and out which contain the test input # and expected output files for the tests run by "make check". EXTRA_DIST = in out ACLOCAL_AMFLAGS = -I m4 all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu progs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu progs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list aplist$(EXEEXT): $(aplist_OBJECTS) $(aplist_DEPENDENCIES) $(EXTRA_aplist_DEPENDENCIES) @rm -f aplist$(EXEEXT) $(CXXLINK) $(aplist_OBJECTS) $(aplist_LDADD) $(LIBS) checkap$(EXEEXT): $(checkap_OBJECTS) $(checkap_DEPENDENCIES) $(EXTRA_checkap_DEPENDENCIES) @rm -f checkap$(EXEEXT) $(CXXLINK) $(checkap_OBJECTS) $(checkap_LDADD) $(LIBS) ecnf$(EXEEXT): $(ecnf_OBJECTS) $(ecnf_DEPENDENCIES) $(EXTRA_ecnf_DEPENDENCIES) @rm -f ecnf$(EXEEXT) $(CXXLINK) $(ecnf_OBJECTS) $(ecnf_LDADD) $(LIBS) h1bsd$(EXEEXT): $(h1bsd_OBJECTS) $(h1bsd_DEPENDENCIES) $(EXTRA_h1bsd_DEPENDENCIES) @rm -f h1bsd$(EXEEXT) $(CXXLINK) $(h1bsd_OBJECTS) $(h1bsd_LDADD) $(LIBS) h1bsdcurisog$(EXEEXT): $(h1bsdcurisog_OBJECTS) $(h1bsdcurisog_DEPENDENCIES) $(EXTRA_h1bsdcurisog_DEPENDENCIES) @rm -f h1bsdcurisog$(EXEEXT) $(CXXLINK) $(h1bsdcurisog_OBJECTS) $(h1bsdcurisog_LDADD) $(LIBS) h1clist$(EXEEXT): $(h1clist_OBJECTS) $(h1clist_DEPENDENCIES) $(EXTRA_h1clist_DEPENDENCIES) @rm -f h1clist$(EXEEXT) $(CXXLINK) $(h1clist_OBJECTS) $(h1clist_LDADD) $(LIBS) h1curve$(EXEEXT): $(h1curve_OBJECTS) $(h1curve_DEPENDENCIES) $(EXTRA_h1curve_DEPENDENCIES) @rm -f h1curve$(EXEEXT) $(CXXLINK) $(h1curve_OBJECTS) $(h1curve_LDADD) $(LIBS) h1first$(EXEEXT): $(h1first_OBJECTS) $(h1first_DEPENDENCIES) $(EXTRA_h1first_DEPENDENCIES) @rm -f h1first$(EXEEXT) $(CXXLINK) $(h1first_OBJECTS) $(h1first_LDADD) $(LIBS) indep_test$(EXEEXT): $(indep_test_OBJECTS) $(indep_test_DEPENDENCIES) $(EXTRA_indep_test_DEPENDENCIES) @rm -f indep_test$(EXEEXT) $(CXXLINK) $(indep_test_OBJECTS) $(indep_test_LDADD) $(LIBS) list_cubics$(EXEEXT): $(list_cubics_OBJECTS) $(list_cubics_DEPENDENCIES) $(EXTRA_list_cubics_DEPENDENCIES) @rm -f list_cubics$(EXEEXT) $(CXXLINK) $(list_cubics_OBJECTS) $(list_cubics_LDADD) $(LIBS) moreap$(EXEEXT): $(moreap_OBJECTS) $(moreap_DEPENDENCIES) $(EXTRA_moreap_DEPENDENCIES) @rm -f moreap$(EXEEXT) $(CXXLINK) $(moreap_OBJECTS) $(moreap_LDADD) $(LIBS) mwrank$(EXEEXT): $(mwrank_OBJECTS) $(mwrank_DEPENDENCIES) $(EXTRA_mwrank_DEPENDENCIES) @rm -f mwrank$(EXEEXT) $(CXXLINK) $(mwrank_OBJECTS) $(mwrank_LDADD) $(LIBS) nfcount$(EXEEXT): $(nfcount_OBJECTS) $(nfcount_DEPENDENCIES) $(EXTRA_nfcount_DEPENDENCIES) @rm -f nfcount$(EXEEXT) $(CXXLINK) $(nfcount_OBJECTS) $(nfcount_LDADD) $(LIBS) nfhpcurve$(EXEEXT): $(nfhpcurve_OBJECTS) $(nfhpcurve_DEPENDENCIES) $(EXTRA_nfhpcurve_DEPENDENCIES) @rm -f nfhpcurve$(EXEEXT) $(CXXLINK) $(nfhpcurve_OBJECTS) $(nfhpcurve_LDADD) $(LIBS) nfhpmcurve$(EXEEXT): $(nfhpmcurve_OBJECTS) $(nfhpmcurve_DEPENDENCIES) $(EXTRA_nfhpmcurve_DEPENDENCIES) @rm -f nfhpmcurve$(EXEEXT) $(CXXLINK) $(nfhpmcurve_OBJECTS) $(nfhpmcurve_LDADD) $(LIBS) pcurve$(EXEEXT): $(pcurve_OBJECTS) $(pcurve_DEPENDENCIES) $(EXTRA_pcurve_DEPENDENCIES) @rm -f pcurve$(EXEEXT) $(CXXLINK) $(pcurve_OBJECTS) $(pcurve_LDADD) $(LIBS) point_search$(EXEEXT): $(point_search_OBJECTS) $(point_search_DEPENDENCIES) $(EXTRA_point_search_DEPENDENCIES) @rm -f point_search$(EXEEXT) $(CXXLINK) $(point_search_OBJECTS) $(point_search_LDADD) $(LIBS) qexp$(EXEEXT): $(qexp_OBJECTS) $(qexp_DEPENDENCIES) $(EXTRA_qexp_DEPENDENCIES) @rm -f qexp$(EXEEXT) $(CXXLINK) $(qexp_OBJECTS) $(qexp_LDADD) $(LIBS) quartic_points$(EXEEXT): $(quartic_points_OBJECTS) $(quartic_points_DEPENDENCIES) $(EXTRA_quartic_points_DEPENDENCIES) @rm -f quartic_points$(EXEEXT) $(CXXLINK) $(quartic_points_OBJECTS) $(quartic_points_LDADD) $(LIBS) reduce_cubics$(EXEEXT): $(reduce_cubics_OBJECTS) $(reduce_cubics_DEPENDENCIES) $(EXTRA_reduce_cubics_DEPENDENCIES) @rm -f reduce_cubics$(EXEEXT) $(CXXLINK) $(reduce_cubics_OBJECTS) $(reduce_cubics_LDADD) $(LIBS) reduce_quartics$(EXEEXT): $(reduce_quartics_OBJECTS) $(reduce_quartics_DEPENDENCIES) $(EXTRA_reduce_quartics_DEPENDENCIES) @rm -f reduce_quartics$(EXEEXT) $(CXXLINK) $(reduce_quartics_OBJECTS) $(reduce_quartics_LDADD) $(LIBS) solve_conic$(EXEEXT): $(solve_conic_OBJECTS) $(solve_conic_DEPENDENCIES) $(EXTRA_solve_conic_DEPENDENCIES) @rm -f solve_conic$(EXEEXT) $(CXXLINK) $(solve_conic_OBJECTS) $(solve_conic_LDADD) $(LIBS) solve_legendre$(EXEEXT): $(solve_legendre_OBJECTS) $(solve_legendre_DEPENDENCIES) $(EXTRA_solve_legendre_DEPENDENCIES) @rm -f solve_legendre$(EXEEXT) $(CXXLINK) $(solve_legendre_OBJECTS) $(solve_legendre_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aplist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecnf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h1bsd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h1bsdcurisog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h1clist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h1curve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h1first.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indep_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_cubics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moreap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mwrank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfcount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfhpcurve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nfhpmcurve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcurve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/point_search.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartic_points.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reduce_cubics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reduce_quartics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve_conic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solve_legendre.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS procs_progs: $(PROCS_PROGS_SUFFIXED) check_procs: procs_progs @echo Checking conics and cubics programs... for prog in $(PROCS_PROGS); do $(check_run); done qcurves_progs: $(QCURVES_PROGS_SUFFIXED) check_qcurves: qcurves_progs @echo Checking qcurves programs... for prog in $(QCURVES_PROGS); do $(check_run); done qrank_progs: $(QRANK_PROGS_SUFFIXED) check_qrank: qrank_progs @echo Checking qrank programs... for prog in $(QRANK_PROGS); do $(check_run); done rm -f PRIMES 1 g0n_progs: $(G0N_PROGS_SUFFIXED) # This is the name of a directory which will be used for newform # input/output in the "make check" tests and removed afterwards. # This does not work without the export! export NF_DIR:=nftmp check_g0n: g0n_progs @echo Checking g0n programs... rm -rf $(NF_DIR) mkdir $(NF_DIR) for prog in $(G0N_PROGS); do $(check_run); done rm -rf $(NF_DIR) ################################################################################# check: check_procs check_qcurves check_qrank check_g0n rm -f *.testout PRIMES 1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: eclib-2013-01-01/progs/qexp.cc0000644000175200017520000000467211774563612012543 00000000000000// FILE QEXP.CC: program for listing coefficients of q-expansions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // #include #include #include #include #include #include #include #include #include #define AUTOLOOP #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output #define NAP 25 // number of ap to output #define SEPCHAR "," // char to separate ap in output int main(void) { cerr<<"q-expansions of rational newforms"; #ifdef LMFDB_ORDER cerr<<" in LMFDB order (simple lexicographic)"; #endif cerr<>firstn>>limit; cerr<0) { cerr<<"Enter level: "; cin>>n; #endif if (n>0) { newforms nf(n,verbose); nf.createfromdata(1,25); int i, num = nf.n1ds; if(num>0){ nap = nf.nflist[0].aplist.size(); if (nap>NAP) nap=NAP; if(verbose) { cout << ">>> Level " << n << " <<<\t"; cout << num << " newform(s) "<v = nf.nflist[i].aplist; copy(v.begin(),v.begin()+nap, ostream_iterator(cout, SEPCHAR)); //vec_out(cout,v,20); cout<<"..."< #include #include #ifndef VERBOSITY #define VERBOSITY 0 #endif #ifndef CONIC_METHOD #define CONIC_METHOD 4 #endif #define TEST_PARAM int main() { initprimes("PRIMES",VERBOSITY); cout<<"Solving ax^2 + bxz + cz^2 = dy^2\n"; cout<<"Using method "<>ws; if(cin.eof()) {cerr<> a >> b >> c >> d; cout< #include #include #include #include #include #include #include #include //from qcurves, for computing conductors #include #include #include #define AUTOLOOP #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output #define MAXNAP 20000 int main(void) { init_time(); start_time(); long n=110, stopp, stopp0; long prec0=25; int output, verbose; cout << "Program nfhpmcurve. Using METHOD = " << METHOD << " to find newforms" << endl; #ifdef MODULAR cout << "MODULUS for linear algebra = " << MODULUS << endl; #endif cout << "Verbose output? "; cin>>verbose; cout << "How many primes for Hecke eigenvalues? "; cin >> stopp0; cout << endl; output=1; cout << "Output newforms to file? (0/1) "; cin >> output; #ifdef AUTOLOOP int limit; cout<<"Enter first and last N: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { cout << "\n>>>Level " << n; // Temporary code to skip non-square-free levels // // if(!is_squarefree(n)) {cout<<" --not square-free, skipping!\n"; continue;} // if(verbose)cout<1)) cout<<"c4 factor " << fac << endl; stopp = stopp0; // will be increased if necessary set_precision(prec0); bigfloat rperiod; vector forms; for(inf=0; inf0) { forms = nf.showcurves(forms,verbose); if(forms.size()==0) { cout<<"All curves found successfully!"<::const_iterator inf=forms.begin(); inf!=forms.end(); inf++) cout<<(*inf+1)<<" "; cout<MAXNAP) { cout<<"Cannot compute more ap, something must be wrong in newform data"<0) } // end of while(n>0) or while(n #include #include #include #ifndef CONIC_METHOD #define CONIC_METHOD 4 #endif #define TEST_PARAM int main() { initprimes("PRIMES"); cout<<"Solving ax^2 + by^2 + cz^2 = 0\n"; cout<<"Using method "<> a >> b >> c; cout< #include #include // for nf_filename int main(void) { int limit,n=1,count=0,firstn, verbose; int getindex=0; cout << "Verbose? (0/1) " << endl; cin >> verbose; cout<<"Enter first and last N: ";cin>>firstn>>limit; n=firstn-1; cout<0) { if(verbose) cout << ">>> Level " << n << " <<< "; int num=0, nap=0, naq=0; string name = nf_filename(n,'x'); ifstream in(name.c_str()); int eig_file_exists = in.is_open(); if(!eig_file_exists) { cout<<"Unable to open file "<0)&&(nap<25)) cout<<" !!!"; if(!eig_file_exists) cout<<" [No eig file exists]"; cout<< endl; } } // end of if(n) } // end of while() cout << "\n" << count << " newform(s) in range " << firstn << "..." << limit << endl; } // end of main() eclib-2013-01-01/progs/ecnf.cc0000644000175200017520000000656711774563612012506 00000000000000// FILE ECNF.CC: program for newform construction from an elliptic curve ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // #include #include #include #include #include #include #include #include #include int main(void) { int verbose=0; // Read in the curve, minimise and construct CurveRed (needed for // conductor and Traces of Frobenius etc.) Curve C; cout << "Enter curve: "; cin >> C; Curvedata CD(C,1); // minimise CurveRed CR(CD); bigint N = getconductor(CR); int n = I2int(N); cout << ">>> Level = conductor = " << n << " <<<" << endl; cout << "Minimal curve = " << (Curve)(CR) << endl; cout<>sign; newforms nf(n,verbose); // Create the newform from the curve (first create the homspace, // then split off the eigenspace) nf.createfromcurve(sign,CR); // Display newform info cout << "Newform information:"<>ws; if(cin.eof()) {cout<> nu >> de; r=rational(nu,de); if((nu==0)&&(de==0)) {cout< "<< nf.plus_modular_symbol(r)< "<< nf.minus_modular_symbol(r)< s = nf.full_modular_symbol(r); cout<<"{0,"< ("<< s.first << "," << s.second << ")" < "<< nf.plus_modular_symbol(r)< "<< nf.minus_modular_symbol(r)< s = nf.full_modular_symbol(r); cout<<"{0,"< ("<< s.first << "," << s.second << ")" < $${prog}.testout 2>/dev/null && diff $${prog}.testout $(test_output_dir)/$${prog}.out || exit $$? test_input_dir = $(srcdir)/in test_output_dir = $(srcdir)/out ################ PROCS (conics & cubics programs) ################# PROCS_PROGS = solve_conic solve_legendre reduce_cubics list_cubics PROCS_PROGS_SUFFIXED = $(PROCS_PROGS:=$(EXEEXT)) procs_progs: $(PROCS_PROGS_SUFFIXED) solve_conic_SOURCES=solve_conic.cc solve_legendre_SOURCES=solve_legendre.cc reduce_cubics_SOURCES=reduce_cubics.cc list_cubics_SOURCES=list_cubics.cc check_procs: procs_progs @echo Checking conics and cubics programs... for prog in $(PROCS_PROGS); do $(check_run); done ################ QCURVES (elliptic curves programs, excluding two-descent) ################# QCURVES_PROGS = point_search indep_test QCURVES_PROGS_SUFFIXED = $(QCURVES_PROGS:=$(EXEEXT)) qcurves_progs: $(QCURVES_PROGS_SUFFIXED) point_search_SOURCES=point_search.cc indep_test_SOURCES=indep_test.cc check_qcurves: qcurves_progs @echo Checking qcurves programs... for prog in $(QCURVES_PROGS); do $(check_run); done ################ QCURVES (elliptic curves two-descent programs) ################# # When allprogs is disabled the only binary to be built and installed # is mwrank, but we want "make check" to build and test all. QRANK_PROGS = mwrank reduce_quartics quartic_points QRANK_CHECK_PROGS = reduce_quartics quartic_points QRANK_PROGS_SUFFIXED = $(QRANK_PROGS:=$(EXEEXT)) QRANK_CHECK_PROGS_SUFFIXED = $(QRANK_CHECK_PROGS:=$(EXEEXT)) qrank_progs: $(QRANK_PROGS_SUFFIXED) mwrank_SOURCES=mwrank.cc reduce_quartics_SOURCES=reduce_quartics.cc quartic_points_SOURCES=quartic_points.cc check_qrank: qrank_progs @echo Checking qrank programs... for prog in $(QRANK_PROGS); do $(check_run); done rm -f PRIMES 1 ################ G0N (modular symbols programs) ################# G0N_PROGS = ecnf nfhpcurve nfhpmcurve h1first h1clist h1bsdcurisog qexp h1bsd h1curve pcurve checkap moreap nfcount aplist G0N_PROGS_SUFFIXED = $(G0N_PROGS:=$(EXEEXT)) g0n_progs: $(G0N_PROGS_SUFFIXED) h1bsd_SOURCES=h1bsd.cc h1curve_SOURCES=h1curve.cc pcurve_SOURCES=pcurve.cc nfhpcurve_SOURCES=nfhpcurve.cc nfhpmcurve_SOURCES=nfhpmcurve.cc h1clist_SOURCES=h1clist.cc checkap_SOURCES=checkap.cc h1bsdcurisog_SOURCES=h1bsdcurisog.cc nfcount_SOURCES=nfcount.cc ecnf_SOURCES=ecnf.cc h1first_SOURCES=h1first.cc moreap_SOURCES=moreap.cc qexp_SOURCES=qexp.cc aplist_SOURCES=aplist.cc # This is the name of a directory which will be used for newform # input/output in the "make check" tests and removed afterwards. # This does not work without the export! export NF_DIR:=nftmp check_g0n: g0n_progs @echo Checking g0n programs... rm -rf $(NF_DIR) mkdir $(NF_DIR) for prog in $(G0N_PROGS); do $(check_run); done rm -rf $(NF_DIR) ################################################################################# check: check_procs check_qcurves check_qrank check_g0n rm -f *.testout PRIMES 1 # When allprogs is disabled the only binary to be built and installed # is mwrank, but we want "make check" to build and test all. if ALLPROGS bin_PROGRAMS=$(PROCS_PROGS) $(QCURVES_PROGS) $(QRANK_PROGS) $(G0N_PROGS) check_PROGRAMS= else bin_PROGRAMS=mwrank$(EXEEXT) check_PROGRAMS=$(PROCS_PROGS) $(QCURVES_PROGS) $(QRANK_CHECK_PROGS) $(G0N_PROGS) endif # We list here the directories in and out which contain the test input # and expected output files for the tests run by "make check". EXTRA_DIST = in out ACLOCAL_AMFLAGS = -I m4 eclib-2013-01-01/progs/reduce_quartics.cc0000644000175200017520000001002612070124774014726 00000000000000// REDUCE_QUARTICS.CC: Program for minimisation and reduction of quartics ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include #include #include #include #include #include #include #include int getquartic(quartic& g); int main() { set_precision(200); cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) int verb=1; //0; // cout << "Verbose? "; cin >> verb; initprimes("PRIMES",verb); quartic g; while (getquartic(g)) { cout<<"Quartic is "<>ch; if(ch=='(') cin>>a>>ch>>b>>ch>>c>>ch>>d>>ch>>e>>ch; else { cin.putback(ch); cin >> a >> b >> c >> d >> e; } if (sign(a)==0&&sign(b)==0&&sign(c)==0&&sign(d)==0&&sign(e)==0) return 0; g=quartic(a,b,c,d,e); // will set its own invariants, roots and type return 1; } eclib-2013-01-01/progs/h1clist.cc0000644000175200017520000001110011774563612013115 00000000000000// h1clist.cc -- Outputs table of curves computing a_i, r, |T| ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include #include #include #include #include #include //from qcurves, for computing conductors #include #include #include #define AUTOLOOP //#define BOOKORDER // if defined, sorts newforms/curves into order // in the Book (relevant up to 500 only) #include #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output #define CURVE_IS_ONE_FIELD // outputs [a1,a2,a3,a4,a6] // else outputs a1 a2 a3 a4 a6 int main(void) { int prec0 = 25; int maxprec = 100; int prec = prec0; set_precision(prec); int limit,n=1; string code; #ifdef AUTOLOOP cerr<<"Enter first and last N: ";cin>>n>>limit; n--; cerr<0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { newforms nf(n,0); int noldap=25; nf.createfromdata(1,noldap,0); // do not create from scratch if data absent int nnf = nf.n1ds; int inf = 1; if(nnf>0) { // cout<<"****************************"< #include #include int main() { initprimes("PRIMES"); bigint a, b, c, d, disc; unimod m; while(cout << "Enter cubic coeffs a, b, c, d: ", cin >> a >> b >> c >> d, !(is_zero(a)&&is_zero(b)&&is_zero(c)&&is_zero(d))) { cubic g0(a,b,c,d); cubic g(g0); cout << "Input cubic = "< #include #include #include #include #include #include //from qcurves, for computing conductors #include //#define AUTOLOOP int main(void) { int n=1; int lastn, stopp, output, showeigs, showforms, findcurves; int nnf, nap; cout << "Program moreap\n"; cout << "---------------\n\n"; cout << "For each N, assumes that the file newforms/xN exists, and computes more\n"; cout << "Hecke eigenvalues.\n"; cout << "Output new eigs to file (1/0)? "; cin>>output; cout << "Output new eigs to screen (1/0)? "; cin>>showeigs; cout << "Display newforms (1/0)? "; cin>>showforms; cout << "Attempt curve construction (1/0)? "; cin>>findcurves; if(findcurves) set_precision("Enter number of decimal places"); #ifdef AUTOLOOP cout << "How many primes for Hecke eigenvalues? "; cin >> stopp; cout << endl; cout<<"Enter first and last N: ";cin>>n>>lastn; n--; while (n>n, n>0) { cout << "How many primes for Hecke eigenvalues? "; cin >> stopp; cout << endl; #endif cout << "\n>>>Level " << n << "\t"; newforms nf(n,showforms); nf.createfromdata(1,0,0); if (showforms) nf.newforms::display(); nnf = nf.n1ds; if(nnf==0) { cout<<"No newforms."<=stopp) { cout<<"Already have "< forms; for(inf=0; inf failures = nf.showcurves(forms,0); if(failures.size()>0) { cout<<"No curve found for "< using namespace std; #include #include // for nf_filename const long MAXNAP = 100000; int main(void) { long firstn, lastn, n, nnf, naq, nap, n2ds, ap, i, j, p; int ok, allok=1; short temp; cout<<"Enter first and last N: "; cin>>firstn>>lastn; for(n=firstn; n<=lastn; n++) { ok=1; string name = nf_filename(n,'x'); ifstream datafile(name.c_str()); if(!datafile.is_open()) { cout<<"\nFile "<0) { // skip over extra data for each newform long ntotal = 16*nnf; int* batch_i = new int[ntotal]; datafile.read((char*)batch_i,ntotal*sizeof(int)); // skip over aq for each newform ntotal = naq*nnf; short* batch = new short[ntotal]; datafile.read((char*)batch,ntotal*sizeof(short)); // read and check ap for each newform ntotal = nap*nnf; delete batch; batch = new short[ntotal]; datafile.read((char*)batch,ntotal*sizeof(short)); short* batchptr = batch; primevar pr; for(j=0; j4*p) { cout << "\nError: N = " << n << ", form # " << (j+1) << ", p = " << p << " has ap = " << ap << flush; ok=0; } } } delete batch; } // ends if(nnf>0) } // ends if(datafile) datafile.close(); if(ok) cout << n << " "; else { cout << "\nN = " << n << ": errors found!\n"; allok=0; } if(n%10==0) cout< #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include int main() { set_precision("Enter number of decimal places"); initprimes("PRIMES",0); bigfloat ht_limit; bigint u,r,s,t; int verbose = 1, modopt=0, pp=1, change_flag; long blength, rank, maxrank; cerr<<"\nenter search limit: "; cin>>ht_limit; cerr<<"verbose (0/1)? "; cin >>verbose; cerr<<"process points found (1) or just list them (0): "; cin>>pp; // cout<<"moduli option (0 (Stoll)/ 1/2/3)?"; cin >> modopt; int verb=1; bigint v; vector ai(5); while (getcurve(ai,verb)) { Curvedata C(ai,v); cout << "Input curve "; cout <<"["<>blength; cerr<<"enter max rank to stop when this is reached (-ve for none): "; cin >>maxrank; if(maxrank<0) maxrank=999; vector known_points(blength); if (blength) { for (long j=0; j> P0; Point P(C,scale(P0,v,1)); if ( P.isvalid() ) { Point Q = transform(P,&C_min,u,r,s,t,0); known_points[j] = Q; if(change_flag) { cout< unsat; if(verbose) { cout <<"Regulator (before saturation) = "< b = mwbasis.getbasis(); vector bb(rank); for (long i=0; i1) cout<<"Regulator = "<>> Level = conductor = 389 <<< Minimal curve = [0,1,1,-2,0] Enter sign (1,-1,0 for both):Newform information: 1 newform(s) at level 389: p0=2 #ap= 25 1: aplist = [ -2 -2 -3 -5 -4 -3 -6 5 -4 -6 4 -8 -3 12 -2 -6 3 -8 -5 -10 ...] aq = [ -1 ] ap0 = -2, dp0 = 0, np0 = 5 SFE = 1, L/P = 0 lplus = 5, mplus = 8 lminus = 3, mminus = 4 [(-111,1;-2,7),1,1;2] Modular symbol map: (0:1) = {0,oo} -> (0,0) (1:1) = {0,1} -> (0,0) (2:1) = {0,1/2} -> (0,0) (3:1) = {0,1/3} -> (0,2) (4:1) = {0,1/4} -> (0,0) (5:1) = {0,1/5} -> (2,0) (6:1) = {0,1/6} -> (0,0) (7:1) = {0,1/7} -> (1,-1) (8:1) = {0,1/8} -> (0,1) (9:1) = {0,1/9} -> (-1,-1) (10:1) = {0,1/10} -> (0,0) (11:1) = {0,1/11} -> (1,0) (12:1) = {0,1/12} -> (0,-1) (13:1) = {0,1/13} -> (0,-2) (14:1) = {0,1/14} -> (-1,1) (15:1) = {0,1/15} -> (0,0) (16:1) = {0,1/16} -> (1,-1) (17:1) = {0,1/17} -> (0,1) (18:1) = {0,1/18} -> (1,-1) (19:1) = {0,1/19} -> (0,-1) (20:1) = {0,1/20} -> (-1,0) (21:1) = {0,1/21} -> (0,-1) (22:1) = {0,1/22} -> (0,0) (23:1) = {0,1/23} -> (0,1) (24:1) = {0,1/24} -> (1,-1) (25:1) = {0,1/25} -> (-1,-1) (26:1) = {0,1/26} -> (0,0) (27:1) = {0,1/27} -> (1,1) (28:1) = {0,1/28} -> (1,-1) (29:1) = {0,1/29} -> (0,-1) (30:1) = {0,1/30} -> (0,-2) (31:1) = {0,1/31} -> (-1,-3) (32:1) = {0,1/32} -> (-2,-1) (33:1) = {0,1/33} -> (-2,-1) (34:1) = {0,1/34} -> (-1,0) (35:1) = {0,1/35} -> (-1,0) (36:1) = {0,1/36} -> (0,1) (37:1) = {0,1/37} -> (0,1) (38:1) = {0,1/38} -> (-1,1) (39:1) = {0,1/39} -> (0,0) (40:1) = {0,1/40} -> (1,0) (41:1) = {0,1/41} -> (0,-1) (42:1) = {0,1/42} -> (-1,-1) (43:1) = {0,1/43} -> (1,-1) (44:1) = {0,1/44} -> (-1,-1) (45:1) = {0,1/45} -> (0,-2) (46:1) = {0,1/46} -> (-1,-3) (47:1) = {0,1/47} -> (-2,1) (48:1) = {0,1/48} -> (-2,1) (49:1) = {0,1/49} -> (0,-1) (50:1) = {0,1/50} -> (0,1) (51:1) = {0,1/51} -> (0,-1) (52:1) = {0,1/52} -> (0,1) (53:1) = {0,1/53} -> (0,0) (54:1) = {0,1/54} -> (0,-1) (55:1) = {0,1/55} -> (-1,-1) (56:1) = {0,1/56} -> (-1,1) (57:1) = {0,1/57} -> (-1,-1) (58:1) = {0,1/58} -> (-1,-1) (59:1) = {0,1/59} -> (-2,2) (60:1) = {0,1/60} -> (0,2) (61:1) = {0,1/61} -> (0,1) (62:1) = {0,1/62} -> (0,2) (63:1) = {0,1/63} -> (0,0) (64:1) = {0,1/64} -> (2,0) (65:1) = {0,1/65} -> (0,0) (66:1) = {0,1/66} -> (1,1) (67:1) = {0,1/67} -> (0,-2) (68:1) = {0,1/68} -> (0,-2) (69:1) = {0,1/69} -> (0,-2) (70:1) = {0,1/70} -> (0,-1) (71:1) = {0,1/71} -> (0,-2) (72:1) = {0,1/72} -> (-1,-1) (73:1) = {0,1/73} -> (-1,-1) (74:1) = {0,1/74} -> (-1,-2) (75:1) = {0,1/75} -> (0,0) (76:1) = {0,1/76} -> (0,-2) (77:1) = {0,1/77} -> (-2,0) (78:1) = {0,1/78} -> (-2,0) (79:1) = {0,1/79} -> (-2,0) (80:1) = {0,1/80} -> (-2,0) (81:1) = {0,1/81} -> (-1,1) (82:1) = {0,1/82} -> (-1,2) (83:1) = {0,1/83} -> (0,0) (84:1) = {0,1/84} -> (0,2) (85:1) = {0,1/85} -> (-1,1) (86:1) = {0,1/86} -> (-2,2) (87:1) = {0,1/87} -> (0,2) (88:1) = {0,1/88} -> (0,2) (89:1) = {0,1/89} -> (-1,1) (90:1) = {0,1/90} -> (-1,3) (91:1) = {0,1/91} -> (-2,2) (92:1) = {0,1/92} -> (-1,4) (93:1) = {0,1/93} -> (1,3) (94:1) = {0,1/94} -> (1,1) (95:1) = {0,1/95} -> (2,2) (96:1) = {0,1/96} -> (2,0) (97:1) = {0,1/97} -> (0,0) (98:1) = {0,1/98} -> (0,2) (99:1) = {0,1/99} -> (1,1) (100:1) = {0,1/100} -> (1,0) (101:1) = {0,1/101} -> (0,0) (102:1) = {0,1/102} -> (-1,1) (103:1) = {0,1/103} -> (1,0) (104:1) = {0,1/104} -> (0,0) (105:1) = {0,1/105} -> (-1,-1) (106:1) = {0,1/106} -> (-1,0) (107:1) = {0,1/107} -> (-1,0) (108:1) = {0,1/108} -> (-1,1) (109:1) = {0,1/109} -> (-1,2) (110:1) = {0,1/110} -> (-1,2) (111:1) = {0,1/111} -> (-1,1) (112:1) = {0,1/112} -> (-1,1) (113:1) = {0,1/113} -> (-1,3) (114:1) = {0,1/114} -> (1,1) (115:1) = {0,1/115} -> (0,0) (116:1) = {0,1/116} -> (1,1) (117:1) = {0,1/117} -> (0,2) (118:1) = {0,1/118} -> (1,-1) (119:1) = {0,1/119} -> (1,1) (120:1) = {0,1/120} -> (-1,-1) (121:1) = {0,1/121} -> (0,2) (122:1) = {0,1/122} -> (-1,1) (123:1) = {0,1/123} -> (0,2) (124:1) = {0,1/124} -> (-1,0) (125:1) = {0,1/125} -> (-1,1) (126:1) = {0,1/126} -> (0,2) (127:1) = {0,1/127} -> (0,1) (128:1) = {0,1/128} -> (-2,2) (129:1) = {0,1/129} -> (0,2) (130:1) = {0,1/130} -> (0,2) (131:1) = {0,1/131} -> (0,2) (132:1) = {0,1/132} -> (1,1) (133:1) = {0,1/133} -> (0,2) (134:1) = {0,1/134} -> (1,3) (135:1) = {0,1/135} -> (-1,1) (136:1) = {0,1/136} -> (0,2) (137:1) = {0,1/137} -> (-1,2) (138:1) = {0,1/138} -> (1,3) (139:1) = {0,1/139} -> (1,1) (140:1) = {0,1/140} -> (1,1) (141:1) = {0,1/141} -> (2,0) (142:1) = {0,1/142} -> (0,0) (143:1) = {0,1/143} -> (0,2) (144:1) = {0,1/144} -> (0,0) (145:1) = {0,1/145} -> (1,2) (146:1) = {0,1/146} -> (0,1) (147:1) = {0,1/147} -> (-1,2) (148:1) = {0,1/148} -> (1,4) (149:1) = {0,1/149} -> (2,1) (150:1) = {0,1/150} -> (0,0) (151:1) = {0,1/151} -> (0,2) (152:1) = {0,1/152} -> (0,2) (153:1) = {0,1/153} -> (0,0) (154:1) = {0,1/154} -> (2,1) (155:1) = {0,1/155} -> (2,2) (156:1) = {0,1/156} -> (2,0) (157:1) = {0,1/157} -> (0,0) (158:1) = {0,1/158} -> (2,1) (159:1) = {0,1/159} -> (1,-2) (160:1) = {0,1/160} -> (1,0) (161:1) = {0,1/161} -> (0,-1) (162:1) = {0,1/162} -> (0,1) (163:1) = {0,1/163} -> (1,1) (164:1) = {0,1/164} -> (1,1) (165:1) = {0,1/165} -> (2,1) (166:1) = {0,1/166} -> (0,0) (167:1) = {0,1/167} -> (2,0) (168:1) = {0,1/168} -> (1,-1) (169:1) = {0,1/169} -> (1,1) (170:1) = {0,1/170} -> (1,-1) (171:1) = {0,1/171} -> (2,2) (172:1) = {0,1/172} -> (1,-2) (173:1) = {0,1/173} -> (1,-1) (174:1) = {0,1/174} -> (1,-1) (175:1) = {0,1/175} -> (1,0) (176:1) = {0,1/176} -> (1,-1) (177:1) = {0,1/177} -> (2,0) (178:1) = {0,1/178} -> (2,-2) (179:1) = {0,1/179} -> (1,-3) (180:1) = {0,1/180} -> (0,-2) (181:1) = {0,1/181} -> (0,0) (182:1) = {0,1/182} -> (1,-2) (183:1) = {0,1/183} -> (0,-1) (184:1) = {0,1/184} -> (1,-2) (185:1) = {0,1/185} -> (1,-2) (186:1) = {0,1/186} -> (0,-1) (187:1) = {0,1/187} -> (0,-1) (188:1) = {0,1/188} -> (0,-2) (189:1) = {0,1/189} -> (-2,0) (190:1) = {0,1/190} -> (-1,-1) (191:1) = {0,1/191} -> (-2,0) (192:1) = {0,1/192} -> (-2,0) (193:1) = {0,1/193} -> (0,2) (194:1) = {0,1/194} -> (0,0) (195:1) = {0,1/195} -> (0,0) (196:1) = {0,1/196} -> (0,-2) (197:1) = {0,1/197} -> (-2,0) (198:1) = {0,1/198} -> (-2,0) (199:1) = {0,1/199} -> (-1,1) (200:1) = {0,1/200} -> (-2,0) (201:1) = {0,1/201} -> (0,2) (202:1) = {0,1/202} -> (0,1) (203:1) = {0,1/203} -> (0,1) (204:1) = {0,1/204} -> (1,2) (205:1) = {0,1/205} -> (1,2) (206:1) = {0,1/206} -> (0,1) (207:1) = {0,1/207} -> (1,2) (208:1) = {0,1/208} -> (0,0) (209:1) = {0,1/209} -> (0,2) (210:1) = {0,1/210} -> (1,3) (211:1) = {0,1/211} -> (2,2) (212:1) = {0,1/212} -> (2,0) (213:1) = {0,1/213} -> (1,1) (214:1) = {0,1/214} -> (1,0) (215:1) = {0,1/215} -> (1,1) (216:1) = {0,1/216} -> (1,1) (217:1) = {0,1/217} -> (1,2) (218:1) = {0,1/218} -> (2,-2) (219:1) = {0,1/219} -> (1,1) (220:1) = {0,1/220} -> (1,-1) (221:1) = {0,1/221} -> (1,1) (222:1) = {0,1/222} -> (2,0) (223:1) = {0,1/223} -> (0,0) (224:1) = {0,1/224} -> (2,-1) (225:1) = {0,1/225} -> (1,-1) (226:1) = {0,1/226} -> (1,-1) (227:1) = {0,1/227} -> (0,-1) (228:1) = {0,1/228} -> (0,1) (229:1) = {0,1/229} -> (1,0) (230:1) = {0,1/230} -> (1,2) (231:1) = {0,1/231} -> (2,-1) (232:1) = {0,1/232} -> (0,0) (233:1) = {0,1/233} -> (2,0) (234:1) = {0,1/234} -> (2,-2) (235:1) = {0,1/235} -> (2,-1) (236:1) = {0,1/236} -> (0,0) (237:1) = {0,1/237} -> (0,-2) (238:1) = {0,1/238} -> (0,-2) (239:1) = {0,1/239} -> (0,0) (240:1) = {0,1/240} -> (2,-1) (241:1) = {0,1/241} -> (1,-4) (242:1) = {0,1/242} -> (-1,-2) (243:1) = {0,1/243} -> (0,-1) (244:1) = {0,1/244} -> (1,-2) (245:1) = {0,1/245} -> (0,0) (246:1) = {0,1/246} -> (0,-2) (247:1) = {0,1/247} -> (0,0) (248:1) = {0,1/248} -> (2,0) (249:1) = {0,1/249} -> (1,-1) (250:1) = {0,1/250} -> (1,-1) (251:1) = {0,1/251} -> (1,-3) (252:1) = {0,1/252} -> (-1,-2) (253:1) = {0,1/253} -> (0,-2) (254:1) = {0,1/254} -> (-1,-1) (255:1) = {0,1/255} -> (1,-3) (256:1) = {0,1/256} -> (0,-2) (257:1) = {0,1/257} -> (1,-1) (258:1) = {0,1/258} -> (0,-2) (259:1) = {0,1/259} -> (0,-2) (260:1) = {0,1/260} -> (0,-2) (261:1) = {0,1/261} -> (-2,-2) (262:1) = {0,1/262} -> (0,-1) (263:1) = {0,1/263} -> (0,-2) (264:1) = {0,1/264} -> (-1,-1) (265:1) = {0,1/265} -> (-1,0) (266:1) = {0,1/266} -> (0,-2) (267:1) = {0,1/267} -> (-1,-1) (268:1) = {0,1/268} -> (0,-2) (269:1) = {0,1/269} -> (-1,1) (270:1) = {0,1/270} -> (1,-1) (271:1) = {0,1/271} -> (1,1) (272:1) = {0,1/272} -> (0,-2) (273:1) = {0,1/273} -> (1,-1) (274:1) = {0,1/274} -> (0,0) (275:1) = {0,1/275} -> (1,-1) (276:1) = {0,1/276} -> (-1,-3) (277:1) = {0,1/277} -> (-1,-1) (278:1) = {0,1/278} -> (-1,-1) (279:1) = {0,1/279} -> (-1,-2) (280:1) = {0,1/280} -> (-1,-2) (281:1) = {0,1/281} -> (-1,-1) (282:1) = {0,1/282} -> (-1,0) (283:1) = {0,1/283} -> (-1,0) (284:1) = {0,1/284} -> (-1,1) (285:1) = {0,1/285} -> (0,0) (286:1) = {0,1/286} -> (1,0) (287:1) = {0,1/287} -> (-1,-1) (288:1) = {0,1/288} -> (0,0) (289:1) = {0,1/289} -> (1,0) (290:1) = {0,1/290} -> (1,-1) (291:1) = {0,1/291} -> (0,-2) (292:1) = {0,1/292} -> (0,0) (293:1) = {0,1/293} -> (2,0) (294:1) = {0,1/294} -> (2,-2) (295:1) = {0,1/295} -> (1,-1) (296:1) = {0,1/296} -> (1,-3) (297:1) = {0,1/297} -> (-1,-4) (298:1) = {0,1/298} -> (-2,-2) (299:1) = {0,1/299} -> (-1,-3) (300:1) = {0,1/300} -> (-1,-1) (301:1) = {0,1/301} -> (0,-2) (302:1) = {0,1/302} -> (0,-2) (303:1) = {0,1/303} -> (-2,-2) (304:1) = {0,1/304} -> (-1,-1) (305:1) = {0,1/305} -> (0,-2) (306:1) = {0,1/306} -> (0,0) (307:1) = {0,1/307} -> (-1,-2) (308:1) = {0,1/308} -> (-1,-1) (309:1) = {0,1/309} -> (-2,0) (310:1) = {0,1/310} -> (-2,0) (311:1) = {0,1/311} -> (-2,0) (312:1) = {0,1/312} -> (-2,0) (313:1) = {0,1/313} -> (0,2) (314:1) = {0,1/314} -> (0,0) (315:1) = {0,1/315} -> (-1,2) (316:1) = {0,1/316} -> (-1,1) (317:1) = {0,1/317} -> (-1,1) (318:1) = {0,1/318} -> (0,2) (319:1) = {0,1/319} -> (0,1) (320:1) = {0,1/320} -> (0,2) (321:1) = {0,1/321} -> (0,2) (322:1) = {0,1/322} -> (0,2) (323:1) = {0,1/323} -> (1,-1) (324:1) = {0,1/324} -> (0,0) (325:1) = {0,1/325} -> (2,0) (326:1) = {0,1/326} -> (0,0) (327:1) = {0,1/327} -> (0,-2) (328:1) = {0,1/328} -> (0,-1) (329:1) = {0,1/329} -> (0,-2) (330:1) = {0,1/330} -> (-2,-2) (331:1) = {0,1/331} -> (-1,1) (332:1) = {0,1/332} -> (-1,1) (333:1) = {0,1/333} -> (-1,-1) (334:1) = {0,1/334} -> (-1,1) (335:1) = {0,1/335} -> (0,1) (336:1) = {0,1/336} -> (0,0) (337:1) = {0,1/337} -> (0,-1) (338:1) = {0,1/338} -> (0,1) (339:1) = {0,1/339} -> (0,-1) (340:1) = {0,1/340} -> (0,1) (341:1) = {0,1/341} -> (-2,-1) (342:1) = {0,1/342} -> (-2,-1) (343:1) = {0,1/343} -> (-1,3) (344:1) = {0,1/344} -> (0,2) (345:1) = {0,1/345} -> (-1,1) (346:1) = {0,1/346} -> (1,1) (347:1) = {0,1/347} -> (-1,1) (348:1) = {0,1/348} -> (0,1) (349:1) = {0,1/349} -> (1,0) (350:1) = {0,1/350} -> (0,0) (351:1) = {0,1/351} -> (-1,-1) (352:1) = {0,1/352} -> (0,-1) (353:1) = {0,1/353} -> (0,-1) (354:1) = {0,1/354} -> (-1,0) (355:1) = {0,1/355} -> (-1,0) (356:1) = {0,1/356} -> (-2,1) (357:1) = {0,1/357} -> (-2,1) (358:1) = {0,1/358} -> (-1,3) (359:1) = {0,1/359} -> (0,2) (360:1) = {0,1/360} -> (0,1) (361:1) = {0,1/361} -> (1,1) (362:1) = {0,1/362} -> (1,-1) (363:1) = {0,1/363} -> (0,0) (364:1) = {0,1/364} -> (-1,1) (365:1) = {0,1/365} -> (1,1) (366:1) = {0,1/366} -> (0,-1) (367:1) = {0,1/367} -> (0,0) (368:1) = {0,1/368} -> (0,1) (369:1) = {0,1/369} -> (-1,0) (370:1) = {0,1/370} -> (0,1) (371:1) = {0,1/371} -> (1,1) (372:1) = {0,1/372} -> (0,-1) (373:1) = {0,1/373} -> (1,1) (374:1) = {0,1/374} -> (0,0) (375:1) = {0,1/375} -> (-1,-1) (376:1) = {0,1/376} -> (0,2) (377:1) = {0,1/377} -> (0,1) (378:1) = {0,1/378} -> (1,0) (379:1) = {0,1/379} -> (0,0) (380:1) = {0,1/380} -> (-1,1) (381:1) = {0,1/381} -> (0,-1) (382:1) = {0,1/382} -> (1,1) (383:1) = {0,1/383} -> (0,0) (384:1) = {0,1/384} -> (2,0) (385:1) = {0,1/385} -> (0,0) (386:1) = {0,1/386} -> (0,-2) (387:1) = {0,1/387} -> (0,0) (388:1) = {0,1/388} -> (0,0) (1:0) = {oo,0} -> (0,0) Computation of further modular symbols {0,r} for rational r: Enter numerator and denominator of r: {0,355/113} -> (3,1) Enter numerator and denominator of r: {0,0} -> (0,0) {0,1/2} -> (0,0) {0,1/3} -> (0,2) {0,2/3} -> (0,-2) {0,1/4} -> (0,0) {0,3/4} -> (0,0) {0,1/5} -> (2,0) {0,2/5} -> (-2,0) {0,3/5} -> (-2,0) {0,4/5} -> (2,0) {0,1/6} -> (0,0) {0,5/6} -> (0,0) {0,1/7} -> (1,-1) {0,2/7} -> (1,1) {0,3/7} -> (-2,0) {0,4/7} -> (-2,0) {0,5/7} -> (1,-1) {0,6/7} -> (1,1) {0,1/8} -> (0,1) {0,3/8} -> (0,1) {0,5/8} -> (0,-1) {0,7/8} -> (0,-1) {0,1/9} -> (-1,-1) {0,2/9} -> (2,2) {0,4/9} -> (-1,-1) {0,5/9} -> (-1,1) {0,7/9} -> (2,-2) {0,8/9} -> (-1,1) {0,1/10} -> (0,0) {0,3/10} -> (0,0) {0,7/10} -> (0,0) {0,9/10} -> (0,0) {0,1/11} -> (1,0) {0,2/11} -> (0,0) {0,3/11} -> (1,0) {0,4/11} -> (0,0) {0,5/11} -> (-2,0) {0,6/11} -> (-2,0) {0,7/11} -> (0,0) {0,8/11} -> (1,0) {0,9/11} -> (0,0) {0,10/11} -> (1,0) {0,1/12} -> (0,-1) {0,5/12} -> (0,1) {0,7/12} -> (0,-1) {0,11/12} -> (0,1) {0,1/13} -> (0,-2) {0,2/13} -> (0,2) {0,3/13} -> (1,1) {0,4/13} -> (1,-1) {0,5/13} -> (-2,0) {0,6/13} -> (0,-2) {0,7/13} -> (0,2) {0,8/13} -> (-2,0) {0,9/13} -> (1,1) {0,10/13} -> (1,-1) {0,11/13} -> (0,-2) {0,12/13} -> (0,2) {0,1/14} -> (-1,1) {0,3/14} -> (2,0) {0,5/14} -> (-1,1) {0,9/14} -> (-1,-1) {0,11/14} -> (2,0) {0,13/14} -> (-1,-1) {0,1/15} -> (0,0) {0,2/15} -> (0,1) {0,4/15} -> (0,0) {0,7/15} -> (0,-1) {0,8/15} -> (0,1) {0,11/15} -> (0,0) {0,13/15} -> (0,-1) {0,14/15} -> (0,0) {0,1/16} -> (1,-1) {0,3/16} -> (1,-1) {0,5/16} -> (-1,1) {0,7/16} -> (-1,1) {0,9/16} -> (-1,-1) {0,11/16} -> (-1,-1) {0,13/16} -> (1,1) {0,15/16} -> (1,1) {0,1/17} -> (0,1) {0,2/17} -> (1,-3) {0,3/17} -> (0,-2) {0,4/17} -> (1,3) {0,5/17} -> (0,0) {0,6/17} -> (-1,2) {0,7/17} -> (-1,-2) {0,8/17} -> (0,-1) {0,9/17} -> (0,1) {0,10/17} -> (-1,2) {0,11/17} -> (-1,-2) {0,12/17} -> (0,0) {0,13/17} -> (1,-3) {0,14/17} -> (0,2) {0,15/17} -> (1,3) {0,16/17} -> (0,-1) {0,1/18} -> (1,-1) {0,5/18} -> (1,1) {0,7/18} -> (-2,2) {0,11/18} -> (-2,-2) {0,13/18} -> (1,-1) {0,17/18} -> (1,1) {0,1/19} -> (0,-1) {0,2/19} -> (0,-1) {0,3/19} -> (0,2) {0,4/19} -> (1,2) {0,5/19} -> (-1,1) {0,6/19} -> (0,0) {0,7/19} -> (0,2) {0,8/19} -> (-1,1) {0,9/19} -> (1,-2) {0,10/19} -> (1,2) {0,11/19} -> (-1,-1) {0,12/19} -> (0,-2) {0,13/19} -> (0,0) {0,14/19} -> (-1,-1) {0,15/19} -> (1,-2) {0,16/19} -> (0,-2) {0,17/19} -> (0,1) {0,18/19} -> (0,1) eclib-2013-01-01/progs/out/checkap.out0000644000175200017520000000011312015426325014163 00000000000000Enter first and last N: 50 51 52 53 54 55 56 57 58 59 60 All checked ok eclib-2013-01-01/progs/out/h1clist.out0000644000175200017520000000013711752000337014140 00000000000000 90 a 1 [1,-1,0,6,0] 0 6 0 90 b 1 [1,-1,1,-8,11] 0 6 0 90 c 1 [1,-1,1,13,-61] 0 4 0 eclib-2013-01-01/progs/out/reduce_cubics.out0000644000175200017520000000060111751754030015371 00000000000000Enter cubic coeffs a, b, c, d: Input cubic = [123,234,345,456] Discriminant = -40491312264 Real root alpha = -1.598578656 g(alpha) = -0.1076197221e-41 Using Mathews reduction ... Mathews reduced cubic = [123,234,345,456] after transform by [1,0;0,1] Using JC/Julia reduction ... JC/Julia reduced cubic = [123,-135,246,222] after transform by [1,-1;0,1] Enter cubic coeffs a, b, c, d: eclib-2013-01-01/progs/out/h1bsd.out0000644000175200017520000000134112071066423013573 00000000000000Enter first and last N: 50 a Rank = 0 L^(r)(f,1)/r! = 0.713164981428297 50 b Rank = 0 L^(r)(f,1)/r! = 0.956811226587628 51 a Rank = 0 L^(r)(f,1)/r! = 0.860059016127138 52 a Rank = 0 L^(r)(f,1)/r! = 0.845483208645646 53 a Rank = 1 L^(r)(f,1)/r! = 0.435863824177856 54 a Rank = 0 L^(r)(f,1)/r! = 0.70157482532401 54 b Rank = 0 L^(r)(f,1)/r! = 1.030521849701 55 a Rank = 0 L^(r)(f,1)/r! = 1.02866985617819 56 a Rank = 0 L^(r)(f,1)/r! = 0.874548314188336 56 b Rank = 0 L^(r)(f,1)/r! = 0.948019115613868 57 a Rank = 1 L^(r)(f,1)/r! = 0.41749163967631 57 b Rank = 0 L^(r)(f,1)/r! = 0.586509591656568 57 c Rank = 0 L^(r)(f,1)/r! = 1.08530227226767 58 a Rank = 1 L^(r)(f,1)/r! = 0.463704164788249 58 b Rank = 0 L^(r)(f,1)/r! = 1.03320750936511 eclib-2013-01-01/progs/out/qexp.out0000644000175200017520000000215411752000400013536 0000000000000050a: -1,1,0,2,-3,-4,-3,5,6,0,2,2,-3,-4,12,6,0,2,-13,12,11,-10,-9,15,2,... 50b: 1,-1,0,-2,-3,4,3,5,-6,0,2,-2,-3,4,-12,-6,0,2,13,12,-11,-10,9,15,-2,... 51a: 0,1,3,-4,-3,-1,-1,-1,9,6,2,-4,-3,-7,-6,-6,6,8,-4,12,2,-10,-6,0,-16,... 52a: 0,0,2,-2,-2,-1,6,-6,8,2,10,-6,-6,4,-2,6,-10,-2,10,10,2,-4,-6,-6,2,... 53a: -1,-3,0,-4,0,-3,-3,-5,7,-7,4,5,6,-2,-2,-1,-2,-8,-12,1,-4,-1,-1,-14,1,... 54a: -1,0,3,-1,-3,-4,0,2,-6,6,5,2,-6,-10,6,9,12,8,14,0,-7,8,-3,-18,-1,... 54b: 1,0,-3,-1,3,-4,0,2,6,-6,5,2,6,-10,-6,-9,-12,8,14,0,-7,8,3,18,-1,... 55a: 1,0,1,0,-1,2,6,-4,4,6,-8,-2,2,4,-12,-2,4,-10,-16,8,14,8,-4,10,10,... 56a: 0,0,2,-1,-4,2,-6,8,0,6,8,-2,2,-4,-8,6,0,-6,-4,-8,10,16,8,-6,-6,... 56b: 0,2,-4,1,0,0,-2,-2,8,2,4,-6,-2,8,-4,-10,6,4,-12,0,-14,-8,6,10,-2,... 57a: -2,-1,-3,-5,1,2,-1,-1,-4,-2,-6,0,0,-1,-9,10,-8,-1,8,-12,-11,16,12,-6,-10,... 57b: -2,1,1,3,-3,-6,3,-1,4,-10,2,8,-8,-1,3,-6,0,7,8,12,-11,0,4,10,-2,... 57c: 1,1,-2,0,0,6,-6,-1,4,2,8,-10,-2,-4,12,-6,-12,-2,-4,0,10,0,16,-2,10,... 58a: -1,-3,-3,-2,-1,3,-4,-8,0,-1,3,-8,-2,7,11,1,-4,4,-4,-2,-12,-7,0,-6,-6,... 58b: 1,-1,1,-2,-3,-1,8,0,4,-1,-3,8,2,-11,13,-11,0,-8,-12,2,4,15,4,-10,-2,... eclib-2013-01-01/progs/out/list_cubics.out0000644000175200017520000000263311751754272015114 00000000000000Enter discriminant bound (positive or negative): Positive discriminants up to 200 49 [1,-1,-2,1] -----------> [1,-1,-2,1] 81 [1,0,-3,1] -----------> [1,0,-3,1] 108 [1,0,-3,0] -----------> [1,0,-3,0] 117 [1,1,-3,0] -----------> [0,-3,-1,1] 125 [1,-1,-3,2] -----------> [1,2,-2,-1] 148 [1,0,-4,2] -----------> [1,-1,-3,1] 148 [1,1,-3,-1] -----------> [1,1,-3,-1] 169 [1,1,-4,1] -----------> [1,1,-4,1] Enter discriminant bound (positive or negative): Negative discriminants down to 200 -23 [1,-1,0,1] -----------> [1,-1,0,1] -23 [1,0,-1,1] -----------> [1,1,0,1] -27 [1,0,0,1] -----------> [1,0,0,1] -31 [1,1,-2,1] -----------> [1,-1,0,1] -31 [1,1,0,1] -----------> [1,1,0,1] -44 [1,1,-1,1] -----------> [1,1,-1,1] -59 [1,-1,-1,2] -----------> [1,2,0,1] -76 [1,0,-2,2] -----------> [1,3,1,1] -83 [1,-1,-3,4] -----------> [1,2,-2,1] -87 [1,-1,-2,3] -----------> [1,2,-1,1] -100 [1,-1,0,2] -----------> [1,-1,0,2] -104 [1,0,-1,2] -----------> [1,0,-1,2] -107 [1,1,-3,2] -----------> [1,4,2,1] -108 [1,0,0,2] -----------> [1,0,0,2] -116 [1,1,0,2] -----------> [1,1,0,2] -135 [1,0,-3,3] -----------> [1,3,0,1] -147 [1,1,-1,2] -----------> [1,1,-1,2] -152 [1,1,-2,2] -----------> [1,1,-2,2] -172 [1,-1,-1,3] -----------> [1,2,0,2] -175 [1,0,-5,5] -----------> [1,3,-2,1] -176 [1,0,-4,4] -----------> [1,3,-1,1] -199 [1,1,-4,3] -----------> [1,4,1,1] -200 [2,2,-1,1] -----------> [1,1,-2,2] Enter discriminant bound (positive or negative): eclib-2013-01-01/progs/out/nfcount.out0000644000175200017520000000114012015427766014254 00000000000000Verbose? (0/1) Enter first and last N: >>> Level 50 <<< 2 newform(s), 100 eigs on file. >>> Level 51 <<< 1 newform(s), 100 eigs on file. >>> Level 52 <<< 1 newform(s), 100 eigs on file. >>> Level 53 <<< 1 newform(s), 100 eigs on file. >>> Level 54 <<< 2 newform(s), 100 eigs on file. >>> Level 55 <<< 1 newform(s), 100 eigs on file. >>> Level 56 <<< 2 newform(s), 100 eigs on file. >>> Level 57 <<< 3 newform(s), 100 eigs on file. >>> Level 58 <<< 2 newform(s), 100 eigs on file. >>> Level 59 <<< 0 newform(s), 0 eigs on file. >>> Level 60 <<< 0 newform(s), 0 eigs on file. 15 newform(s) in range 50...60 eclib-2013-01-01/progs/out/indep_test.out0000644000175200017520000001704411751756343014752 00000000000000verbose (0/1)? Input a curve: Curve [1,0,1,-19252966408674012828065964616418441723,32685500727716376257923347071452044295907443056345614006] enter number of points: enter point 1 : enter point 2 : enter point 3 : enter point 4 : enter point 5 : enter point 6 : enter point 7 : enter point 8 : enter point 9 : enter point 10 : enter point 11 : enter point 12 : enter point 13 : enter point 14 : enter point 15 : enter point 16 : enter point 17 : enter point 18 : enter point 19 : enter point 20 : enter point 21 : enter point 22 : enter point 23 : 23 points entered. Enter number of primes to use: Processing point [5836121652711390553392352147587734955:-69455519784971993679807552308609739430858248812:41166906143372569] Image = 00 1 1 0 01 0 0 1 0 0 1 0 1 1 00 1 1 01 1 1 After elimination: 00 1 1 0 01 0 0 1 0 0 1 0 1 1 00 1 1 01 1 1 P independent of previous points (using prime 31) rank increases to 1 Processing point [1168425140326369941586705900133272389:-17137023844710987140049387309945953892946213544:5429411004770479] Image = 11 1 1 1 01 0 0 0 1 1 0 0 0 1 00 1 0 11 0 1 After elimination: 11 0 0 1 00 0 0 1 1 1 1 0 1 0 00 0 1 10 1 0 P independent of previous points (using prime 7) rank increases to 2 Processing point [69505543020048021386994294068829048:1443380843339272397458721030742392016696304046:161157926442059] Image = 11 1 0 0 11 1 1 1 0 1 1 1 1 1 11 1 1 01 0 0 After elimination: 00 0 1 1 10 1 1 1 1 0 1 1 1 0 11 0 1 10 0 1 P independent of previous points (using prime 43) rank increases to 3 Processing point [33726169481462771119596650221569:49412130720987886904443301152758710388796:7098921280459] Image = 11 0 1 0 11 0 0 1 0 0 1 0 0 1 00 0 0 11 0 1 After elimination: 00 0 0 0 01 1 1 1 0 1 1 1 0 1 11 0 0 11 1 0 P independent of previous points (using prime 53) rank increases to 4 Processing point [15827793579244286948730141533934:6538434104009303265024749952830709029353:5389750958437] Image = 01 1 0 1 01 1 1 0 1 0 0 1 1 1 11 1 1 01 1 0 After elimination: 01 0 0 0 10 0 0 0 0 0 0 0 1 0 00 0 1 10 0 0 P independent of previous points (using prime 7) rank increases to 5 Processing point [695536410556937814932194749585:230697883363551870088729854504374414548:302787575875] Image = 11 1 1 0 11 0 1 1 0 1 1 1 0 0 01 0 1 00 1 1 After elimination: 00 0 0 1 10 0 1 1 1 0 1 1 0 1 01 1 1 11 1 0 P independent of previous points (using prime 47) rank increases to 6 Processing point [3765485669836998883000769028606015:1411381089291349753164768808558921002947204:1666240341498377] Image = 01 1 1 0 11 1 0 1 0 1 0 0 0 1 10 0 1 10 0 0 After elimination: 00 0 0 0 00 1 0 0 0 1 1 0 0 0 10 1 1 01 1 1 P independent of previous points (using prime 59) rank increases to 7 Processing point [3944555884631464928934930:5657335012046240705357319452802233:2406104] Image = 01 0 0 1 01 1 0 0 0 0 1 1 1 0 00 1 0 10 1 1 After elimination: 00 0 0 0 00 0 0 0 1 1 1 1 0 0 10 0 0 00 1 1 P independent of previous points (using prime 83) rank increases to 8 Processing point [1127027270330215920:3523978127407100674110377602:1] Image = 10 1 1 0 00 1 0 1 1 0 1 0 1 1 01 1 1 01 1 0 After elimination: 00 0 0 0 00 0 0 1 0 1 0 1 0 0 01 1 1 00 0 0 P independent of previous points (using prime 71) rank increases to 9 Processing point [256051163199552568592395095:-394563651945882403580468873435105816:51895117] Image = 00 1 0 1 00 0 0 1 1 1 0 1 0 1 10 0 1 01 1 0 After elimination: 00 0 0 0 10 0 0 0 0 0 1 1 0 1 10 1 1 01 1 0 P independent of previous points (using prime 53) rank increases to 10 Processing point [442619010291205562786415:-1167962768316319592876571517317044:50653] Image = 01 0 1 1 00 1 1 0 0 1 1 0 1 0 11 0 0 01 1 0 After elimination: 00 0 0 0 00 0 0 0 0 1 1 1 1 0 11 1 1 01 0 0 P independent of previous points (using prime 89) rank increases to 11 Processing point [55822325193081529476460202295:-151915114589061403100759698106532333112:6118445789] Image = 11 0 1 0 10 0 1 0 1 1 0 1 1 1 00 1 1 00 0 1 After elimination: 00 0 0 0 00 0 0 0 0 0 0 1 1 1 11 0 0 01 1 0 P independent of previous points (using prime 109) rank increases to 12 Processing point [356145268111068765982119246504180:-1150775031908416918955115365651634494501651:30094741482625] Image = 10 1 1 1 11 1 1 1 1 1 1 0 0 1 01 0 0 10 1 0 After elimination: 00 0 0 0 00 0 1 0 0 0 0 0 0 1 01 1 1 11 1 0 P independent of previous points (using prime 67) rank increases to 13 Processing point [178158613465020969197033760546270:184569435055535326363669745422918052707327:46079082400051] Image = 11 1 0 0 01 0 0 1 1 0 0 0 1 1 11 1 1 10 1 1 After elimination: 00 0 0 0 00 0 0 0 0 0 1 0 1 0 00 0 0 01 1 1 P independent of previous points (using prime 97) rank increases to 14 Processing point [192666510528582744766151703315:-10531550647702714814852169224678207441368:64481201] Image = 10 1 1 0 01 1 0 1 1 1 0 0 1 1 11 0 1 01 1 1 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 1 0 11 0 1 00 0 1 P independent of previous points (using prime 113) rank increases to 15 Processing point [743072319779988539974981500704194760635:964874722537391293613786748114488474882993683572:437169613520472565481] Image = 00 1 1 0 10 0 1 0 0 0 0 0 1 0 01 1 1 10 1 0 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 1 10 0 0 00 1 0 P independent of previous points (using prime 127) rank increases to 16 Processing point [524227677070779268411695177915:3941156276776007263792745630379334937996:9221366673] Image = 01 0 1 1 01 1 0 1 1 1 1 1 1 0 00 0 0 00 0 0 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 10 0 1 10 1 1 P independent of previous points (using prime 131) rank increases to 17 Processing point [109625308172049929108967881865:387496978790653709721061294119215460988:7988005999] Image = 01 0 0 0 01 1 0 1 1 1 0 0 0 1 10 0 0 11 0 0 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 01 1 1 11 1 0 P independent of previous points (using prime 131) rank increases to 18 Processing point [90690032605118118988993244301780:-953144078079942906360903670036536669593542:819763055279] Image = 00 0 0 1 10 0 1 0 1 1 0 1 1 1 01 0 1 01 0 1 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 00 1 0 11 0 0 P independent of previous points (using prime 139) rank increases to 19 Processing point [244353456546628958634824760:-775394556680837651292166377698874734:21253933] Image = 01 0 0 0 10 0 0 0 1 1 1 1 0 0 00 1 1 00 0 0 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 00 0 0 01 0 0 P independent of previous points (using prime 151) rank increases to 20 Processing point [435887272311260175170207520:4712624271973109965160039085789391367:3723875] Image = 11 0 0 0 11 0 1 1 0 1 0 1 0 0 11 0 1 11 0 1 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 00 0 0 00 1 0 P independent of previous points (using prime 157) rank increases to 21 Processing point [386870511037825543981230636169542701637111:83015454575998684006900205726968222686505350799684:159996363164349841378621] Image = 11 1 1 0 11 0 1 0 1 1 1 1 1 0 01 0 0 00 1 1 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 00 0 0 00 0 1 P independent of previous points (using prime 163) rank increases to 22 Processing point [62160011888235162136050:10099849221189668277354753748208:24389] Image = 00 1 0 1 10 0 1 1 0 0 1 0 1 1 01 1 1 01 0 0 After elimination: 00 0 0 0 00 0 0 0 0 0 0 0 0 0 00 0 1 00 0 0 P independent of previous points (using prime 149) rank increases to 23 Points are all independent, their rank is 23 Input a curve: eclib-2013-01-01/progs/out/solve_legendre.out0000644000175200017520000004713411751752632015611 00000000000000Solving ax^2 + by^2 + cz^2 = 0 Using method 4 Enter coefficients a b c: -113922743 310146482690273725409 -1 Solution: (x:y:z) = (11931641701:7244:7523107023591) --OK x = [11931641701,-4873846170,-25495895384] * [u^2,uv,v^2] y = [7244,-1698,15826] * [u^2,uv,v^2] z = [7523107023591,373522427721722,-60212759924226] * [u^2,uv,v^2] Disc(qx) = 1240585930761094901636 Disc(qy) = -455690972 Disc(qz) = 141330952159512008877688307548 Parametric solution is OK Enter coefficients a b c: 7 -4 1 Solution: (x:y:z) = (0:1:2) --OK x = [0,4,0] * [u^2,uv,v^2] y = [1,0,7] * [u^2,uv,v^2] z = [-2,0,14] * [u^2,uv,v^2] Disc(qx) = 16 Disc(qy) = -28 Disc(qz) = 112 Parametric solution is OK Enter coefficients a b c: -5 4 1 Solution: (x:y:z) = (1:1:1) --OK x = [1,0,4] * [u^2,uv,v^2] y = [-1,-2,4] * [u^2,uv,v^2] z = [-1,8,4] * [u^2,uv,v^2] Disc(qx) = -16 Disc(qy) = 20 Disc(qz) = 80 Parametric solution is OK Enter coefficients a b c: 61 -4 3 Solution: (x:y:z) = (1:4:1) --OK x = [-3,0,4] * [u^2,uv,v^2] y = [12,6,16] * [u^2,uv,v^2] z = [-3,-32,-4] * [u^2,uv,v^2] Disc(qx) = 48 Disc(qy) = -732 Disc(qz) = 976 Parametric solution is OK Enter coefficients a b c: 8 1 -1 Solution: (x:y:z) = (0:1:1) --OK x = [0,-2,0] * [u^2,uv,v^2] y = [1,0,-8] * [u^2,uv,v^2] z = [1,0,8] * [u^2,uv,v^2] Disc(qx) = 4 Disc(qy) = 32 Disc(qz) = -32 Parametric solution is OK Enter coefficients a b c: -5 1 1 Solution: (x:y:z) = (1:2:1) --OK x = [1,0,1] * [u^2,uv,v^2] y = [2,2,-2] * [u^2,uv,v^2] z = [1,-4,-1] * [u^2,uv,v^2] Disc(qx) = -4 Disc(qy) = 20 Disc(qz) = 20 Parametric solution is OK Enter coefficients a b c: 525973 1 -1 Solution: (x:y:z) = (0:1:1) --OK x = [0,-2,0] * [u^2,uv,v^2] y = [1,0,-525973] * [u^2,uv,v^2] z = [1,0,525973] * [u^2,uv,v^2] Disc(qx) = 4 Disc(qy) = 2103892 Disc(qz) = -2103892 Parametric solution is OK Enter coefficients a b c: 22729 32 -1 Solution: (x:y:z) = (1:15:173) --OK x = [1,-6,-23] * [u^2,uv,v^2] y = [15,256,-423] * [u^2,uv,v^2] z = [173,-78,4213] * [u^2,uv,v^2] Disc(qx) = 128 Disc(qy) = 90916 Disc(qz) = -2909312 Parametric solution is OK Enter coefficients a b c: -4097 27 5 Solution: (x:y:z) = (3:22:69) --OK x = [9,0,15] * [u^2,uv,v^2] y = [66,230,-110] * [u^2,uv,v^2] z = [207,-396,-345] * [u^2,uv,v^2] Disc(qx) = -540 Disc(qy) = 81940 Disc(qz) = 442476 Parametric solution is OK Enter coefficients a b c: 21127 48 -7 Solution: (x:y:z) = (1:1:55) --OK x = [7,0,-48] * [u^2,uv,v^2] y = [7,770,48] * [u^2,uv,v^2] z = [385,96,2640] * [u^2,uv,v^2] Disc(qx) = 1344 Disc(qy) = 591556 Disc(qz) = -4056384 Parametric solution is OK Enter coefficients a b c: 8779 17 -12 Solution: (x:y:z) = (5:67:157) --OK x = [-1,28,8] * [u^2,uv,v^2] y = [-73,-140,1376] * [u^2,uv,v^2] z = [91,-66,1652] * [u^2,uv,v^2] Disc(qx) = 816 Disc(qy) = 421392 Disc(qz) = -596972 Parametric solution is OK Enter coefficients a b c: 15182006953 -40426 9 Solution: (x:y:z) = (9:41007:2723347) --OK x = [-9,1194,825] * [u^2,uv,v^2] y = [41007,6432,3332319] * [u^2,uv,v^2] z = [-2723347,-7091294,220749027] * [u^2,uv,v^2] Disc(qx) = 1455336 Disc(qy) = -546552250308 Disc(qz) = 2454991252327912 Parametric solution is OK Enter coefficients a b c: -4103 23 8 Solution: (x:y:z) = (5:57:59) --OK x = [11,10,19] * [u^2,uv,v^2] y = [55,-286,-225] * [u^2,uv,v^2] z = [-231,-440,199] * [u^2,uv,v^2] Disc(qx) = -736 Disc(qy) = 131296 Disc(qz) = 377476 Parametric solution is OK Enter coefficients a b c: -3140477 43 25 Solution: (x:y:z) = (10:1685:2771) --OK x = [10,-10,110] * [u^2,uv,v^2] y = [-1685,-12170,24620] * [u^2,uv,v^2] z = [-2771,17262,21850] * [u^2,uv,v^2] Disc(qx) = -4300 Disc(qy) = 314047700 Disc(qz) = 540162044 Parametric solution is OK Enter coefficients a b c: -239743087 78 25 Solution: (x:y:z) = (1:1623:1171) --OK x = [25,0,78] * [u^2,uv,v^2] y = [-40575,-58550,126594] * [u^2,uv,v^2] z = [-29275,253188,91338] * [u^2,uv,v^2] Disc(qx) = -7800 Disc(qy) = 23974308700 Disc(qz) = 74799843144 Parametric solution is OK Enter coefficients a b c: -134593 56 1 Solution: (x:y:z) = (3:136:419) --OK x = [3,2,19] * [u^2,uv,v^2] y = [-136,-370,738] * [u^2,uv,v^2] z = [-419,4798,4253] * [u^2,uv,v^2] Disc(qx) = -224 Disc(qy) = 538372 Disc(qz) = 30148832 Parametric solution is OK Enter coefficients a b c: -47287 8 7 Solution: (x:y:z) = (3:26:245) --OK x = [5,4,12] * [u^2,uv,v^2] y = [384,254,-820] * [u^2,uv,v^2] z = [-19,-1244,-452] * [u^2,uv,v^2] Disc(qx) = -224 Disc(qy) = 1324036 Disc(qz) = 1513184 Parametric solution is OK Enter coefficients a b c: -4431282451 4719 7 Solution: (x:y:z) = (11:10286:72611) --OK x = [77,0,429] * [u^2,uv,v^2] y = [-72002,-92414,401154] * [u^2,uv,v^2] z = [-508277,8825388,2831829] * [u^2,uv,v^2] Disc(qx) = -132132 Disc(qy) = 124075908628 Disc(qz) = 83644887545076 Parametric solution is OK Enter coefficients a b c: -336649 300 1 Solution: (x:y:z) = (5:62:2695) --OK x = [5,0,60] * [u^2,uv,v^2] y = [-62,-1078,744] * [u^2,uv,v^2] z = [-2695,7440,32340] * [u^2,uv,v^2] Disc(qx) = -1200 Disc(qy) = 1346596 Disc(qz) = 403978800 Parametric solution is OK Enter coefficients a b c: 51018545 -412 83 Solution: (x:y:z) = (17:8827:14461) --OK x = [140,-128,-215] * [u^2,uv,v^2] y = [54140,9810,78659] * [u^2,uv,v^2] z = [50020,272920,-47947] * [u^2,uv,v^2] Disc(qx) = 136784 Disc(qy) = -16938156940 Disc(qz) = 84078562160 Parametric solution is OK Enter coefficients a b c: 134873197 1791 -13 Solution: (x:y:z) = (9:964:31119) --OK x = [117,-156,-147] * [u^2,uv,v^2] y = [12532,73190,-33048] * [u^2,uv,v^2] z = [404547,-155724,612093] * [u^2,uv,v^2] Disc(qx) = 93132 Disc(qy) = 7013406244 Disc(qz) = -966231583308 Parametric solution is OK Enter coefficients a b c: 9400805511 2437 -4 Solution: (x:y:z) = (4:6998:259691) --OK x = [4,-132,-1348] * [u^2,uv,v^2] y = [6998,288448,-2401066] * [u^2,uv,v^2] z = [259691,-42740,88221077] * [u^2,uv,v^2] Disc(qx) = 38992 Disc(qy) = 150412888176 Disc(qz) = -91639052121228 Parametric solution is OK Enter coefficients a b c: 2607882701 -17205 4 Solution: (x:y:z) = (4:1774:55721) --OK x = [-4,252,13236] * [u^2,uv,v^2] y = [1774,-320,5880246] * [u^2,uv,v^2] z = [-55721,-11750412,185757189] * [u^2,uv,v^2] Disc(qx) = 275280 Disc(qy) = -41726123216 Disc(qz) = 179474487482820 Parametric solution is OK Enter coefficients a b c: 153 -13 1 Solution: (x:y:z) = (1:9:30) --OK x = [-1,6,4] * [u^2,uv,v^2] y = [9,6,18] * [u^2,uv,v^2] z = [-30,-54,42] * [u^2,uv,v^2] Disc(qx) = 52 Disc(qy) = -612 Disc(qz) = 7956 Parametric solution is OK Enter coefficients a b c: -15152 5 3 Solution: (x:y:z) = (1:16:68) --OK x = [3,0,5] * [u^2,uv,v^2] y = [-48,-408,80] * [u^2,uv,v^2] z = [-204,160,340] * [u^2,uv,v^2] Disc(qx) = -60 Disc(qy) = 181824 Disc(qz) = 303040 Parametric solution is OK Enter coefficients a b c: 4293 13 -10 Solution: (x:y:z) = (1:3:21) --OK x = [10,0,-13] * [u^2,uv,v^2] y = [30,420,39] * [u^2,uv,v^2] z = [210,78,273] * [u^2,uv,v^2] Disc(qx) = 520 Disc(qy) = 171720 Disc(qz) = -223236 Parametric solution is OK Enter coefficients a b c: 32432 -15 7 Solution: (x:y:z) = (2:93:1) --OK x = [4,-22,4] * [u^2,uv,v^2] y = [508,-372,515] * [u^2,uv,v^2] z = [692,4,-703] * [u^2,uv,v^2] Disc(qx) = 420 Disc(qy) = -908096 Disc(qz) = 1945920 Parametric solution is OK Enter coefficients a b c: 7185786 -1465 1 Solution: (x:y:z) = (28:1961:179) --OK x = [-28,22,48] * [u^2,uv,v^2] y = [1961,-1528,3962] * [u^2,uv,v^2] z = [-179,-205064,80254] * [u^2,uv,v^2] Disc(qx) = 5860 Disc(qy) = -28743144 Disc(qz) = 42108705960 Parametric solution is OK Enter coefficients a b c: 21328386 4537 -1 Solution: (x:y:z) = (2:1645:111187) --OK x = [2,-134,-24] * [u^2,uv,v^2] y = [1645,972,-12822] * [u^2,uv,v^2] z = [111187,13836,870738] * [u^2,uv,v^2] Disc(qx) = 18148 Disc(qy) = 85313544 Disc(qz) = -387067549128 Parametric solution is OK Enter coefficients a b c: -30940374 1871 1 Solution: (x:y:z) = (10:293:54161) --OK x = [10,6,188] * [u^2,uv,v^2] y = [-293,-11008,2206] * [u^2,uv,v^2] z = [-54161,77144,1041370] * [u^2,uv,v^2] Disc(qx) = -7484 Disc(qy) = 123761496 Disc(qz) = 231557759016 Parametric solution is OK Enter coefficients a b c: 29239123130 -165321 1 Solution: (x:y:z) = (4:3683:1332167) --OK x = [-4,722,8750] * [u^2,uv,v^2] y = [3683,1302,7939057] * [u^2,uv,v^2] z = [-1332167,-63982478,2860303327] * [u^2,uv,v^2] Disc(qx) = 661284 Disc(qy) = -116956492520 Disc(qz) = 19335364299898920 Parametric solution is OK Enter coefficients a b c: 86807326430 57649 -1 Solution: (x:y:z) = (36:60113:17911481) --OK x = [36,-410,-434] * [u^2,uv,v^2] y = [60113,310462,-1043213] * [u^2,uv,v^2] z = [17911481,-11466626,281228919] * [u^2,uv,v^2] Disc(qx) = 230596 Disc(qy) = 347229305720 Disc(qz) = -20017422245452280 Parametric solution is OK Enter coefficients a b c: -17194283526 62471 1 Solution: (x:y:z) = (142:25285:17514733) --OK x = [142,-6,440] * [u^2,uv,v^2] y = [-25285,-245618,83537] * [u^2,uv,v^2] z = [-17514733,22987654,53785349] * [u^2,uv,v^2] Disc(qx) = -249884 Disc(qy) = 68777134104 Disc(qz) = 4296576344610984 Parametric solution is OK Enter coefficients a b c: 130017558910 31761 -1 Solution: (x:y:z) = (8:15409:3982759) --OK x = [8,-238,-2200] * [u^2,uv,v^2] y = [15409,537272,-3754446] * [u^2,uv,v^2] z = [3982759,3864232,1037778274] * [u^2,uv,v^2] Disc(qx) = 127044 Disc(qy) = 520070235640 Disc(qz) = -16517950754162040 Parametric solution is OK Enter coefficients a b c: 188060224470 -31489 1 Solution: (x:y:z) = (6:145223:25638331) --OK x = [-6,358,-92] * [u^2,uv,v^2] y = [145223,-118862,1319297] * [u^2,uv,v^2] z = [-25638331,5444734,230686511] * [u^2,uv,v^2] Disc(qx) = 125956 Disc(qy) = -752240897880 Disc(qz) = 23687313633343320 Parametric solution is OK Enter coefficients a b c: -2568561397757146 1015687 9 Solution: (x:y:z) = (2568:128318463:4885038233) --OK x = [2568,594,3594] * [u^2,uv,v^2] y = [-128318463,-63922062,172193031] * [u^2,uv,v^2] z = [-4885038233,100374251070,18445475069] * [u^2,uv,v^2] Disc(qx) = -36564732 Disc(qy) = 92468210319257256 Disc(qz) = 10435417681615049397208 Parametric solution is OK Enter coefficients a b c: 6819 29 -5 Solution: (x:y:z) = (3:61:184) --OK x = [-8,-6,17] * [u^2,uv,v^2] y = [26,-358,-79] * [u^2,uv,v^2] z = [302,38,656] * [u^2,uv,v^2] Disc(qx) = 580 Disc(qy) = 136380 Disc(qz) = -791004 Parametric solution is OK Enter coefficients a b c: 9987 -91 1 Solution: (x:y:z) = (1:26:227) --OK x = [-1,18,10] * [u^2,uv,v^2] y = [26,-14,386] * [u^2,uv,v^2] z = [-227,-646,3544] * [u^2,uv,v^2] Disc(qx) = 364 Disc(qy) = -39948 Disc(qz) = 3635268 Parametric solution is OK Enter coefficients a b c: -9476 319 1 Solution: (x:y:z) = (2:5:173) --OK x = [2,-2,160] * [u^2,uv,v^2] y = [-5,-168,484] * [u^2,uv,v^2] z = [-173,1768,12956] * [u^2,uv,v^2] Disc(qx) = -1276 Disc(qy) = 37904 Disc(qz) = 12091376 Parametric solution is OK Enter coefficients a b c: -242324 61 43 Solution: (x:y:z) = (13:514:760) --OK x = [8,-6,329] * [u^2,uv,v^2] y = [-332,5108,11738] * [u^2,uv,v^2] z = [452,4724,-20360] * [u^2,uv,v^2] Disc(qx) = -10492 Disc(qy) = 41679728 Disc(qz) = 59127056 Parametric solution is OK Enter coefficients a b c: 132963927 -1145 2 Solution: (x:y:z) = (1:383:4183) --OK x = [-2,44,903] * [u^2,uv,v^2] y = [766,-120,347169] * [u^2,uv,v^2] z = [-8366,-693018,3845949] * [u^2,uv,v^2] Disc(qx) = 9160 Disc(qy) = -1063711416 Disc(qz) = 608974785660 Parametric solution is OK Enter coefficients a b c: 7 2 -1 Solution: (x:y:z) = (1:1:3) --OK x = [1,-2,-1] * [u^2,uv,v^2] y = [1,4,-3] * [u^2,uv,v^2] z = [3,-2,5] * [u^2,uv,v^2] Disc(qx) = 8 Disc(qy) = 28 Disc(qz) = -56 Parametric solution is OK Enter coefficients a b c: 5 -83 -2 Solution: (x:y:z) = (7:1:9) --OK x = [13,8,14] * [u^2,uv,v^2] y = [-3,-4,2] * [u^2,uv,v^2] z = [-7,34,18] * [u^2,uv,v^2] Disc(qx) = -664 Disc(qy) = 40 Disc(qz) = 1660 Parametric solution is OK Enter coefficients a b c: 257 -116044 -1 Solution: (x:y:z) = (85:4:11) --OK x = [85,-48,1372] * [u^2,uv,v^2] y = [4,-2,-64] * [u^2,uv,v^2] z = [11,-10928,2908] * [u^2,uv,v^2] Disc(qx) = -464176 Disc(qy) = 1028 Disc(qz) = 119293232 Parametric solution is OK Enter coefficients a b c: 1027986085027861747937 722974121783 -604305613931 Solution: (x:y:z) = (96169054998:8355012676083151:9962270515504999) --OK x = [-171311893342,-398643135954,2318392642282] * [u^2,uv,v^2] y = [2018398374852981,-47528310472702492,-27983914786891851] * [u^2,uv,v^2] z = [7402533838782499,189535693811400,100400259446190829] * [u^2,uv,v^2] Disc(qx) = 1747589282081205501435892 Disc(qy) = 2484871048901148643309038230841388 Disc(qz) = -2972829348112650849204367548046684 Parametric solution is OK Enter coefficients a b c: 21458238196506826611317 155590763477 -429392673713 Solution: (x:y:z) = (133174840374:12323039517012895:30681131636462597) --OK x = [-120839066706,-69074898358,543008981510] * [u^2,uv,v^2] y = [-3653109691455587,-194702538229996066,-72064445956284564] * [u^2,uv,v^2] z = [27102622202551825,24899986468074458,128906567389794722] * [u^2,uv,v^2] Disc(qx) = 267238135737744073520404 Disc(qy) = 36856041089473957501961224216840084 Disc(qz) = -13354814655463282827589091033876836 Parametric solution is OK Enter coefficients a b c: 293911884200387681576093 106205605559 -687223946819 Solution: (x:y:z) = (23840892990:133700736855785209:54824084629796371) --OK x = [-120543758034,-289421995022,431758255050] * [u^2,uv,v^2] y = [201353504898388438,-790335940111425618,-227587597953023497] * [u^2,uv,v^2] z = [111714818825405396,-86582800060098558,296193784378457843] * [u^2,uv,v^2] Disc(qx) = 291948141706231627067284 Disc(qy) = 807933140308797241690526567735192668 Disc(qz) = -124860358569955432897412098409203948 Parametric solution is OK Enter coefficients a b c: 206207486824798778186641 769034410087 -80703111317 Solution: (x:y:z) = (165865026463:38107219971077702:290056531374297691) --OK x = [25472865203,323082507022,-1412008140086] * [u^2,uv,v^2] y = [-12377002765101082,196820171004354090,562094148891299246] * [u^2,uv,v^2] z = [55836550914326161,-39134552764402442,2846943958532790128] * [u^2,uv,v^2] Disc(qx) = 248253878415418354618316 Disc(qy) = 66566343054482186688488320101264788 Disc(qz) = -634322611943327812420967300076191068 Parametric solution is OK Enter coefficients a b c: 79 -8 1 Solution: (x:y:z) = (1:4:7) --OK x = [-1,4,4] * [u^2,uv,v^2] y = [4,-2,20] * [u^2,uv,v^2] z = [-7,-36,44] * [u^2,uv,v^2] Disc(qx) = 32 Disc(qy) = -316 Disc(qz) = 2528 Parametric solution is OK Enter coefficients a b c: 125965 -134 1 Solution: (x:y:z) = (1:31:53) --OK x = [-1,4,130] * [u^2,uv,v^2] y = [31,-18,4066] * [u^2,uv,v^2] z = [-53,-8096,9302] * [u^2,uv,v^2] Disc(qx) = 536 Disc(qy) = -503860 Disc(qz) = 67517240 Parametric solution is OK Enter coefficients a b c: -163184 223 1 Solution: (x:y:z) = (1:5:397) --OK x = [1,0,223] * [u^2,uv,v^2] y = [-5,-794,1115] * [u^2,uv,v^2] z = [-397,2230,88531] * [u^2,uv,v^2] Disc(qx) = -892 Disc(qy) = 652736 Disc(qz) = 145560128 Parametric solution is OK Enter coefficients a b c: -1115479181 2065 61 Solution: (x:y:z) = (271:196736:180889) --OK x = [386,370,415] * [u^2,uv,v^2] y = [-256838,-467778,51940] * [u^2,uv,v^2] z = [-701084,2076010,1748735] * [u^2,uv,v^2] Disc(qx) = -503860 Disc(qy) = 272176920164 Disc(qz) = 9213858035060 Parametric solution is OK Enter coefficients a b c: 88727009405 -50601 1 Solution: (x:y:z) = (67:107183:13528438) --OK x = [-67,276,471] * [u^2,uv,v^2] y = [107183,-37696,831123] * [u^2,uv,v^2] z = [-13528438,-106168434,123572382] * [u^2,uv,v^2] Disc(qx) = 202404 Disc(qy) = -354908037620 Disc(qz) = 17958701611609620 Parametric solution is OK Enter coefficients a b c: 263422353799 -497480 1 Solution: (x:y:z) = (7:17590:11875043) --OK x = [-7,1348,6172] * [u^2,uv,v^2] y = [17590,5538,14976124] * [u^2,uv,v^2] z = [-11875043,-213398348,10076817308] * [u^2,uv,v^2] Disc(qx) = 1989920 Disc(qy) = -1053689415196 Disc(qz) = 524189410271706080 Parametric solution is OK Enter coefficients a b c: 62063469603854588654579 68044230041 -1 Solution: (x:y:z) = (30740:32088063161:11344956855892619) --OK x = [30740,-409478,-849908] * [u^2,uv,v^2] y = [32088063161,310688281872,-1182111469003] * [u^2,uv,v^2] z = [11344956855892619,-9066204972113032,374052548186839105] * [u^2,uv,v^2] Disc(qx) = 272176920164 Disc(qy) = 248253878415418354618316 Disc(qz) = -16892244011469171082902408656030956 Parametric solution is OK Enter coefficients a b c: 1 7535987 -52 Solution: (x:y:z) = (4735:1:759) --OK x = [4735,22116,-56936] * [u^2,uv,v^2] y = [-1,12,16] * [u^2,uv,v^2] z = [759,362,9972] * [u^2,uv,v^2] Disc(qx) = 1567485296 Disc(qy) = 208 Disc(qz) = -30143948 Parametric solution is OK Enter coefficients a b c: 19 4776762553 -6836 Solution: (x:y:z) = (1267471:13:67699) --OK x = [1903532,10105320,-3742819] * [u^2,uv,v^2] y = [-316,352,313] * [u^2,uv,v^2] z = [282572,-85858,327709] * [u^2,uv,v^2] Disc(qx) = 130615795249232 Disc(qy) = 519536 Disc(qz) = -363033954028 Parametric solution is OK Enter coefficients a b c: 1 52753834808 -208881 Solution: (x:y:z) = (17547333:27:40721) --OK x = [17547333,52950174,-588029163] * [u^2,uv,v^2] y = [-27,888,435] * [u^2,uv,v^2] z = [40721,-39466,1305057] * [u^2,uv,v^2] Disc(qx) = 44077095074119392 Disc(qy) = 835524 Disc(qz) = -211015339232 Parametric solution is OK Enter coefficients a b c: 221916530122928255 1 -370095536 Solution: (x:y:z) = (7508:1539105595944:200502439) --OK x = [-7508,-10400,45692] * [u^2,uv,v^2] y = [1539105595944,-17634978298376,-2847239512744] * [u^2,uv,v^2] z = [200502439,-132257036,1128612261] * [u^2,uv,v^2] Disc(qx) = 1480382144 Disc(qy) = 328521268652421113695078720 Disc(qz) = -887666120491713020 Parametric solution is OK Enter coefficients a b c: 555143 1 -1737 Solution: (x:y:z) = (9:2973:176) --OK x = [-9,-30,168] * [u^2,uv,v^2] y = [2973,-58026,-41214] * [u^2,uv,v^2] z = [176,-74,3162] * [u^2,uv,v^2] Disc(qx) = 6948 Disc(qy) = 3857133564 Disc(qz) = -2220572 Parametric solution is OK Enter coefficients a b c: 1 23121989 -2313 Solution: (x:y:z) = (8707:4:439) --OK x = [8707,416280,-1166751] * [u^2,uv,v^2] y = [-4,42,468] * [u^2,uv,v^2] z = [439,-256,52707] * [u^2,uv,v^2] Disc(qx) = 213924642228 Disc(qy) = 9252 Disc(qz) = -92487956 Parametric solution is OK Enter coefficients a b c: 14299777 2 -5276187762844563 Solution: (x:y:z) = (19356219:36672694683:1235) --OK x = [-38712438,-118025652,182625075] * [u^2,uv,v^2] y = [73345389366,-449667627426,-339463255227] * [u^2,uv,v^2] z = [2470,-48,11579] * [u^2,uv,v^2] Disc(qx) = 42209502102756504 Disc(qy) = 301793233675224546249804 Disc(qz) = -114398216 Parametric solution is OK Enter coefficients a b c: 1 316 -5 Solution: (x:y:z) = (2:1:8) --OK x = [2,80,10] * [u^2,uv,v^2] y = [-1,0,5] * [u^2,uv,v^2] z = [8,4,40] * [u^2,uv,v^2] Disc(qx) = 6320 Disc(qy) = 20 Disc(qz) = -1264 Parametric solution is OK Enter coefficients a b c: 388 152441 -1 Solution: (x:y:z) = (56:9:3683) --OK x = [56,-694,-572] * [u^2,uv,v^2] y = [9,20,-32] * [u^2,uv,v^2] z = [3683,3356,16824] * [u^2,uv,v^2] Disc(qx) = 609764 Disc(qy) = 1552 Disc(qz) = -236588432 Parametric solution is OK Enter coefficients a b c: 831 1 -92742160 Solution: (x:y:z) = (309:17077:2) --OK x = [-309,-16768,72656] * [u^2,uv,v^2] y = [17077,-273856,-3415088] * [u^2,uv,v^2] z = [2,-2,416] * [u^2,uv,v^2] Disc(qx) = 370968640 Disc(qy) = 308274939840 Disc(qz) = -3324 Parametric solution is OK Enter coefficients a b c: 1 29526647 -1956 Solution: (x:y:z) = (17194:8:1057) --OK x = [17194,439500,-550428] * [u^2,uv,v^2] y = [-8,36,204] * [u^2,uv,v^2] z = [1057,-458,27984] * [u^2,uv,v^2] Disc(qx) = 231016486128 Disc(qy) = 7824 Disc(qz) = -118106588 Parametric solution is OK Enter coefficients a b c: 7 4715959977 -21016 Solution: (x:y:z) = (227529:11:6663) --OK x = [1592703,15324546,-25365801] * [u^2,uv,v^2] y = [-77,490,1131] * [u^2,uv,v^2] z = [46641,-7224,708063] * [u^2,uv,v^2] Disc(qx) = 396442459506528 Disc(qy) = 588448 Disc(qz) = -132046879356 Parametric solution is OK Enter coefficients a b c: 6404148857786219 1 -3120332 Solution: (x:y:z) = (394:19843986872:21090393) --OK x = [-394,-1984,5422] * [u^2,uv,v^2] y = [19843986872,-234130929916,-316405547352] * [u^2,uv,v^2] z = [21090393,5470472,304007155] * [u^2,uv,v^2] Disc(qx) = 12481328 Disc(qy) = 79932282454855153218832 Disc(qz) = -25616595431144876 Parametric solution is OK Enter coefficients a b c: 0 0 0 eclib-2013-01-01/progs/out/solve_conic.out0000644000175200017520000006647711751752441015130 00000000000000Solving ax^2 + bxz + cz^2 = dy^2 Using method 4 Enter coefficients a b c d: -113922743 0 310146482690273725409 1 Solution: (x:y:z) = (6632499416:70647575606369:5679) Solution is correct! Solution: (x:y:z) = (6632499416:70647575606369:5679) Parametric solution: x = [6632499416,837303821112076122246270,26425848118343941811659972709016629276]*[u^2,uv,v^2] y = [70647575606369,8918732034082630564118638188,281480929858691034492171567319911251675821]*[u^2,uv,v^2] z = [5679,716931597253432612,22626823170468308838277461581301]*[u^2,uv,v^2] disc(qx) = 1240585930761094901636 = 4cd disc(qz) = -455690972 = 4ad resultant(qx,qz) = 141330952159512008877688307548 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 7 0 -4 -1 Solution: (x:y:z) = (0:2:1) Solution is correct! Solution: (x:y:z) = (0:2:1) Parametric solution: x = [0,-4,0]*[u^2,uv,v^2] y = [2,0,-14]*[u^2,uv,v^2] z = [1,0,7]*[u^2,uv,v^2] disc(qx) = 16 = 4cd disc(qz) = -28 = 4ad resultant(qx,qz) = 112 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -5 0 4 -1 Solution: (x:y:z) = (2:4:1) Solution is correct! Solution: (x:y:z) = (2:4:1) Parametric solution: x = [2,8,10]*[u^2,uv,v^2] y = [4,12,4]*[u^2,uv,v^2] z = [1,8,11]*[u^2,uv,v^2] disc(qx) = -16 = 4cd disc(qz) = 20 = 4ad resultant(qx,qz) = 80 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 61 0 -4 -3 Solution: (x:y:z) = (1:1:4) Solution is correct! Solution: (x:y:z) = (1:1:4) Parametric solution: x = [1,-32,244]*[u^2,uv,v^2] y = [1,0,-244]*[u^2,uv,v^2] z = [4,-122,976]*[u^2,uv,v^2] disc(qx) = 48 = 4cd disc(qz) = -732 = 4ad resultant(qx,qz) = 8784 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 8 0 1 1 Solution: (x:y:z) = (0:1:1) Solution is correct! Solution: (x:y:z) = (0:1:1) Parametric solution: x = [0,2,0]*[u^2,uv,v^2] y = [1,0,8]*[u^2,uv,v^2] z = [1,0,-8]*[u^2,uv,v^2] disc(qx) = 4 = 4cd disc(qz) = 32 = 4ad resultant(qx,qz) = -32 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -5 0 1 -1 Solution: (x:y:z) = (1:2:1) Solution is correct! Solution: (x:y:z) = (1:2:1) Parametric solution: x = [1,4,5]*[u^2,uv,v^2] y = [2,6,2]*[u^2,uv,v^2] z = [1,8,11]*[u^2,uv,v^2] disc(qx) = -4 = 4cd disc(qz) = 20 = 4ad resultant(qx,qz) = 20 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 525973 0 1 1 Solution: (x:y:z) = (0:1:1) Solution is correct! Solution: (x:y:z) = (0:1:1) Parametric solution: x = [0,2,0]*[u^2,uv,v^2] y = [1,0,525973]*[u^2,uv,v^2] z = [1,0,-525973]*[u^2,uv,v^2] disc(qx) = 4 = 4cd disc(qz) = 2103892 = 4ad resultant(qx,qz) = -2103892 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 22729 0 32 1 Solution: (x:y:z) = (1:173:15) Solution is correct! Solution: (x:y:z) = (1:173:15) Parametric solution: x = [1,346,29897]*[u^2,uv,v^2] y = [173,58898,5017173]*[u^2,uv,v^2] z = [15,4844,389557]*[u^2,uv,v^2] disc(qx) = 128 = 4cd disc(qz) = 90916 = 4ad resultant(qx,qz) = -2909312 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -4097 0 27 -5 Solution: (x:y:z) = (3:69:22) Solution is correct! Solution: (x:y:z) = (3:69:22) Parametric solution: x = [3,138,1632]*[u^2,uv,v^2] y = [69,2778,26358]*[u^2,uv,v^2] z = [22,1242,16598]*[u^2,uv,v^2] disc(qx) = -540 = 4cd disc(qz) = 81940 = 4ad resultant(qx,qz) = 11061900 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 21127 0 48 7 Solution: (x:y:z) = (1:55:1) Solution is correct! Solution: (x:y:z) = (1:55:1) Parametric solution: x = [1,110,2689]*[u^2,uv,v^2] y = [55,5954,179575]*[u^2,uv,v^2] z = [1,-660,-38989]*[u^2,uv,v^2] disc(qx) = 1344 = 4cd disc(qz) = 591556 = 4ad resultant(qx,qz) = -198762816 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 8779 0 17 3 Solution: (x:y:z) = (1:182:73) Solution is correct! Solution: (x:y:z) = (1:182:73) Parametric solution: x = [1,364,33073]*[u^2,uv,v^2] y = [182,63766,5586126]*[u^2,uv,v^2] z = [73,25480,2223031]*[u^2,uv,v^2] disc(qx) = 204 = 4cd disc(qz) = 105348 = 4ad resultant(qx,qz) = -5372748 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 15182006953 0 -40426 -1 Solution: (x:y:z) = (3:2723347:13669) Solution is correct! Solution: (x:y:z) = (3:2723347:13669) Parametric solution: x = [3,10893388,9888825163070]*[u^2,uv,v^2] y = [2723347,9889193565208,8977569638361942354]*[u^2,uv,v^2] z = [13669,49635722422,45060080115856346]*[u^2,uv,v^2] disc(qx) = 161704 = 4cd disc(qz) = -60728027812 = 4ad resultant(qx,qz) = 2454991252327912 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -4103 0 23 -2 Solution: (x:y:z) = (5:118:57) Solution is correct! Solution: (x:y:z) = (5:118:57) Parametric solution: x = [5,944,44566]*[u^2,uv,v^2] y = [118,21754,1001820]*[u^2,uv,v^2] z = [57,10856,516754]*[u^2,uv,v^2] disc(qx) = -184 = 4cd disc(qz) = 32824 = 4ad resultant(qx,qz) = 1509904 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -3140477 0 43 -1 Solution: (x:y:z) = (2:2771:337) Solution is correct! Solution: (x:y:z) = (2:2771:337) Parametric solution: x = [2,5542,3839242]*[u^2,uv,v^2] y = [2771,7663950,5299132934]*[u^2,uv,v^2] z = [337,936598,650744252]*[u^2,uv,v^2] disc(qx) = -172 = 4cd disc(qz) = 12561908 = 4ad resultant(qx,qz) = 540162044 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -239743087 0 78 -1 Solution: (x:y:z) = (1:4087:1691) Solution is correct! Solution: (x:y:z) = (1:4087:1691) Parametric solution: x = [1,8174,16703647]*[u^2,uv,v^2] y = [4087,33143342,67189033465]*[u^2,uv,v^2] z = [1691,13830408,28279010419]*[u^2,uv,v^2] disc(qx) = -312 = 4cd disc(qz) = 958972348 = 4ad resultant(qx,qz) = 74799843144 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -134593 0 56 -1 Solution: (x:y:z) = (3:1079:29) Solution is correct! Solution: (x:y:z) = (3:1079:29) Parametric solution: x = [3,2158,388099]*[u^2,uv,v^2] y = [1079,775078,139183447]*[u^2,uv,v^2] z = [29,21580,4009983]*[u^2,uv,v^2] disc(qx) = -224 = 4cd disc(qz) = 538372 = 4ad resultant(qx,qz) = 30148832 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -47287 0 8 -7 Solution: (x:y:z) = (3:245:26) Solution is correct! Solution: (x:y:z) = (3:245:26) Parametric solution: x = [3,490,20027]*[u^2,uv,v^2] y = [245,39878,1621165]*[u^2,uv,v^2] z = [26,5390,266616]*[u^2,uv,v^2] disc(qx) = -224 = 4cd disc(qz) = 1324036 = 4ad resultant(qx,qz) = 74146016 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -4431282451 0 4719 -7 Solution: (x:y:z) = (11:72611:10286) Solution is correct! Solution: (x:y:z) = (11:72611:10286) Parametric solution: x = [11,580888,7668886379]*[u^2,uv,v^2] y = [72611,3825616300,50389253797421]*[u^2,uv,v^2] z = [10286,543275502,7173540418954]*[u^2,uv,v^2] disc(qx) = -132132 = 4cd disc(qz) = 124075908628 = 4ad resultant(qx,qz) = 4098599489708724 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -336649 0 300 -1 Solution: (x:y:z) = (5:2695:62) Solution is correct! Solution: (x:y:z) = (5:2695:62) Parametric solution: x = [5,10780,5810480]*[u^2,uv,v^2] y = [2695,5802980,3123763720]*[u^2,uv,v^2] z = [62,134750,73210548]*[u^2,uv,v^2] disc(qx) = -1200 = 4cd disc(qz) = 1346596 = 4ad resultant(qx,qz) = 403978800 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 51018545 0 -412 -83 Solution: (x:y:z) = (17:14461:8827) Solution is correct! Solution: (x:y:z) = (17:14461:8827) Parametric solution: x = [17,260298,996395765]*[u^2,uv,v^2] y = [14461,221849578,850860092321]*[u^2,uv,v^2] z = [8827,135297116,518446996037]*[u^2,uv,v^2] disc(qx) = 136784 = 4cd disc(qz) = -16938156940 = 4ad resultant(qx,qz) = 579217214720240 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 134873197 0 1791 13 Solution: (x:y:z) = (31:143486:8779) Solution is correct! Solution: (x:y:z) = (31:143486:8779) Parametric solution: x = [31,8035216,520683032851]*[u^2,uv,v^2] y = [143486,37190630858,2409891948660938]*[u^2,uv,v^2] z = [8779,2275400988,147438479587025]*[u^2,uv,v^2] disc(qx) = 93132 = 4cd disc(qz) = 7013406244 = 4ad resultant(qx,qz) = -163293137579052 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 9400805511 0 2437 1 Solution: (x:y:z) = (2:259691:3499) Solution is correct! Solution: (x:y:z) = (2:259691:3499) Parametric solution: x = [2,519382,33719706522]*[u^2,uv,v^2] y = [259691,67430888418,4377245268877068]*[u^2,uv,v^2] z = [3499,908399118,58958911116030]*[u^2,uv,v^2] disc(qx) = 9748 = 4cd disc(qz) = 37603222044 = 4ad resultant(qx,qz) = -91639052121228 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 2607882701 0 -17205 -1 Solution: (x:y:z) = (2:55721:887) Solution is correct! Solution: (x:y:z) = (2:55721:887) Parametric solution: x = [2,111442,1552406318]*[u^2,uv,v^2] y = [55721,3120090676,43676470056059]*[u^2,uv,v^2] z = [887,49480248,690052247371]*[u^2,uv,v^2] disc(qx) = 68820 = 4cd disc(qz) = -10431530804 = 4ad resultant(qx,qz) = 179474487482820 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 153 0 -13 -1 Solution: (x:y:z) = (1:30:9) Solution is correct! Solution: (x:y:z) = (1:30:9) Parametric solution: x = [1,0,-13]*[u^2,uv,v^2] y = [30,234,390]*[u^2,uv,v^2] z = [9,60,117]*[u^2,uv,v^2] disc(qx) = 52 = 4cd disc(qz) = -612 = 4ad resultant(qx,qz) = 7956 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -15152 0 5 -3 Solution: (x:y:z) = (1:68:16) Solution is correct! Solution: (x:y:z) = (1:68:16) Parametric solution: x = [1,136,4639]*[u^2,uv,v^2] y = [68,9088,302532]*[u^2,uv,v^2] z = [16,2584,101488]*[u^2,uv,v^2] disc(qx) = -60 = 4cd disc(qz) = 181824 = 4ad resultant(qx,qz) = 2727360 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 4293 0 13 10 Solution: (x:y:z) = (1:135:117) Solution is correct! Solution: (x:y:z) = (1:135:117) Parametric solution: x = [1,270,18095]*[u^2,uv,v^2] y = [135,33408,2067255]*[u^2,uv,v^2] z = [117,28890,1783035]*[u^2,uv,v^2] disc(qx) = 520 = 4cd disc(qz) = 171720 = 4ad resultant(qx,qz) = -22323600 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 32432 0 -15 -7 Solution: (x:y:z) = (1:88:76) Solution is correct! Solution: (x:y:z) = (1:88:76) Parametric solution: x = [1,0,-105]*[u^2,uv,v^2] y = [88,2280,9240]*[u^2,uv,v^2] z = [76,1232,7980]*[u^2,uv,v^2] disc(qx) = 420 = 4cd disc(qz) = -908096 = 4ad resultant(qx,qz) = 95350080 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 7185786 0 -1465 -1 Solution: (x:y:z) = (28:179:1961) Solution is correct! Solution: (x:y:z) = (28:179:1961) Parametric solution: x = [28,-30430,8267670]*[u^2,uv,v^2] y = [179,10670,-58652035]*[u^2,uv,v^2] z = [1961,-2131174,579032555]*[u^2,uv,v^2] disc(qx) = 5860 = 4cd disc(qz) = -28743144 = 4ad resultant(qx,qz) = 42108705960 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 21328386 0 4537 1 Solution: (x:y:z) = (2:111187:1645) Solution is correct! Solution: (x:y:z) = (2:111187:1645) Parametric solution: x = [2,222374,6181272216]*[u^2,uv,v^2] y = [111187,12355085604,343223894585778]*[u^2,uv,v^2] z = [1645,182791428,5077918854858]*[u^2,uv,v^2] disc(qx) = 18148 = 4cd disc(qz) = 85313544 = 4ad resultant(qx,qz) = -387067549128 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -30940374 0 1871 -1 Solution: (x:y:z) = (10:54161:293) Solution is correct! Solution: (x:y:z) = (10:54161:293) Parametric solution: x = [10,324966,2640072716]*[u^2,uv,v^2] y = [54161,1759938712,14297114337062]*[u^2,uv,v^2] z = [293,9532336,77530124450]*[u^2,uv,v^2] disc(qx) = -7484 = 4cd disc(qz) = 123761496 = 4ad resultant(qx,qz) = 231557759016 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 29239123130 0 -165321 -1 Solution: (x:y:z) = (4:1332167:3683) Solution is correct! Solution: (x:y:z) = (4:1332167:3683) Parametric solution: x = [4,2664334,443667187642]*[u^2,uv,v^2] y = [1332167,887638896566,147861114890539577]*[u^2,uv,v^2] z = [3683,2453851614,408728472745513]*[u^2,uv,v^2] disc(qx) = 661284 = 4cd disc(qz) = -116956492520 = 4ad resultant(qx,qz) = 19335364299898920 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 86807326430 0 57649 1 Solution: (x:y:z) = (36:17911481:60113) Solution is correct! Solution: (x:y:z) = (36:17911481:60113) Parametric solution: x = [36,179114810,222792466396566]*[u^2,uv,v^2] y = [17911481,89116794034026,110847938522267219119]*[u^2,uv,v^2] z = [60113,299085909738,372017622658409387]*[u^2,uv,v^2] disc(qx) = 230596 = 4cd disc(qz) = 347229305720 = 4ad resultant(qx,qz) = -20017422245452280 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -17194283526 0 62471 -1 Solution: (x:y:z) = (142:17514733:25285) Solution is correct! Solution: (x:y:z) = (142:17514733:25285) Parametric solution: x = [142,2206856358,8574322156417736]*[u^2,uv,v^2] y = [17514733,272200681130732,1057584075190157670370]*[u^2,uv,v^2] z = [25285,392960549588,1526774703702137926]*[u^2,uv,v^2] disc(qx) = -249884 = 4cd disc(qz) = 68777134104 = 4ad resultant(qx,qz) = 4296576344610984 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 130017558910 0 31761 1 Solution: (x:y:z) = (8:3982759:15409) Solution is correct! Solution: (x:y:z) = (8:3982759:15409) Parametric solution: x = [8,7965518,1982796152540]*[u^2,uv,v^2] y = [3982759,3965469961708,987063994691016814]*[u^2,uv,v^2] z = [15409,15341587668,3818617555565894]*[u^2,uv,v^2] disc(qx) = 127044 = 4cd disc(qz) = 520070235640 = 4ad resultant(qx,qz) = -16517950754162040 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 188060224470 0 -31489 -1 Solution: (x:y:z) = (40:9268177:110831) Solution is correct! Solution: (x:y:z) = (40:9268177:110831) Parametric solution: x = [40,166827186,173945687428454]*[u^2,uv,v^2] y = [9268177,38654771704366,40304349374557883467]*[u^2,uv,v^2] z = [110831,462241059698,481965328453867241]*[u^2,uv,v^2] disc(qx) = 125956 = 4cd disc(qz) = -752240897880 = 4ad resultant(qx,qz) = 23687313633343320 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -2568561397757146 0 1015687 -1 Solution: (x:y:z) = (928:43406907117:17966105) Solution is correct! Solution: (x:y:z) = (928:43406907117:17966105) Parametric solution: x = [928,54779516781654,808403949038661694481422]*[u^2,uv,v^2] y = [43406907117,2562294608641058264066,37812839577435366501816592631511]*[u^2,uv,v^2] z = [17966105,1060532920727663418,15650722234273210852556256967]*[u^2,uv,v^2] disc(qx) = -4062748 = 4cd disc(qz) = 10274245591028584 = 4ad resultant(qx,qz) = 10435417681615049397208 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 6819 0 29 5 Solution: (x:y:z) = (1:332:137) Solution is correct! Solution: (x:y:z) = (1:332:137) Parametric solution: x = [1,664,110079]*[u^2,uv,v^2] y = [332,212502,34004436]*[u^2,uv,v^2] z = [137,87648,14018313]*[u^2,uv,v^2] disc(qx) = 580 = 4cd disc(qz) = 136380 = 4ad resultant(qx,qz) = -19775100 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 9987 0 -91 -1 Solution: (x:y:z) = (1:227:26) Solution is correct! Solution: (x:y:z) = (1:227:26) Parametric solution: x = [1,0,-91]*[u^2,uv,v^2] y = [227,4732,20657]*[u^2,uv,v^2] z = [26,454,2366]*[u^2,uv,v^2] disc(qx) = 364 = 4cd disc(qz) = -39948 = 4ad resultant(qx,qz) = 3635268 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -9476 0 319 -1 Solution: (x:y:z) = (2:173:5) Solution is correct! Solution: (x:y:z) = (2:173:5) Parametric solution: x = [2,346,15124]*[u^2,uv,v^2] y = [173,28334,1142665]*[u^2,uv,v^2] z = [5,1038,51977]*[u^2,uv,v^2] disc(qx) = -1276 = 4cd disc(qz) = 37904 = 4ad resultant(qx,qz) = 12091376 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -242324 0 61 -43 Solution: (x:y:z) = (2:113:83) Solution is correct! Solution: (x:y:z) = (2:113:83) Parametric solution: x = [2,226,7696]*[u^2,uv,v^2] y = [113,7706,565]*[u^2,uv,v^2] z = [83,14238,485063]*[u^2,uv,v^2] disc(qx) = -10492 = 4cd disc(qz) = 41679728 = 4ad resultant(qx,qz) = 109325926544 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 132963927 0 -1145 -2 Solution: (x:y:z) = (1:4183:383) Solution is correct! Solution: (x:y:z) = (1:4183:383) Parametric solution: x = [1,0,-2290]*[u^2,uv,v^2] y = [4183,877070,9579070]*[u^2,uv,v^2] z = [383,16732,877070]*[u^2,uv,v^2] disc(qx) = 9160 = 4cd disc(qz) = -1063711416 = 4ad resultant(qx,qz) = 2435899142640 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 7 0 2 1 Solution: (x:y:z) = (1:3:1) Solution is correct! Solution: (x:y:z) = (1:3:1) Parametric solution: x = [1,6,7]*[u^2,uv,v^2] y = [3,14,21]*[u^2,uv,v^2] z = [1,0,-7]*[u^2,uv,v^2] disc(qx) = 8 = 4cd disc(qz) = 28 = 4ad resultant(qx,qz) = -56 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 5 0 -83 2 Solution: (x:y:z) = (7:9:1) Solution is correct! Solution: (x:y:z) = (7:9:1) Parametric solution: x = [7,36,70]*[u^2,uv,v^2] y = [9,70,90]*[u^2,uv,v^2] z = [1,0,-10]*[u^2,uv,v^2] disc(qx) = -664 = 4cd disc(qz) = 40 = 4ad resultant(qx,qz) = 6640 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 257 0 -116044 1 Solution: (x:y:z) = (85:11:4) Solution is correct! Solution: (x:y:z) = (85:11:4) Parametric solution: x = [85,-82742,20137361]*[u^2,uv,v^2] y = [11,214,-2710169]*[u^2,uv,v^2] z = [4,-3894,947638]*[u^2,uv,v^2] disc(qx) = -464176 = 4cd disc(qz) = 1028 = 4ad resultant(qx,qz) = 119293232 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 1027986085027861747937 0 722974121783 604305613931 Solution: (x:y:z) = (171311893342:7402533838782499:2018398374852981) Solution is correct! Solution: (x:y:z) = (171311893342:7402533838782499:2018398374852981) Parametric solution: x = [171311893342,2010117937494774948517315634,5896517229209259273774341786566912927034598]*[u^2,uv,v^2] y = [7402533838782499,86858920078263347398188000098360,254793566685099590042491875352393376532792008429]*[u^2,uv,v^2] z = [2018398374852981,23683228870762677156565927669748,69472822701041623149476476182622950258251362709]*[u^2,uv,v^2] disc(qx) = 1747589282081205501435892 = 4cd disc(qz) = 2484871048901148643309038230841388 = 4ad resultant(qx,qz) = -1085633503103382611516316228062412935649076964148325574524 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 21458238196506826611317 0 155590763477 429392673713 Solution: (x:y:z) = (195924828285:57363880008362257:61540493626424234) Solution is correct! Solution: (x:y:z) = (195924828285:57363880008362257:61540493626424234) Parametric solution: x = [195924828285,2145280581885379595193169688,5872442016792135409459129921769285835917671]*[u^2,uv,v^2] y = [57363880008362257,628106294443357445996190963797188,1719363809865435325426625130926352481483793500685]*[u^2,uv,v^2] z = [61540493626424234,673838160952041003544277567799686,1844549175667748953847496454031950661610608575242]*[u^2,uv,v^2] disc(qx) = 267238135737744073520404 = 4cd disc(qz) = 36856041089473957501961224216840084 = 4ad resultant(qx,qz) = -2462334927856178605269320611019391015762951921790644768484 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 293911884200387681576093 0 106205605559 687223946819 Solution: (x:y:z) = (23840892990:54824084629796371:133700736855785209) Solution is correct! Solution: (x:y:z) = (23840892990:54824084629796371:133700736855785209) Parametric solution: x = [23840892990,257854110770079285408328222,697213213331782985887885426456233671379650]*[u^2,uv,v^2] y = [54824084629796371,592956631151746394411322223236130,1603298845758285007862010568052580920857024251572]*[u^2,uv,v^2] z = [133700736855785209,1446056765814659443319843363200930,3910001207049952259367656820325232372843306383962]*[u^2,uv,v^2] disc(qx) = 291948141706231627067284 = 4cd disc(qz) = 807933140308797241690526567735192668 = 4ad resultant(qx,qz) = -58968644734008364224834765146537500431921600165901384868428 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 206207486824798778186641 0 769034410087 80703111317 Solution: (x:y:z) = (25472865203:55836550914326161:12377002765101082) Solution is correct! Solution: (x:y:z) = (25472865203:55836550914326161:12377002765101082) Parametric solution: x = [25472865203,2076178487649254090497454584,42304988840339445343515873913409503516614895]*[u^2,uv,v^2] y = [55836550914326161,4550985721826192070758237216624452,92732586008244371371661349355055269020223310542763]*[u^2,uv,v^2] z = [12377002765101082,1008793737088194157229386470804738,20555558225652004372148847014220148014677041760902]*[u^2,uv,v^2] disc(qx) = 248253878415418354618316 = 4cd disc(qz) = 66566343054482186688488320101264788 = 4ad resultant(qx,qz) = -4131338208801612207997140177843018188754934920213147664252 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 79 0 -8 -1 Solution: (x:y:z) = (1:7:4) Solution is correct! Solution: (x:y:z) = (1:7:4) Parametric solution: x = [1,0,-8]*[u^2,uv,v^2] y = [7,64,56]*[u^2,uv,v^2] z = [4,14,32]*[u^2,uv,v^2] disc(qx) = 32 = 4cd disc(qz) = -316 = 4ad resultant(qx,qz) = 2528 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 125965 0 -134 -1 Solution: (x:y:z) = (1:53:31) Solution is correct! Solution: (x:y:z) = (1:53:31) Parametric solution: x = [1,-106,2675]*[u^2,uv,v^2] y = [53,2690,-284345]*[u^2,uv,v^2] z = [31,-3180,85615]*[u^2,uv,v^2] disc(qx) = 536 = 4cd disc(qz) = -503860 = 4ad resultant(qx,qz) = 67517240 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -163184 0 223 -1 Solution: (x:y:z) = (2:767:17) Solution is correct! Solution: (x:y:z) = (2:767:17) Parametric solution: x = [2,1534,294256]*[u^2,uv,v^2] y = [767,584498,111307807]*[u^2,uv,v^2] z = [17,13806,2793425]*[u^2,uv,v^2] disc(qx) = -892 = 4cd disc(qz) = 652736 = 4ad resultant(qx,qz) = 145560128 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: -1115479181 0 2065 -61 Solution: (x:y:z) = (193:350542:128419) Solution is correct! Solution: (x:y:z) = (193:350542:128419) Parametric solution: x = [193,4907588,31197435857]*[u^2,uv,v^2] y = [350542,8910804882,56628331577398]*[u^2,uv,v^2] z = [128419,3265649272,20761072924445]*[u^2,uv,v^2] disc(qx) = -503860 = 4cd disc(qz) = 272176920164 = 4ad resultant(qx,qz) = 34284765748458260 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 88727009405 0 -50601 -1 Solution: (x:y:z) = (67:13528438:107183) Solution is correct! Solution: (x:y:z) = (67:13528438:107183) Parametric solution: x = [67,108227504,43705942618909]*[u^2,uv,v^2] y = [13528438,21853133207354,8825102923197774598]*[u^2,uv,v^2] z = [107183,173136949524,69918744788891503]*[u^2,uv,v^2] disc(qx) = 202404 = 4cd disc(qz) = -354908037620 = 4ad resultant(qx,qz) = 17958701611609620 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 263422353799 0 -497480 -1 Solution: (x:y:z) = (7:11875043:17590) Solution is correct! Solution: (x:y:z) = (7:11875043:17590) Parametric solution: x = [7,23750086,20145235107767]*[u^2,uv,v^2] y = [11875043,40292970550014,34179317818472448803]*[u^2,uv,v^2] z = [17590,59683966118,50627854073738792]*[u^2,uv,v^2] disc(qx) = 1989920 = 4cd disc(qz) = -1053689415196 = 4ad resultant(qx,qz) = 524189410271706080 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 62063469603854588654579 0 68044230041 1 Solution: (x:y:z) = (30740:11344956855892619:32088063161) Solution is correct! Solution: (x:y:z) = (30740:11344956855892619:32088063161) Parametric solution: x = [30740,185172385801879327318,278861519710149973050991236497202376]*[u^2,uv,v^2] y = [11344956855892619,68340036689167845457583539158036,102917108324017159669476036949895222133813471677]*[u^2,uv,v^2] z = [32088063161,193292882605196512607887604,291090632974354925439361272040802233485625]*[u^2,uv,v^2] disc(qx) = 272176920164 = 4cd disc(qz) = 248253878415418354618316 = 4ad resultant(qx,qz) = -16892244011469171082902408656030956 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 1 0 7535987 13 Solution: (x:y:z) = (4735:1518:1) Solution is correct! Solution: (x:y:z) = (4735:1518:1) Parametric solution: x = [4735,39468,61555]*[u^2,uv,v^2] y = [1518,9470,19734]*[u^2,uv,v^2] z = [1,0,-13]*[u^2,uv,v^2] disc(qx) = 391871324 = 4cd disc(qz) = 52 = 4ad resultant(qx,qz) = -5094327212 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 19 0 4776762553 6836 Solution: (x:y:z) = (1267471:67699:13) Solution is correct! Solution: (x:y:z) = (1267471:67699:13) Parametric solution: x = [1267471,105679222184,2202831045207236]*[u^2,uv,v^2] y = [67699,5644510578,117654987622372]*[u^2,uv,v^2] z = [13,1083184,22563212660]*[u^2,uv,v^2] disc(qx) = 130615795249232 = 4cd disc(qz) = 519536 = 4ad resultant(qx,qz) = -16964901950151249088 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 1 0 52753834808 23209 Solution: (x:y:z) = (5849111:40721:9) Solution is correct! Solution: (x:y:z) = (5849111:40721:9) Parametric solution: x = [5849111,53139276160,120692604968248]*[u^2,uv,v^2] y = [40721,369788656,839516840952]*[u^2,uv,v^2] z = [9,81442,184241848]*[u^2,uv,v^2] disc(qx) = 4897455008235488 = 4cd disc(qz) = 92836 = 4ad resultant(qx,qz) = -113665033286137440992 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 555143 0 1 193 Solution: (x:y:z) = (3:176:991) Solution is correct! Solution: (x:y:z) = (3:176:991) Parametric solution: x = [3,352,10261]*[u^2,uv,v^2] y = [176,19990,570768]*[u^2,uv,v^2] z = [991,93632,2103527]*[u^2,uv,v^2] disc(qx) = 772 = 4cd disc(qz) = 428570396 = 4ad resultant(qx,qz) = -82714086428 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 1 0 316 5 Solution: (x:y:z) = (2:8:1) Solution is correct! Solution: (x:y:z) = (2:8:1) Parametric solution: x = [2,80,10]*[u^2,uv,v^2] y = [8,4,40]*[u^2,uv,v^2] z = [1,0,-5]*[u^2,uv,v^2] disc(qx) = 6320 = 4cd disc(qz) = 20 = 4ad resultant(qx,qz) = -31600 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 388 0 152441 1 Solution: (x:y:z) = (143:4206:8) Solution is correct! Solution: (x:y:z) = (143:4206:8) Parametric solution: x = [143,151416,40080761]*[u^2,uv,v^2] y = [4206,4436480,1169911518]*[u^2,uv,v^2] z = [8,8412,2211256]*[u^2,uv,v^2] disc(qx) = 609764 = 4cd disc(qz) = 1552 = 4ad resultant(qx,qz) = -236588432 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 831 0 1 92742160 Solution: (x:y:z) = (309:2:17077) Solution is correct! Solution: (x:y:z) = (309:2:17077) Parametric solution: x = [309,18004,-37884]*[u^2,uv,v^2] y = [2,6,420]*[u^2,uv,v^2] z = [17077,-205548,-3894492]*[u^2,uv,v^2] disc(qx) = 370968640 = 4cd disc(qz) = 308274939840 = 4ad resultant(qx,qz) = -28590083794631654400 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 1 0 29526647 489 Solution: (x:y:z) = (8597:1057:4) Solution is correct! Solution: (x:y:z) = (8597:1057:4) Parametric solution: x = [8597,13888980,5607944961]*[u^2,uv,v^2] y = [1057,1680172,667714299]*[u^2,uv,v^2] z = [4,6342,2513688]*[u^2,uv,v^2] disc(qx) = 57754121532 = 4cd disc(qz) = 1956 = 4ad resultant(qx,qz) = -28241765429148 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 7 0 4715959977 21016 Solution: (x:y:z) = (227529:6663:11) Solution is correct! Solution: (x:y:z) = (227529:6663:11) Parametric solution: x = [227529,301100970,99180051417]*[u^2,uv,v^2] y = [6663,8361504,2628200361]*[u^2,uv,v^2] z = [11,13326,4022587]*[u^2,uv,v^2] disc(qx) = 396442459506528 = 4cd disc(qz) = 588448 = 4ad resultant(qx,qz) = -58321443102924347136 = d^2(b^2-4ac) Parametric solution is correct! Enter coefficients a b c d: 0 0 0 0 eclib-2013-01-01/progs/out/moreap.out0000644000175200017520000000236412015427650014064 00000000000000Program moreap --------------- For each N, assumes that the file newforms/xN exists, and computes more Hecke eigenvalues. Output new eigs to file (1/0)? Output new eigs to screen (1/0)? Display newforms (1/0)? Attempt curve construction (1/0)? Enter level: How many primes for Hecke eigenvalues? >>>Level 11 Retrieving newform data for N = 11 Finished reading newform data for N = 11 1 newform(s) at level 11: p0=2 #ap= 100 1: aplist = [ -2 -1 1 -2 1 4 -2 0 -1 0 7 3 -8 -6 8 -6 5 12 -7 -3 ...] aq = [ -1 ] ap0 = -2, dp0 = 2, np0 = 5 SFE = 1, L/P = 2/5 lplus = 1, mplus = 1 lminus = 3, mminus = 2 [(4,1;1,3),1,1;1] Making homspace...Constructing H1 (with sign=+1) ...done done. Making form_finder (nap=100)...Recovering eigenspace bases with form_finder... Form number 1 with eigs -2 -1 1 -2 -1 4 -2 0 -1 0 ... Entering form_finder, depth = 0, dimension 2 restarting at depth = 0, dimension 2 Computing T(2)...done. eig -2 gives new subspace at depth 1 of dimension 1 Filling in data for for newform #1: bases...type and cuspidal factors...cuspidalfactorplus = 5 coords...denomplus = 5 done. Finished filling in data for newform #1 ...done. About to start computing ap......done. Computing 1 curves... 1 [0,-1,1,-10,-20] N = 11 All curves found OK Enter level: eclib-2013-01-01/progs/out/mwrank.out0000644000175200017520000002731611757512636014117 00000000000000Curve [0,1,1,-2,0] : Basic pair: I=112, J=-1712 disc=2688768 2-adic index bound = 2 By Lemma 5.1(a), 2-adic index = 1 2-adic index = 1 One (I,J) pair Looking for quartics with I = 112, J = -1712 Looking for Type 2 quartics: Trying positive a from 1 up to 2 (square a first...) (1,0,-8,4,4) --nontrivial...(x:y:z) = (1 : 1 : 0) Point = [1:0:1] height = 0.476711659343739 Rank of B=im(eps) increases to 1 Trying positive a from 1 up to 2 (...then non-square a) Trying negative a from -1 down to -1 Finished looking for Type 2 quartics. Looking for Type 1 quartics: Trying positive a from 1 up to 3 (square a first...) (1,0,4,12,8) --nontrivial...(x:y:z) = (1 : 1 : 0) Point = [-1:1:1] height = 0.686667083305586 Rank of B=im(eps) increases to 2 (The previous point is on the egg) Exiting search for Type 1 quartics after finding one which is globally soluble. Mordell rank contribution from B=im(eps) = 2 Selmer rank contribution from B=im(eps) = 2 Sha rank contribution from B=im(eps) = 0 Mordell rank contribution from A=ker(eps) = 0 Selmer rank contribution from A=ker(eps) = 0 Sha rank contribution from A=ker(eps) = 0 Used full 2-descent via multiplication-by-2 map Rank = 2 Rank of S^2(E) = 2 Searching for points (bound = 8)...done: found points which generate a subgroup of rank 2 and regulator 0.152460177943144 Processing points found during 2-descent...done: now regulator = 0.152460177943144 Saturating (with bound = 1000)...done: points were already saturated. Transferring points from minimal curve [0,1,1,-2,0] back to original curve [0,1,1,-2,0] Generator 1 is [0:-1:1]; height 0.327000773651605 Generator 2 is [-1:1:1]; height 0.686667083305586 Regulator = 0.152460177943144 The rank and full Mordell-Weil basis have been determined unconditionally. Curve [0,0,0,0,-675/4] : integral model = [0,0,0,0,-10800] with scale factor 2 Working with minimal curve [0,0,1,0,-169] via [u,r,s,t] = [2,0,0,4] Basic pair: I=0, J=291600 disc=-85030560000 2-adic index bound = 2 By Lemma 5.1(a), 2-adic index = 1 2-adic index = 1 One (I,J) pair Looking for quartics with I = 0, J = 291600 Looking for Type 3 quartics: Trying positive a from 1 up to 12 (square a first...) Trying positive a from 1 up to 12 (...then non-square a) (2,-2,-78,298,-328) --trivial Trying negative a from -1 down to -19 (-3,0,0,60,0) --trivial (-7,-4,12,44,8) --trivial (-7,12,36,36,0) --trivial (-7,-13,-42,-28,8) --trivial Finished looking for Type 3 quartics. Mordell rank contribution from B=im(eps) = 0 Selmer rank contribution from B=im(eps) = 0 Sha rank contribution from B=im(eps) = 0 Mordell rank contribution from A=ker(eps) = 0 Selmer rank contribution from A=ker(eps) = 0 Sha rank contribution from A=ker(eps) = 0 Used full 2-descent via multiplication-by-2 map Rank = 0 Rank of S^2(E) = 0 Processing points found during 2-descent...done: now regulator = 1 Regulator = 1 The rank and full Mordell-Weil basis have been determined unconditionally. Curve [0,0,0,0,73/64] : integral model = [0,0,0,0,73] with scale factor 2 Basic pair: I=0, J=-1971 disc=-3884841 2-adic index bound = 2 2-adic index = 2 Two (I,J) pairs Looking for quartics with I = 0, J = -1971 Looking for Type 3 quartics: Trying positive a from 1 up to 3 (square a first...) (1,0,6,3,-3) --nontrivial...(x:y:z) = (1 : 1 : 0) Point = [-4:3:1] height = 0.962573188092379 Rank of B=im(eps) increases to 1 Trying positive a from 1 up to 3 (...then non-square a) Trying negative a from -1 down to -2 Finished looking for Type 3 quartics. Looking for quartics with I = 0, J = -126144 Looking for Type 3 quartics: Trying positive a from 1 up to 14 (square a first...) (1,0,-12,72,-12) --nontrivial...(x:y:z) = (1 : 1 : 0) Point = [2:9:1] height = 0.923943171600397 Doubling global 2-adic index to 2 global 2-adic index is equal to local index so we abort the search for large quartics Rank of B=im(eps) increases to 2 Exiting search for large quartics after finding enough globally soluble ones. Mordell rank contribution from B=im(eps) = 2 Selmer rank contribution from B=im(eps) = 2 Sha rank contribution from B=im(eps) = 0 Mordell rank contribution from A=ker(eps) = 0 Selmer rank contribution from A=ker(eps) = 0 Sha rank contribution from A=ker(eps) = 0 Used full 2-descent via multiplication-by-2 map Rank = 2 Rank of S^2(E) = 2 Searching for points (bound = 8)...done: found points which generate a subgroup of rank 2 and regulator 0.886543288687716 Processing points found during 2-descent...done: now regulator = 0.886543288687716 Saturating (with bound = 1000)...done: points were already saturated. Transferring points from minimal curve [0,0,0,0,73] back to original curve [0,0,0,0,73/64] Generator 1 is [-8:3:8]; height 0.962573188092379 Generator 2 is [4:9:8]; height 0.923943171600397 Regulator = 0.886543288687716 The rank and full Mordell-Weil basis have been determined unconditionally. Curve [0,0,0,677,0] : 1 points of order 2: [0:0:1] Using 2-isogenous curve [0,0,0,-2708,0] ------------------------------------------------------- First step, determining 1st descent Selmer groups ------------------------------------------------------- After first local descent, rank bound = 1 rk(S^{phi}(E'))= 1 rk(S^{phi'}(E))= 2 ------------------------------------------------------- Second step, determining 2nd descent Selmer groups ------------------------------------------------------- After second local descent, rank bound = 1 rk(phi'(S^{2}(E)))= 1 rk(phi(S^{2}(E')))= 2 rk(S^{2}(E))= 2 rk(S^{2}(E'))= 2 Third step, determining E(Q)/phi(E'(Q)) and E'(Q)/phi'(E(Q)) ------------------------------------------------------- 1. E(Q)/phi(E'(Q)) ------------------------------------------------------- (c,d) =(0,677) (c',d')=(0,-2708) This component of the rank is 0 ------------------------------------------------------- 2. E'(Q)/phi'(E(Q)) ------------------------------------------------------- First stage (no second descent yet)... (-1,0,0,0,2708): (x:y:z) = (502:279022:85) Curve E' Point [-21420340:-140069044:614125], height = 12.3948826572104 Curve E Point [830499826893070:-7145241014093919:77690502163000], height = 24.7897653144207 After first global descent, this component of the rank = 2 ------------------------------------------------------- Summary of results: ------------------------------------------------------- rank(E) = 1 #E(Q)/2E(Q) = 4 Information on III(E/Q): #III(E/Q)[phi'] = 1 #III(E/Q)[2] = 1 Information on III(E'/Q): #phi'(III(E/Q)[2]) = 1 #III(E'/Q)[phi] = 1 #III(E'/Q)[2] = 1 ------------------------------------------------------- List of points on E = [0,0,0,677,0]: I. Points on E mod phi(E') --none (modulo torsion). II. Points on phi(E') mod 2E Point [830499826893070:-7145241014093919:77690502163000], height = 24.7897653144207 ------------------------------------------------------- Computing full set of 2 coset representatives for 2E(Q) in E(Q) (modulo torsion), and sorting into height order....done. Used descent via 2-isogeny with isogenous curve E' = [0,0,0,-2708,0] Rank = 1 Rank of S^2(E) = 2 Rank of S^2(E') = 2 Rank of S^phi(E') = 1 Rank of S^phi'(E) = 2 Searching for points (bound = 8)...done: found points which generate a subgroup of rank 0 and regulator 1 Processing points found during 2-descent...done: 2-descent increases rank to 1, now regulator = 24.7897653144207 Saturating (with bound = 1000)...done: points were already saturated. Transferring points from minimal curve [0,0,0,677,0] back to original curve [0,0,0,677,0] Generator 1 is [830499826893070:-7145241014093919:77690502163000]; height 24.7897653144207 Regulator = 24.7897653144207 The rank and full Mordell-Weil basis have been determined unconditionally. Curve [0,0,0,-169,0] : 3 points of order 2: [-13:0:1], [0:0:1], [13:0:1] **************************** * Using 2-isogeny number 1 * **************************** Using 2-isogenous curve [0,78,0,169,0] (minimal model [0,0,0,-1859,30758]) ------------------------------------------------------- First step, determining 1st descent Selmer groups ------------------------------------------------------- After first local descent, rank bound = 1 rk(S^{phi}(E'))= 2 rk(S^{phi'}(E))= 1 ------------------------------------------------------- Second step, determining 2nd descent Selmer groups ------------------------------------------------------- After second local descent, rank bound = 1 rk(phi'(S^{2}(E)))= 2 rk(phi(S^{2}(E')))= 1 rk(S^{2}(E))= 3 rk(S^{2}(E'))= 2 **************************** * Using 2-isogeny number 2 * **************************** Using 2-isogenous curve [0,0,0,676,0] ------------------------------------------------------- First step, determining 1st descent Selmer groups ------------------------------------------------------- After first local descent, rank bound = 1 rk(S^{phi}(E'))= 2 rk(S^{phi'}(E))= 1 ------------------------------------------------------- Second step, determining 2nd descent Selmer groups ------------------------------------------------------- After second local descent, rank bound = 1 rk(phi'(S^{2}(E)))= 2 rk(phi(S^{2}(E')))= 1 rk(S^{2}(E))= 3 rk(S^{2}(E'))= 2 **************************** * Using 2-isogeny number 3 * **************************** Using 2-isogenous curve [0,-78,0,169,0] (minimal model [0,0,0,-1859,-30758]) ------------------------------------------------------- First step, determining 1st descent Selmer groups ------------------------------------------------------- After first local descent, rank bound = 1 rk(S^{phi}(E'))= 3 rk(S^{phi'}(E))= 0 ------------------------------------------------------- Second step, determining 2nd descent Selmer groups ------------------------------------------------------- After second local descent, rank bound = 1 rk(phi'(S^{2}(E)))= 3 rk(phi(S^{2}(E')))= 0 rk(S^{2}(E))= 3 rk(S^{2}(E'))= 2 After second local descent, combined upper bound on rank = 1 Third step, determining E(Q)/phi(E'(Q)) and E'(Q)/phi'(E(Q)) ------------------------------------------------------- 1. E(Q)/phi(E'(Q)) ------------------------------------------------------- (c,d) =(39,338) (c',d')=(-78,169) First stage (no second descent yet)... (-1,0,39,0,-338): (x:y:z) = (19:102:5) Curve E Point [-1805:-1938:125], height = 5.83251173698765 After first global descent, this component of the rank = 3 ------------------------------------------------------- 2. E'(Q)/phi'(E(Q)) ------------------------------------------------------- This component of the rank is 0 ------------------------------------------------------- Summary of results: ------------------------------------------------------- rank(E) = 1 #E(Q)/2E(Q) = 8 Information on III(E/Q): #III(E/Q)[phi'] = 1 #III(E/Q)[2] = 1 Information on III(E'/Q): #phi'(III(E/Q)[2]) = 1 #III(E'/Q)[phi] = 1 #III(E'/Q)[2] = 1 ------------------------------------------------------- List of points on E = [0,0,0,-169,0]: I. Points on E mod phi(E') Point [-180:-1938:125], height = 5.83251173698765 II. Points on phi(E') mod 2E --none (modulo torsion). ------------------------------------------------------- Computing full set of 2 coset representatives for 2E(Q) in E(Q) (modulo torsion), and sorting into height order....done. Used descent via 2-isogeny with isogenous curve E' = [0,0,0,-1859,-30758] Rank = 1 Rank of S^2(E) = 3 Rank of S^2(E') = 2 Rank of S^phi(E') = 3 Rank of S^phi'(E) = 0 Searching for points (bound = 8)...done: found points which generate a subgroup of rank 1 and regulator 5.83251173698765 Processing points found during 2-descent...done: now regulator = 5.83251173698765 Saturating (with bound = 1000)...done: points were already saturated. Transferring points from minimal curve [0,0,0,-169,0] back to original curve [0,0,0,-169,0] Generator 1 is [-180:1938:125]; height 5.83251173698765 Regulator = 5.83251173698765 The rank and full Mordell-Weil basis have been determined unconditionally. eclib-2013-01-01/progs/out/h1bsdcurisog.out0000644000175200017520000000260411752000360015163 00000000000000 37 a 1 [0,0,1,-1,0] 1 1 1 5.986917292 0.3059997738 0.05111140824 1 37 b 1 [0,1,1,-23,-50] 0 3 3 2.177043186 0.7256810619 1 1 37 b 2 [0,1,1,-3,1] 0 3 1 6.531129557 0.7256810619 1 1 37 b 3 [0,1,1,-1873,-31833] 0 1 1 0.7256810619 0.7256810619 1 1 90 a 1 [1,-1,0,6,0] 0 6 12 2.459935371 0.8199784571 1 1 90 a 2 [1,-1,0,-24,18] 0 6 12 2.459935371 0.8199784571 1 1 90 a 3 [1,-1,0,-69,-235] 0 2 4 0.8199784571 0.8199784571 1 1 90 a 4 [1,-1,0,-1149,-14707] 0 2 4 0.8199784571 0.8199784571 1 1 90 b 1 [1,-1,1,-8,11] 0 6 12 3.971094259 1.323698086 1 1 90 b 2 [1,-1,1,-128,587] 0 6 12 3.971094259 1.323698086 1 1 90 b 3 [1,-1,1,52,-53] 0 2 4 1.323698086 1.323698086 1 1 90 b 4 [1,-1,1,-218,-269] 0 2 4 1.323698086 1.323698086 1 1 90 c 1 [1,-1,1,13,-61] 0 4 16 1.337595995 1.337595995 1 1 90 c 2 [1,-1,1,-167,-709] 0 4 16 1.337595995 1.337595995 1 1 90 c 3 [1,-1,1,-122,1721] 0 12 144 1.337595995 1.337595995 1 1 90 c 4 [1,-1,1,-617,5231] 0 2 4 1.337595995 1.337595995 1 1 90 c 5 [1,-1,1,-2597,-50281] 0 2 8 0.6687979973 1.337595995 1 1 90 c 6 [1,-1,1,-3002,63929] 0 12 144 1.337595995 1.337595995 1 1 90 c 7 [1,-1,1,-48002,4059929] 0 6 36 1.337595995 1.337595995 1 1 90 c 8 [1,-1,1,-4082,14681] 0 6 72 0.6687979973 1.337595995 1 1 389 a 1 [0,1,1,-2,0] 2 1 1 4.980425122 0.7593165003 0.1524601779 1 eclib-2013-01-01/progs/out/nfhpcurve.out0000644000175200017520000000626012015427520014574 00000000000000Program nfhpcurve. Using METHOD = 2 to find newforms MODULUS for linear algebra = 1073741789 Verbose output? How many primes for Hecke eigenvalues? Output newforms to file? (0/1) Enter level: >>>Level 11: 1 newform(s) found. Computing 1 curves... 1 [0,-1,1,-10,-20] N = 11 [(4,1;1,3),1,1;1] All curves found successfully! Finished level 11 Enter level: >>>Level 37: 2 newform(s) found. Computing 2 curves... 1 [0,0,1,-1,0] N = 37 [(14,1;3,8),1,1;2] 2 [0,1,1,-23,-50] N = 37 [(15,1;2,5),1,1;2] All curves found successfully! Finished level 37 Enter level: >>>Level 50: 2 newform(s) found. Computing 2 curves... 1 [1,0,1,-1,-2] N = 50 [(17,1;1,3),1,1;1] 2 [1,1,1,-3,1] N = 50 [(17,1;1,3),1,1;1] All curves found successfully! Finished level 50 Enter level: >>>Level 51: 1 newform(s) found. Computing 1 curves... 1 [0,1,1,1,-1] N = 51 [(13,1;1,4),1,1;1] All curves found successfully! Finished level 51 Enter level: >>>Level 52: 1 newform(s) found. Computing 1 curves... 1 [0,0,0,1,-10] N = 52 [(21,1;2,5),1,1;1] All curves found successfully! Finished level 52 Enter level: >>>Level 53: 1 newform(s) found. Computing 1 curves... 1 [1,-1,1,0,0] N = 53 [(-21,1;-2,5),1,1;1] All curves found successfully! Finished level 53 Enter level: >>>Level 54: 2 newform(s) found. Computing 2 curves... 1 [1,-1,0,12,8] N = 54 [(11,1;1,5),1,1;1] 2 [1,-1,1,1,-1] N = 54 [(11,1;1,5),1,1;1] All curves found successfully! Finished level 54 Enter level: >>>Level 55: 1 newform(s) found. Computing 1 curves... 1 [1,-1,0,1,0] N = 55 [(14,1;1,4),1,1;1] All curves found successfully! Finished level 55 Enter level: >>>Level 56: 2 newform(s) found. Computing 2 curves... 1 [0,0,0,1,2] N = 56 [(19,1;1,3),1,1;1] 2 [0,-1,0,0,-4] N = 56 [(19,1;1,3),1,1;1] All curves found successfully! Finished level 56 Enter level: >>>Level 57: 3 newform(s) found. Computing 3 curves... 1 [0,-1,1,-2,2] N = 57 [(23,1;2,5),1,1;1] 2 [0,1,1,20,-32] N = 57 [(23,1;2,5),1,1;1] 3 [1,0,1,-7,5] N = 57 [(23,1;2,5),1,1;2] All curves found successfully! Finished level 57 Enter level: >>>Level 58: 2 newform(s) found. Computing 2 curves... 1 [1,-1,0,-1,1] N = 58 [(-23,1;-2,5),1,1;1] 2 [1,1,1,5,9] N = 58 [(-23,1;-2,5),1,1;1] ******************************L(f,31)/ip = 19.99999933184035365079434 is not integral! (denom = 1496649) Using rounded value mminus=20 All curves found successfully! Finished level 58 Enter level: >>>Level 59: 0 newform(s) found. No newforms. Finished level 59 Enter level: >>>Level 60: 0 newform(s) found. No newforms. Finished level 60 Enter level: >>>Level 77: 3 newform(s) found. Computing 3 curves... 1 [0,0,1,2,0] N = 77 [(31,1;2,5),1,1;1] 2 [0,1,1,-49,600] N = 77 [(26,1;1,3),2,2;1] 3 [1,1,0,4,11] N = 77 [(26,1;1,3),1,1;1] All curves found successfully! Finished level 77 Enter level: >>>Level 90: 3 newform(s) found. Computing 3 curves... 1 [1,-1,0,6,0] N = 90 [(-77,2;-3,7),1,1;1] 2 [1,-1,1,-8,11] N = 90 [(-77,2;-3,7),1,1;1] 3 [1,-1,1,13,-61] N = 90 [(13,1;1,7),2,2;1] All curves found successfully! Finished level 90 Enter level: >>>Level 389: 1 newform(s) found. Computing 1 curves... 1 [0,1,1,-2,0] N = 389 [(-111,1;-2,7),1,1;2] All curves found successfully! Finished level 389 Enter level: eclib-2013-01-01/progs/out/h1curve.out0000644000175200017520000000525412015426064014155 00000000000000See detail? Enter first and last N: Table of curves computed from newforms via periods (reordered to agree with Book for levels up to 1000) (reordered to agree with LMFDB for levels over 1000) Retrieving newform data for N = 90 Finished reading newform data for N = 90 Form number 1: aplist = [ -1 0 1 2 6 -4 -6 -4 0 -6 -4 8 0 8 0 -6 6 2 -4 -12 ...] aq = [ 1 1 -1 ] ap0 = 2, dp0 = 4, np0 = 6 SFE = 1, L/P = 2/3 lplus = 1, mplus = 1 lminus = 7, mminus = 4 [(-77,2;-3,7),1,1;1] Finding periods -- via L(f_chi) using twists by 1 and 7 [w_1,w_2] = [(1.229967685586970495175018,1.14635616957311248404033),(-1.229967685586970495175018,1.14635616957311248404033)] tau = (-0.07028346131662992344799259,0.9975270598161003196814261) (abs(tau)=0.9999999999999999999999998) w_R = (-2.459935371173940990350036,0) w_IR = (-1.229967685586970495175018,-1.14635616957311248404033) c4 = -278.9999999999999999999985 c6 = -1268.999999999999999999938 After rounding, using factors 3 for c4 and 3 for c6: ic4 = -279 ic6 = -1269 Lattice type checks OK Real period checks OK Imag period checks OK Curve = [1,-1,0,6,0] N = 90 Form number 2: aplist = [ 1 0 -1 2 -6 -4 6 -4 0 6 -4 8 0 8 0 6 -6 2 -4 12 ...] aq = [ -1 1 1 ] ap0 = 2, dp0 = 4, np0 = 6 SFE = 1, L/P = 2/3 lplus = 1, mplus = 1 lminus = 7, mminus = 12 [(-77,2;-3,7),1,1;1] Finding periods -- via L(f_chi) using twists by 1 and 7 [w_1,w_2] = [(0,-1.42024434873635680197068),(1.985547129270674318649064,0.7101221743681784009853398)] tau = (-0.5,1.398032057678869145976115) (abs(tau)=1.484753728501064551755562) w_R = (-3.971094258541348637298128,0) w_IR = (-1.985547129270674318649064,-0.7101221743681784009853398) c4 = 368.9999999999999999999945 c6 = -8072.999999999999999999854 After rounding, using factors 3 for c4 and 3 for c6: ic4 = 369 ic6 = -8073 Lattice type checks OK Real period checks OK Imag period checks OK Curve = [1,-1,1,-8,11] N = 90 Form number 3: aplist = [ 1 0 1 -4 0 2 -6 -4 0 6 8 2 6 -4 0 6 0 -10 -4 0 ...] aq = [ -1 -1 -1 ] ap0 = -4, dp0 = 24, np0 = 12 SFE = 1, L/P = 2 lplus = 1, mplus = 1 lminus = 7, mminus = 8 [(13,1;1,7),2,2;1] Finding periods -- via L(f_chi) using twists by 1 and 7 [w_1,w_2] = [(0.6687979972943242528826713,0.9676241148913877311526313),(-0.6687979972943242528826713,0.9676241148913877311526313)] tau = (0.3534332136464203486286135,0.9354597604876244964377629) (abs(tau)=1) w_R = (-1.337595994588648505765343,0) w_IR = (-0.6687979972943242528826713,-0.9676241148913877311526313) c4 = -638.9999999999999999999905 c6 = 49598.99999999999999999972 After rounding, using factors 3 for c4 and 3 for c6: ic4 = -639 ic6 = 49599 Lattice type checks OK Real period checks OK Imag period checks OK Curve = [1,-1,1,13,-61] N = 90 eclib-2013-01-01/progs/out/h1first.out0000644000175200017520000000017111764406576014171 00000000000000Program h1first. Using METHOD = 2 >>>Level 90<<< 1 [1,-1,0,6,0] N = 90 2 [1,-1,1,-8,11] N = 90 3 [1,-1,1,13,-61] N = 90 eclib-2013-01-01/progs/out/reduce_quartics.out0000644000175200017520000000170211751762176015771 00000000000000Computed 78519 primes, largest is 1000253 Extra primes in list: Enter quartic coefficients a,b,c,d,e ? Quartic is (-33,-2159,-52689,-568174,-2282844) I = 73947 J = 0 Bad primes: [ 2 3 157 ] Attempting to minimize the quartic. First partial minimization without assuming local solvability: p=2: minimal already p=3: minimal already p=157: minimal already Result has coefficients: (-33,-2159,-52689,-568174,-2282844) I = 73947 J = 0 Bad primes: [ 2 3 157 ] Now check local solvability: Everywhere locally soluble Final minimization of I, J: p=2: minimal already p=3: minimal already p=157: minimal already Result has coefficients: (-33,-2159,-52689,-568174,-2282844) I = 73947 J = 0 Bad primes: [ 2 3 157 ] transform = [1,0;0,1] / 1 Attempting to reduce the quartic. Finished reducing g, new coefficients: (-33,-47,255,434,132) I = 73947 J = 0 extra reducing transform = [-17,-18;1,1] total transform = [-17,-18;1,1] / 1 OK Enter quartic coefficients a,b,c,d,e ? eclib-2013-01-01/progs/out/nfhpmcurve.out0000644000175200017520000000062011752000317014741 00000000000000Program nfhpmcurve. Using METHOD = 2 to find newforms MODULUS for linear algebra = 1073741789 Verbose output? How many primes for Hecke eigenvalues? Output newforms to file? (0/1) Enter first and last N: >>>Level 2002: 3 newform(s) found. Computing 3 curves... 1 [1,-1,0,-691,-27531] N = 2002 2 [1,-1,0,-26,52] N = 2002 3 [1,-1,1,17,19] N = 2002 All curves found successfully! Finished level 2002 eclib-2013-01-01/progs/out/point_search.out0000644000175200017520000000237111751756213015263 00000000000000Input curve [0,0,1,-7,6] Rank of points found is 3 Generator 1 is [1:-1:1]; height 0.66820516565192793502 Generator 2 is [-2:3:1]; height 1.368572505353930112 Generator 3 is [-14:25:8]; height 2.7173593928122930896 Regulator = 0.41714355875838397005 Points have been successfully saturated [[1,-1],[-2,3],[-7/4,25/8]] Input curve [0,1,1,-2,0] Rank of points found is 2 Generator 1 is [0:-1:1]; height 0.32700077365160495184 Generator 2 is [-1:1:1]; height 0.68666708330558658573 Regulator = 0.15246017794314375163 Points have been successfully saturated [[0,-1],[-1,1]] Input curve [2/5,-1/45,1/1800,-7/810000,7/60750000] Searching on standard minimal model [0,1,1,-2,0] (points found will be transferred back at end) Transformation: [u,r,s,t] = [1,-5,-6,23] with scale factor 30 [-6:1:900] maps to [-1:1:1] on [0,1,1,-2,0], with height 0.68666708330558658573 Rank of known points is 1 with regulator 0.68666708330558658573 Rank of points found is 2 Generator 1 is [0:-1:1]; height 0.32700077365160495184 --maps back to [-75:11:13500] on input curve Generator 2 is [-2:0:1]; height 0.92075778268510239274 --maps back to [-42:7:5400] on input curve Regulator = 0.15246017794314375163 Points have been successfully saturated [[-1/180,11/13500],[-7/900,7/5400]] eclib-2013-01-01/progs/out/quartic_points.out0000644000175200017520000000216411751763101015643 00000000000000Verbose? Enter quartic coefficients a,b,c,d,e ? Limit on height? I = -26356388845395184406350565808061369918064, J = -352166609661875954997390187329873130323434589147579770870730368 Minimal model for Jacobian: [1,0,1,34318214642441646362435632562579908747,3184376895814127197244886284686214848599453811643486936756] Checking local solublity in R: Checking local solublity at primes [ 2 3 5 7 11 17 67 89 139 211 281 431 443 577 647 977 1613 3863 10567 11923 15361 73277 ]: Everywhere locally soluble. Searching for points on (-76507605796482039669,0,334447602052445326228,0,150542317465449993216) up to height 6 (x:y:z) = (-4:456379274456:5) Point = [2717410306797994865322390215100882986749083600480:31945036659247177505290259298595196252256878326866123825847:541269629646463252964269919701] height = 43.74623851 Curve = [1,0,1,34318214642441646362435632562579908747,3184376895814127197244886284686214848599453811643486936756] Point = [2717410306797994865322390215100882986749083600480:31945036659247177505290259298595196252256878326866123825847:541269629646463252964269919701] height = 43.74623851 Enter quartic coefficients a,b,c,d,e ? eclib-2013-01-01/progs/out/aplist.out0000644000175200017520000000044312015447441014071 00000000000000 90 a + + - 2 6 -4 -6 -4 0 -6 -4 8 0 8 0 -6 6 2 -4 -12 -10 -4 12 12 2 90 b - + + 2 -6 -4 6 -4 0 6 -4 8 0 8 0 6 -6 2 -4 12 -10 -4 -12 -12 2 90 c - - - -4 0 2 -6 -4 0 6 8 2 6 -4 0 6 0 -10 -4 0 2 8 -12 -18 2 eclib-2013-01-01/progs/aplist.cc0000644000175200017520000001166111774563612013056 00000000000000// FILE APLIST.CC: program for listing ap ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #include // for nf_filename #define BOOKORDER // if defined, sorts newforms & curves into order // in the Book (relevant up to 500 only) #include int main() { string filename; cout<<"Enter output filename: "; cin>>filename; ofstream output(filename.c_str()); int n1,n2; short temp; cout<<"Enter first and last values of n: "; cin>>n1>>n2; for (int n=n1; n<=n2; n++) { string data = nf_filename(n,'x'); ifstream datafile(data.c_str()); if (!datafile) cout<<"No file "< > aqtable; for(ic=0; ic(naq)); for (iq=0; iq > aptable; vector bigptable; for(ic=0; ic(25+nbigprimes)); for (ip=0; ip<25; ip++) for (ic=0; ic100) if any: int nn=n; ip=25; // index into aptable jp=26; // current prime being considered p=prime_number(jp); for (ip=0; ip<25; ip++) { int p = prime_number(ip+1); while (nn%p==0) nn/=p; } while (nn>1) // then there are primes>100 dividing n { while (nn%p!=0) // skip over data for p & increment p { datafile.read((char*)batch,nnf*sizeof(short)); p=prime_number(++jp); } // now p is a "large" prime divisor of n bigptable.push_back(p); while (nn%p==0) nn/=p; datafile.read((char*)batch,nnf*sizeof(short)); batchptr=batch; for(ic=0; ic8) output<<" "; if(ap==1) output<<" +"; else output<<" -"; } else // T_p-eig { if (jp>8) output< #include #include #include #include #include #define MAX_HEIGHT 20 // will never search for points on curve of naive // logarithmic height greater than this #define SEARCH_METHOD 0 // 0 for Stoll sieve (fastest) // 1, 2, 3 for JC's sieve int main(int argc, char **argv) { mrank_options opt; opt.set(argc, argv); int verbose = (opt.get_verbose()); //opt.show(); if(!opt.get_quiet()) {opt.banner(1); show_version();} #if defined(NTL_ALL) long decimal_precision=opt.get_precision(); set_precision(decimal_precision); if(verbose) cerr<<"Using NTL multiprecision floating point with " < ai; // while ( getcurve(CD,!opt.get_quiet()) ) while ( getcurve(ai,!opt.get_quiet()) ) { cout << "Curve "<< "["< #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#define AUTOLOOP //#define POS_RANK_ONLY 1 // for testing //#define RANK_ZERO_ONLY 1 //#define RANK_TWO_ONLY 1 //#define SQUAREFREE_ONLY //#define DEBUG_BSD #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output #include int main(void) { set_precision(10); long limit, n=1, hlim1=10, hlim2=15; bigint nn; int verbose=0; char genfile[30]; #ifndef RANK_ZERO_ONLY cerr << "See detail (0/1)? "; cin >> verbose; cerr << "Limits on naive height in point search? "; cerr << "(searches up to first limit on all curves, up to second limit only if rank is deficient after that): "; cin>>hlim1>>hlim2; cerr << "filename for dumping generators? "; cin >> genfile; ofstream genout; genout.open(genfile); if(!genout.is_open()) {cerr<<"Unable to open file " << genfile << "\n"; abort();} #endif #ifdef AUTOLOOP cerr<<"Enter first and last N: ";cin>>n>>limit; n--; cerr<0) { cerr<<"Enter level: "; cin>>n; #endif if (n>0) { nn=n; // Temporary code: check that n is square-free #ifdef SQUAREFREE_ONLY longlist plist=pdivs(n); int sqfree=1; long i; for(i=0; (i clist = icl.getcurves(); long ic, nc = clist.size(); for(ic=0; ic0.01) { cout<<"analytic L/P = "<0.1) cout << S << " ***!!!***"; else { cout << roundS; long rootS=(long)(sqrt((double)roundS)+0.1); int squareS=(roundS==rootS*rootS); if(!squareS) cout << " ***!!!***"; } cout << endl; } else { if(verbose) cout << "\nRS = " << RS << endl; mw mwbasis(&CDi,verbose,1,r); // stop when rank r is reached mwbasis.search(to_bigfloat(hlim1)); long mwr = mwbasis.getrank(); // if((mwr1)) ) // 2-descent for rank 2 if((mwr shortlist = two_d.getpbasis(); mwbasis.process(shortlist); mwr = mwbasis.getrank(); if(verbose) cout<<"After 2-descent, rank of points is "< unsat; int sat_ok = mwbasis.saturate(index,unsat); if(!sat_ok) { cout << "saturation possibly incomplete at primes " << unsat << "\n"; } bigfloat reg = mwbasis.regulator(); vector gens = mwbasis.getbasis(); if(r!=mwr) { cout << "RS = " << RS <<"\t"; cout<<"Warning: points found have rank " << mwr << ", not " << r << ", with hlim2="<0.1) cout << " ***!!!***"; else { long rootS=(long)(sqrt((double)roundS)+0.1); int squareS=(roundS==rootS*rootS); if(!squareS) cout << " ***!!!***"; } cout << endl; } // Dump to genfile: genout << n << "\t" << code << "\t" << ic+1; genout << "\t" << (Curve)CDi ; genout << "\t" << r ; for(int ip=0; ip #include int main() { set_precision(30); initprimes("PRIMES",0); int verbose = 1; long rank, npts, j; cout<<"verbose (0/1)? "; cin>>ws; if(cin.eof()) {cout<>verbose; Curve E; while (1) { cout<<"\nInput a curve: "; cin>>ws; if(cin.eof()) {cout<> E; if ( E.isnull() ) exit(0); Curvedata C(E); cout << "Curve " << (Curve)C << endl; Point P(C); cout<<"enter number of points: "; cin>>ws; if(cin.eof()) {cout<> npts; vector points; points.reserve(npts); j=0; while(j>ws; if(cin.eof()) {cout<> P; if ( P.isvalid() ) {points.push_back(P); j++;} else {cout<<"point "<>ws; if(cin.eof()) {cerr<>naux; sifter box(&C, naux, verbose); box.process(points); rank = box.getrank(); if(rank==npts) cout<<"Points are all independent, their rank is "< #include #include #include #include #include int getquartic(quartic& g) { bigint a, b, c, d, e; cout << "Enter quartic coefficients a,b,c,d,e ?" << endl; char ch; cin>>ch; if(ch=='(') cin>>a>>ch>>b>>ch>>c>>ch>>d>>ch>>e>>ch; else { cin.putback(ch); cin >> a >> b >> c >> d >> e; } if (is_zero(a)&&is_zero(b)&&is_zero(c)&&is_zero(d)&&is_zero(e)) return 0; g=quartic(a,b,c,d,e); // will set its own invariants, roots and type return 1; } int main() { show_version(); cout.precision(15); cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) int verb; cout << "Verbose? "; cin >> verb; initprimes("PRIMES",0); int modopt=0; // cout<<"moduli option (0 (Stoll)/ 1/2/3)?"; cin >> modopt; quartic g; while (getquartic(g)) { double hlim; cout << "Limit on height? "; cin >> hlim; bigint I = g.getI(), J=g.getJ(), zero=BIGINT(0); Curvedata IJ_curve(zero,zero,zero,-27*I,-27*J,0); bigint tr_u,tr_r,tr_s,tr_t; Curvedata E = IJ_curve.minimalize(tr_u,tr_r,tr_s,tr_t); cout << "I = " << I << ", J = " << J << "\n"; cout << "Minimal model for Jacobian: " << (Curve)E << endl; bigint badp; vector plist = pdivs(6*g.getdisc()); unsigned int i, els, els1; cout << "Checking local solublity in R:\n"; els = ((g.gettype()>1)||(g.geta()>BIGINT(0))); if(!els) cout << "Not locally soluble over R\n"; cout << "Checking local solublity at primes " << plist << ":\n"; els1 = qpsoluble(g,BIGINT(2)); if(!els1) cout << "Not locally soluble at p = 2\n"; els = els&els1; for (i=1; i #include #include #include #include #include #include //from qcurves, for computing conductors #include #include #include //#define SINGLE #ifndef SINGLE #define AUTOLOOP #endif #define DMAX 50 // Upper bound for d = (2,2) matrix entry used #define LMAX 200 // Upper bound twisting prime l- int main(void) { initprimes("PRIMES",0); set_precision("Enter number of decimal places"); long limit,n=1; int dump=1, detail; long maxn, dmax=DMAX; //#ifdef SINGLE detail=2; //#else cout << "See details? "; cin>>detail; //#endif cout << "Enter max d: "; cin>>dmax; cout << "Enter max scaling factor for periods: "; cin>>maxn; #ifdef AUTOLOOP cout<<"Enter first and last N: ";cin>>n>>limit; n--; cout<<"\n"; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { cout << "N = " << n << endl; newforms nf(n,detail); int noldap=25; nf.createfromdata(1,noldap); int squarelevel=nf.squarelevel; long fac=nf.sqfac; long nnf = nf.n1ds; long inf = 1; #ifdef SINGLE cout << "Enter form number: "; cin>>inf; nnf=inf; #endif primevar pr; long p0; // First "good" prime while (p0=(long)pr, ::divides(p0,n)) pr++; int anyfound=0; for(long i=inf-1; i1) {cout<<"\n Newform details:\n";nfi->display();cout<lplus, mplus=nfi->mplus; long s = nfi->sfe; //nfi->dotplus=1; nfi->dotminus=1; // In case wrong values were on the file! // STEP 1: find the real period using L(f,1) is L/P nonzero, // or via L(f,chi,1) // Now done within get_matrix_periods() // STEP 2: compute periods of lots of matriced in Gamma_0(N) over all // symbols {0,b/d} for da<<","<b<<";"<c<<","<d<<"):\t"; cout << "dotplus = "<< nfi->dotplus << ", dotminus = "<< nfi->dotminus<< "\n"; cout << "Searching for scaling factors.\n"; } // STEP 3: Now we have nonzero integer multiples of real and imag // periods, we search for a sub-multiple of both which gives a genuine // curve. long nx, ny; int type; long maxnx=maxn; if(rp_known) maxnx=1; int found = get_curve(n, fac, maxnx, maxn, x0, y0, nx, ny, type, detail); if(found) { anyfound=1; cout<<"before rescaling, dotplus="<dotplus<<", dotminus="<dotminus<a<<","<b<<";"<c <<","<d<<"),"<dotplus<<","<dotminus <<";"<type<<"]"<display(); cout<<"test reconstruction of curve from updated data:"<>dump; if(dump) { nf.output_to_file(); } } } // end of if(n) } // end of while() } // end of main() eclib-2013-01-01/progs/in/0000755000175200017520000000000012071067052011720 500000000000000eclib-2013-01-01/progs/in/list_cubics.in0000644000175200017520000000001311751754256014502 00000000000000200 -200 0 eclib-2013-01-01/progs/in/moreap.in0000644000175200017520000000002412015427602013446 000000000000001 1 1 1 20 11 200 0 eclib-2013-01-01/progs/in/reduce_cubics.in0000644000175200017520000000003011751754016014767 00000000000000123 234 345 456 0 0 0 0 eclib-2013-01-01/progs/in/point_search.in0000644000175200017520000000015711751756201014656 0000000000000020 10 0 1 [0,0,1,-7,6] 0 3 [0,1,1,-2,0] 0 2 [2/5, -1/45, 1/1800, -7/810000, 7/60750000] 1 -1 [-1/150, 1/900] eclib-2013-01-01/progs/in/mwrank.in0000644000175200017520000000013711751761442013500 00000000000000[0, 1, 1, -2, 0] [0, 0, 0, 0, -675/4] [0, 0, 0, 0, 73/64] [0, 0, 0, 677, 0] [0, 0, 0, -169, 0] eclib-2013-01-01/progs/in/h1bsdcurisog.in0000644000175200017520000000003611752000357014564 000000000000000 10 10 /dev/null 37 90 389 0 eclib-2013-01-01/progs/in/h1first.in0000644000175200017520000000001211764406660013553 000000000000000 0 90 90 eclib-2013-01-01/progs/in/solve_legendre.in0000644000175200017520000000255311751752620015200 00000000000000-113922743 310146482690273725409 -1 7 -4 1 -5 4 1 61 -4 3 8 1 -1 -5 1 1 525973 1 -1 22729 32 -1 -4097 27 5 21127 48 -7 8779 17 -12 15182006953 -40426 9 -4103 23 8 -3140477 43 25 -239743087 78 25 -134593 56 1 -47287 8 7 -4431282451 4719 7 -336649 300 1 51018545 -412 83 134873197 1791 -13 9400805511 2437 -4 2607882701 -17205 4 153 -13 1 -15152 5 3 4293 13 -10 32432 -15 7 7185786 -1465 1 21328386 4537 -1 -30940374 1871 1 29239123130 -165321 1 86807326430 57649 -1 -17194283526 62471 1 130017558910 31761 -1 188060224470 -31489 1 -2568561397757146 1015687 9 6819 29 -5 9987 -91 1 -9476 319 1 -242324 61 43 132963927 -1145 2 7 2 -1 5 -83 -2 257 -116044 -1 1027986085027861747937 722974121783 -604305613931 21458238196506826611317 155590763477 -429392673713 293911884200387681576093 106205605559 -687223946819 206207486824798778186641 769034410087 -80703111317 79 -8 1 125965 -134 1 -163184 223 1 -1115479181 2065 61 88727009405 -50601 1 263422353799 -497480 1 62063469603854588654579 68044230041 -1 1 7535987 -52 19 4776762553 -6836 1 52753834808 -208881 221916530122928255 1 -370095536 555143 1 -1737 1 23121989 -2313 14299777 2 -5276187762844563 1 316 -5 388 152441 -1 831 1 -92742160 1 29526647 -1956 7 4715959977 -21016 6404148857786219 1 -3120332 0 0 0 eclib-2013-01-01/progs/in/nfcount.in0000644000175200017520000000001012015427745013642 000000000000001 50 60 eclib-2013-01-01/progs/in/pcurve.in0000644000175200017520000000002412015426176013474 0000000000000020 1 10 100 11 11 1 eclib-2013-01-01/progs/in/nfhpcurve.in0000644000175200017520000000007312015427465014176 000000000000000 100 1 11 37 50 51 52 53 54 55 56 57 58 59 60 77 90 389 0 eclib-2013-01-01/progs/in/indep_test.in0000644000175200017520000001073711751756327014354 000000000000001 [1,0,1,-19252966408674012828065964616418441723,32685500727716376257923347071452044295907443056345614006] 23 [5836121652711390553392352147587734955:-69455519784971993679807552308609739430858248812:41166906143372569] [1168425140326369941586705900133272389:-17137023844710987140049387309945953892946213544:5429411004770479] [69505543020048021386994294068829048:1443380843339272397458721030742392016696304046:161157926442059] [33726169481462771119596650221569:49412130720987886904443301152758710388796:7098921280459] [15827793579244286948730141533934:6538434104009303265024749952830709029353:5389750958437] [695536410556937814932194749585:230697883363551870088729854504374414548:302787575875] [3765485669836998883000769028606015:1411381089291349753164768808558921002947204:1666240341498377] [3944555884631464928934930:5657335012046240705357319452802233:2406104] [1127027270330215920:3523978127407100674110377602:1] [256051163199552568592395095:-394563651945882403580468873435105816:51895117] [442619010291205562786415:-1167962768316319592876571517317044:50653] [55822325193081529476460202295:-151915114589061403100759698106532333112:6118445789] [356145268111068765982119246504180:-1150775031908416918955115365651634494501651:30094741482625] [178158613465020969197033760546270:184569435055535326363669745422918052707327:46079082400051] [192666510528582744766151703315:-10531550647702714814852169224678207441368:64481201] [743072319779988539974981500704194760635:964874722537391293613786748114488474882993683572:437169613520472565481] [524227677070779268411695177915:3941156276776007263792745630379334937996:9221366673] [109625308172049929108967881865:387496978790653709721061294119215460988:7988005999] [90690032605118118988993244301780:-953144078079942906360903670036536669593542:819763055279] [244353456546628958634824760:-775394556680837651292166377698874734:21253933] [435887272311260175170207520:4712624271973109965160039085789391367:3723875] [386870511037825543981230636169542701637111:83015454575998684006900205726968222686505350799684:159996363164349841378621] [62160011888235162136050:10099849221189668277354753748208:24389] 20 [0,0,0,0,0] P1 = (16902136044621724275584661392595/119224493521, -69455519784971993679807552308609739430858248812/41166906143372569) P2 = (6647882272466103821634772046571/30891226081, -17137023844710987140049387309945953892946213544/5429411004770479) P3 = (1277229332035649706664846727592/2961427561, 1443380843339272397458721030742392016696304046/161157926442059) P4 = (1754834771916476982132090651/369369961, 49412130720987886904443301152758710388796/7098921280459) P5 = (902743031953703698667092998/307406089, 6538434104009303265024749952830709029353/5389750958437) P6 = (103579510135061476534950819/45091225, 230697883363551870088729854504374414548/302787575875) P7 = (31762044569407766003397375255/14054813809, 1411381089291349753164768808558921002947204/1666240341498377) P8 = (29436984213667648723395/17956, 5657335012046240705357319452802233/2406104) P9 = (1127027270330215920, 3523978127407100674110377602) P10 = (686464244502821899711515/139129, -394563651945882403580468873435105816/51895117) P11 = (11962675953816366561795/1369, -1167962768316319592876571517317044/50653) P12 = (30520680805402695175757355/3345241, -151915114589061403100759698106532333112/6118445789) P13 = (11449775538050756019357635316/967521025, -1150775031908416918955115365651634494501651/30094741482625) P14 = (4969418243982621661795591770/1285294201, 184569435055535326363669745422918052707327/46079082400051) P15 = (480465113537612829840777315/160801, -10531550647702714814852169224678207441368/64481201) P16 = (97907154284679777917982542166035/57601436172721, 964874722537391293613786748114488474882993683572/437169613520472565481) P17 = (249989354826313432718977195/4397409, 3941156276776007263792745630379334937996/9221366673) P18 = (54840074123086507808388135/3996001, 387496978790653709721061294119215460988/7988005999) P19 = (9690141319063801580189469420/87590881, -953144078079942906360903670036536669593542/819763055279) P20 = (882142442406602738753880/76729, -775394556680837651292166377698874734/21253933) P21 = (2812175950395226936581984/24025, 4712624271973109965160039085789391367/3723875) P22 = (7126269737101017406079752337071371/2947180538019481, 83015454575998684006900205726968222686505350799684/ 159996363164349841378621) P23 = (2143448685801212487450/841, 10099849221189668277354753748208/24389) eclib-2013-01-01/progs/in/nfhpmcurve.in0000644000175200017520000000002211752000316014332 000000000000000 150 0 2002 2002 eclib-2013-01-01/progs/in/h1bsd.in0000644000175200017520000000001112071066423013162 0000000000000015 50 60 eclib-2013-01-01/progs/in/h1clist.in0000644000175200017520000000000611752000335013527 0000000000000090 90 eclib-2013-01-01/progs/in/solve_conic.in0000644000175200017520000000257111751752422014506 00000000000000-113922743 0 310146482690273725409 1 7 0 -4 -1 -5 0 4 -1 61 0 -4 -3 8 0 1 1 -5 0 1 -1 525973 0 1 1 22729 0 32 1 -4097 0 27 -5 21127 0 48 7 8779 0 17 3 15182006953 0 -40426 -1 -4103 0 23 -2 -3140477 0 43 -1 -239743087 0 78 -1 -134593 0 56 -1 -47287 0 8 -7 -4431282451 0 4719 -7 -336649 0 300 -1 51018545 0 -412 -83 134873197 0 1791 13 9400805511 0 2437 1 2607882701 0 -17205 -1 153 0 -13 -1 -15152 0 5 -3 4293 0 13 10 32432 0 -15 -7 7185786 0 -1465 -1 21328386 0 4537 1 -30940374 0 1871 -1 29239123130 0 -165321 -1 86807326430 0 57649 1 -17194283526 0 62471 -1 130017558910 0 31761 1 188060224470 0 -31489 -1 -2568561397757146 0 1015687 -1 6819 0 29 5 9987 0 -91 -1 -9476 0 319 -1 -242324 0 61 -43 132963927 0 -1145 -2 7 0 2 1 5 0 -83 2 257 0 -116044 1 1027986085027861747937 0 722974121783 604305613931 21458238196506826611317 0 155590763477 429392673713 293911884200387681576093 0 106205605559 687223946819 206207486824798778186641 0 769034410087 80703111317 79 0 -8 -1 125965 0 -134 -1 -163184 0 223 -1 -1115479181 0 2065 -61 88727009405 0 -50601 -1 263422353799 0 -497480 -1 62063469603854588654579 0 68044230041 1 1 0 7535987 13 19 0 4776762553 6836 1 0 52753834808 23209 555143 0 1 193 1 0 316 5 388 0 152441 1 831 0 1 92742160 1 0 29526647 489 7 0 4715959977 21016 0 0 0 0 eclib-2013-01-01/progs/in/ecnf.in0000644000175200017520000000003311752000227013073 00000000000000[0,1,1,-2,0] 0 355 113 0 0 eclib-2013-01-01/progs/in/aplist.in0000644000175200017520000000002512015447352013464 00000000000000aplist.testout 90 90 eclib-2013-01-01/progs/in/quartic_points.in0000644000175200017520000000012611751763067015250 000000000000000 (-76507605796482039669,0,334447602052445326228,0,150542317465449993216) 6 0 0 0 0 0 eclib-2013-01-01/progs/in/qexp.in0000644000175200017520000000000611752000375013141 0000000000000050 60 eclib-2013-01-01/progs/in/h1curve.in0000644000175200017520000000001012015426033013530 000000000000001 90 90 eclib-2013-01-01/progs/in/reduce_quartics.in0000644000175200017520000000005611751762165015366 00000000000000(-33,-2159,-52689,-568174,-2282844) 0 0 0 0 0 eclib-2013-01-01/progs/in/checkap.in0000644000175200017520000000000612015426307013562 0000000000000050 60 eclib-2013-01-01/progs/list_cubics.cc0000644000175200017520000000572111774563612014065 00000000000000// list_cubicx.cc: Program for listing integer cubics with given discriminant bound ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include int main() { initprimes("PRIMES"); bigint a, b, c, d, disc; bigint absdisc, maxdisc; bigint a0,b0,c0,d0; bigint alim, blim, a2, b2, b3, cmin, cmax, r; bigint P, U, U2; bigfloat rdisc, ax, cx, cy; int neg; bigfloat fac1, fac2; unimod m; while(cout << "Enter discriminant bound (positive or negative): ", cin >> maxdisc, !is_zero(maxdisc)) { neg=(maxdisc<0); if(neg) { ::negate(maxdisc); fac1 = sqrt((double)8)/sqrt((double)27); fac2 = 1.2599210498948731647672106072782283505; cout << "Negative discriminants down to " << maxdisc << endl; } else { fac1 = sqrt(to_bigfloat(8))/to_bigfloat(3); fac2 = to_bigfloat(1); cout << "Positive discriminants up to " << maxdisc << endl; } for(absdisc=1; absdisc<=maxdisc; absdisc++) { disc=absdisc; if(neg) ::negate(disc); // cout << "Discriminant = " << disc << endl; rdisc = sqrt(I2bigfloat(absdisc)); ax = fac1 * sqrt(rdisc); alim=Ifloor(ax); // cout<<"Bound on a = " << alim << endl; for(a=1; a<=alim; a++) { a2=a*a; blim=(3*a)/2; // cout<<"a="<\t"; if(neg) g.jc_reduce(m); else g.hess_reduce(m); cout< #include #include #include #include #include #include //from qcurves, for computing conductors #include #include #include #define AUTOLOOP #define SHOWCURVES #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output int main(void) { long prec0=25; int verbose,output,limit=210,n=130; cout << "Program h1first. Using METHOD = " << METHOD << endl; cerr << "Verbose output? "; cin>>verbose; cerr << "Output updated newform data? "; cin>>output; #ifdef AUTOLOOP cerr<<"Enter first and last N: ";cin>>n>>limit; n--; while (n0) { cout<<"\n\nEnter level: "; cin>>n; #endif if (n>0) { if(verbose) cout << "\n\n"; cout << ">>>Level " << n << "<<<" << endl; newforms nf(n,verbose>1); if(verbose) { cout << "Reading newform data from file..." << flush; } nf.createfromdata(1,0,0); long inf, nnf = nf.n1ds; if(verbose) { cout << "done: " << nnf << " newforms." << endl; } if(nnf==0) { cout << "No newforms.\n"; cout << "Finished level "< forms; for(inf=0; inf failures = nf.showcurves(forms,0); if(failures.size()>0) { cout<<"No curve found for "<&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: eclib-2013-01-01/Makefile.in0000644000175200017520000005527412071070364012162 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLINT_CFLAGS = @FLINT_CFLAGS@ FLINT_LDFLAGS = @FLINT_LDFLAGS@ FLINT_LIBS = @FLINT_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LDFLAGS = @GMP_LDFLAGS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LDFLAGS = @NTL_LDFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARI_CFLAGS = @PARI_CFLAGS@ PARI_LDFLAGS = @PARI_LDFLAGS@ PARI_LIBS = @PARI_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libsrc tests progs doc man all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: eclib-2013-01-01/INSTALL0000644000175200017520000003633211737577017011157 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. eclib-2013-01-01/m4/0000755000175200017520000000000012071070655010503 500000000000000eclib-2013-01-01/m4/libtool.m40000644000175200017520000106043411657416066012352 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS eclib-2013-01-01/m4/ltversion.m40000644000175200017520000000126211657416066012724 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) eclib-2013-01-01/m4/ltoptions.m40000644000175200017520000003007311657416066012734 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) eclib-2013-01-01/m4/lt~obsolete.m40000644000175200017520000001375611657416066013264 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) eclib-2013-01-01/m4/ltsugar.m40000644000175200017520000001042411657416066012360 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) eclib-2013-01-01/COPYING0000644000175200017520000010451311737577017011156 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . eclib-2013-01-01/NEWS0000644000175200017520000000036011737577017010615 00000000000000News: this is the first version of eclib to (1) not use four separate directories for sources, and build four separate libraries; instead all the library sources are here (in ./libsrc) and the programs are in ./tests. (2) use autotools! eclib-2013-01-01/configure0000744000175200017520000216521212071070362012014 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for eclib 2013-01-01. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: john.cremona@gmail.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='eclib' PACKAGE_TARNAME='eclib' PACKAGE_VERSION='2013-01-01' PACKAGE_STRING='eclib 2013-01-01' PACKAGE_BUGREPORT='john.cremona@gmail.com' PACKAGE_URL='' ac_unique_file="libsrc" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS ALLPROGS_FALSE ALLPROGS_TRUE ALLOCA FLINT_LDFLAGS FLINT_CFLAGS FLINT_LIBS NTL_LDFLAGS NTL_CFLAGS NTL_LIBS PARI_LDFLAGS PARI_CFLAGS PARI_LIBS GMP_CFLAGS GMP_LDFLAGS GMP_LIBS CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock with_gmp with_pari with_ntl with_flint enable_allprogs ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures eclib 2013-01-01 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/eclib] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of eclib 2013-01-01:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --disable-allprogs only build the library and mwrank, otherwise build all programs and tests Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gmp= prefix of GMP installation. e.g. /usr/local or /usr --with-pari= prefix of PARI installation. e.g. /usr/local or /usr --with-ntl= prefix of NTL installation. e.g. /usr/local or /usr --with-flint= prefix of FLINT installation. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF eclib configure 2013-01-01 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to john.cremona@gmail.com ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by eclib $as_me 2013-01-01, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='eclib' VERSION='2013-01-01' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring eclib..." >&5 $as_echo "$as_me: Configuring eclib..." >&6;} #AC_CONFIG_HEADERS([config.h]) # Initialise libtools: case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # Checks for programs: ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Checks for libraries. # The following AC_ARG_WITH section were written by Volker Braun # Check whether --with-gmp was given. if test "${with_gmp+set}" = set; then : withval=$with_gmp; else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add in -lgmp" >&5 $as_echo_n "checking for __gmpz_add in -lgmp... " >&6; } if ${ac_cv_lib_gmp___gmpz_add+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char __gmpz_add (); int main () { return __gmpz_add (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gmp___gmpz_add=yes else ac_cv_lib_gmp___gmpz_add=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add" >&5 $as_echo "$ac_cv_lib_gmp___gmpz_add" >&6; } if test "x$ac_cv_lib_gmp___gmpz_add" = xyes; then : else as_fn_error $? "GMP library not found. Maybe you want to call configure with the --with-gmp= option? This tells configure where to find the GMP library and headers. e.g. --with-gmp=/usr/local or --with-gmp=/usr" "$LINENO" 5 fi fi case "$with_gmp" in ""|yes) GMP_LDFLAGS="" GMP_CFLAGS="" ;; no) as_fn_error $? "Compiling without libgmp impossible (but --without-gmp given)" "$LINENO" 5 ;; *) GMP_LDFLAGS="-L${with_gmp}/lib" GMP_CFLAGS="-I${with_gmp}/include" ;; esac GMP_LIBS="-lgmp" # Check whether --with-pari was given. if test "${with_pari+set}" = set; then : withval=$with_pari; else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pari_kernel_init in -lpari" >&5 $as_echo_n "checking for pari_kernel_init in -lpari... " >&6; } if ${ac_cv_lib_pari_pari_kernel_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpari ${GMP_LIBS} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pari_kernel_init (); int main () { return pari_kernel_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pari_pari_kernel_init=yes else ac_cv_lib_pari_pari_kernel_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pari_pari_kernel_init" >&5 $as_echo "$ac_cv_lib_pari_pari_kernel_init" >&6; } if test "x$ac_cv_lib_pari_pari_kernel_init" = xyes; then : else as_fn_error $? "Pari library not found. Maybe you want to call configure with the --with-pari= option? This tells configure where to find the PARI library and headers. e.g. --with-pari=/usr/local or --with-pari=/usr" "$LINENO" 5 fi fi case "$with_pari" in ""|yes) PARI_LDFLAGS="" PARI_CFLAGS="" ;; no) as_fn_error $? "Compiling without libpari impossible (but --without-pari given)" "$LINENO" 5 ;; *) PARI_LDFLAGS="-L${with_pari}/lib" PARI_CFLAGS="-I${with_pari}/include" ;; esac PARI_LIBS="-lpari" # Check whether --with-ntl was given. if test "${with_ntl+set}" = set; then : withval=$with_ntl; else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ntl_gmul in -lntl" >&5 $as_echo_n "checking for _ntl_gmul in -lntl... " >&6; } if ${ac_cv_lib_ntl__ntl_gmul+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lntl ${GMP_LIBS} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _ntl_gmul (); int main () { return _ntl_gmul (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ntl__ntl_gmul=yes else ac_cv_lib_ntl__ntl_gmul=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ntl__ntl_gmul" >&5 $as_echo "$ac_cv_lib_ntl__ntl_gmul" >&6; } if test "x$ac_cv_lib_ntl__ntl_gmul" = xyes; then : else as_fn_error $? "NTL Library not found. Maybe you want to call configure with the --with-ntl= option? This tells configure where to find the NTL library and headers. e.g. --with-ntl=/usr/local or --with-ntl=/usr" "$LINENO" 5 fi fi case "$with_ntl" in ""|yes) NTL_LDFLAGS="" NTL_CFLAGS="" ;; no) as_fn_error $? "Compiling without libntl impossible (but --without-ntl given)" "$LINENO" 5 ;; *) NTL_LDFLAGS="-L${with_ntl}/lib" NTL_CFLAGS="-I${with_ntl}/include" ;; esac NTL_LIBS="-lntl" FLINT_CFLAGS="-DFLINT_LEVEL=0" FLINT_LDFLAGS="" FLINT_LIBS="" # Check whether --with-flint was given. if test "${with_flint+set}" = set; then : withval=$with_flint; FLINT_CFLAGS="-DFLINT_LEVEL=1 -I${with_flint}/include"; FLINT_LDFLAGS="-L${with_flint}/lib"; FLINT_LIBS="-lflint" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmpz_init, nmod_mat_rref in -lflint" >&5 $as_echo_n "checking for fmpz_init, nmod_mat_rref in -lflint... " >&6; } if ${ac_cv_lib_flint_fmpz_init__nmod_mat_rref+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lflint ${GMP_LIBS} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fmpz_init, nmod_mat_rref (); int main () { return fmpz_init, nmod_mat_rref (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_flint_fmpz_init__nmod_mat_rref=yes else ac_cv_lib_flint_fmpz_init__nmod_mat_rref=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_flint_fmpz_init__nmod_mat_rref" >&5 $as_echo "$ac_cv_lib_flint_fmpz_init__nmod_mat_rref" >&6; } if test "x$ac_cv_lib_flint_fmpz_init__nmod_mat_rref" = xyes; then : FLINT_CFLAGS="-DFLINT_LEVEL=1"; FLINT_LIBS="-lflint"; { $as_echo "$as_me:${as_lineno-$LINENO}: Building with FLINT support from system install" >&5 $as_echo "$as_me: Building with FLINT support from system install" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: No suitable FLINT Library (version >=2.3) found" >&5 $as_echo "$as_me: No suitable FLINT Library (version >=2.3) found" >&6;} fi fi if test ${with_flint} = no; then FLINT_CFLAGS="-DFLINT_LEVEL=0" FLINT_LDFLAGS="" FLINT_LIBS="" fi # Checks for header files. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in stdlib.h string.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_func in floor memmove memset pow sqrt strchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Check whether --enable-allprogs was given. if test "${enable_allprogs+set}" = set; then : enableval=$enable_allprogs; case "${enableval}" in yes) allprogs=true ;; no) allprogs=false ;; *) as_fn_error $? "bad value ${enableval} for --enable-allprogs" "$LINENO" 5 ;; esac else allprogs=true fi if test x$allprogs = xtrue; then ALLPROGS_TRUE= ALLPROGS_FALSE='#' else ALLPROGS_TRUE='#' ALLPROGS_FALSE= fi ac_config_files="$ac_config_files libsrc/Makefile tests/Makefile progs/Makefile doc/Makefile man/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ALLPROGS_TRUE}" && test -z "${ALLPROGS_FALSE}"; then as_fn_error $? "conditional \"ALLPROGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by eclib $as_me 2013-01-01, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ eclib config.status 2013-01-01 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "libsrc/Makefile") CONFIG_FILES="$CONFIG_FILES libsrc/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "progs/Makefile") CONFIG_FILES="$CONFIG_FILES progs/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi eclib-2013-01-01/ChangeLog0000644000175200017520000000000011737577017011657 00000000000000eclib-2013-01-01/config.guess0000744000175200017520000013105411737577462012445 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-10' # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: eclib-2013-01-01/Makefile.am0000644000175200017520000000007512071067052012136 00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libsrc tests progs doc man eclib-2013-01-01/man/0000755000175200017520000000000012071070657010740 500000000000000eclib-2013-01-01/man/Makefile.in0000644000175200017520000003277512071070363012735 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLINT_CFLAGS = @FLINT_CFLAGS@ FLINT_LDFLAGS = @FLINT_LDFLAGS@ FLINT_LIBS = @FLINT_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LDFLAGS = @GMP_LDFLAGS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LDFLAGS = @NTL_LDFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARI_CFLAGS = @PARI_CFLAGS@ PARI_LDFLAGS = @PARI_LDFLAGS@ PARI_LIBS = @PARI_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man_MANS = mwrank.1 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: eclib-2013-01-01/man/Makefile.am0000644000175200017520000000003111761430550012703 00000000000000dist_man_MANS = mwrank.1 eclib-2013-01-01/man/mwrank.10000644000175200017520000000312011761421540012231 00000000000000.TH MWRANK "1" "May 2012" "mwrank 2012-07-30" "User Commands" .SH NAME mwrank \- determines the rank of an elliptic curve E over Q by 2-descent and generating points for E(Q) modulo torsion .SH DESCRIPTION mwrank is organized as a loop where the user enters curves one by one and the program displays what it can compute about them. An elliptic curve is entered by giving its Weierstrass coefficients (which may be integers or rationals, either as [a1,a2,a3,a4,a6] or as a1 a2 a3 a4 a6. Here are mwrank command line options (can be in any order): .PP .HP \fB\-h\fR help prints this info and quits .IP .HP \fB\-q\fR quiet turns OFF banner display .IP .HP \fB\-v\fR n verbosity sets verbosity to n (default=1) .IP .HP \fB\-o\fR PARI/GP output turns ON extra PARI/GP short output (default is OFF) .IP .HP \fB\-p\fR n precision sets precision to n decimals (default=15) .IP .HP \fB\-b\fR n quartic bound bound on quartic point search (default=10) .IP .HP \fB\-x\fR n n aux number of aux primes used for sieving (default=6) .IP .HP \fB\-l\fR list turns ON listing of points (default ON unless v=0) .IP .HP \fB\-t\fR trace turns ON trace of quartic equivalence testing (debugging only) .IP .HP \fB\-s\fR selmer_only if set, computes Selmer rank only (default: not set) .IP .HP \fB\-d\fR skip_2nd_descent if set, skips the second descent for curves with 2\-torsion (default: not set) .IP .HP \fB\-S\fR n sat_bd upper bound on saturation primes (default=1000, \fB\-1\fR for automatic) eclib-2013-01-01/ltmain.sh0000644000175200017520000105204012071070357011724 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 eclib-2013-01-01/libsrc/0000755000175200017520000000000012071070656011442 500000000000000eclib-2013-01-01/libsrc/mlocsol.cc0000644000175200017520000003420411774563612013354 00000000000000// mlocsol.cc: implementation of functions for local solubility of quartics ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// //#define DEBUG_NEW_LOCSOL #include #include #include #include int psquare(const bigint& aa, const bigint& p); /* tests if aa is a p-adic square */ int lemma6(const bigint& a,const bigint& b,const bigint& c,const bigint& d,const bigint& e, const bigint& p, int nu,const bigint& x); /* returns -1 for insoluble, 0 for undecided, +1 for soluble --- odd p */ int lemma7(const bigint& a,const bigint& b,const bigint& c,const bigint& d,const bigint& e, const bigint& p, int nu, const bigint& x); /* returns -1 for insoluble, 0 for undecided, +1 for soluble --- p=2 */ int zpsoluble(const bigint& a,const bigint& b,const bigint& c,const bigint& d,const bigint& e, const bigint& p, int pzp); /* Checks for solublility in Zp, or in pZp if "pzp" is 1 */ int psquare(const bigint& aa, const bigint& p) /* tests if aa is a p-adic square */ { if (is_zero(aa)) return 1; long v = val(p,aa); if (odd(v)) return 0; bigint a(aa); while(v--) a/=p; if(p==2) return posmod(a,8)==1; else return legendre(a,p) == 1 ; } /* of psquare */ int lemma6(const bigint& a,const bigint& b,const bigint& c,const bigint& d,const bigint& e, const bigint& p, int nu, const bigint& x) // returns -1 for insoluble, 0 for undecided, +1 for soluble --- odd p { bigint gx = (((a*x+b)*x+c)*x+d)*x+e; if (psquare(gx,p)) return +1; bigint gdashx = ((4*a*x+3*b)*x+2*c)*x+d; long lambda = val(p,gx); if(is_zero(gdashx)) // then effectively mu = infinity { if (lambda >= 2*nu) return 0; return -1; } // now gdashx !=0: long mu = val(p,gdashx); if ((lambda-mu >= nu) && (nu > mu)) return +1; if ((lambda >= 2*nu) && (mu >= nu)) return 0; return -1; } /* end of lemma6 */ int lemma7(const bigint& a,const bigint& b,const bigint& c,const bigint& d,const bigint& e, const bigint& p, int nu, const bigint& x) // returns -1 for insoluble, 0 for undecided, +1 for soluble --- p=2 { bigint gx = (((a*x+b)*x+c)*x+d)*x+e; if (psquare(gx,p)) return +1; bigint gdashx = ((4*a*x+3*b)*x+2*c)*x+d; long lambda = val(p,gx); bigint oddgx = gx; if (oddgx==0) oddgx= 1; else while (even(oddgx)) oddgx /= 2; int odd4 = (posmod(oddgx,4)==1); if(is_zero(gdashx)) // mu = infinity { if (lambda >= 2*nu) return 0; if ((lambda == 2*nu-2) && odd4) return 0; return -1; } long mu = val(p,gdashx); // Now gdashx is nonzero if ((lambda-mu >= nu) && (nu > mu)) return +1; if ((nu > mu) && (lambda==mu+nu-1) && even(lambda)) return +1; if ((nu > mu) && (lambda==mu+nu-2) && even(lambda) && odd4) return +1; if ((mu >= nu) && (lambda >= 2*nu)) return 0; if ((mu >= nu) && (lambda == 2*nu-2) && odd4) return 0; return -1; } /* end of lemma7 */ int zpsol(const bigint& a,const bigint& b,const bigint& c,const bigint& d,const bigint& e, const bigint& p, const bigint& x0, long nu) // Checks for solublility in Zp with x=x0 (mod p^nu) // Fully recursive (depth-first) version { // cout << "In zpsol with (p,nu) = (" << p << "," << nu << "), x0="<1)||(g.geta()>BIGINT(0))); } int Rsoluble(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e) { quartic g(a,b,c,d,e); return Rsoluble(g); } //#define CHECK_LOC_SOL 1 int locallysoluble(const quartic& g, const vector& plist, bigint& badp) { bigint a=g.geta(), b=g.getb(), c=g.getcc(), d=g.getd(), e=g.gete(); return locallysoluble(a,b,c,d,e,plist,badp); } int locallysoluble(const bigint& a, const bigint& c, const bigint& e, const vector& plist, bigint& badp) { static const bigint zero = BIGINT(0); bigint d = c*c-4*a*e; // cout<<"In locallysoluble(a,c,e) with plist = "<::const_iterator p = plist.begin(); (p!=plist.end())&/ p++) { badp = *p; sol = new_qpsoluble(a,b,c,d,e,badp,0); #ifdef CHECK_LOC_SOL cout<<"Checking solubility with old method (p="<=0 && zeromodp; i--) { unit=c[i]; zeromodp=div(p,unit); } // If leading non-zero term is a square return 1 if (legendre(unit,p)==1) { return 1; } // If f is a constant mod p and constant not a square return 0 if (i==-1) { return 0; } // Factorize f Factorization fact_f=fact_c(c); long nc=fact_f.length(); // Check if of the form unit*g^2 if (verbose) cout << "Factorization of f = "<< fact_f << endl; for (i=0; i #include #include "random.cc" #undef scalar #undef vec #undef mat #undef subspace #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #include "vec.cc" #undef scalar #undef vec #undef mat #undef subspace #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #include "vec.cc" #undef scalar #undef vec #undef mat #undef subspace eclib-2013-01-01/libsrc/periods.cc0000644000175200017520000007424012071067052013341 00000000000000// FILE PERIODS.CC : implementation of classes for integrating newforms ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include #include #include #include #include #include #include // from qcurves #include #include #include #define CHECK_PERIODS // check that curves constructed from periods // have the same periods... //#define TRACE_CACHE //#define TRACE_USE ///////////////////////////////////// // functions for character class // ///////////////////////////////////// character::character(long m) { modul=m; chartable = new int[m]; init(); } character::~character() { delete [] chartable; } void character::init() { if ( modul==1 ) chartable[0] = 1; else { long i=modul; while(i--) chartable[i] = legendre(i,modul);} } void character::reset(long m) { delete [] chartable; modul=m; chartable = new int[m]; init(); } ///////////////////////////////// // functions for summer class // ///////////////////////////////// #ifndef NEW_OP_ORDER vector resort_aplist(const level* iN, const vector& primelist, const vector& apl) { long N = iN->modulus; //Sort out the aplist, since apl has the W_q eigs first: long nap=apl.size(); // cout<<"resort_aplist(), using "< aplist; aplist.reserve(nap); long i, j, p, ip = iN->npdivs; for(i=0; i::const_iterator pi = find(iN->plist.begin(),iN->plist.end(),p); if(pi==iN->plist.end()) // then p is good { aplist.push_back( apl[ip++]); // cout << "i = "<aplist); rootmod = sqrt(to_bigfloat(N)); long dp = decimal_precision(); Iasb(limit0,dp*LOG10*rootmod/(TWOPI)) ; // brackets essential } void lfchi::compute(long ell) { chi.reset(ell); limit = limit1 = ell*limit0; factor1 = exp(-(TWOPI)/ (to_bigfloat(ell) * rootmod)); rootlimit=sqrt(to_bigfloat(limit)); an_cache.resize(I2long(Ifloor(rootlimit+1)),0); #ifdef TRACE_USE cout<<"lfchi.factor1 = "<loverp; x = abs(lx.value()*to_bigfloat(den(lop))/to_bigfloat(num(lop))); if(verbose) cout<<"real period = "<lplus); long mplus=abs(nfi->mplus); if(mplus!=0) { if(verbose) cout << "Computing real period via L(f,chi,1) with chi mod " <dotplus); if (!dotplus) return 0; x /= dotplus; if(verbose) cout<<"real period (after scaling by "<lminus); long mminus=abs(nfi->mminus); if(mminus!=0) { if(verbose) cout << "Computing imaginary period via L(f,chi,1) with chi mod " <a<<","<b<<";"<c <<","<d<<"), dotplus="<dotplus <<", dotminus="<dotminus<<"; type="<type<dotplus), per.iper()/(nfi->dotminus), (nfi->type));; } else { if(verbose) cout<<"Finding periods -- via L(f_chi) using twists by " <lplus<<" and "<lminus<1) cout<<"factor = "< p | c4, c6 so we take advantage of the fact that c4, c6 // must be multiples of fac when rounding. // bigcomplex wR, wRI, w1, w2, c4, c6; Cperiods cp = getperiods(i, method, verbose); if(verbose) cout<1)) cout << ", using factors " << fac << " for c4 and " << fac6 << " for c6"; if(verbose) cout<<":\n"; if(verbose) cout << "ic4 = " << ic4 << "\nic6 = " << ic6 << endl; // To fix the c4 or c6 values insert data in files fixc4.data and // fixc6.data; NB the index here (i) starts at 0, but class fixc6 // adjusts so in the data files, start at 1 #ifndef MPFP // Multi-Precision Floating Point c4c6fixer(n,i,ic4,ic6); if(verbose) cout << "After fixing: \n"; if(verbose) cout << "ic4 = " << ic4 << "\nic6 = " << ic6 << endl; #endif Curve C(ic4,ic6); if(C.isnull()) return C; Curvedata CD(C,1); // The 1 causes minimalization CurveRed CR(CD); if (getconductor(CR) != n) { if (verbose) cout << "Constructed curve "<0.0001)) { cout<<"Real period of constructed curve does not match that" <<" of the newform (using decimal precision "<0.0001)) { cout<<"Second period of constructed curve does not match that" <<" of the newform (using decimal precision "<708) return to_bigfloat(0); #endif return exp(-x); } //#define TRACEG1 bigfloat myg1(bigfloat x) { #ifndef MPFP // Multi-Precision Floating Point if(x>708) return to_bigfloat(0); #endif if(x<2) { bigfloat ans = -log(x) - Euler(); bigfloat p = to_bigfloat(-1); #ifdef TRACEG1 cout<<"Computing myg1 for x = "< Av(r+1); // indexed from 0 to r int j; bigfloat n=one; for(j=0;j<=r;j++) Av[j]=one; while(!is_approx_zero(emx*term*Av[r])) //while(!is_approx_zero(term*Av[r])) { n++; // update A-vector, term and sum for(j=1;j<=r;j++) Av[j]+=(Av[j-1]/n); term*=(x/n); ans+=(Av[r]*term); } return emx*ans; } bigfloat Glarge(int r, bigfloat x) // Cohen's Gamma_r(x) for large x { static const bigfloat zero = to_bigfloat(0); static const bigfloat one = to_bigfloat(1); static const bigfloat two = to_bigfloat(2); bigfloat emx=exp(-x), ans=zero, term=-one/x; vector Cv(r+1); // indexed from 0 to r int j; bigfloat n=zero; Cv[0]=one; for(j=1;j<=r;j++) Cv[j]=zero; // cout<<"emx*term="<0;j--) Cv[j]+=(Cv[j-1]/n); term*=(-n/x); ans+=(Cv[r]*term); // cout<<"term="<20) return zero; bigfloat ans = -log(x) - Euler(); //cout<<"Computing myg3 for x = "< plist=pdivs(den(qa1)); plist=vector_union(plist,pdivs(den(qa2))); plist=vector_union(plist,pdivs(den(qa3))); plist=vector_union(plist,pdivs(den(qa4))); plist=vector_union(plist,pdivs(den(qa6))); #ifdef DEBUG_Q_INPUT cout<<"Denominator primes: "<::const_iterator pp=plist.begin(); pp!=plist.end(); pp++) { bigint p=*pp; #ifdef DEBUG_Q_INPUT cout<<"p = "<0 ? 2 : 1; } } Curvedata::Curvedata(const Curve& c, int min_on_init) : Curve(c), minimal_flag(0), ntorsion(0) { b2 = a1*a1 + 4*a2; b4 = 2*a4 + a1*a3; b6 = a3*a3 + 4*a6; b8 = (b2*b6 - b4*b4) / 4; c4 = b2*b2 - 24*b4; c6 = -b2*b2*b2 + 36*b2*b4 - 216*b6; discr = (c4*c4*c4 - c6*c6) / 1728; discr_factored=0; if(sign(discr)==0) // singular curve, replace by null { a1=0;a2=0;a3=0;a4=0;a6=0; b2=0;b4=0;b6=0;b8=0; c4=0;c6=0; conncomp=0; } else { conncomp = sign(discr)>0 ? 2 : 1; if (min_on_init) minimalize(); // which sets discr } } Curvedata::Curvedata(const Curvedata& c, int min_on_init) : Curve(c), b2(c.b2), b4(c.b4), b6(c.b6), b8(c.b8), c4(c.c4), c6(c.c6), discr(c.discr), minimal_flag(c.minimal_flag), discr_factored(c.discr_factored), conncomp(c.conncomp), ntorsion(c.ntorsion) { if(discr_factored) the_bad_primes=c.the_bad_primes; if (min_on_init) minimalize(); } Curvedata::Curvedata(const bigint& cc4, const bigint& cc6, int min_on_init) :minimal_flag(0), discr_factored(0), ntorsion(0) { if (valid_invariants(cc4, cc6)) { c4=cc4; c6=cc6; c4c6_to_ai(cc4, cc6, a1, a2, a3, a4, a6, b2, b4, b6, b8); /* cout<<"a1="<0 ? 2 : 1; } else { cout << " ## attempt to call Curve constructor\n" << " with invalid invariants c4 = "< 1) { c4 = newc4; c6 = newc6; } discr = newdiscr; if(discr_factored) { if(u>1) // trim list of bad primes { bigint p; vector new_bad_primes; vector::iterator pr = the_bad_primes.begin(); while(pr!=the_bad_primes.end()) { bigint p=*pr++; if(div(p,discr)) new_bad_primes.push_back(p); } the_bad_primes=new_bad_primes; } } else the_bad_primes = pdivs(discr); // cout<<"After Curvedata::minimalize(): discr = "<0 ? 2 : 1; ntorsion=0; } void Curvedata::output(ostream& os) const { Curve::output(os); if (isnull()) {os << " --singular\n"; return; } if (minimal_flag) os << " (reduced minimal model)"; os << endl; os << "b2 = " << b2 << "\t " << "b4 = " << b4 << "\t " << "b6 = " << b6 << "\t " << "b8 = " << b8 << endl; os << "c4 = " << c4 << "\t\t" << "c6 = " << c6 << endl; os << "disc = " << discr << "\t("; if (minimal_flag&&discr_factored) os << "bad primes: " << the_bad_primes << ";\t"; os << "# real components = " << conncomp << ")" << endl; if (ntorsion) os<<"#torsion = "<= 0.0) return (pow(x, third) ) ; else return( - pow(-x, third) ); } void sort(bigfloat roots[3] ) { bigfloat x0, x1, x2, temp ; x0 = roots[0] ; x1 = roots[1] ; x2 = roots[2] ; if (x0 > x1) { temp = x0; x0 = x1 ; x1 = temp ; } /* now x0 < x1 */ if (x1 > x2) { temp = x1; x1 = x2 ; x2 = temp ; } /* now x1 < x2, x0 < x2 */ if (x0 > x1) { temp = x0; x0 = x1 ; x1 = temp ; } /* now x0 < x1 < x2 */ roots[0] = x0 ; roots[1] = x1; roots[2] = x2 ; } CurvedataExtra::CurvedataExtra(const Curvedata& c) : Curvedata(c) { if ( isnull() ) {roots[0]=roots[1]=roots[2]=period=0; return; } bigfloat fb2 = I2bigfloat(b2); bigfloat fc6 = I2bigfloat(c6); bigfloat fdiscr = I2bigfloat(discr); if (conncomp == 1) { bigfloat sqdisc = 24.0 * sqrt(-3.0 * fdiscr) ; roots[2] = ( -fb2 + cuberoot(fc6 - sqdisc) + cuberoot(fc6 + sqdisc) ) / 12.0 ; } else { bigfloat theta = atan2( 24.0 * sqrt(3.0*fdiscr), fc6) ; bigfloat fc4 = I2bigfloat(c4); bigfloat sqc4 = sqrt( fc4 ) ; roots[0] = (-fb2 + 2.0 * sqc4 * cos( theta/3.0 )) / 12.0 ; roots[1] = (-fb2 + 2.0 * sqc4 * cos( (theta+2.0*Pi())/3.0)) / 12.0; roots[2] = (-fb2 + 2.0 * sqc4 * cos( (theta+4.0*Pi())/3.0)) / 12.0; sort(roots) ; } // note that roots[2] (the THIRD one!) is always the largest root // now compute the period bigfloat a, b ; // parameters to feed to agm() if (conncomp == 2){ a = sqrt(roots[2] - roots[0]) ; b = sqrt(roots[2] - roots[1]) ; } else { bigfloat fb4 = I2bigfloat(b4); // bigfloat version of b4 bigfloat fp = sqrt( fb4/2.0 + roots[2] * (fb2/2.0 + 3.0 * roots[2]) ); // f', where f is the cubic a = 2.0 * sqrt( fp ) ; b = sqrt( 3.0 * roots[2] + fb2/4.0 + 2.0 * fp ) ; } period = (2.0 * Pi() / agm(a, b) ); } void CurvedataExtra::output(ostream& os) const { Curvedata::output(os); if(conncomp == 1) os << "The real two-division point is " << roots[2] << endl ; else if(conncomp == 2) os << "The real two-division points are " << roots[0] << ", " << roots[1] << ", "<< roots[2] << endl ; os << "The real period is " << period << endl; } #endif eclib-2013-01-01/libsrc/newforms.cc0000644000175200017520000013413012071067052013527 00000000000000// FILE NEWFORMS.CC: implementation of newforms class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include #include // Functions for ordering newforms // (1) Old ordering (first aq, then ap for good p); // with the order for eigenvalues being // 1,-1 or 0,1,-1,2,-2,... // (2) New ordering (ap for all p in natural order) // with the order for eigenvalues being // -1,1 or ...,-2,-1,0,1,2,... (plain numerical order) // less_ap(a,b) returns +1,0,-1 according to whether a is // before/equal/after b in the above ordering int less_ap(long a, long b, int old=0) { if(!old) return sign(b-a); // the simple new ordering! if(a==b) return 0; int s = sign(abs(b)-abs(a)); if(s) return s; else return sign(a-b); // this way round! +1 before -1 etc } // Compare two ap-vectors lexicographically, using less_ap(.,.,old): int less_apvec(const vector& v, const vector& w, int old=0); int less_apvec(const vector& v, const vector& w, int old) { vector::const_iterator vi=v.begin(), wi=w.begin(); while(vi!=v.end()) { int s = less_ap(*vi++,*wi++,old); if(s) return s; } return 0; } struct less_newform_old : public binary_function { bool operator()(const newform& f, const newform& g) { int s = less_apvec(f.aqlist,g.aqlist,1); if(s==0) s = less_apvec(f.aplist,g.aplist,1); return (s==1); } }; struct less_apvec_function : public binary_function&, const vector&, bool> { bool operator()(const vector& f, const vector& g) { return 1==less_apvec(f,g); } }; vector eiglist(const newform& f, int oldorder) { /* cout<<"Entering eiglist with f.aqlist="<2) { if(sign!=-1) cout<<"bplus = "<h1->extend_coords(bminus); tvec = nf->h1->contract_coords(bminusx); tvec /= denom; if (tvec!=bminus) { success=0; cout<<"! bminus="<h1->h1denom(); aqlist.resize(nf->npdivs); vector::iterator api=aplist.begin(), pi=nf->plist.begin(); vector::iterator aqi=aqlist.begin(); primevar pr; long q, i, j; long n = nf->modulus; while((api!=aplist.end())&&(aqi!=aqlist.end())) { q=pr.value(); pr++; if(::divides(q,n)) { *aqi++=*api; *api=(::divides(q*q,n)? 0: -*api); pi++; } api++; } if(aqi!=aqlist.end()) // compute missing aq { long piv; ssubspace espace; if(sign==-1) espace=make1d(bminus,piv); else espace=make1d(bplus,piv); piv*=denom; while(aqi!=aqlist.end()) // compute missing aq { q=*pi++; if(nf->verbose) cout<<"Computing Wq for q="<h1->s_heckeop_restricted(q,espace,1,0); long aq = Wq.elem(1,1) / piv; if(nf->verbose) cout<<"aq ="<verbose) cout<<"aqlist = "<npdivs); i++) sfe*=aqlist[i]; if(nf->verbose) cout<<"sfe = "<::iterator api=aplist.begin(); vector::iterator aqi=aqlist.begin(); primevar pr; long n = nf->modulus; while((api!=aplist.end())&&(aqi!=aqlist.end())) { if(::divides(pr.value(),n)) *api=*aqi++; api++; pr++; } } // After recovering eigenbases, we need to replace the ap for bad p void newform::refix_eigs() { vector::iterator api=aplist.begin(); primevar pr; long n = nf->modulus, np = nf->npdivs, ip=0, q; while((api!=aplist.end())&&(ip::const_iterator api=aplist.begin(); while(pr.value()!=nf->p0) {pr++; api++;} ap0=*api; np0 = 1 + (nf->p0) - ap0; if(nf->verbose) cout<<"ap0 = "<mvp)*bplus); dp0=pdot; // DO scale dp0 since it is used to compute L/P if(dp0!=0) { if(denomplus>1) { if(::divides(denomplus,dp0)) dp0/=denomplus; else cout<<"newform constructor error: dp0 not divisible by denomplus!" <verbose) { cout<<"pdot = "<h1->coord_vecs[i]; if(sign!=-1) coordsplus[i]=dotmodp(cvi,bplus,BIGPRIME); if(sign!=+1) coordsminus[i]=dotmodp(cvi,bminus,BIGPRIME); } if(sign!=+1) { denomminus=vecgcd(coordsminus)*cuspidalfactorminus; if(verbose>1) cout<<"coordsminus = "<1)) { if(sign!=-1) { cout<<"cuspidalfactorplus = "<2) cout<<"bplusc = "<degphi(bplusc,bminusc,type); if(nf->verbose) cout<<"done..."<verbose); if(verbose) cout<<"computing twisting primes (sign="<squarelevel) return; long n = nf->modulus; for (primevar lvar; lvar.ok() && (((sign!=-1)&&(mplus==0)) || ((sign!=+1)&&(mminus==0))); lvar++) { //cout << "Trying l = " << lvar << endl; while (n%lvar==0) {lvar++;} long l = lvar; //cout << "Trying l = " << l << endl; if (legendre(-n,l)!=sfe) continue; //cout << "Legendre condition passed... " << endl; if((sign!=-1)&&(mplus==0)&&(l%4==1)) { lplus = l; //cout << "Trying lplus = " << l << "\n"; map::const_iterator vi = nf->mvlplusvecs.find(l); if(vi==nf->mvlplusvecs.end()) mplus = abs((nf->mvlplusvecs[l]=nf->h1->manintwist(l))*bplus); else mplus = abs((vi->second)*bplus); if((denomplus>1)&&(mplus!=0)) { if(::divides(denomplus,mplus)) mplus/=denomplus; else cout<<"Warning in newform constructor: mplus not divisible by denomplus!" <::const_iterator vi = nf->mvlminusvecs.find(l); if(vi==nf->mvlminusvecs.end()) mminus = abs((nf->mvlminusvecs[l]=nf->h1->manintwist(l))*bminus); else mminus = abs((vi->second)*bminus); if((denomminus>1)&&(mminus!=0)) { if(::divides(denomminus,mminus)) mminus/=denomminus; else cout<<"Warning in newform constructor: mminus="<modulus; int found=0; vec v; for(d=2; !found; d++) { if(1==gcd(d,n)) { for(b=1; (bh1->chain(b,d).as_vec(); // cout<<"v="<h1->cuspidal)) v = nf->h1->cuspidalpart(v); if(sign!=-1) { dotplus=v*bplus; if(::divides(denomplus,dotplus)) dotplus/=denomplus; else cout<<"Warning in find_matrix: dotplus not divisible by denomplus!"<0 for integration if(verbose) { cout<<"done: "; cout << "[(" <=nap) return; int verbose=(nf->verbose); long piv, p, ap; // Do not make the espace right away, as it is possible that the // only ap we are missing are aq which we already have... ssubspace espace; int have_espace=0; primevar pr(nap,aplist.size()+1); while(aplist.size()modulus)) { if(::divides(p*p,nf->modulus)) ap=0; else ap=-aqlist[find(nf->plist.begin(),nf->plist.end(),p)-nf->plist.begin()]; } else { if(verbose>1) cout<<"Computing Tp for p="<h1->h1denom(); have_espace=1; } ap = (nf->h1->s_heckeop_restricted(p,espace,1,0)).elem(1,1) / piv; } aplist.push_back(ap); pr++; } if(verbose>1) cout<<"aplist = "<1)&&(modulus<130000)) // reorder into old order { if(verbose) cout<<"Reordering newforms into old order as N<130000"<1) { for(i=0; imaxnap) maxnap=nap; if(verbose) cout<<"Max number of ap in newforms so far is "<1 this MUST be re-called after any sorting of newforms make_projcoord(); // Look for a j0 such that nflist[i].bplus/bminus[j0]!=0 for all i, or a set of such j find_jlist(); } void newforms::find_jlist() { int i, j, ok=0; j0=0; for(j=1; (!ok)&&(j<=h1->h1dim()); j++) { ok=1; for (i=0; (i1) cout<<"j0="<nsymb; i++) { symb s = h1->symbol(i); cout< "; j=h1->coordindex[i]; int sg=::sign(j); j=abs(j); // cout<<"j="< * data = new vector[n1ds]; vector * aq = new vector[n1ds]; vector * ap = new vector[n1ds]; // read extra data for each newform for(i=0; imaninvector(p0); if(verbose) cout << "Making form_finder (nap="< > eigs(ncurves); int i,j; for(i=0; i * ap = new vector[n1ds]; for(i=0; i * aq = new vector[n1ds]; for(i=0; i * data = new vector[n1ds]; for(i=0; i> data[i][15]; // degphi // cout<<"degphi = "<> data[i][0]; // sfe // cout<<"sfe = "<> nloverp; // num(L/P) intdatafile >> dloverp; // den(L/P) intdatafile >> data[i][14]; // type // cout<<"type = "<> dp0; data[i][3]=dp0; // dp0 // cout<<"dp0 = "<> np0; data[i][2]=np0; // np0 // cout<<"np0 = "<maninvector(p0); if(verbose) cout << "Making form_finder (nap="< > eigs(n1ds); int i,j; unfix_eigs(); sort(); for(i=0; i1) cout<<"Reordering newforms after recovery"<1) {cout<<"Before sorting:\n"; display();} sort(int(modulus<130000)); // old order for N<130000, else new order if(verbose>1) {cout<<"After sorting:\n"; display();} } void newforms::merge() { if(n1ds==0) return; if(verbose) cout << "Making homspace..."<nsymb); bminus.init(h1->nsymb); int i,j; for(i=1; i<=h1->nsymb; i++) { j = h1plus->coordindex[i-1]; if (j==0) bplus[i] = 0; else if (j>0) bplus[i] = nflist[inf].coordsplus[j]; else if (j<0) bplus[i] = -nflist[inf].coordsplus[-j]; j = h1minus->coordindex[i-1]; if (j==0) bminus[i] = 0; else if (j>0) bminus[i] = nflist[inf].coordsminus[j]; else if (j<0) bminus[i] = -nflist[inf].coordsminus[-j]; } if(verbose) cout<< "done, about to contract bplus,bminus..."<contract_coords(bplus); bplus /= vecgcd(bplus); bminus = h1->contract_coords(bminus); bminus /= vecgcd(bminus); if(verbose) cout<< "done."<1) { cout << " new bplus = "<0) { imagej+=pcd.row(ind); return; } if(ind<0) { imagej-=pcd.row(-ind); return; } // cout<<"updated imagej (after using ind="< newforms::apvec(long p) // computes a[p] for each newform { //cout<<"In apvec with p = "< apv(n1ds); vec v; long i,j,iq,ap; if(::divides(p,modulus)) // we already have all the aq { if(::divides(p*p,modulus)) for (i=0; i images; // [j,v] stores image of j'th M-symbol in v // (so we don't compute any more than once) vec bas, imagej; long fac; long p2=(p-1)>>1; // (p-1)/2 long sl, sg, x1, x2, x3, y1, y2, y3, a, b, c, q, r; long u1,u2,u3; long ind; // Compute the image of the necessary M-symbols (hopefully only one) //cout<<"Computing images of M-symbols"<symbol(h1->freegens[j-1]); //cout<<" = "<projcoord; //cout<<"projcoord = "<coordindex[h1->index2(u,p*v)]; update(pcd,imagej,ind); // Matrix [p,0;0,1] ind = h1->coordindex[h1->index2(p*u,v)]; update(pcd,imagej,ind); // Other matrices for(sg=0; sg<2; sg++) // signs for(r=1; r<=p2; r++) { a = -p; b = sg ? -r : r ; u1=u*p; u2=v-u*b; ind = h1->coordindex[h1->index2(u1,u2)]; update(pcd,imagej,ind); while(b!=0) { c=mod(a,b); q=(a-c)/b; if(q==1) {u3= u2-u1;} else {u3=q*u2-u1;} a=-b; b=c; u1=u2; u2=u3; ind = h1->coordindex[h1->index2(u1,u2)]; update(pcd,imagej,ind); } } images[j]=imagej/(h1->h1denom()); //cout<<" image is "<maxap)||(-ap>maxap)) { cout<<"Error: eigenvalue "<1) // output the ap already known... for(primevar pr(nflist[0].aplist.size()); pr.ok(); pr++, j++) { p=(long)pr; if(ndivides(p,modulus)) cout<<"p="; else cout<<"q="; cout< apv=apvec(p); if(verbose>1) { if(ndivides(p,modulus)) cout<<"p="; else cout<<"q="; cout<nfprojchain(num(r),den(r),nflist[i].coordsplus), nflist[i].cuspidalfactorplus); } rational newforms::minus_modular_symbol(const rational& r, long i) const { return rational(h1->nfprojchain(num(r),den(r),nflist[i].coordsminus), nflist[i].cuspidalfactorminus); } pair newforms::full_modular_symbol(const rational& r, long i) const { mat m(h1->coord_vecs.size()-1,2); m.setcol(1,nflist[i].coordsplus); m.setcol(2,nflist[i].coordsminus); vec a = h1->projchain(num(r),den(r),m); rational a1(a[1],nflist[i].cuspidalfactorplus); rational a2(a[2],nflist[i].cuspidalfactorminus); return pair ( a1, a2 ); } // Attempt to compute and display the elliptic curve for each // newform; return a list of newform indices where this failed. vector newforms::showcurves(vector forms, int verbose) { if((verbose>1)&&(sqfac>1)) cout<<"c4 factor " << sqfac << endl; bigfloat rperiod; vector badcurves; // will hold the indices of forms for which we fail to find a curve vector::const_iterator inf; // will iterate through the forms to be used for(inf=forms.begin(); inf!=forms.end(); inf++) { if(verbose) cout<<"\n"<<"Form number "<<*inf+1<<"\n"; else cout<<(*inf+1)<<" "; newform* nfi = &(nflist[*inf]); Curve C = getcurve(*inf,-1,rperiod,verbose); Curvedata CD(C,1); // The 1 causes minimalization if(verbose) cout << "\nCurve = \t"; cout << (Curve)CD << "\t"; CurveRed CR(CD); cout << "N = " << getconductor(CR) << endl; if(verbose) cout< extern "C" void *__builtin_alloca(...); #elif defined(_AIX) #pragma alloca #else char *alloca (); #endif #include char* GetOpt::nextchar = 0; int GetOpt::first_nonopt = 0; int GetOpt::last_nonopt = 0; GetOpt::GetOpt (int argc, char **argv, const char *optstring) :opterr (1), nargc (argc), nargv (argv), noptstring (optstring) { /* Initialize the internal data when the first call is made. Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind = 1; optarg = nextchar = 0; /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') ordering = RETURN_IN_ORDER; else if (getenv ("_POSIX_OPTION_ORDER") != 0) ordering = REQUIRE_ORDER; else ordering = PERMUTE; } void GetOpt::exchange (char **argv) { int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *); char **temp = (char **) alloca (nonopts_size); /* Interchange the two blocks of data in argv. */ memcpy (temp, &argv[first_nonopt], nonopts_size); memcpy (&argv[first_nonopt], &argv[last_nonopt], (optind - last_nonopt) * sizeof (char *)); memcpy (&argv[first_nonopt + optind - last_nonopt], temp, nonopts_size); /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of theoption characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns `EOF'. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. A colon in OPTSTRING means that the previous character is an option that wants an argument. The argument is taken from the rest of the current ARGV-element, or from the following ARGV-element, and returned in `optarg'. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg'. If OPTSTRING starts with `-', it requests a different method of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER, above. */ int GetOpt::operator () (void) { if (nextchar == 0 || *nextchar == 0) { if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange (nargv); else if (last_nonopt != optind) first_nonopt = optind; /* Now skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < nargc && (nargv[optind][0] != '-' || nargv[optind][1] == 0)) optind++; last_nonopt = optind; } /* Special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != nargc && !strcmp (nargv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange (nargv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = nargc; optind = nargc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == nargc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return EOF; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (nargv[optind][0] != '-' || nargv[optind][1] == 0) { if (ordering == REQUIRE_ORDER) return EOF; optarg = nargv[optind++]; return 0; } /* We have found another option-ARGV-element. Start decoding its characters. */ nextchar = nargv[optind] + 1; } /* Look at and handle the next option-character. */ { char c = *nextchar++; char *temp = (char *) strchr (noptstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == 0) optind++; if (temp == 0 || c == ':') { if (opterr != 0) { if (c < 040 || c >= 0177) fprintf (stderr, "%s: unrecognized option, character code 0%o\n", nargv[0], c); else fprintf (stderr, "%s: unrecognized option `-%c'\n", nargv[0], c); } return '?'; } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != 0) { optarg = nextchar; optind++; } else optarg = 0; nextchar = 0; } else { /* This is an option that requires an argument. */ if (*nextchar != 0) { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == nargc) { if (opterr != 0) fprintf (stderr, "%s: no argument for `-%c' option\n", nargv[0], c); c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = nargv[optind++]; nextchar = 0; } } return c; } } eclib-2013-01-01/libsrc/moddata.cc0000644000175200017520000001035411774563612013315 00000000000000// FILE MODDATA.CC: Implementation of member functions for class moddata ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include level::level(long n, long neigs) { //cout<<"Creating a class level with n = " << n << endl; modulus=n; plist=pdivs(n); npdivs=plist.size(); dlist=posdivs(n); ndivs=dlist.size(); nap=neigs; primelist=plist; primevar pr; long p; p0=0; while(primelist.size()<(unsigned)nap) { p=pr; if (ndivides(p,modulus)) { if(p0==0) p0=p; primelist.push_back(p); } pr++; } sqfac=1; for(long ip=0; ip0) {dstarts.reserve(ndivs);} } void moddata::display() const { cout << "Level = " << modulus << "\n"; cout << "Number of symbols = " << nsymb << "\n"; cout << ndivs << " non-trivial divisors: " << dlist << endl; cout << npdivs << " prime divisors: " << plist << endl; cout << "invlist: " << invlist << endl; cout << "noninvlist: " << noninvlist << endl; cout << "noninvdlist: " << noninvdlist << endl; cout << "gcdtable: " << gcdtable << endl; cout << "unitdivlist: " << unitdivlist << endl; } string nf_filename(long n, char c) { stringstream s; s << getenv("NF_DIR"); if (s.str().empty()) {s.clear(); s<<"./newforms";} s << "/" << c << n; return s.str(); } eclib-2013-01-01/libsrc/curvered.cc0000644000175200017520000006557511774563612013542 00000000000000// curvered.cc -- implementation of CurveRed class etc. ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include // for nrootscubic #include // for point counting to get ap #include ostream& operator<<(ostream& os, const Kodaira_code& c) { int code=c.code; switch (code%10){ case 0: os<<"I"<<((code)/10); break; case 1: os<<"I*"<<((code - 1)/10); break; case 2: os<<"II "; break; case 3: os<<"III "; break; case 4: os<<"IV "; break; case 5: os<<"IV* "; break; case 6: os<<"III* "; break; case 7: os<<"II* "; break; default: os<<"???? "; break; }; return os; } // // Tate's algorithm -- constructor function for a CurveRed // // subroutines -- not general purpose (.cc only) bigint root(const bigint& aa, int e, const bigint & p) // the e'th root of aa, mod p { bigint i, ans, temp; int found=0; const bigint& a = mod(aa, p); for (i = 1; (! found); ++i) {ans = i; if (e==2) temp = ans*ans - a; else temp = ans*ans*ans - a; found = div(p, temp); } // bigint ans; // int found = 0; // bigint a = aa % p; // for ( ans = 1; (ans<=p) && (! found); ++ans) // found = div(p, pow(ans,e) - a); //N.B. pow(0,p) causes problems. return ans; } // test if quadratic aX^2 + bX + c = 0 (mod p) has roots int rootsexist(const bigint& aa, const bigint& bb, const bigint& cc, const bigint& p) { const bigint& a = aa % p; const bigint& b = bb % p; const bigint& c = cc % p; const bigint& temp = (a*b*c)%p; if (even(p)) return sign(temp)==0; if (sign(a)==0) return 1; const bigint& d = b*b - 4*a*c; return legendre(d, p) >= 0; //ie true if legendre(d,p)=0,1 } //monic version int rootsexist(const bigint& bb, const bigint& cc, const bigint& p) { static bigint one; one=1; return rootsexist(one,bb,cc,p); } CurveRed::~CurveRed() { } CurveRed::CurveRed(const CurveRed& E) : Curvedata(E), N(E.N) { factor_discr(); // will only do anything if not already factored reduct_array = E.reduct_array; } void CurveRed::operator=(const CurveRed& E) { if(this==&E) return; a1=E.a1;a2=E.a2;a3=E.a3;a4=E.a4;a6=E.a6;b2=E.b2;b4=E.b4;b6=E.b6;b8=E.b8; c4=E.c4;c6=E.c6;discr=E.discr;minimal_flag=1; discr_factored=E.discr_factored; the_bad_primes=E.the_bad_primes; conncomp=E.conncomp; ntorsion=E.ntorsion; reduct_array = E.reduct_array; N=E.N; } CurveRed::CurveRed(const Curvedata& E) : Curvedata(E, 1) //minimalize in constructor { // constructor stuff N=1; if (discr==0) {N = 0; return; } factor_discr(); // will only do anything if not already factored // local variables Curvedata C(*this); bigint p, halfmodp, temp, r, s, t, b, c, bb, cc, bc, d, w, x, mx, my, a2t, a3t, a4t, a6t, zero; int ord_p_discr, ord_p_j, c_p=1, pdiv2, pdiv3, sw, loop, ix, iy; zero=0; // main loop - for each of the prime divisors of the discriminant. // Because the curve is minimal, Tate's algorithm reduce-loop is not needed //cout<<"Running Tate's algorithm"<::const_iterator pi= the_bad_primes.begin(); while(pi!=the_bad_primes.end()) { p = *pi++; ord_p_discr = val(p,discr); ord_p_j = ord_p_discr - 3*val(p,c4); if (ord_p_j < 0) ord_p_j = 0; halfmodp = (p+1) >>1; pdiv2 = even(p); pdiv3 = (p==3); //change coords so that p|C.a3,C.a4,C.a6 if ( pdiv2 ) { if ( div(p,C.b2) ) { r = root(C.a4,2,p); t = root(((r+C.a2)*r+C.a4)*r+C.a6,2,p); } else { temp=invmod(C.a1,p); r = temp*C.a3; t = temp*(C.a4 + r*r); } } else if ( pdiv3 ) { if ( div(p,C.b2) ) r = root(-C.b6,3,p); else r = -invmod(C.b2,p)*C.b4; t = C.a1*r + C.a3; } else { if ( div(p,c4) ) r = -invmod(BIGINT(12),p)*C.b2; else r = -invmod(12*c4,p)*(c6+C.b2*c4); t = -halfmodp*(C.a1*r+C.a3); } r = mod(r,p); t = mod(t,p); C.transform(r,zero,t); // test for Types In, II, III, IV if ( ndiv(p,c4) ) {temp=-C.a2; if (rootsexist(C.a1,temp,p) ) c_p = ord_p_discr; else { if ( odd(ord_p_discr) ) c_p = 1; else c_p = 2; } reduct_array[p] = Reduction_type (ord_p_discr, 1, ord_p_j, 10*ord_p_discr, c_p); continue; } // Type In (n=ord_p_discr) else if ( val(p,C.a6) < 2 ) {reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr, ord_p_j, 2, 1); continue; } // Type II else if ( val(p,C.b8) < 3 ) {reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - 1, ord_p_j, 3, 2); continue; } // Type III else if ( val(p,C.b6) < 3 ) {temp = -(C.a6/p)/p; bigint temp2 = C.a3/p; if ( rootsexist(temp2,temp,p) ) c_p = 3; else c_p = 1; reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - 2, ord_p_j, 4, c_p); continue; } // Type IV // else change coords so that p|C.a1,C.a2, p^2|C.a3,C.a4, p^3|C.a6 if ( pdiv2 ) { s = root(C.a2,2,p); t = p*root((C.a6/p)/p,2,p); } else if ( pdiv3 ) { s = C.a1; t = C.a3; } else { s = -C.a1*halfmodp; t = -C.a3*halfmodp; } C.transform(zero,s,t); // 3 2 // Analyse roots of the cubic T + bT + cT + d = 0, where // b=C.a2/p, c=(C.a4/p)/p, d=((C.a6/p)/p)/p b=C.a2/p; c=(C.a4/p)/p; d=((C.a6/p)/p)/p; bb=b*b; cc=c*c; bc=b*c; w = 27*d*d - bb*cc + 4*b*bb*d - 18*bc*d + 4*c*cc; x = 3*c - bb; if ( div(p,w) ) {if ( div(p,x) ) sw = 3; else sw = 2; } else sw = 1; //cout << "Analysing roots of cubic; case " << sw << endl; switch ( sw ) { case 1: //Three distinct roots - Type I*0 reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - 4, ord_p_j, 1, 1+nrootscubic(b,c,d,p) ); break; case 2: // One double root - Type I*m for some m // Change coords so that the double root is T=0 mod p if ( pdiv2 ) r = root(c,2,p); else if ( pdiv3 ) r = c*invmod(b,p); else r = (bc - 9*d)*invmod(2*x,p); r = p * mod(r,p); C.transform(r,zero,zero); ix = 3; iy = 3; mx = p*p; my = p*p; loop = 1; while (loop) { a2t = C.a2/p; a3t = C.a3/my; a4t = (C.a4/p)/mx; a6t = (C.a6/mx)/my; temp = a3t*a3t + 4*a6t; if ( div(p,temp ) ) {if ( pdiv2 ) t = my*root(a6t,2,p); else t = my*mod(-a3t*halfmodp, p); C.transform(zero,zero,t); my = my*p; iy++; a2t = C.a2/p; a3t = C.a3/my; a4t = (C.a4/p)/mx; a6t = (C.a6/mx)/my; temp = a4t*a4t - 4*a6t*a2t; if ( div(p,temp) ) {if ( pdiv2 ) r = mx*root( a6t*invmod(a2t,p), 2, p); else r = mx*mod( -a4t*invmod(2*a2t,p), p); C.transform(r,zero,zero); mx = mx*p; ix++; // and stay in loop } else {if ( rootsexist(a2t,a4t,a6t,p) ) c_p = 4; else c_p = 2; loop = 0; } // and exit loop } else { temp = -a6t; if ( rootsexist(a3t,temp,p) ) c_p = 4; else c_p = 2; loop = 0; } } reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - ix - iy + 1, ord_p_j, 10 * (ix + iy) - 49, c_p ); break; // Type I*m case 3: // Triple root // change coords so that T=0 mod p if ( pdiv2 ) r = b; else if ( pdiv3 ) r = root(-d,3,p); else r = -b*invmod(BIGINT(3),p); r = p*mod(r,p); C.transform(r,zero,zero); a3t = (C.a3/p)/p; a6t = (((C.a6/p)/p)/p)/p; // test for Type IV* temp = a3t*a3t + 4*a6t; if ( ndiv(p,temp ) ) { temp = -a6t; if ( rootsexist(a3t,temp,p) ) c_p = 3; else c_p = 1; reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - 6, ord_p_j, 5, c_p); break; } // change coords so that p^3|C.a3, p^5|C.a6 if ( pdiv2 ) t = -p*p*root(a6t,2,p); else t = p*p*mod(-a3t*halfmodp, p); C.transform(zero,zero,t); // test for types III*, II* if ( val(p,C.a4) < 4 ) {reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - 7, ord_p_j, 6, 2); break; } // Type III* else if ( val(p,C.a6) < 6 ) {reduct_array[p] = Reduction_type (ord_p_discr, ord_p_discr - 8, ord_p_j, 7, 1); break; } // Type II* else cout<<" ## Tate's algorithm reached end of loop !!!"<::const_iterator ri; for(ri = reduct_array.begin(); ri!=reduct_array.end(); ri++) { N *= pow((ri->first), (ri->second).ord_p_N); } return; } // end of Tate's algorithm // CurveRed member access friend functions: // NB If p is not a bad prime this will not cause an error, but will // return the appropriate result for a good prime. We do have to // check that p is a valid key in the reduct_array map first, // otherwise we would cause inclusion of a new entry in that map, // which is impossible without removing the "const" qualifier from the // CurveRed argument! int getord_p_discr(const CurveRed& c, const bigint& p) { map::const_iterator ri = c.reduct_array.find(p); if(ri==c.reduct_array.end()) return 0; return (ri->second).ord_p_discr; } int getord_p_N(const CurveRed& c, const bigint& p) { map::const_iterator ri = c.reduct_array.find(p); if(ri==c.reduct_array.end()) return 0; return (ri->second).ord_p_N; } int getord_p_j_denom(const CurveRed& c, const bigint& p) { map::const_iterator ri = c.reduct_array.find(p); if(ri==c.reduct_array.end()) return 0; return (ri->second).ord_p_j_denom; } int getc_p(const CurveRed& c, const bigint& p) { map::const_iterator ri = c.reduct_array.find(p); if(ri==c.reduct_array.end()) return 1; return (ri->second).c_p; } int prodcp(const CurveRed& c) { int ans=1; map::const_iterator ri; for(ri = c.reduct_array.begin(); ri!=c.reduct_array.end(); ri++) { ans *= (ri->second).c_p; } return ans; } Kodaira_code getKodaira_code(const CurveRed& c, const bigint& p) { map::const_iterator ri = c.reduct_array.find(p); if(ri==c.reduct_array.end()) return Kodaira_code(); return (ri->second).Kcode; } void CurveRed::output(ostream& os) const { Curvedata::output(os); if(isnull()) return; os << "Conductor = " << N << endl; } ostream& operator<<(ostream& os, const Reduction_type& R) { os << R.ord_p_discr << "\t"; os << R.ord_p_N << "\t"; os << R.ord_p_j_denom <<"\t"; os << R.Kcode << "\t"; os << R.c_p << "\t"; os << R.local_root_number; return os; } void CurveRed::display(ostream& os) { CurveRed::output(os); if(isnull()) return; os << "Global Root Number = " << GlobalRootNumber(*this) << endl; os << "Reduction type at bad primes:\n"; os <<"p\tord(d)\tord(N)\tord(j)\tKodaira\tc_p\troot_number\n"; map::const_iterator ri; for(ri = reduct_array.begin(); ri!=reduct_array.end(); ri++) { if((ri->second).local_root_number==0) setLocalRootNumber(ri->first); os << (ri->first) << "\t" << (ri->second) << endl; } } // Sign of functional equation for an elliptic curve over Q // // Taken partly from Odile Lecacheux's GP code, partly translated by // JEC from the pari C code in elliptic.c from pari-2.1.3 // // For the theory, see // // Halberstadt, Emmanuel. Signes locaux des courbes elliptiques en 2 et 3. // (French) [Local root numbers of elliptic curves for $p=2$ or $3$] // C. R. Acad. Sci. Paris Sér. I Math. 326 (1998), no. 9, 1047--1052. // // The following functions return local and global root numbers, just // looking up the local numbers from the // Reduction_type::local_root_number field, computing them if not // already set (i.e. field contains 0) int LocalRootNumber(CurveRed& c, const bigint& p) { if(is_zero(p)) return -1; // the infinite prime map::const_iterator ri = c.reduct_array.find(p); if(ri==c.reduct_array.end()) return 1; // good reduction case if((ri->second).local_root_number==0) c.setLocalRootNumber(p); return (ri->second).local_root_number; } int GlobalRootNumber(CurveRed& c) { int ans=-1; map::const_iterator ri; for(ri = c.reduct_array.begin(); ri!=c.reduct_array.end(); ri++) { if((ri->second).local_root_number==0) c.setLocalRootNumber(ri->first); ans *= (ri->second).local_root_number; } return ans; } int kro(const bigint& d, const bigint& n); int kro(const bigint& d, long n); int kro(long d, long n); int kro_m1(long x); // kronecker(-1,x) with x>0 odd int kro_p2(long x); // kronecker(2,x) with x>0 odd int kro_m2(long x); // kronecker(-2,x) with x>0 odd int kro_3(long x); // kronecker(x,3) // sets the "local root number" or local factor at 2 to +/-1 void CurveRed::setLocalRootNumber2() { static const bigint two = BIGINT(2); map::iterator ri = reduct_array.find(two); if(ri==reduct_array.end()) return; Reduction_type& info = ri->second; int kod = PariKodairaCode(info.Kcode); int n2 = neron(2,kod); #ifdef DEBUG_ESIGN cout<<"\nIn LocalRootNumber2(), n2 = "<::iterator ri = reduct_array.find(three); if(ri==reduct_array.end()) return; Reduction_type& info = ri->second; int kod = PariKodairaCode(info.Kcode); int n2 = neron(3,kod); #ifdef DEBUG_ESIGN cout<<"\nIn LocalRootNumber3()..."<::iterator ri = reduct_array.find(p); if(ri==reduct_array.end()) return; Reduction_type& info = ri->second; if (info.ord_p_N == 1) { info.local_root_number = -kro(-c6,p); return; } long sp=posmod(p,24); if (info.ord_p_j_denom >0) { info.local_root_number = kro_m1(sp); return; } long ep=12 / gcd(12,info.ord_p_discr); if(ep==4) { info.local_root_number = kro_m2(sp); return; } if(odd(ep)) { info.local_root_number = kro_3(sp); return; } info.local_root_number = kro_m1(sp); } // Given a prime p, sets to +1 or -1, the "local root number" or local // factor in the sign of the functional equation of L(E,s). // // This function just delegates to subsidiary ones for the cases // p=2, p=3, and p>=5. // void CurveRed::setLocalRootNumber(const bigint& p) { if (is_zero(p)) return; if (p==2) setLocalRootNumber2(); else if (p==3) setLocalRootNumber3(); else setLocalRootNumber_not_2_or_3(p); } int kro(const bigint& d, const bigint& n) { #ifdef DEBUG_ESIGN cout<<"kro("<0 odd { static int kro_m1_tab[4] = {0,1,0,-1}; #ifdef DEBUG_ESIGN if (!((x>0)&&(odd(x)))) { cout<<"kro_m1() called with x="<0 odd { static int kro_p2_tab[8] = {0,1,0,-1,0,-1,0,1}; #ifdef DEBUG_ESIGN if (!((x>0)&&(odd(x)))) { cout<<"kro_p2() called with x="<0 odd { static int kro_m2_tab[8] = {0,1,0,1,0,-1,0,-1}; #ifdef DEBUG_ESIGN if (!((x>0)&&(odd(x)))) { cout<<"kro_m2() called with x="<0)) { cout<<"kro_3() called with x="<4) ans = code-9; else ans=code; #ifdef DEBUG_ESIGN cout<<"PariKodairaCode("<=2) return zero; if(f==1) return BIGINT(-LocalRootNumber(c,p)); int x,a,b,d; bigint n=zero; if(p==two) // curvemodq class only in characteristic > 3 { // Count points naively // y^2+(a1*x+a3)*y-(x^3+a2*x^2+a4*x+a6) = y^2+ay+b int a1=bigint_mod_long(c.a1,2), a2=bigint_mod_long(c.a2,2), a3=bigint_mod_long(c.a3,2), a4=bigint_mod_long(c.a4,2), a6=bigint_mod_long(c.a6,2); // x=0: a = odd(a3); // 1 if odd else 0 b = odd(a6); n += (a?(b?0:2):1); // x=1: a = odd(a1+a3); b = odd(1+a2+a4+a6); n += (a?(b?0:2):1); return two-n; } if(p==three) // curvemodq class only in characteristic > 3 { // Count points naively // y^2+(a1*x+a3)*y-(x^3+a2*x^2+a4*x+a6) = y^2+ay+b int a1=bigint_mod_long(c.a1,3), a2=bigint_mod_long(c.a2,3), a3=bigint_mod_long(c.a3,3), a4=bigint_mod_long(c.a4,3), a6=bigint_mod_long(c.a6,3); for(x=-1; x<2; x++) { a = (((x+a2)*x+a4)*x+a6)%3; b = (a1*x+a3)%3; d = (b*b+a)%3; if(d==2)d=-1; if(d==-2)d=1; n += (d+1); } return three-n; } curvemodq Cq = reduce_curve(c,p); n = Cq.group_order(); bigint ans = one+p-n; return ans; } eclib-2013-01-01/libsrc/sqfdiv.cc0000644000175200017520000001322511774563612013200 00000000000000// sqfdiv.cc : implementation of class sqfdiv for managing square-free divisors ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include //#define DEBUG sqfdiv::sqfdiv(const bigint& dd, int posd, vector* plist) :primebase(plist), np(0), positive(posd), factor(0) { d=1; bigint p; for(unsigned long i=0; isize(); i++) if(p=(*primebase)[i],div(p,dd)) {d*=p; np++;} maxnsub=2<size(); (i>0)&&(!valp); i--) { p=(*primebase)[i-1]; if(div(p,d)) {valp=val(p,e); newpiv=i-1;} } // now if valp!=0, p|d and p|e to an odd power if(valp) {d/=p; np--; factor++; pivs[ngens++]=newpiv;} else if((e<0)&& !positive) {positive=1; factor++; pivs[ngens++]=-1;} //else e is square over the support of d so should have returned earlier! #ifdef DEBUG cout << "New gens: " << vector(gens.begin(),gens.begin()+ngens) << endl; cout << "New pivs: " << vector(pivs.begin(),pivs.begin()+ngens) << endl; cout << "New subgroup: " << vector(subgp.begin(),subgp.begin()+nsub) << endl; #endif } vector sqfdiv::getdivs() const { long nd=1<getai(A1,A2,A3,A4,A6); // coordinates of P const bigint& X1 = X ; const bigint& Y1 = Y ; const bigint& Z1 = Z ; // coordinates of Q const bigint& X2 = Q.X ; const bigint& Y2 = Q.Y ; const bigint& Z2 = Q.Z ; const bigint& Z12 = Z1 * Z2 ; const bigint& L = - Y2 * Z1 + Y1 * Z2 ; /* lambda */ const bigint& M = - X2 * Z1 + X1 * Z2 ; /* mu */ const bigint& N = - Y1 * X2 + Y2 * X1 ; /* nu */ const bigint& Mz = M * M * Z12 ; const bigint& t = L * L * Z12 + M * ( A1 * L * Z12 - M * (A2 * Z12 + X1 * Z2 + X2 * Z1 ) ) ; const bigint& newX = M * t ; const bigint& newY = - ( t * (L + A1 * M) + Mz * (N + A3 * M )) ; const bigint& newZ = M * Mz ; ans.init(E, newX, newY, newZ); return ans; } Point Point::operator-(const Point& Q) const // P - Q { Point ans = (-Q) ; ans += (*this); return ans; } Point Point::twice(void) const // doubles P { // do trivial cases Point ans(E); if( Z==0) return ans; bigint A1,A2,A3,A4,A6; E->getai(A1,A2,A3,A4,A6); Point minusthis = -(*this); if(eq(*this,minusthis)) return ans; // order 2 const bigint& Zsq = Z * Z ; const bigint& L = 3 * X * X + 2 * A2 * X * Z + A4 * Zsq - A1 * Y * Z ; const bigint& M = 2 * Y + A1 * X + A3 * Z ; const bigint& Mz = M * Z ; const bigint& N = - X * X * X -A3 * Y * Zsq + A4 * X *Zsq + 2 * A6 * Z *Zsq ; const bigint& t = L * L + Mz * ( A1 * L - M * ( A2 * Z + 2 * X ) ); const bigint& newX = t * Mz ; const bigint& newY = - ( L * t + Mz * ( A1 * t+ M * ( N + A3 * Mz * Z) ) ); const bigint& newZ = Mz * Mz * Mz; ans.init(E, newX, newY, newZ) ; return ans; } Point Point::operator-(void) const // -Q { Point negation(*this); negation.Y = -Y - (E->a3)*Z - (E->a1)*X; return negation; } // calculates nP Point operator*(int n, const Point& P) { Point ans(*(P.E)); if(P.iszero() || n == 0) return ans; int negative = (n < 0) ; if(negative) n = - n ; if(n == 1) { ans = P; if(negative) ans = -P; return ans ; } // now n >= 2 if(n == 2){ ans = P.twice() ; if(negative) ans = -ans; return ans ; } // now n >= 3 if(n&1) ans = P ; // else ans is ZERO Point Q = P ; while(n > 1){ Q = Q.twice() ; // 2^k P n /= 2 ; if(n&1) ans = ans + Q ; } if(negative) ans = -ans ; return ans ; } int order(Point& p) { // ASSUME that point is valid; check before calling if unknown if (p.ord) {return p.ord;} bigint eight, z=getZ(p); eight=8; if (is_zero(z)) {p.ord = 1; return 1; } if (z>eight) {p.ord =-1; return -1;} Point q = p; long ord=1; while ( (sign(z)!=0) && (z<=eight) ) // (worst denom of a torsion point) {ord++; q+=p; z = getZ(q); } if (sign(z)!=0) ord = -1; p.ord = ord; return ord; } int order(Point& p, vector& multiples) { #ifdef DEBUG_TORSION cout<<"In order() with p = "<getai(A1,A2,A3,A4,A6); const bigint& Lhs = Y*Z*(Y + A1*X + A3*Z) ; const bigint& Rhs = A6*pow(Z,3) + X*(A4*Z*Z + X*(A2*Z + X)) ; return Lhs == Rhs ; } } // Find all points with a given rational x-coordinate: vector points_from_x(Curvedata &E, const bigrational& x) { // cout<<"Trying to construct points with x="< ans; bigint xn = num(x), xd2=den(x), xd, xd4, s, t, yn; // cout<<"xd2 = "< ans = torsion_points(*this); ntorsion = ans.size(); #ifdef DEBUG_TORSION cout<<"torsion_points() returns "< two_torsion(Curvedata& E) { #ifdef DEBUG_TORSION cout<<"\nIn two_torsion() with curve "<<(Curve)E<<"\n"; #endif bigint a1, a2, a3, a4, a6, b2, b4, b6, b8; E.getai(a1,a2,a3,a4,a6); E.getbi(b2,b4,b6,b8); int scaled=0; if (odd(a1) || odd(a3)) { b4*=BIGINT(8); b6*=BIGINT(16); scaled=1; } else { b2=a2; b4=a4; b6=a6; } vector xlist = Introotscubic(b2,b4,b6); int n, n2tors = xlist.size(); // If there are 3 points of order 2, we order them for consistency: if(n2tors==3) sort(xlist.begin(),xlist.end()); vector two_tors; two_tors.push_back(Point(E)) ; // zero point for(n=0; n three_torsion_x(Curvedata& E) { #ifdef DEBUG_TORSION cout<<"\nIn three_torsion_x() with curve "<<(Curve)E<<"\n"; #endif bigint b2, b4, b6, b8; E.getbi(b2,b4,b6,b8); vector xlist = Introotsquartic(b2,9*b4,27*b6,27*b8); // NB The implementation of Introosquartic() in marith.cc does not // fix the order of the roots, which depends on the order of the // factors in NTL's Z[X] factorization routine. HENCE the order of // the 3-torsion point x-coordinates (when there are two) is not // well-defined without the sorting done here. #ifdef DEBUG_TORSION cout<<"\nthree_torsion_x() finds unsorted xlist = "< three_torsion(Curvedata& E) { #ifdef DEBUG_TORSION cout<<"\nIn three_torsion() with curve "<<(Curve)E<<"\n"; #endif bigint a1, a2, a3, a4, a6, b2, b4, b6, b8, xi, d, rd; E.getai(a1,a2,a3,a4,a6); E.getbi(b2,b4,b6,b8); vector xlist = three_torsion_x(E); vector three_tors; three_tors.push_back(Point(E)) ; // zero point for(unsigned int n=0; n torsion_points(Curvedata& E) // After Darrin Doud, adapted by JC { if ( E.isnull() ) return vector(0); // // table[i][] contains a list of possible maximal orders for a point, // given that the 2-torsion subgroup has order i // static long table[5][5] = {{},{5,7,9,3},{12,6,8,4,10},{},{8,6,4}}; static long nt[5] = {0,4,5,0,3}; #ifdef DEBUG_TORSION cout<<"\nIn torsion_points() with curve "<<(Curve)E<<"\n"; #endif bigint a1,a2,a3,a4,a6,sa2,sa4,sa6, x, y ; E.getai(a1,a2,a3,a4,a6); bigfloat ra1=I2bigfloat(a1), ra2=I2bigfloat(a2), ra3=I2bigfloat(a3); long i,j,ntp=1,nt2; vector points; vector cycle; Cperiods per(E); bigcomplex w1,w2,z,z2; per.getwRI(w1,w2); z2=w2/to_bigfloat(2); int ncc = getconncomp(E); int found; #ifdef DEBUG_TORSION cout<<"Periods: "< two_tors = two_torsion(E); nt2=two_tors.size(); #ifdef DEBUG_TORSION cout<<"Size of 2-torsion subgroup = " << nt2 << endl; cout << two_tors << endl; #endif for(i=0, found=0; (i p3 = three_torsion(E); if(p3.size()>1) {p=p3[1];} } else { z=w1/to_bigfloat(ni); p = make_tor_pt(E,per,ra1,ra2,ra3,z); } #ifdef DEBUG_TORSION cout<<"p = " << p <<"?\n"; #endif found=(p.isvalid())&&(order(p,cycle)==ni); if(!found&&(ncc==2)&&even(ni)) { p = make_tor_pt(E,per,ra1,ra2,ra3,z+z2); #ifdef DEBUG_TORSION cout<<"p = " << p <<"?\n"; #endif found=(p.isvalid())&&(order(p,cycle)==ni); if(!found&&((ni%4)==2)) { p = make_tor_pt(E,per,ra1,ra2,ra3,z+z+z2); #ifdef DEBUG_TORSION cout<<"p = " << p <<"?\n"; #endif found=(p.isvalid())&&(order(p,cycle)==ni); } } if(found) { ntp=ni; points=cycle; #ifdef DEBUG_TORSION cout<<"Found a point " << p << " of order " << ni << endl; cout<<"generating subgroup "< old_torsion_points(Curvedata& E) { if ( E.isnull() ) return vector(0); bigint a1,a2,a3,a4,a6,sa2,sa4,sa6, d, x, y ; E.getai(a1,a2,a3,a4,a6); long i,nroots,ntp; int scaled_flag; vector points; ntp = 1; points.push_back(Point(E)) ; // zero point if ( (sign(a1)==0) && (sign(a3)==0) ) {sa2=a2; sa4=a4; sa6=a6; scaled_flag=0; } else {sa2 = a1*a1 + 4*a2; sa4 = 8*a1*a3 + 16*a4; sa6 = 16*a3*a3 + 64*a6; scaled_flag=1; } d = sa2*sa2*(sa4*sa4 - 4*sa2*sa6) + 18*sa2*sa4*sa6 - 4*sa4*sa4*sa4 - 27*sa6*sa6; Point p; // First test y=0 for points of order 2: vector xlist = Introotscubic(sa2, sa4, sa6); nroots = xlist.size(); for (i=0; i possible_y( sqdivs(d) ); vector::iterator yvar=possible_y.begin(); while( yvar!=possible_y.end()) { y = *yvar++; xlist = Introotscubic(sa2, sa4, sa6-y*y); nroots = xlist.size(); for (i=0; i 0) { points.push_back(p); points.push_back(-p); // N.B. order>2 here! } } } return points; } // end of file: points.cc eclib-2013-01-01/libsrc/smatrix.cc0000644000175200017520000000313111774563612013366 00000000000000// smatrix.cc: implementation of class smat (sparse integer matrices) ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Original version by Luiz Figueiredo #include #include #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #include "smat.cc" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #include "smat.cc" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat eclib-2013-01-01/libsrc/matrix.cc0000644000175200017520000000277212071067052013201 00000000000000// matrix.cc: manage implementation of integer matrix classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #undef scalar #undef vec #undef mat #undef subspace #undef SCALAR_OPTION #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define SCALAR_OPTION 1 #include "mat.cc" #undef scalar #undef vec #undef mat #undef subspace #undef SCALAR_OPTION #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define SCALAR_OPTION 2 #include "mat.cc" #undef scalar #undef vec #undef mat #undef subspace #undef SCALAR_OPTION eclib-2013-01-01/libsrc/homspace.cc0000644000175200017520000012123711774563612013506 00000000000000// FILE HOMSPACE.CC: Implemention of class homspace ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #define USE_SMATS // Warning: no longer testing without this switched on! #include #include #include #include #include #ifdef USE_SMATS #include #endif const string W_opname("W"); const string T_opname("T"); matop::matop(long a, long b, long c, long d) { mats.push_back(mat22(a,b,c,d)); } matop::matop(long p, long n) { if (p==n) { mats.push_back(mat22(0,-1,n,0)); return; } if ((n%p)==0) // W involution, 1 term { long u,v,a,b; for (u=1, v=n; v%p==0; v/=p, u*=p) ; bezout(u,v,a,b); mats.push_back(mat22(u*a,-b,n,u)); return; } // else Hecke operator, p+1 terms { mats.resize(p+1); long j, p2 = p>>1; for (j=0; j1) // cout << "Relation: " << rel[0]<<" "<1) cout << "gens["<1) cout << "Relation: " << rel[0]<<" "<1) cout << "gens["<1) { cout << "gens = "; for (i=1; i<=ngens; i++) cout << gens[i] << " "; cout << "\n"; cout << "coordindex = "; for (i=0; i1) cout << "Relation: " << rel[0]<<" "< "; for (j=0; j<3; j++) {ij = rel[j]; check[ij] = 1; if (plusflag) check[rof(ij)] = 1; fix = coordindex[ij]; #ifdef USE_SMATS if(fix) newrel.add(abs(fix),(fix>0?1:-1)); #else if (verbose>1) cout << fix << " "; if (fix!=0) newrel[abs(fix)] += sign(fix); #endif } #ifdef USE_SMATS if(verbose>1) cout<1) cout<<"\n"; #endif #ifdef USE_SMATS if(newrel.size()!=0) { numrel++; make_primitive(newrel); if(numrel<=maxnumrel) relmat.setrow(numrel,newrel); else cout<<"Too many 3-term relations (numrel="<1) cout << newrel << "\n"; long h = vecgcd(newrel); if (h!=0) { if (h>1) newrel/=h; if(numrel1) cout << "relmat = " << relmat.as_mat().slice(numrel,ngens) << endl; cout << "Computing kernel..."<0) { for (i=0; i1) { cout << "freegens: "; for (i=0; i::const_iterator d,p; for(d=(dlist).begin();d!=(dlist).end();d++) { dd = *d; nc = ::gcd(dd,modulus/dd); for(p=plist.begin();p!=plist.end();p++) // computing phi(dd) { pp = *p; if ((nc%pp)==0) nc = nc*(pp-1)/pp; } maxncusps += nc; } if (verbose) cout << "Number of cusps is "<-3; j-=2) { rational c = (j==1 ? m.beta() : m.alpha()); if (plusflag==-1) k = cusps.index_1(c); //adds automatically if new, ignores if [c]=[-c] else k = cusps.index(c); //adds automatically if new } } ncusps=cusps.count(); if(verbose) { cout << "ncusps = " << ncusps << endl; if(verbose>1) {cusps.display(); cout<-3; j-=2) { rational c = (j==1 ? m.beta() : m.alpha()); if (plusflag==-1) k = cusps.index_1(c); else k = cusps.index(c); if (k>0) deltamat(k,i+1) += j; if (k<0) deltamat(-k,i+1) -= j; } } if (verbose) { cout << "delta matrix done: size "<1) cout<<"deltamat = "<1) { cout<<"tkernbas = "<0) { if (verbose>1) cout << "Freemods:\n"; for (i=0; i1) { cout << i << ": " << freemods[i]; if (!needed[i]) cout << " (not needed)"; cout << "\n"; } } if ((verbose>1)&&cuspidal) { cout << "Basis of ker(delta):\n"; cout << kern.bas().as_mat()<0) ans[i] = v*coord_vecs[j]; else if (j<0) ans[i] = -v*coord_vecs[-j]; } // cout<<"returning "<0) return coord_vecs[i]; if (i<0) return -coord_vecs[-i]; return svec(rk); } void homspace::add_chain(svec& v, const symb& s) const { long i= coordindex[index(s)]; if (i>0) {v+=coord_vecs[i]; return;} if (i<0) {v-=coord_vecs[-i]; return;} } vec homspace::projchaincd(long c, long d, const mat& m) const { long i= coordindex[index2(c,d)]; if (i>0) return m.row(i); if (i<0) return -m.row(-i); return vec(ncols(m)); } long homspace::nfprojchaincd(long c, long d, const vec& bas) const { long i= coordindex[index2(c,d)]; if (i>0) return bas[i]; if (i<0) return -bas[-i]; return 0; } svec homspace::chaincd(long c, long d) const { long i= coordindex[index2(c,d)]; if (i>0) return coord_vecs[i]; if (i<0) return -coord_vecs[-i]; return svec(rk); } void homspace::add_projchaincd(vec& v, long c, long d, const mat& m) const { long i= coordindex[index2(c,d)]; if (i>0) {add_row_to_vec(v,m,i); return;} if (i<0) {sub_row_to_vec(v,m,-i); return;} } void homspace::add_nfprojchaincd(long& a, long c, long d, const vec& bas) const { long i= coordindex[index2(c,d)]; if (i>0) {a += bas[i]; return;} if (i<0) {a -= bas[-i]; return;} } void homspace::add_chaincd(svec& v, long c, long d) const { long i= coordindex[index2(c,d)]; if (i>0) {v+=coord_vecs[i]; return;} if (i<0) {v-=coord_vecs[-i]; return;} } svec homspace::chain(long nn, long dd) const { svec ans = chaincd(0,1); long c=0, d=1, e, a=nn, b=dd, q, f; while (b) { q=a/b; f=a; a=-b; b= f-q*b; e=d; d= c; c=(-q*c-e)%modulus; add_chaincd(ans,c,d); } return ans; } void homspace::add_chain(svec& v, long nn, long dd) const { add_chaincd(v,0,1); long c=0, d=1, e, a=nn, b=dd, q, f; while (b) { q=a/b; f=a; a=-b; b= f-q*b; e=d; d= c; c=(-q*c-e)%modulus; add_chaincd(v,c,d); } } vec homspace::projchain(long nn, long dd, const mat& m) const { vec ans = projchaincd(0,1,m); long c=0, d=1, e, a=nn, b=dd, q, f; while (b) { q=a/b; f=a; a=-b; b= f-q*b; e=d; d= c; c=(-q*c-e)%modulus; add_projchaincd(ans,c,d,m); } return ans; } long homspace::nfprojchain(long nn, long dd, const vec& bas) const { long ans = nfprojchaincd(0,1,bas); long c=0, d=1, e, a=nn, b=dd, q, f; while (b) { q=a/b; f=a; a=-b; b= f-q*b; e=d; d= c; c=(-q*c-e)%modulus; add_nfprojchaincd(ans,c,d,bas); } return ans; } void homspace::add_projchain(vec& v, long nn, long dd, const mat& m) const { add_projchaincd(v,0,1,m); long c=0, d=1, e, a=nn, b=dd, q, f; while (b) { q=a/b; f=a; a=-b; b= f-q*b; e=d; d= c; c=(-q*c-e)%modulus; add_projchaincd(v,c,d,m); } } void homspace::add_nfprojchain(long& aa, long nn, long dd, const vec& bas) const { add_nfprojchaincd(aa,0,1,bas); long c=0, d=1, e, a=nn, b=dd, q, f; while (b) { q=a/b; f=a; a=-b; b= f-q*b; e=d; d= c; c=(-q*c-e)%modulus; add_nfprojchaincd(aa,c,d,bas); } } svec homspace::applyop(const matop& mlist, const rational& q) const { svec ans(rk); long i=mlist.size(); while (i--) add_chain(ans,mlist[i](q)); return ans; } // copy of routine from ../procs/xsplit.cc: mat sparse_restrict(const mat& m, const subspace& s); smat restrict_mat(const smat& m, const subspace& s); mat homspace::calcop_restricted(string opname, long p, const matop& mlist, const subspace& s, int dual, int display) const { long d=dim(s); mat m(d,rk); for (long j=0; j=nap)) { cout<<"Error in homspace::s_opmat(): called with i = " << i << endl; ::abort(); return smat(dimension); // shouldn't happen } long p = op_prime(i); if(v) { cout<<"Computing " << ((::divides(p,modulus)) ? W_opname : T_opname) <<"("<=nap)) { cout<<"Error in homspace::opmat_restricted(): called with i = " << i << endl; ::abort(); return mat(dim(s)); // shouldn't happen } long p = op_prime(i); if(v) { cout<<"Computing " << ((::divides(p,modulus)) ? W_opname : T_opname) <<"("<

=nap)) { cout<<"Error in homspace::s_opmat_restricted(): called with i = " << i << endl; ::abort(); return smat(dim(s)); // shouldn't happen } long p = op_prime(i); if(v) { cout<<"Computing " << ((::divides(p,modulus)) ? W_opname : T_opname) <<"("<

2)); // Automatically chooses W or T cout<<"done."< T_eigrange(long p) { vector ans; ans.push_back(0); long aplim=1; while (aplim*aplim<=4*p) aplim++; aplim--; for(long ap=1; ap<=aplim; ap++) { ans.push_back(ap); ans.push_back(-ap); } return ans; } #else // new eig order, in strict numerical order static long pm1[]={-1,1}; vector T_eigrange(long p) { long aplim=3, four_p=p<<2; while (aplim*aplim<=four_p) aplim++; aplim--; vector ans(1+2*aplim); iota(ans.begin(),ans.end(),-aplim); return ans; } #endif vector homspace::eigrange(long i) { if((i<0)||(i>=nap)) return vector(0); // shouldn't happen long p = op_prime(i); if(::divides(p,modulus)) return vector(pm1,pm1+2); return T_eigrange(p); } vec homspace::maninvector(long p) const { long i,p2; svec tvec = chain(0,p); // =0, but sets the right length. if (plusflag!=-1) { if (p==2) add_chain(tvec,1,2); else { p2=(p-1)>>1; for (i=1; i<=p2; i++) { add_chain(tvec,i,p); } if(plusflag) tvec *=2; else for (i=1; i<=p2; i++) { add_chain(tvec,-i,p); } } } if(cuspidal) return cuspidalpart(tvec.as_vec()); else return tvec.as_vec(); } vec homspace::manintwist(long p) const { svec sum = chain(0,p); // =0, but sets the right length. for (long i=1; i>1; for (i=1; i<=p2; i++) { add_projchain(tvec,i,p); } if(plusflag) tvec *=2; else for (i=1; i<=p2; i++) { add_projchain(tvec,-i,p); } } return tvec; } vec homspace::projmaninvector(long p, const mat& m) const { long i,p2; vec tvec = projchain(0,p,m); // =0, but sets the right length. if (plusflag==-1) return tvec; if (p==2) add_projchain(tvec,1,2,m); else { p2=(p-1)>>1; for (i=1; i<=p2; i++) { add_projchain(tvec,i,p,m); } if(plusflag) tvec *=2; else for (i=1; i<=p2; i++) { add_projchain(tvec,-i,p,m); } } return tvec; } vec homspace::newhecke(long p, long n, long d) const // Will only work after "proj" { vec tvec = projchain(p*n,d); // cout<<"newhecke starts: tvec = "<>1, dp = d*p, k; for (k=1+p2-p; k<=p2; k++) { add_projchain(tvec,n+d*k,dp); // cout<<"tvec = "< #include bigfloat safe_sqrt(const bigfloat& x) { static bigfloat zero=to_bigfloat(0); if(x>zero) return sqrt(x); return zero; } bigfloat cube_root(const bigfloat& x) { if(is_zero(x)) return x; if(x<0) return -exp(log(-x)/3); return exp(log(x)/3); } /* bigfloat cube_root(const bigfloat& x) { static bigfloat third = to_bigfloat(1)/to_bigfloat(3); if(x<0) return -pow(-x, third); else return pow( x, third); } */ // coeff contains deg+1 reals starting with the leading coefficient // which must be nonzero // // we assume the roots are distinct //#define DEBUG_REALROOTS vector realroots( const vector& coeff ) { #ifdef DEBUG_REALROOTS cout<<"In realroots with coeff = "< tcoeff; unsigned int i=0; while(is_zero(coeff[i])) i++; while(i0) // one real root { #ifdef DEBUG_REALROOTS cout<<"one real root "< #include #include #include #include #include void set_order_point(pointmodq& P, const bigint& n) {P.set_order(n);} pointmodq::pointmodq(const gf_element&x, const curvemodq& EE) // a point with X=x or oo if none : order(BIGINT(0)), E(EE) { set_x_coordinate(x); } // make a point with given x & return true, or return false if none int pointmodq::set_x_coordinate(const gf_element& x) { is0flag=1; order=0; gf_element two=to_ZZ_p(2); gf_element four=to_ZZ_p(4); gf_element a1,a2,a3,a4,a6; E.get_ai(a1,a2,a3,a4,a6); // cout<<"E = "<twice(); else return ans; // =oo } gf_element lambda = (Y-YQ)/(X-XQ); gf_element mu = Y-lambda*X; ans.X = lambda*(lambda+(E.a1))-(E.a2)-X-XQ; ans.Y = lambda*(ans.X)+mu; ans.is0flag=0; ans.order=0; if(!(ans.on_curve())) { cout<<"error in pointmodq::operator+() adding "<<(*this)<<" to "<negate(); } pointmodq pointmodq::twice(void) const // doubles P { pointmodq ans(E); if(is0flag) return ans; // Do NOT make these static as the modulus might change! gf_element two=to_ZZ_p(2); gf_element three=to_ZZ_p(3); gf_element a1,a2,a3,a4,a6; E.get_ai(a1,a2,a3,a4,a6); gf_element den = two*Y+a1*X+a3; if(den==0) return ans; gf_element lambda=(three*X*X+two*a2*X+a4-a1*Y)/den; gf_element mu = Y-lambda*X; ans.X = lambda*(lambda+a1)-a2-two*X; ans.Y = lambda*(ans.X)+mu; ans.is0flag=0; ans.order=0; if(!(ans.on_curve())) { cout<<"\nerror in pointmodq::twice() with P = "<<(*this)<<": "<<(ans)<<" not on "<= 2 if(n == 2){ ans = P.twice() ; return (negative? -ans : ans); } // now n >= 3 if(n&1) ans = P ; // (else ans is still 0 from initialization) pointmodq Q = P ; while(n > 1){ Q = Q.twice() ; // 2^k P n /= 2 ; if(n&1) ans = ans + Q ; } return (negative? -ans : ans); } // calculates nP for bigint n pointmodq operator*(const bigint& n, const pointmodq& P) // n*P { static bigint one = BIGINT(1); static bigint two = BIGINT(2); pointmodq ans(P.get_curve()); if(P.is0flag || is_zero(n)) return ans; int negative = (is_negative(n)) ; bigint nn = n; if(negative) nn = - n ; if(nn == one) { return (negative? -P : P); } // now nn >= 2 if(nn == two){ ans = P.twice() ; return (negative? -ans : ans); } // now nn >= 3 if(odd(nn)) ans = P ; // (else ans is still 0 from initialization) pointmodq Q = P ; while(nn > one){ Q = Q.twice() ; // 2^k P nn >>= 1 ; if(odd(nn)) ans = ans + Q ; } return (negative? -ans : ans); } pointmodq curvemodq::random_point() { gf_element x; pointmodq ans(*this); while(ans.is_zero()) { random(x); ans=pointmodq(x,*this); } return ans; } pointmodq reduce_point(const Point& P, const curvemodq& Emodq) { // cout<<"Reducing "< "<1) cout<<" gen 1 = "<1) cout<<" gen 2 = "<1) { pointmodq Q1=(n1/n2)*P1; // order n2 cout<<"Computing "< curvemodqbasis::get_pbasis(int p) { vector ans; if((n%p)!=0) return ans; #if 1 if((n1%p)==0) ans.push_back((n1/p)*P1); if((n2%p)==0) ans.push_back((n2/p)*P2); #else ans = get_pbasis_via_divpol(p); #endif return ans; } //#define DEBUG_PBASIS vector curvemodqbasis::get_pbasis_via_divpol(int p) { vector ans; if((n%p)!=0) return ans; FqPoly pdivpol = makepdivpol(*this, p); #ifdef DEBUG_PBASIS cout< curvemodqbasis::get_pbasis_via_divpol(int p, const vector& pdivpol) { vector ans; if((n%p)!=0) return ans; galois_field Fq = get_field(*this); NewFqPoly(Fq,pdivpolmodq); long i, deg = pdivpol.size()-1; SetDegree(pdivpolmodq,deg); for (i=0; i<=deg; i++) SetCoeff(pdivpolmodq,i,ZtoGF(Fq,pdivpol[i])); #ifdef DEBUG_PBASIS cout< curvemodqbasis::get_pbasis_from_roots(int p, const vector& xi) { vector ans; if(xi.size()==0) { #ifdef DEBUG_PBASIS // cout<<"no "< xjp; pointmodq Q=P; for(i=0; i upper bound"< MAX_BG_STEPS) h = MAX_BG_STEPS; number_baby=h; map HT; H2 = Q-lower*P; H = pointmodq(P.get_curve()); //****** Babysteps, store [x(i * P),i] ********************* if (info) cout << " (#Babysteps = " << number_baby << flush; for (i = 1; i <= number_baby; i++) { H+=P; // H = i*P and H2 = Q-lower*P if (H == H2) // i * P = Q - lower* P, solution = lower+i { if (info) cout<<") "<::iterator HTi = HT.find(LiftGF(H2.get_x())); if(HTi!=HT.end()) { i = HTi->second; H3=i*P; if (H3 == H2) { h = lower + i + j * step_size; #ifdef DEBUG assert(h * P == Q); #endif if (h <= upper) return h; else return minus_one; } } // H2 is in table H2-=H; } // loop on j return minus_one; } bigint my_order_point(const pointmodq& P, const bigint& mult) { vector plist = pdivs(mult); unsigned int i; bigint m, p, ans = BIGINT(1); if(P.is_zero()) return ans; for(i=0; i0 s.t. m*Q is in

with m*Q=a*P; n is assumed // to be the order of P. Special case: if and

are disjoint, // then m=order(Q) and a=0. On input, m holds order(Q) if known, else 0 bigint linear_relation( pointmodq& P, pointmodq& Q, bigint& a) { static bigint zero = BIGINT(0); static bigint one = BIGINT(1); bigint n = order_point(P), m = order_point(Q), g,n1,m1,h; int debug_linear_relation=0; if(debug_linear_relation) cout<<"In linear_relation() with P = "<1) cout<<"Order(Q) divides order(P)" <1) cout<<"Order(Q) = "<< ordQ <1) cout<<"Order(P) divides order(Q)" <0) cout<<"Order(Q) divides n2=" <0) cout<<"Order(Q) does not divide n1="<0) cout<<"New P1 has order " <1) {P2 = pointmodq(P2.get_curve()); n2=1;} return; } // General Case 3: // We find a multiple a*P1 such that Q-a*P1 is killed by n2target so // we can apply the Weil Pairing of order n2target Q1 = n2target*Q; Q2 = n2target*P1; // has exact order n1/n2target bigint a = my_bg_algorithm(Q2,Q1,BIGINT(0),n1/n2target); if(a==BIGINT(-1)) // dlog failed, n1 must be wrong { if(debug_iso_type) { cout<<"Dlog of "< n2list(const bigint& n1, const bigint& lower, const bigint& upper, const bigint& q) { bigint n2min = lower/n1, n2max = upper/n1, n2, g = gcd(n1,q-1); if(n2min*n1 ans; for(n2=n2min; n2<=n2max; n2++) if(div(n2,g)) ans.push_back(n2); return ans; } // find a point of "large" order void one_generator(curvemodq& Cq, bigint& n1, pointmodq& P1) { galois_field Fq = get_field(Cq); bigint q = Fq.characteristic(); bigint upper, lower; // bounds on group order set_hasse_bounds(q,lower,upper); if(debug_iso_type) cout<<"Lower and upper bounds on group order: [" <1) { cout<<"now P1 = "<1) cout<<"Q = "<1) { cout<<"now P = "<= lower int count=0; while(n1*n25) { m = linear_relation(P1,Q,a); if(debug_iso_type) cout<<"linear relation gives m="<a) cout<<"Replacing second generator by "<1) { P3=(n1/n2)*P1; // so P2,P3 are a basis for n2-torsion set_order_point(P3,n2); if(debug_iso_type) cout<<"storing generator "<1) { m = linear_relation(P1,P3,a); if(debug_iso_type) cout<<"linear relation gives m="< #include #include // This function tests cusps for Gamma_0(N)-equivalence, unless // plusflag is +1 in which case it tests for equivalence under // int cusplist::cuspeq(const rational& c1, const rational& c2, int plusflag) const { // cout<<"Testing equivalence of cusps "<gcd(q1))!=(N->gcd(q2))) return 0; long s1,r1,s2,r2; bezout(p1,q1,s1,r1); s1*=q2; bezout(p2,q2,s2,r2); s2*=q1; long q3 = N->gcd(q1*q2); int ans = ((s1-s2)%q3==0); // 1 iff [c1]=[c2] // cout << "ans = "< #include #include //#define DEBUG_CONIC //#define DEBUG_CONIC_2 #ifndef TRACE_FACTORIZATION #define TRACE_FACTORIZATION 0 #endif //#define DEBUG_REDUCE #define REDUCE_INTERMEDIATES // reduces intermediate solutions //#define MORDELL_REDUCE // else use JC's (faster!) reduction via quadratics // CONIC_METHODS: // // 0: simple recursion, no reduction // 1: recursion with algebraic reduction (Denis Simon) // 2: recursion with lattice reduction (best non-factn-free) // 3: obsolete // 4: Uses factorization-free reduction from legendre.cc (best) // 5: Uses LLL method from legendre.cc int solve_conic(const quadratic& q, const bigint& d, bigint& x, bigint& y, bigint& z, int method) { return solve_conic(q[0],q[1],q[2],d,x,y,z,method); } int solve_conic(const quadratic& q, const bigint& d, const vector& factorbase, bigint& x, bigint& y, bigint& z, int method) { return solve_conic(q[0],q[1],q[2],d,factorbase,x,y,z,method); } int solve_conic(const bigint& a, const bigint& b, const bigint& c, const bigint& d, bigint& x, bigint& y, bigint& z, int method) { vector factorbase = pdivs(2*d); // cout<<"factorbase(1) = "<& aplist, const bigint& b, const vector& bplist, bigint& x, bigint& y, bigint& z, int method); // Solves xx-azz=byy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, b non-zero square-free, their prime divisors in aplist, bplist // Here |b| >= |a|, |b| >=2, a!=1 int solve_conic_diag(const bigint& a, const vector& aplist, const bigint& b, const vector& bplist, bigint& x, bigint& y, bigint& z, int method) // Solves xx-azz=byy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, b non-zero square-free, their prime divisors in aplist, bplist // // Here trivial cases are dealt with, non-trivial passed on { #ifdef DEBUG_CONIC cout << "In solve_conic_diag with a = " << a << ", b = " << b << endl; #endif // DEBUG_CONIC if(is_one(b)) { x=1; y=1; z=0; #ifdef DEBUG_CONIC cout << "...returns "; show_xyz(x,y,z); #endif // DEBUG_CONIC return 1; } if(is_one(a)) { x=1; y=0; z=1; #ifdef DEBUG_CONIC cout << "...returns "; show_xyz(x,y,z); #endif // DEBUG_CONIC return 1; } if(abs(a)>abs(b)) { int res = solve_conic_diag(b,bplist,a,aplist,x,z,y,method); #ifdef DEBUG_CONIC cout << "...returns "; show_xyz(x,y,z); #endif // DEBUG_CONIC return res; } // Now |a|<=|b|, neither a nor b = 1 if(is_one(-b)) { #ifdef DEBUG_CONIC cout << "...returns fail (a=b=-1)\n"; #endif // DEBUG_CONIC return 0; // since a must be -1 too and xx+zz=-yy insoluble } if(b==-a) { x=0; y=1; z=1; #ifdef DEBUG_CONIC cout << "...returns "; show_xyz(x,y,z); #endif // DEBUG_CONIC return 1; } if(b==a) { bigint m1; m1=-1; int res = solve_conic_diag(m1,pdivs(BIGINT(1)),a,aplist,y,x,z,method); x*=a; #ifdef DEBUG_CONIC cout << "...returns "; show_xyz(x,y,z); #endif // DEBUG_CONIC return res; } // Now |b| >= 2 , |b|>|a| and a is NOT square return solve_conic_diag_nontriv(a,aplist,b,bplist,x,y,z,method); } int solve_conic_diag_nontriv(const bigint& a, const vector& aplist, const bigint& b, const vector& bplist, bigint& x, bigint& y, bigint& z, int method) // Solves xx-azz=byy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, b non-zero square-free, their prime divisors in aplist, bplist // Here |b| > |a|, |b| >=2, a!=1 { if(method<3) { bigint x0, t, t0, t1, x1, y1, z1; vector tplist; int res = modsqrt(a,bplist,x0); // Solves x^2=a mod b, returns success/fail if(!res) { #ifdef DEBUG_CONIC cout << "...returns fail (no modular sqrt)\n"; #endif // DEBUG_CONIC return 0; } t=b; bigint newt = (sqr(x0)-a)/b; #ifdef DEBUG_CONIC cout<<"x0 = "<=n1); #ifdef DEBUG_REDUCE count++; // cout<<"In lattice reduction loop, u1=" // < tplist; res = modsqrt(a,bplist,x0); // Solves x^2=a mod b, returns success/fail if(!res) { #ifdef DEBUG_CONIC cout << "...returns fail (no modular sqrt)\n"; #endif // DEBUG_CONIC return 0; // since a must be -1 too and xx+zz=-yy insoluble } // Always have v ^2 - a*u ^2 = b*c // vv^2 - a*uu^2 = c*newc bigint u, v, temp, c, uu, vv, nor, newc; u=1; v=x0; c = (x0*x0-a)/b; vv = mod(-x0,c), uu=1; nor = vv*vv-a*uu*uu; // if(!div(c,nor)) cout<<"Error: "<=0 or z=0 and x>=0 { cancel1(x,y,z); if(is_positive(z)) return; if(is_negative(z)) {::negate(x); ::negate(y); ::negate(z); return;} if(is_positive(y)) return; if(is_negative(y)) {::negate(x); ::negate(y); return;} if(is_negative(x)) {::negate(x);} return; } int testsol(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& x, const bigint& y, const bigint& z, int verb) { int triv = is_zero(x) && is_zero(y) && is_zero(z); if(triv) { if(verb) cout << "Trivial solution!\n"; return 0; } bigint t = a*x*x+b*x*z+c*z*z-d*y*y; if(is_zero(t)) { if(verb) cout << "Solution OK!\n"; return 1; } else { if(verb) cout << "Solution wrong!\n"; return 0; } } int testlocsol(const bigint& a, const bigint& b, const bigint& c) // tests if ax^2+by^2+cz^2=0 is soluble, where a, b, c are pairwise // coprime and square-free { vector alist=pdivs(a); vector blist=pdivs(b); vector clist=pdivs(c); return testlocsol(a,alist,b,blist,c,clist); } int testlocsol(const bigint& a, const vector& alist, const bigint& b, const vector& blist, const bigint& c, const vector& clist) // tests if ax^2+by^2+cz^2=0 is soluble, where a, b, c are pairwise // coprime and square-free, their prime factors being in alist etc. { int as=sign(a), bs=sign(b), cs=sign(c); if((as==bs)&&(bs==cs)) { // cout<<"testlocsol("<::const_iterator pr; pr=clist.begin(); while(pr!=clist.end()) { p=*pr++; if(p==two) continue; if(legendre(mab,p)!=1) { // cout<<"testlocsol fails legendre(mab,p) with " // <<"(a,b,p)=("<& alist, const bigint& b, const vector& blist) // tests if ax^2+by^2=z^2 is soluble, where a, b are // square-free, their prime factors being in alist and blist. { // Avoid any factorization and gcd computation using the primes given bigint p, a0, b0, c; a0=1; b0=1; c=-1; vector a0list, b0list, clist; long sa=sign(a), sb=sign(b); if((sa<0)&&(sb<0)) { // cout<<"testlocsol("<::const_iterator pr; pr=alist.begin(); while(pr!=alist.end()) { p=*pr++; if(div(p,b)) { c*=p; clist.push_back(p); } else { a0*=p; a0list.push_back(p); } } pr=blist.begin(); while(pr!=blist.end()) { p=*pr++; if(!div(p,c)) {b0*=p; b0list.push_back(p);} } #if(0) if((a!=-a0*c)||(b!=-b0*c)||(abs(c)!=gcd(a,b))) { cout<<"Error: (a,b)=("<> m; mm=m; vector plist=pdivs(mm); int* flag = new int[m]; for(i=0; i plist; while(cout << "Enter a nonzero integer m: ", cin >> m, m!=0) { sqfdecomp(m,m1,m2,plist,TRACE_FACTORIZATION); cout << "sqfdecomp returns m1 = " << m1 << " and m2 = " << m2 << endl; cout << "(plist = " << plist << ")\n"; sqfdecomp(m,plist,m1,m2); cout << "sqfdecomp returns m1 = " << m1 << " and m2 = " << m2 << endl; cout << "(plist = " << plist << ")\n"; } } void testcancel() { bigint x,y,z; cout << "Enter x, y, z to be cancelled: "; cin >> x >> y >> z; cout << "Before: (x:y:z) = ("<& factorbase, quadratic& qx, quadratic& qy, quadratic& qz, int method, int verb) { return solve_conic_param(q[0],q[1],q[2],d,factorbase,qx,qy,qz,method,verb); } int solve_conic_param(const quadratic& q, const bigint& d, quadratic& qx, quadratic& qy, quadratic& qz, int method, int verb) { return solve_conic_param(q[0],q[1],q[2],d,qx,qy,qz,method,verb); } int solve_conic_param(const bigint& a, const bigint& b, const bigint& c, const bigint& d, quadratic& qx, quadratic& qy, quadratic& qz, int method, int verb) { vector factorbase = pdivs(2*d); if(is_zero(b)) { factorbase=vector_union(factorbase,pdivs(a)); factorbase=vector_union(factorbase,pdivs(c)); } else { bigint disc = b*b-4*a*c; factorbase=vector_union(factorbase,pdivs(a)); factorbase=vector_union(factorbase,pdivs(disc)); } return solve_conic_param(a,b,c,d,factorbase,qx,qy,qz,method,verb); } int solve_conic_param(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const vector& factorbase, quadratic& qx, quadratic& qy, quadratic& qz, int method, int verb) // Solves axx+bxz+czz=dyy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, c, d, bb-4ac non-zero // qx,qy,qz are (preallocated) arrays of coeffs of parametrizing quadratics // with leading coeffs qx[0],qy[0],qz[0] one solution { if(verb) cout<<"In solve_conic_param() with (a,b,c,d)=("<0, b>0, c<0, abc square-free and ax^2+by^2+cz^2=0 // reduces x, y, z in place using Mordell's method (page 48) // to achieve Holzer's bounds |z|<=sqrt(ab) etc. // NOTE that we allow c not to be square-free here, // so we may have g=gcd(x0,y0)>1 with g^2|c. { // To check if Holzer's conditions are satisfied // it suffices to chack that |z| < sqrt(ab). int ok = (sqr(z0)<=(a*b)); // if(ok) return; bigint zero; zero=0; if(verb) { bigfloat xlim = sqrt(I2bigfloat(b)*I2bigfloat(-c)); bigfloat ylim = sqrt(I2bigfloat(a)*I2bigfloat(-c)); bigfloat zlim = sqrt(I2bigfloat(a)*I2bigfloat(b)); cout<<"Using Mordell reduction to reduce the solution "; show_xyz(x0,y0,z0); cout<<" for (a,b,c) = ("<1) {fix=1; x00/=gxy; y00/=gxy; c0/=sqr(gxy);} int c_parity; if(odd(c0)) {c_parity=1; d=c0;} else {c_parity=0; d=c0/2;} g=bezout(y00,-x00,xx,yy); xx*=d; yy*=d; // now y00*xx-x00*yy=d u = a*x00*xx+b*y00*yy; v = -c0*z0; if(v<0) {::negate(u); ::negate(v);} bigfloat zz_real; zz_real=0; if(verb>1) { zz_real = I2bigfloat(u)/I2bigfloat(v); cout<<"u = "<=abs(z0)))) { cout<<"Problem: new solution is NOT smaller than old one!\n"; cout<<"(a,b,c) = ("<0 else { if(sb==1) {icase=2;} // a>0, b>0 else {icase=3;} // a>0, b<0 } bigint c = gcd(a,b); y*=c; z*=c; bigint g = gcd(x,c), a0=a/c, b0=b/c; if(g>1) {x/=g; y/=g; z/=g;} if(debug) { cout<<"Case "< #include #include #include #ifndef CLK_TCK #define CLK_TCK CLOCKS_PER_SEC #endif double starttime,stoptime; void init_time() { ;} void start_time() { starttime = GetTime();} void stop_time() { stoptime = GetTime();} void show_time(ostream& s) { s<<" ("<<(stoptime-starttime)<<" seconds)" << flush; } eclib-2013-01-01/libsrc/pcprocs.cc0000644000175200017520000003000411774563612013347 00000000000000// file pcprocs.cc: implementation of functions used to compute periods ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include //from qcurves, for computing conductors #include #include #include // Function used to test whether a denominator found by ratapprox() is // "trustworthy": always with multiprecision, but only if below // a fixed bound otherwise. #ifdef MPFP // Multi-Precision Floating Point //inline int trust_denom(long d) { return (d<501);} // 1000);} inline int trust_denom(long d) { return (d<1201);} // 1000);} #else inline int trust_denom(long d) { return (d<251);} #endif // Given a newform (the i'th in newforms) at level n with a real // period x0; Finds a matrix [a0,b0;Nc0,d0] whose integral is // dotplus*x0+dotminus*y0*i N.B. The value of x0 may be changed, if we // come across some period whose real part isnot an integer multiple // of the original x0. // We compute periods of lots of matrices in Gamma_0(N), over all // symbols {0,b/d} for d1) cout << "Matrix ("<1) cout<<"real part = " << x << ", x/x0 = " << ratio << " =~= "<1) { cout<<"******************************real part of period not an multiple of x0?\n"; if(verbose<=1) cout<<"real part = " << x << ", x/x0 = " << ratio << " =~= "<10) { drx=1; nrx=I2long(Iround(ratio)); cout << "Using rounded value nrx=" << nrx <0)) { if(d1) cout<<"replacing original x0 by "<0.001) { x0=x; have_rp=1; nrx=drx=1; if(verbose>1) cout<<"real period = " << x0 << "\n"; } bigfloat y = abs(integrator.iper()); if(have_ip) { bigfloat ratio=y/y0; ratapprox(ratio, nry, dry); // cout<<"dry = "<1) cout<<"imag part = " << y << ", y/y0 = " << ratio << " =~= "<0.001) { y0=y; have_ip=1; nry=dry=1; if(verbose>1) cout<<"imag period = " << y0 << "\n"; } if(!have_both && (x>0.001) && (y>0.001) && trust_denom(dry)) { have_both=1; if(trust_denom(drx)) {nrx0=nrx; drx0=drx;} nry0=nry; dry0=dry; // cout<<"nrx0="<1)) cout<<"c6 factor " << fac6 << endl; bigcomplex w1, w2; bigcomplex c4, c6; bigfloat x1=x0, y1=y0; bigfloat c4err, c6err, c4c6err; for(nx=1; (nx<=maxnx); nx++) {x1=x0/to_bigfloat(nx); for(ny=1; (ny<=maxny); ny++) { y1=y0/to_bigfloat(ny); for(type=1; (type<=2); type++) { if(type==2){w1=bigcomplex(x1,zero); w2=bigcomplex(zero,y1);} else {w1=bigcomplex(2*x1,zero); w2=bigcomplex(x1,y1);} bigcomplex tau=normalize(w1,w2); getc4c6(w1,w2,c4,c6); // cout<<"w1 = "<0.001)) { disagree|=2; cout<<"Real period of constructed curve does not match that" <<" of the newform"<1) cout<<"L(f,"<0.001) { nflist[i].lminus=ell; bigfloat ratio = y/y1; if(verbose>1) cout<<"ratio = "<10) { mm=I2long(Iround(ratio)); cout << "Using rounded value mminus=" << mm <1) cout << "lminus = "< #include #include bigint g_content(const bigint& ga, const bigint& gb, const bigint& gc, const bigint& gd, const bigint& ge) // returns largest SQUARE which divides all { // first find the content: bigint ans=abs(ga); if(ans==1) return ans; ans=gcd(ans,gb); if(ans==1) return ans; ans=gcd(ans,gc); if(ans==1) return ans; ans=gcd(ans,gd); if(ans==1) return ans; ans=gcd(ans,ge); if(ans==1) return ans; // if content non-trivial, get its divisors whose square divides // (as we alreasy have this function to hand...) vector cdivs = sqdivs(ans); // and return the last in the list, which is the biggest: return cdivs[(cdivs.size())-1]; } void apply_transform(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, const unimod& m) { bigint m11=m(1,1), m12=m(1,2), m21=m(2,1), m22=m(2,2); bigint m112=sqr(m11); bigint m113=m112*m11; bigint m114=m113*m11; bigint m212=sqr(m21); bigint m213=m212*m21; bigint m214=m213*m21; bigint m222=sqr(m22); bigint m223=m222*m22; bigint m224=m223*m22; bigint m122=sqr(m12); bigint m123=m122*m12; bigint m124=m123*m12; bigint newa = m214*e + m11*m213*d + m112*m212*c + m113*m21*b + m114*a; bigint newe = m224*e + m12*m223*d + m122*m222*c + m123*m22*b + m124*a; bigint newb = 4*m213*m22*e + (3*m11*m212*m22+m12*m213)*d + 2*(m112*m21*m22+m11*m12*m212) * c + (3*m112*m12*m21+m113*m22)*b + 4*m113*m12*a; bigint newd = 4*m21*m223*e + (3*m12*m21*m222+m11*m223)*d + 2*(m122*m21*m22+m11*m12*m222)*c + (m123*m21+ 3*m11*m122*m22)*b + 4*m11*m123*a; bigint newc = 6*m212*m222*e + 3*(m12*m212*m22+m11*m21*m222) * d + (m122*m212+ 4*m11*m12*m21*m22+m112*m222) * c + 3*(m11*m122*m21+m112*m12*m22) * b + 6*m112*m122*a; a=newa; b=newb; c=newc; d=newd; e=newe; } void apply_transform(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, const scaled_unimod& m) { apply_transform(a,b,c,d,e,(unimod)m); bigint u2=sqr(m.scale_factor()); if(u2>1) { divide_exact(a,u2,a); divide_exact(b,u2,b); divide_exact(c,u2,c); divide_exact(d,u2,d); divide_exact(e,u2,e); } } void xshift(const bigint& alpha, bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m) { e = e+alpha*(d+alpha*( c+alpha*( b+ alpha*a))); d = d+alpha*(2*c+alpha*(3*b+4*alpha*a)); c = c+alpha*(3*b+6*alpha*a); b = b+4*alpha*a; //a = a; m.x_shift(alpha); } void zshift(const bigint& gamma, bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m) { a = a+gamma*(b+gamma*( c+gamma*( d+ gamma*e))); b = b+gamma*(2*c+gamma*(3*d+4*gamma*e)); c = c+gamma*(3*d+6*gamma*e); d = d+4*gamma*e; //e = e; m.y_shift(gamma); } void m_invert(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m) { swap(a,e); swap(b,d); ::negate(b); ::negate(d); m.invert(); } void m_invert(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, scaled_unimod& m) { swap(a,e); swap(b,d); ::negate(b); ::negate(d); m.invert(); } int check_transform(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const unimod& m, const bigint& xa, const bigint& xb, const bigint& xc, const bigint& xd, const bigint& xe) { bigint aa(a), bb(b), cc(c), dd(d), ee(e); apply_transform(aa,bb,cc,dd,ee,m); if(aa!=xa) return 0; if(bb!=xb) return 0; if(cc!=xc) return 0; if(dd!=xd) return 0; if(ee!=xe) return 0; return 1; } int check_transform(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const scaled_unimod& m, const bigint& xa, const bigint& xb, const bigint& xc, const bigint& xd, const bigint& xe) { bigint aa(a), bb(b), cc(c), dd(d), ee(e); apply_transform(aa,bb,cc,dd,ee,m); if(aa!=xa) return 0; if(bb!=xb) return 0; if(cc!=xc) return 0; if(dd!=xd) return 0; if(ee!=xe) return 0; return 1; } eclib-2013-01-01/libsrc/gf.cc0000644000175200017520000000333211774563612012276 00000000000000// gf.cc: interface for NTL's ZZ_p ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include map ZZ_pContextCache; galois_field::galois_field(void) //dummy :q(to_ZZ(2)) { // cout<<"In galois_field constructor, calling default ZZ_p::init(2)"<newheckeop(p,0)); cout<<"done."<>p; if(p==0) break; if(p==1) { cout<<"Coefficient of identity: "; cin>>ap1; if(ap1!=0) tp = addscalar(tp,ap1); } else { cout << "Computing T_p for p = " << p << "..." << flush; tp1 = transpose(h1->newheckeop(p,0)); cout<<"done."<>ap1; if(ap1!=1) tp1*=ap1; if(ap1!=0) tp+=tp1; } } } // Compute the appropriate W-eigenspace and restrict to it msubspace SW(dimh); int dimsw=dimh; if(w_split) { vector badprimes = h1->plist; int nq = badprimes.size(); for(i=0; (i0); i++) { long q = badprimes[i]; bigint eq; cout<<"Enter eigenvalue of W("<>eq; eq *=dH; mat_m wq = transpose(h1->heckeop(q,0)); if(dimsw coeffs; while(looking) { cout<<"Enter factor number: "; cin>>j; if((j<1)||(j>nf)) {cout<<"Must be between 1 and "<1!\n"; continue;} d = deg(factors[j].a); cout<<"Degree = "<=0; i--) { minpol[i]=coeff(factors[j].a,i); coeffs[i]=coeff(factors[j].a,i)*Hscales[d-i]*Sscales[d-i]; m = addscalar(m,coeffs[i]); if(i) m = m*tp; } if(verbose) { cout<<"(unscaled) min poly = [1 "; for(i=d-1; i>=0; i--) cout<1) cout<1||(sden2>1)) { cout<<"S has denom "<1) { cout<<"WinvV = ";showmatrix(WinvV);cout<coord_vecs.size()-1; projcoord.init(ncoord,dims); coord_fac=0; vec_m mrowi(dims); vec rowi(dims), coordi(dimh); for (i=1; i<=ncoord; i++) { coordi = (h1->coord_vecs[i]).as_vec(); if(h1->cuspidal) coordi = h1->cuspidalpart(coordi); mrowi = V*coordi; rowi=mrowi.shorten((int)i); projcoord.setrow(i,rowi); coord_fac=gcd(coord_fac,(long)vecgcd(rowi)); } if(verbose>1) cout<<"content of projccord = "<1) projcoord /= coord_fac; Wdetdenom = coord_fac; Wdetnum*=dHS; Winv_scaled=Winv; bigint g; g=mvecgcd(Winv_scaled.row(1)); for(i=2; i<=dims; i++) { Winv_scaled.multrow(i,Hscales[i-1]*Sscales[i-1]); g=gcd(g,mvecgcd(Winv_scaled.row(i))); } // now g is the content of Winv_scaled Winv_scaled/=g; Wdetdenom*=g; g = gcd(Wdetnum,Wdetdenom); if(g>1) {Wdetnum/=g; Wdetdenom/=g;} cout<<"Basis for Hecke eigenvalues, in terms of powers of alpha:"<kern).as_mat(); long rk = nrows(K); matop *matlist; long k,l,n = h1->modulus, dimh=h1->h1dim(), dims=dim(S); vec_m apvec(dims); int bad = ::divides(p,n); if(bad) return apvec; // temporary fix! if(bad) matlist=new matop(p,n); else matlist=new matop(p); for(k=0; kfreemods[k]; // for(l=0; lsize(); l++) // apvec += mKkj*(*matlist)[l](s,h1,projcoord); // apvec += mKkj*h1->applyop(*matlist,s,projcoord); } else { symb s = h1->symbol(h1->freegens[k]); for(l=0; lsize(); l++) apvec += mKkj*(*matlist)[l](s,h1,projcoord); } } } delete matlist; return apvec; } mat_m nfd::oldheckeop(long p) { return restrict_mat(transpose(h1->newheckeop(p,0)),S); } mat_m nfd::heckeop(long p) { mat K = basis(h1->kern).as_mat(); long rk = nrows(K); matop *matlist; long j,k,l,n = h1->modulus, dimh=h1->h1dim(), dims=dim(S); int bad = ::divides(p,n); if(bad) { cout<<"q = "<applyop(*matlist,h1->freemods[k])).as_vec(); if(h1->cuspidal) vt=h1->cuspidalpart(vt); colj += (mKkj*vt); } else { symb s = h1->symbol(h1->freegens[k]); for(l=0; lsize(); l++) { vec vt = ((*matlist)[l](s,h1)).as_vec(); if(h1->cuspidal) vt=h1->cuspidalpart(vt); colj += mKkj*vt; } } } } TE.setcol(j+1,colj); } delete matlist; return transpose(V*TE); } bigint inverse(const mat_m& a, mat_m& ainv) { long d = nrows(a); mat_m aug=colcat(a,midmat(d)); long rk, ny; vec pc,npc; bigint denom; mat_m ref = echelon(aug, pc, npc, rk, ny, denom); ainv = ref.slice(1,d,d+1,2*d); // cout<<"Inverse = "< // for debugging only #include using namespace std; #include #ifndef M_LN2 #define M_LN2 0.69314718055994530942 #endif #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #define LOG2 M_LN2 #define PI M_PI #define expo(x) ((x)==0?-1000:(long)floor(log(fabs((x)))/LOG2)) #define lbin -64 // = bit-precision of doubles (or should be) double kbessel(double nu, double gx, int debug) { double x,y,p1,p2,zf,zz,s,t,q,r,u,v,e,f,c,d,ak; double nu2,w; long k,k2,n2,n,ex; if(debug) { cout << "\nCalled kbessel("<0;--k) { k2-=2; p1=k2*k2+nu2; ak=-p1*zz/k; s=1+ak*s; t=k2+ak*t; } u=s*zf; t/=2.0; v=-(t*zf+u*nu)/n2; q=n2; r=x+x; if(debug) { cout << "Finished k loop. lbin = "<= -1) p1=0.5; p2=1.0-r/q; if (p1>p2) p1=p2; c=-p1; k=1; d=1; e=u; f=v; if(debug) { cout << "...outer loop: p1 = "<lbin); y=u*pow((x/n),nu); } else { if(debug) { cout << "In the x>=n case.\n"; } p2=2*x; zf=sqrt(PI/p2); zz=1.0/(4*p2); s=1.0; k2=2*n2+1; for (k=n2;k>0;--k) { k2-=2; p1=k2*k2+nu2; ak=(p1*zz)/k; s=1.0-(ak*s); } y=s*zf; } y/=exp(x); if(debug) { cout << "kbessel returns " << y << endl; } return y; } eclib-2013-01-01/libsrc/lambda.cc0000644000175200017520000001317611774563612013131 00000000000000// lambda.h Declarations of functions which compute Silverman's ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // finite set Lambda_bad for a curve // N.B. (1) Uses my height normalization, double S's. // (3) Uses the local height normalization WITHOUT the log|Delta| // (2) Intended for use in computing Heegner points (not yet implemented) #include #include #define MAX_NUM_LAMBDA 1000 vector lambda_bad_1(const bigint& p, long kcode, long npd, long& nlambda) { bigfloat logp = log(I2bigfloat(p)), n=to_bigfloat(npd); if((kcode%10)==0) // Type I_m { long i, m = kcode/10; nlambda=1+(m/2); vector ans; ans.reserve(nlambda); for(i=0; i ans; ans.reserve(nlambda); ans.push_back(to_bigfloat(0)); ans.push_back(-logp); ans.push_back(-(1 +m/4)*logp); return ans; } if((kcode==2)||(kcode==7)||(p>3)) { nlambda = 1; vector ans(1,to_bigfloat(0)); return ans; } nlambda = 2; vector ans; ans.reserve(nlambda); ans.push_back(to_bigfloat(0)); long nn = (kcode<5? kcode: kcode+3); ans.push_back( -(nn*logp)/6 ); return ans; } vector lambda_bad(const CurveRed& C, long& nlambda, int verbose) { vector ans; nlambda = 1; ans.push_back(to_bigfloat(0)); bigint discr = getdiscr(C); vector plist = getbad_primes(C); long i, j, nl, nnl; vector::const_iterator pr=plist.begin(); while(pr!=plist.end()) { bigint p = *pr++; if (ndiv(p*p,discr)) { if(verbose) cout<<"Lambda_bad("< list = lambda_bad_1(p,kcode,npd,nl); if(verbose) { cout << "Lambda_bad("<getbi(b2,b4,b6,b8); bigint d2=d*d; bigint d3=d2*d; bigint e,e2 = ((4*a+b2*d)*a + 2*b4*d2)*a + b6*d3; if(!isqrt(e2,e)) return 0; bigint a1,a2,a3,a4,a6; CD->getai(a1,a2,a3,a4,a6); b = (e-a1*a*c-a3*c*d)/2; *P = Point(CD,a*c,b,c*d); return 1; } int make_point_from_x(Curvedata* CD, const bigfloat& x, long maxdd, Point* P) { bigint a,b,c,d; //cout<<"In ratapprox2 with x = " << x << endl; bigint x0, x1, x2, y0, y1, y2; bigfloat xx, diff, xc; xx = x; x0 = 0; x1 = 1; y0 = 1; y1 = 0; diff = 1; bigint maxdenom = pow(BIGINT(10),maxdd); while ( !is_approx_zero(diff) && (y2getbi(b2,b4,b6,b8); bigint d2=d*d; bigint d3=d2*d; bigint e,e2 = ((4*a+b2*d)*a + 2*b4*d2)*a + b6*d3; if(!isqrt(e2,e)) return 0; bigint a1,a2,a3,a4,a6; CD->getai(a1,a2,a3,a4,a6); b = (e-a1*a*c-a3*c*d)/2; *P = Point(CD,a*c,b,c*d); return 1; } int make_point_from_x_and_ht(Curvedata* CD, vector lambdas, const bigfloat& xp, const bigfloat& ht, Point* P) { bigfloat rh = realheight(xp,CD); vector::const_iterator lam = lambdas.begin(); while(lam!=lambdas.end()) { bigfloat logd = (ht-rh-(*lam++))/2; bigfloat approxd = exp(logd); bigint xa, xd2, xd = Iround(approxd); if(xd>0) { xd2 = xd*xd; xa = Iround(xp*I2bigfloat(xd2)); if(make_point_from_x(CD,xa,xd2,P)) return 1; } bigint xdx; long id, delta=10; for(id=1;id<=delta;id++) { xdx=xd+delta; if(xdx>0) { xd2 = xd*xd; xa = Iround(xp*I2bigfloat(xd2)); if(make_point_from_x(CD,xa,xd2,P)) return 1; } xdx=xd-delta; if(xdx>0) { xd2 = xd*xd; xa = Iround(xp*I2bigfloat(xd2)); if(make_point_from_x(CD,xa,xd2,P)) return 1; } } } return 0; } eclib-2013-01-01/libsrc/heights.cc0000644000175200017520000002523411774563612013342 00000000000000// heights.cc: implementation of height functions declared in points.h ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include // which includes curve.h bigfloat height(Point& P) { // WARNING -- no check made of validity of point on curve bigfloat zero(to_bigfloat(0)); if ( P.iszero() ) return zero; if (P.height >= zero) return P.height; // already calculated it if (order(P) > 0) {P.height = zero; return zero; } // zero height if torsion // N.B. So if we ever ask a point its height it will compute its order. // otherwise need to calculate it // Add local heights at finite primes dividing discr(E) OR denom(P). // The components for primes dividing denom(P) add to log(denom(x(P))); // since P=(XZ:Y:Z^3), denom(P)=Z=gcd(XZ,Z^3), called "zroot" here, // and so the contribution is log(denom(x(P))) = 2*log(zroot). // This avoids factorizing the denominator. const bigint& zroot = gcd(getX(P),getZ(P)); // = cube root of Z bigfloat ans = realheight(P); ans += 2*log(I2bigfloat(zroot)); const vector& bad_p = getbad_primes( *(P.E) ); vector::const_iterator pr = bad_p.begin(); while(pr!=bad_p.end()) { const bigint& p = *pr++; if(ndiv(p,zroot)) ans += pheight(P,p); } P.height = ans; return ans; } //#define DEBUG_HEIGHT bigfloat pheight(const Point& P, const bigint& pr) { #ifdef DEBUG_HEIGHT cout<<"In pheight with P = "<getai(a1,a2,a3,a4,a6); P.E->getbi(b2,b4,b6,b8); P.E->getci(c4,c6); discr = getdiscr(*(P.E)); long n = val(pr, discr); #ifdef DEBUG_HEIGHT cout<<"n = val(pr, discr) = " << n << endl; #endif bigint x,y,z; P.getcoordinates(x,y,z); const bigint& zroot = gcd(x,z); // = cube root of z long vpz = 3*val(pr,zroot); #ifdef DEBUG_HEIGHT cout<<"vpz = val(pr, z) = " << vpz << endl; #endif const bigint& x2 = x*x; const bigint& z2 = z*z; const bigint& xz = x*z; const bigint& yz = y*z; long a = val(pr, 3*x2 + 2*a2*xz + a4*z2 - a1*yz) - 2*vpz; long b = val(pr, 2*y + a1*x + a3*z) - vpz; long c = val(pr, 3*x2*x2 + b2*x2*xz + 3*b4*x2*z2 + 3*b6*xz*z2 + b8*z2*z2) -4*vpz; #ifdef DEBUG_HEIGHT cout<<"a = " << a << endl; cout<<"b = " << b << endl; cout<<"c = " << c << endl; #endif // some obvious changes enable calculation of lambda as a rational // some improvements can be made if this is never to be done // eg in the above, no need to work with projective coords, just use real x/z bigfloat halfn = to_bigfloat(n); halfn /= to_bigfloat(2); bigfloat lambda; if ( (a<=0) || (b<=0) ) { lambda = vpz - val(pr,x); if(lambda<0) lambda=0; } else if ( ndiv(pr, c4) ) { bigfloat m = to_bigfloat(b); if(halfn=(3*b) ) lambda = (-2*b) / to_bigfloat(3); else lambda = -c / to_bigfloat(4); bigfloat ans = lambda * log( I2bigfloat(pr) ); #ifdef DEBUG_HEIGHT cout<<"...returning lambda = " << lambda << ", pheight = "<H) H=t; t=2*abs(b4); if(t>H) H=t; t=2*abs(b6); if(t>H) H=t; t=abs(b8); if(t>H) H=t; long precision = decimal_precision(); #ifdef DEBUG_HEIGHT cout<<"decimal precision = "<operator-=(lambda); this->reduce_mod_p(p); } void smat::reduce_mod_p(const scalar& p) { svec rowi; for(int i=1; i<=nro; i++) { rowi = row(i); rowi.reduce_mod_p(p); setrow(i,rowi); } } smat& smat::operator*=(scalar scal) { if(scal==0) cerr<<"Attempt to multiply smat by 0\n"<::const_iterator vi; for(vi=v.entries.begin(); vi!=v.entries.end(); vi++) prod += (vi->second)*(A.row(vi->first)); return prod; } svec mult_mod_p( const svec& v, const smat& A, const scalar& p ) { if( v.d != nrows(A) ) { cout << "incompatible sizes in v*A\n"; cout << "Dimensions "<::const_iterator vi; for(vi=v.entries.begin(); vi!=v.entries.end(); vi++) prod.add_scalar_times_mod_p(A.row(vi->first), vi->second,p); return prod; } #if(1) smat operator* ( const smat& A, const smat& B ) { if( A.nco != B.nro ) { cerr << "incompatible smats in operator *\n"; abort();} int nro = A.nro, nco = B.nco; smat prod( nro, nco ); for (int i=1; i<=nro; i++) prod.setrow(i, A.row(i)*B); return prod; } smat mult_mod_p ( const smat& A, const smat& B, const scalar& p ) { if( A.nco != B.nro ) { cerr << "incompatible smats in operator *\n"; abort();} int nro = A.nro, nco = B.nco; smat prod( nro, nco ); for (int i=1; i<=nro; i++) prod.setrow(i, mult_mod_p(A.row(i),B,p)); return prod; } #endif #if(0) smat operator* ( const smat& A, const smat& B ) { if( A.nco != B.nro ) { cerr << "incompatible smats in operator *\n"; abort();} int nro = A.nro, nco = B.nco; smat prod( nro, nco ); /* writes columns of B */ int* ncol = new int [nco]; int *nc = ncol; int l, r, s; for( l = 0; l < nco; l++ ) *nc++ = 0; for( r = 0; r posB[l] ) l++; else soma= xmod0(soma + xmm0(A.val[r][i++] , colB_val[c][l++])); } if( soma != 0 ) { aux_pos[count] = c+1; aux[count++] = mod0(soma); } } delete [] prod.col[r]; delete [] prod.val[r]; int *pos = prod.col[r] = new int [count+1]; scalar *val = prod.val[r] = new scalar [count]; *pos++ = count; for( ax = aux, axp = aux_pos, l = 0; l < count; l++ ) { *pos++ = *axp++; *val++ = *ax++; } } delete [] aux; delete [] aux_pos; delete [] ncol; for( l = 0; l < nco; l++ ) { delete [] colB_mat[l]; delete [] colB_val[l]; } delete [] colB_mat; delete [] colB_val; return prod; } #endif smat transpose ( const smat& A ) { // 1. Count the number of entries in each column (as in operator*() below): int *colwts = new int[A.nco]; int i, r; for(i=0; i 0 ) s << *veci++; while ( n-- ) s << "," << (*veci++); s << "]"; s << " positions: " << "["; if( d > 0 ) { s << *posi++; d = d-1; } while ( d-- ) { s << "," << (*posi++); } s << "] }" << endl; } return s; } istream& operator >> (istream& s, smat& sm) { int *pos = new int [ sm.nco ]; scalar *values = new scalar [ sm.nco ]; int r, k, count; for( r = 0; r < sm.nro; r++ ) { cout << "input row " << r+1 << endl; int *p = pos; scalar *v = values; s >> k; for( count = 0; k != 0; s >> k ) { *v++ = k; s >> k; if( k ) *p++ = k; else { cerr << "enter zero as a value!!!\n"; abort(); } count++; } delete [] sm.col[r]; delete [] sm.val[r]; sm.col[r] = new int [ count + 1 ]; sm.val[r] = new scalar [ count ]; sm.col[r][0] = count; p = pos; v = values; for( k = 0; k < count; k++ ) { sm.col[r][k+1] = *p++; sm.val[r][k] = *v++; } } delete [] pos; delete [] values; return s; } // Definition of non-friend functions smat operator+(const smat& sm) { return sm; } smat operator-(const smat& sm) { return (-1)*sm; } smat operator+(const smat& sm1, const smat& sm2) { smat ans(sm1); ans+=sm2; return ans; } smat operator-(const smat& sm1, const smat& sm2) { smat ans(sm1); ans-=sm2; return ans; } smat operator*(scalar scal, const smat& sm) { smat ans(sm); ans*=scal; return ans; } smat operator/(const smat& sm, scalar scal) { smat ans(sm); ans/=scal; return ans; } int operator!=(const smat& sm1, const smat& sm2) { return !(sm1==sm2); } int get_population(const smat& m ) { int r,d,count = 0; for( r = 0; r < m.nro; r++ ) { d = *(m.col[r]); if(d==0) continue; int *pos = m.col[r] + 1; while( d-- ) { count += ( *pos++ != 0 );} } return count; } smat sidmat(scalar n) // identity matrix { smat I(n,n); // creates enough space for( int i = 0; i < n; i++ ) { I.col[i][0] = 1; // one entry in this row I.col[i][1] = i+1; // ...it's in column i+1 I.val[i][0] = 1; // ...its value is 1 } return I; } smat liftmat(const smat& mm, scalar pr, scalar& dd, int trace) { scalar modulus=pr,n,d; long nr,nc; dd=1; int succ=0,success=1; float lim=floor(sqrt(pr/2.0)); smat m = mm; if(trace) { cout << "Lifting mod-p smat; smat mod "< #include void sifter::init() { long iaux, i, j, nr; auxs = new long[num_aux]; nroots = new int[num_aux]; thetamod = new long*[num_aux]; squares = new int*[num_aux]; all_p = new long[2*num_aux]; for(i=0; i5, such that the resolvent cubic has root(s) mod p. primevar pr; pr++; pr++; // skip past 2 and 3 for(;pr.ok()&&iaux1) cout<<"Trying p = " << p << endl; long c1 = mod(-27*I,p); long c2 = mod(-27*J,p); nr = nrootscubic(0,c1,c2,p,thetamod[iaux]); if(verbose>1) cout<<"nr = " << nr << endl; if(nr>0) { auxs[iaux]=p; nroots[iaux]=nr; iaux++; all_p[max_dim_im++]=p; if(nr>1) all_p[max_dim_im++]=p; //again, since p gives 2 bits } } pivcols = new int[max_dim_im]; eps_mat = new int*[max_dim_im]; for(i=0; i1)&&(num_aux>0)) { cout<<"sifting using " <1)&&(num_aux>0)) cout<<"finished sifter::init()"<>=1; *ansi++ = (c&1); } } return ans; } void sifter::process(const vector& Plist) { vector::const_iterator P=Plist.begin(); while(P!=Plist.end()) { if(verbose) cout<<"Processing point "<<*P< #include #include #include #include #include #include #include void TLSS::init(int pp, int verb) { verbose=verb; p=pp; Pi=Emodq.get_pbasis(p); rank=Pi.size(); if((verbose>1)&&(rank>0)) { cout<<"Generators of "< TLSS::map1point(const Point& P) const { #ifdef debugTL cout<<"Applying TLSS::map1point (q="< "< #include using namespace std; bitspace::bitspace(long d) { if(d<0) { cout<<"Error in bitspace constructor with negative dimension "<32) { cout<<"Error in bitspace constructor with dimension "<32! replacing with 32\n"; d=32; } maxdim=d; pivs = new long[maxdim]; gens = new unsigned long[maxdim]; dim=0; bitmask=0; } bitspace::~bitspace() { delete[]pivs; delete[]gens; } long bitspace::reduce(unsigned long& v, long start) const { long j; for(j=start; j=0; j--) if(testbit(v,j)) {return j;} return -1; } void bitspace::augment(unsigned long v, long piv) { gens[dim]=v; pivs[dim]=piv; bitmask |= (1< #include #include #include #include //#define DEBUG_MINV //#define DEBUG_LEM1 //#define WATCH_REDUCTION //#define DEBUG_LEGENDRE //#define DEBUG_LEGENDRE_PARAM //#define CHECK_ALL //#define DEBUG_LLL //#define MORDELL_REDUCE // else use JC's reduction via quadratics #ifndef TRACE_HOLZER #define TRACE_HOLZER 0 // =1 for verbose reduction of solutions #endif //#define CHECK_CERTS // define this to check all certificates produced //#define CHECK_LATTICE // define this to check that solutions lie in correct lattice //#define CHECK_INDEX //#define CHECK_CLAIMS //#define REDUCE_INTERMEDIATES // reduces intermediate solutions //#define HOLZER_MEASURES // shows Holzer measure of solutions before/after reduction //#define TL2(nnn) cout<<"Calling lem2() at point "<=n1); while(!reduced) { swap(n1,n2); swap(x,xx); swap(y,yy); dot = c1*x*xx + c2*y*yy; nearest(alpha,dot,n1); reduced = is_zero(alpha); if(!reduced) { xx-=alpha*x; yy-=alpha*y; n2 = c1*sqr(xx) + c2*sqr(yy); } reduced=(n2>=n1); } #ifdef CHECK_ALL #ifdef DEBUG_MINV cout<<"minv called with a=["< 0)) {g= f; f=-e; e=g; return;} if((e< 0)&&(f<=0)) {::negate(e); ::negate(f); return;} if((e>=0)&&(f< 0)) {g=-f; f= e; e=g; return;} return; } // Solve Legendre's equation when ab=1: void lem1plus(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z) { static bigint one, zero; one=1; zero=0; GIgcd(q,one,c,zero,x,y); z=1; if(b==-one) {y=-y;} // So we have qx=-y, qy=x (mod c) #ifdef DEBUG_LEM1 if(!CHECK_LEG(a,b,c,n,p,q,x,y,z)) { cout<<"Wrong solution in lem1plus!\n"; show_all(a,b,c,n,p,q,x,y,z); } #endif // DEBUG_LEM1 return; } // Solve Legendre's equation when ab=-1: // (Trivial solution is (1,1,0), but we want a solution in the correct lattice, // satisfying y=qx (mod c) where q^2=1 (mod c)) // void lem1minus(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z) { #ifdef DEBUG_LEM1 cout<<"lem1minus: ab=-1, c="< factorbase = vector_union(vector_union(pdivs(a),pdivs(b)),pdivs(c)); return legendre_solve(a,b,c,factorbase,x,y,z,use_lll); } int legendre_solve(const bigint& a, const bigint& b, const bigint& c, const vector& factorbase, bigint& x, bigint& y, bigint& z, int use_lll) { #ifdef DEBUG_LEGENDRE cout<<"Starting to solve Legendre equation with coeffs " < apdivs=factorbase, bpdivs=factorbase, cpdivs=factorbase; sqfdecomp(a1,apdivs,a2,a3); yfac*=a3; zfac*=a3; sqfdecomp(b1,bpdivs,b2,b3); xfac*=b3; zfac*=b3; sqfdecomp(c1,cpdivs,c2,c3); xfac*=c3; yfac*=c3; cancel1(xfac,yfac,zfac); #ifdef DEBUG_LEGENDRE cout<<"After squarefree reduction, new coeffs are " <1, so { // we can reduce b with lem2 if(bb>1) { TL2(1) lem2b(a,b,c,n,p,q,bb,x,y,z); return; } } // Now |b| is not a square if(isqrt(absc,cc)) { if(cc>1) // then |c| = cc^2 and we can reduce c with lem2 { TL2(2) lem2c(a,b,c,n,p,q,cc,x,y,z); return; } } // Now |b|, |c| are not squares if(isqrt(absa,aa)) { if(aa>1) // then |a| = aa^2 and we can reduce a with lem2 { TL2(3) lem2a(a,b,c,n,p,q,aa,x,y,z); return; } } // Now |a|, |b|, |c| are all not squares // Sort so that |a|>=|b|>=|c|: int perm; if(absa>absb) { if(absc>absa) perm=4; else {if(absb>absc) perm=0; else perm=1;} } else // absb>absa { if(absa>absc) perm=2; else {if(absc>absb) perm=5; else perm=3;} } switch(perm) { case 0: lem4(a,b,c,n,p,q,x,y,z); break; case 1: lem4(a,c,b,-n,-q,-p,x,z,y); break; case 2: lem4(b,a,c,-p,-n,-q,y,x,z); break; case 3: lem4(b,c,a,p,q,n,y,z,x); break; case 4: lem4(c,a,b,q,n,p,z,x,y); break; case 5: lem4(c,b,a,-q,-p,-n,z,y,x); break; } #ifdef CHECK_ALL CHECK_LEG(a,b,c,n,p,q,x,y,z); #endif // CHECK_ALL } static int permtable[6][4] = {{0,1,2,3}, {0,1,3,2}, {0,2,1,3}, {0,2,3,1}, {0,3,1,2}, {0,3,2,1}}; // Solve Legendre's equation ax^2+by^2+cz^2=0 using Rusin's reduction, // given "certificate" (n,p,q) satisfying a|n^2+bc, b|p^2+ac, c|q^2+ab. // // All this does is sort the coeffs and pass to lem4_1() // int legendre_solve_cert_1(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z, bigint& u) { #ifdef DEBUG_LEGENDRE level++; cout<<"\nLevel "<1, so we return { if(u>1) return 2; } // Now |b| is not a square if(isqrt(absc,u)) // then |c| = u^2 with u>1 and we return { if(u>1) return 3; } // Now |b|, |c| are not squares if(isqrt(absa,u)) // then |a| = u^2 with u>1 and we return { if(u>1) return 1; } // Now |a|, |b|, |c| are all not squares // Sort so that |a|>=|b|>=|c|: int perm, res=-1, newres; if(absa>absb) { if(absc>absa) perm=4; else {if(absb>absc) perm=0; else perm=1;} } else // absb>absa { if(absa>absc) perm=2; else {if(absc>absb) perm=5; else perm=3;} } switch(perm) { case 0: res = lem4_1(a,b,c,n,p,q,x,y,z,u); break; case 1: res = lem4_1(a,c,b,-n,-q,-p,x,z,y,u); break; case 2: res = lem4_1(b,a,c,-p,-n,-q,y,x,z,u); break; case 3: res = lem4_1(b,c,a,p,q,n,y,z,x,u); break; case 4: res = lem4_1(c,a,b,q,n,p,z,x,y,u); break; case 5: res = lem4_1(c,b,a,-q,-p,-n,z,y,x,u); break; } if(res!=-1) {newres=permtable[perm][res];} else newres=res; #ifdef DEBUG_LEGENDRE if(newres!=res) cout<<"Permutation "<1) {cout<<"Input error: a and b not coprime!"<1) {cout<<"Input error: b and c not coprime!"<1) {cout<<"Input error: c and a not coprime!"<0, b>0, c<0) // we may assume a, b, c do not all have the same sign { #ifdef WATCH_REDUCTION verb=1; #endif if(is_positive(a)) { if(is_positive(b)) { conic_mordell_reduce(a,b,c,x0,y0,z0,verb); } else { if(is_positive(c)) { conic_mordell_reduce(a,c,b,x0,z0,y0,verb); } else { conic_mordell_reduce(-c,-b,-a,z0,y0,x0,verb); } } } else { if(is_positive(b)) { if(is_positive(c)) { conic_mordell_reduce(b,c,a,y0,z0,x0,verb); } else { conic_mordell_reduce(-a,-c,-b,x0,z0,y0,verb); } } else { conic_mordell_reduce(-a,-b,-c,x0,y0,z0,verb); } } } // Finds a certificate or returns 0 if none exists: int make_certificate(const bigint& a, const bigint& b, const bigint& c, bigint& n, bigint& p, bigint& q) { if(!sqrt_mod_m(n,-b*c,abs(a))) return 1; if(!sqrt_mod_m(p,-a*c,abs(b))) return 2; if(!sqrt_mod_m(q,-a*b,abs(c))) return 3; return 0; } int make_certificate(const bigint& a, const vector& apdivs, const bigint& b, const vector& bpdivs, const bigint& c, const vector& cpdivs, bigint& n, bigint& p, bigint& q) { if(!sqrt_mod_m(n,-b*c,abs(a),apdivs)) return 1; if(!sqrt_mod_m(p,-a*c,abs(b),bpdivs)) return 2; if(!sqrt_mod_m(q,-a*b,abs(c),cpdivs)) return 3; return 0; } // Check to see if b is congruent to +- c mod a (assumed positive!) // if not, how much to divide a by to ensure that congruence holds? bigint should(const bigint& a, const bigint& b, const bigint& c) { bigint u=gcd(a,b-c); bigint v=gcd(a,b+c); if(u>v) return a/u; else return a/v; } // minv finds shortest vector [xmin,ymin] in lattice generated by // integer vectors a=[a1,a2], b=[b1,b2] // with respect to norm c1*x^2+c2*y^2 (c1, c2>0) // Throughout: [x,y] has norm n1 // [xx,yy] has norm n2 & inner prod = dot. void legendre_via_lll(const bigint& a, const bigint& b, const bigint& c, const bigint& k1, const bigint& k2, const bigint& k3, bigint& x, bigint& y, bigint& z) { int i; bigint g,u,v,adash,bdash,bc=b*c, alpha, beta, gamma; g = bezout(b,c,u,v); if(g!=1) {cout<<"b and c not coprime!\n"; return;} g = bezout(a,bc,adash,bdash); if(g!=1) {cout<<"a and b*c not coprime!\n"; return;} alpha = (c*bdash*k1) % a; beta = (u*adash*b*k3) % bc; gamma = (v*adash*c*k2) % bc; vec_m * vecs = new vec_m[4]; for(i=0; i<=3; i++) vecs[i] = vec_m(3); vecs[0][1] = abs(a); vecs[0][2] = abs(b); vecs[0][3] = abs(c); vecs[1][1] = bc; vecs[1][2] = 0; vecs[1][3] = 0; vecs[2][1] = a*beta; vecs[2][2] = a; vecs[2][3] = 0; vecs[3][1] = alpha*beta+gamma; vecs[3][2] = alpha; vecs[3][3] = 1; #ifdef DEBUG_LLL cout<<"Basis for lattice L:\n"; cout<0, b>0, c<0. void legendre_param(const bigint& a, const bigint& b, const bigint& c, const bigint& x0, const bigint& y0, const bigint& z0, quadratic& qx, quadratic& qy, quadratic& qz) { bigint a1=a, y1=y0, z1=z0, u, v, e; bigint g=abs(gcd(y0,z0)); static bigint zero; zero=0; int scale = (g>1); if(scale) {a1/=sqr(g); y1/=g; z1/=g;} bigint z12=sqr(z1); qx.set( a1*x0, 2*b*y1, -b*x0); qy.set(-a1*y1, 2*a1*x0, b*y1); qz.set( a1*z1, zero, b*z1); #ifdef DEBUG_LEGENDRE_PARAM if(!testparamsol(a1,0,c,-b,qx,qy,qz,0)) cout<<"Parametric solution wrong at (1)\n"; else cout<<"Correct parametrization (1):\n" <0) {qz.reduce(m); qx.transform(m); qy.transform(m);} else { if(a*c>0) {qy.reduce(m); qz.transform(m); qx.transform(m);} else {qx.reduce(m); qy.transform(m); qz.transform(m);} } #ifdef DEBUG_LEGENDRE_PARAM if(!testparamsol(a1,zero,c,-b,qx,qy,qz,0)) cout<<"Parametric solution wrong at (3)\n"; else cout<<"Correct parametrization (3):\n" <0)&&(sc>0)) || ((sa>0)&&(sb<0)&&(sc<0)) ) { which=1; test=b*c; ok=(sqr(x0)<=test); } else { if( ((sb<0)&&(sa>0)&&(sc>0)) || ((sb>0)&&(sa<0)&&(sc<0)) ) { which=2; test=a*c; ok=(sqr(y0)<=test); } else { which=3; test=a*b; ok=(sqr(z0)<=test); } } if(ok) { if(verb) cout<<"...nothing to do, already reduced\n"; return; } quadratic qx, qy, qz; legendre_param(a,b,c,x0,y0,z0,qx,qy,qz); if(verb) { cout<<"Parametrizing quadratics are\n"; cout<=|b|>=|c| and none are squares. If |b|=|c|=1 call lem1 // if((abs(b)==1)) // &&(abs(c)==1)) { lem1(a,b,c,k1,k2,k3,x,y,z); return 0; } w=(k1*invmod(c,a))%a; minv(one,w,zero,a,abs(b),abs(c),w1,w2); t=(b*sqr(w1)+c*sqr(w2))/a; bc=b*c; lem3(t,bc,aa,bb,cc,gamma,alpha); #ifdef DEBUG_LEGENDRE cout<<"w1,w2="<1) {BACK(4,u,2) return 2;} u=gcd(alpha,c); if(u>1) {BACK(5,u,3) return 3;} // From this point alpha=1, // t = aa*cc*gamma^2, // bc = bb*cc. #ifdef CHECK_CLAIMS if(alpha!=1) cout<<"alpha="<1) {BACK(6,u,3) return 3;} // From this point, d1|w1, d1|c #ifdef CHECK_CLAIMS if(!div(d1,w1)) cout<<"d1 ndiv w1\n"; if(!div(d1,c)) cout<<"d1 ndiv c\n"; #endif d2=cc/d1; e=gcd(d2,w2); u=abs(d2/e); if(u>1) {BACK(7,u,2) return 2;} // From this point, d2|w2, d2|b, cc=d1*d2 #ifdef CHECK_CLAIMS if(!div(d2,w2)) cout<<"d2 ndiv w2\n"; if(!div(d2,b)) cout<<"d2 ndiv b\n"; if(cc!=d1*d2) cout<<"Identity 4 fails\n"; #endif d=gcd(b,gamma); e=gcd(d,w2); u=abs(d/e); if(u>1) {BACK(8,u,2) return 2;} if(d>1) {BACK(9,d,2) u=d; return 2;} // From this point, (b,gamma)=1 #ifdef CHECK_CLAIMS if(gcd(b,gamma)!=1) cout<<"(b,gamma) not coprime\n"; #endif d=gcd(c,gamma); e=gcd(d,w1); u=abs(d/e); if(u>1) {BACK(10,u,3) return 3;} if(d>1) {BACK(11,d,3) u=d; return 3;} // From this point, (c,gamma)=1 // Also: (d1,w2)=(d2,w1)=1 #ifdef CHECK_CLAIMS if(gcd(c,gamma)!=1) cout<<"***(c,gamma) not coprime\n"; if(gcd(d1,w2)!=1) cout<<"***(d1,w2) not coprime\n"; if(gcd(d2,w1)!=1) cout<<"***(d2,w1) not coprime\n"; #endif bigint n1, n2, n3, cc1, cc2; bigint m1=c/d1, m2=b/d2; // cout<<"a, gamma, bc = "<1) // we have a square factor of a: reduce { BACK(12,cc1,1) u=cc1; return 1; } if(cc2>1) // we have a square factor of aa: divide it out // and adjust gamma { // cout<<"cc2="<1) { #ifdef DEBUG_LEGENDRE cout<<"**** gammafactor = "<1) {BACK(13,u,3) return 3;} // From this point, d1|w1star #ifdef CHECK_CLAIMS if(!div(d1,w1star)) cout<<"d1 ndiv w1star\n"; #endif e=gcd(d2,w2star); u=abs(d2/e); if(u>1) {BACK(14,u,2) return 2;} // From this point, d2|w2star #ifdef CHECK_CLAIMS if(!div(d2,w2star)) cout<<"d2 ndiv w2star\n"; #endif } // // Now (w1star,gammastar)=(w2star,gammastar)=1 // and (w1star,n2)=(w2star,n2)=1 // and d1|w1star, d2|w2star. // #ifdef CHECK_CLAIMS // cout<<"checking coprimality..."<1) {u=d; return 1;} // since n3|a // now u^2|n2 u2=sqr(u); n2/=u2; aa/=u2; gamma*=u; break; // we will try again... case 2: case 3: d = gcd(u,b); if(d>1) {u=d; return 2;} d = gcd(u,c); if(d>1) {u=d; return 3;} default: return -1; // should not happen } // Now res=0 if we have solution, // =1 if we have adjusted aa and want to try again. } while (res); #ifdef CHECK_ALL if(!CHECK_LEG(aa,bb,cc,k1dash,k2dash,k3dash,x1,y1,z1)) { cout<<" wrong solution for new eqn!\n"; show_all(aa,bb,cc,k1dash,k2dash,k3dash,x1,y1,z1); } #endif // CHECK_ALL #ifdef CHECK_INDEX bigint det_factor=gamma*aa; cout<<"Mapping solution back, reduced det = "<1) cout<<"\t***!!!***"; cout<1) { #ifdef DEBUG_LEGENDRE int divide_ok=1; if(!divide_exact(x,n2,x1)) { cout<<"x="<1) { m1/=d; m2/=d; m3*=d; flag13=flag23=1; } } if(flag13) { d=abs(gcd(m1,m3)); flag13=0; if(d>1) { m1/=d; m2*=d; m3/=d; c1*=d; flag12=flag23=1; } } if(flag23) { d=abs(gcd(m2,m3)); flag23=0; if(d>1) { m1*=d; m2/=d; m3/=d; c2*=d; flag12=flag13=1; } } } #ifdef CHECK_LEM3 if( (a==sqr(c1)*m1*m3) && (b==sqr(c2)*m2*m3) && (gcd(m1,m3)==1) && (gcd(m2,m3)==1) && (gcd(m1,m2)==1) ) {;} else { cout<<"Error in lem3("<=|b|>=|c| and none are squares. If |b|=|c|=1 call lem1 // if(abs(b)==1) { lem1(a,b,c,n,p,q,x,y,z); return; } k=(n*invmod(c,a))%a; minv(one,k,zero,a,abs(b),abs(c),k1,k2); // cout<<"k1,k2="<1) {TL2(4) lem2b(a,b,c,n,p,q,betab,x,y,z); return;} bigint betac=gcd(beta,c); if(betac>1) {TL2(5) lem2c(a,b,c,n,p,q,betac,x,y,z); return;} // From this point beta=1, // t = aa*cc*alpha^2, // bc = bb*cc. #ifdef CHECK_CLAIMS if(beta!=1) cout<<"beta="<1) {TL2(6) lem2c(a,b,c,n,p,q,u,x,y,z); return;} // From this point, d1|k1, d1|c #ifdef CHECK_CLAIMS if(!div(d1,k1)) cout<<"d1 ndiv k1\n"; if(!div(d1,c)) cout<<"d1 ndiv c\n"; #endif d2=cc/d1; e=gcd(d2,k2); u=abs(d2/e); if(u>1) {TL2(7) lem2b(a,b,c,n,p,q,u,x,y,z); return;} // From this point, d2|k2, d2|b, cc=d1*d2 #ifdef CHECK_CLAIMS if(!div(d2,k2)) cout<<"d2 ndiv k2\n"; if(!div(d2,b)) cout<<"d2 ndiv b\n"; if(cc!=d1*d2) cout<<"Identity 4 fails\n"; #endif d=gcd(b,alpha); e=gcd(d,k2); u=abs(d/e); if(u>1) {TL2(8) lem2b(a,b,c,n,p,q,u,x,y,z); return;} if(d>1) {TL2(9) lem2b(a,b,c,n,p,q,d,x,y,z); return;} // From this point, (b,alpha)=1 #ifdef CHECK_CLAIMS if(gcd(b,alpha)!=1) cout<<"(b,alpha) not coprime\n"; #endif d=gcd(c,alpha); e=gcd(d,k1); u=abs(d/e); if(u>1) {TL2(10) lem2c(a,b,c,n,p,q,u,x,y,z); return;} if(d>1) {TL2(11) lem2c(a,b,c,n,p,q,d,x,y,z); return;} // From this point, (c,alpha)=1 // Also: (d1,k2)=(d2,k1)=(k1,alpha)=(k2,alpha)=1 #ifdef CHECK_CLAIMS if(gcd(c,alpha)!=1) cout<<"***(c,alpha) not coprime\n"; if(gcd(d1,k2)!=1) cout<<"***(d1,k2) not coprime\n"; if(gcd(d2,k1)!=1) cout<<"***(d2,k1) not coprime\n"; #endif #define AGREE_PAPER bigint aa1, aa2, aa3, cc1, cc2; bigint m1=c/d1, m2=b/d2, aaa=invmod(a*alpha,bc); // cout<<"a, alpha, bc, aaa = "<1) // we have a square factor of a: reduce { TL2(12) lem2a(a,b,c,n,p,q,cc1,x,y,z); return; } if(cc2>1) // we have a square factor of aa: divide it out // and adjust alpha { // cout<<"cc2="<1) // then d also divides k2 so we can divide it out { k1/=d; k2/=d; alpha/=d; aaa=invmod(a*alpha,bc); } d=gcd(k2,alpha); if(d>1) // then d also divides k1 so we can divide it out { k1/=d; k2/=d; alpha/=d; aaa=invmod(a*alpha,bc); } // Now (k1,alpha)=(k2,alpha)=1 #ifdef CHECK_CLAIMS if(gcd(k1,alpha)!=1) cout<<"***(k1,alpha) not coprime\n"; if(gcd(k2,alpha)!=1) cout<<"***(k2,alpha) not coprime\n"; #endif d=gcd(k1,k2); #ifdef CHECK_CLAIMS if(!div(sqr(d),aa1*aa3*sqr(aa2))) {cout<<"***Identity 9 fails\n"; // cout<<"aa,bb,cc="<1; if(gcd(k1,aa)>1) { #ifdef DEBUG_LEGENDRE cout<<" Special K..."<1) { #ifdef DEBUG_LEGENDRE cout<<" Special K...cc1="<1: square factor of a"<1) { #ifdef DEBUG_LEGENDRE cout<<" Special K...cc2>1"<1) {k1/=d;k2/=d;alpha/=d;} d=gcd(k1,k2); if(d>1) { e=gcd(d,aa3); if(e>1) { #ifdef DEBUG_LEGENDRE cout<<" Special K...first e>1"<1) { #ifdef DEBUG_LEGENDRE cout<<" Special K...second e>1"<1) cout<<"\t***!!!***"; cout<1) { #ifdef DEBUG_LEGENDRE cout<<"Dividing out by factor d="< //Kraus' conditions: int valid_invariants(const bigint& c4, const bigint& c6) { bigint disc = c4*c4*c4; disc -= c6*c6; if (sign(disc)==0) return 0; if (ndiv(1728,disc)) return 0; // need c4^3-c6^2=1728D, with D|=0 long x6= mod(c6,27); if((x6==9)||(x6==-9)) return 0; // need c6 != +-9 (mod 27) x6 = mod(c6,4); if(x6==-1) return 1; // OK if c6 = -1 (mod 4) if(ndiv(16,c4)) return 0; // else need c4=0 (mod 16) x6=mod(c6,32); // and return ((x6==0) || (x6==8)); // c6 = 0,8 (mod 32). } void c4c6_to_ai(const bigint& c4, const bigint& c6, bigint& a1, bigint& a2, bigint& a3, bigint& a4, bigint& a6, bigint& b2, bigint& b4, bigint& b6, bigint& b8) { // cout<<"In c4c6_to_ai() with c4="<>skipws; is>>c; // cout<<"First char read = "<> c4 >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } is >> c6 >> c; if(c!='}') { cout << "syntax error on curve input" << endl; abort(); } if (valid_invariants(c4, c6)) { const bigint& b2 = BIGINT(mod(-c6,12)); const bigint& b22 = b2*b2; const bigint& b4 = (b22-c4)/24; const bigint& b6 = (-b2*b22+36*b2*b4-c6)/216; a1 = (odd(b2) ? 1 : 0); a3 = (odd(b6) ? 1 : 0); a2 = (b2-a1*a1)/4; a4 = (b4-a1*a3)/2; a6 = (b6-a3*a3)/4; } else { cout << " ## invalid invariants, reading as null curve\n"; a1=0; a2=0; a3=0;a4=0; a6=0; } } break; case '[': // cout<<"Reading [a1,a2,a3,a4,a6]...\n"; is >> a1 >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } is >> a2 >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } is >> a3 >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } is >> a4 >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } is >> a6 >> c; if(c!=']') { cout << "syntax error on curve input" << endl; abort(); } // cout<<"["<> a1 >> a2 >> a3 >> a4 >> a6; // cout<<"["< 0) os << " +" << a1 << "xy" ; else os << " " << a1 << " xy" ; } if(a3==0){ ; } else { if(a3==1) os << " + y" ; else if(a3==-1) os << " - y" ; else if(a3 > 0) os << " +" << a3 << "y" ; else os << " " << a3 << " y" ; } os << " = x^3" ; if(a2==0){ ; } else { if(a2==1) os << " + x^2" ; else if(a2==-1) os << " - x^2" ; else if(a2 > 0) os << " +" << a2 << "x^2" ; else os << " " << a2 << " x^2" ; } if(a4==0){ ; } else { if(a4==1) os << " + x" ; else if(a4==-1) os << " - x" ; else if(a4 > 0) os << " +" << a4 << "x" ; else os << " " << a4 << " x" ; } if(a6==0){ ; } else { if(a6==1) os << " + 1" ; else if(a6==-1) os << " - 1" ; else if(a6 > 0) os << " +" << a6 ; else os << " " << a6 ; } os << "$" ; return ; } // end of file: curve.cc // // The following functions from OM's code are never used // // /* number of solutions to y^2+ay=b mod p */ // long quadroots(const bigint& a, const bigint& b, long p ) // { // if (p == 2) { // if (!odd(a)) return(1) ; // if (!odd(b)) return(2) ; // return(0) ; // } // else { // long d = I2long((a*a+4*b)%p); // if (d==0) return 1; // if (legendre(d,p)==1) return 2; // return 0; // } // } // // for finding number of points mod 2 and 3 // long pointsmod(long p, const Curve& E) // { // bigint a1,a2,a3,a4,a6; // E.getai(a1,a2,a3,a4,a6); // if (p == 2) // return( 1 + quadroots(a3, a6, 2) + // quadroots(a1 + a3, 1 + a2 + a4 + a6, 2)) ; // if (p ==3) // return( 1 + quadroots(a3, a6, 3) + // quadroots(a1 + a3, 1 + a2 + a4 + a6, 3) // + quadroots(-a1 + a3, -1 + a2 - a4 + a6, 3)) ; // // Now p>3 // long count=0; // for (long x=0;x #include #include #include void cubic::init() { coeffs = new bigint[4]; } cubic::~cubic() { delete [] coeffs; } void cubic::transform(const unimod& m) { bigint m112=sqr(m(1,1)); bigint m113=m112*m(1,1); bigint m212=sqr(m(2,1)); bigint m213=m212*m(2,1); bigint m222=sqr(m(2,2)); bigint m223=m222*m(2,2); bigint m122=sqr(m(1,2)); bigint m123=m122*m(1,2); coeffs[0] = m113*a() + m(2,1)*m112*b() + m212*m(1,1)*c() + m213*d(); coeffs[1] = m123*a() + m(2,2)*m122*b() + m222*m(1,2)*c() + m223*d(); coeffs[3] = 3*m(1,2)*m112*a() + (m(2,2)*m112 + 2*m(2,1)*m(1,2)*m(1,1))*b() + (2*m(2,2)*m(2,1)*m(1,1) + m212*m(1,2))*c() + 3*m(2,2)*m212*d(); coeffs[2] = 3*m122*m(1,1)*a() + (2*m(2,2)*m(1,2)*m(1,1) + m(2,1)*m122)*b() + (m222*m(1,1) + 2*m(2,2)*m(2,1)*m(1,2))*c() + 3*m222*m(2,1)*d(); } void cubic::x_shift(const bigint& e, unimod& m) { coeffs[3] += e*(c()+e*( b()+ e*a())); coeffs[2] += e*(2*b()+3*e*a()); coeffs[1] += 3*e*a(); m.x_shift(e); } void cubic::y_shift(const bigint& e, unimod& m) { coeffs[0] += e*(b()+e*( c()+ e*d())); coeffs[1] += e*(2*c()+3*e*d()); coeffs[2] += 3*e*d(); m.y_shift(e); } void cubic::invert(unimod& m) { swap(coeffs[0],coeffs[3]); ::negate(coeffs[0]); swap(coeffs[1],coeffs[2]); ::negate(coeffs[2]); m.invert(); } bigint cubic::j_c1() const { bigint b2=sqr(b()); bigint b3=b()*b2; bigint b4=b()*b3; bigint b5=b()*b4; bigint b6=b()*b5; bigint a2=sqr(a()); bigint a3=a()*a2; bigint a4=a()*a3; bigint c2=sqr(c()); bigint c3=c()*c2; bigint c4=c()*c3; bigint c5=c()*c4; bigint c6=c()*c5; bigint d2=sqr(d()); bigint d3=d()*d2; bigint d4=d()*d3; bigint ac=a()*c(), bd=b()*d(); return - 108*b3*a2*d() - 3*b4*c2 + 54*a2*c4 + 18*b5*d() + 243*a2*d2*b2 - 54*b3*ac*d() - 162*bd*c2*a2 - 54*a3*c3 + 486*a3*bd*c() + 3*c4*b2 - 18*c5*a() + 54*c3*a()*bd - 243*d2*a2*c2 + 162*d2*ac*b2 + 2*c6 - 729*a4*d2 - 2*b6 + 18*b4*ac - 27*a2*b2*c2 + 729*d4*a2 + 54*b3*d3 + 108*c3*d2*a() - 18*c4*bd + 27*d2*c2*b2 - 486*d3*ac*b() - 54*d2*b4; } bigint cubic::j_c2() const { bigint b2=sqr(b()); bigint b3=b()*b2; bigint b4=b()*b3; bigint b5=b()*b4; bigint b6=b()*b5; bigint a2=sqr(a()); bigint a3=a()*a2; bigint a4=a()*a3; bigint c2=sqr(c()); bigint c3=c()*c2; bigint c4=c()*c3; bigint c5=c()*c4; bigint c6=c()*c5; bigint d2=sqr(d()); bigint d3=d()*d2; bigint d4=d()*d3; bigint ac=a()*c(), bd=b()*d(); return - 108*b3*a2*d() + 12*b4*c2 - 216*a2*c4 - 72*b5*d() - 486*a3*c2*d() + 270*a2*c3*b() - 90*b3*c2*a() - 972*a2*d2*b2 + 216*b3*ac*d() + 648*bd*c2*a2 - 54*a3*c3 + 486*a3*bd*c() - 16*c3*b3 + 216*d2*b3*a() + 72*d()*b4*c() + 72*c4*b()*a() + 216*d()*c3*a2 - 432*d()*b2*a()*c2 - 729*a4*d2 - 2*b6 + 18*b4*ac - 27*a2*b2*c2 + 6*b5*c() - 648*b2*c()*a2*d() + 162*a()*d()*b4 + 1458*a3*d2*b(); } bigint cubic::j_c3() const { bigint a = coeffs[0], b=coeffs[1], c=coeffs[2], d=coeffs[3]; bigint b2=b*b; bigint b3=b*b2; bigint b4=b*b3; bigint b5=b*b4; bigint b6=b*b5; bigint a2=a*a; bigint a3=a*a2; bigint a4=a*a3; bigint c2=c*c; bigint c3=c*c2; bigint c4=c*c3; bigint c5=c*c4; bigint c6=c*c5; bigint d2=d*d; bigint d3=d*d2; bigint d4=d*d3; return 108*b3*a2*d - 12*b4*c2 + 216*a2*c4 + 72*b5*d - 486*a3*c2*d + 270*a2*c3*b - 90*b3*c2*a + 972*a2*d2*b2 - 216*b3*c*a*d - 648*b*c2*a2*d + 54*a3*c3 - 486*a3*d*c*b - 16*c3*b3 + 216*d2*b3*a + 72*d*b4*c + 72*c4*b*a + 216*d*c3*a2 - 432*d*b2*a*c2 + 729*a4*d2 + 2*b6 - 18*b4*a*c + 27*a2*b2*c2 + 6*b5*c - 648*b2*c*a2*d + 162*a*d*b4 + 1458*a3*d2*b; } //#define DEBUG bigcomplex cubic::hess_root() const { bigfloat discr = I2bigfloat(disc()); if(!is_positive(disc())) { cout<<"Error: hess_root called with negative dicriminant!\n"; return to_bigfloat(0); } bigfloat P = I2bigfloat(p_semi()); bigfloat Q = I2bigfloat(q_semi()); bigfloat delta = sqrt(3*discr); bigcomplex gamma(-Q,delta); gamma/=(2*P); return gamma; } void cubic::hess_reduce(unimod& m) { int s=1; bigint k; m.reset(); while(s) { s=0; k = roundover(-q_semi(),2*p_semi()); if(!is_zero(k)) { s=1; x_shift(k,m); #ifdef DEBUG cout << "Shift by " << k << ": " << (*this) << endl; #endif } if(p_semi()>r_semi()) { s=1; invert(m); #ifdef DEBUG cout << "invert: " << (*this) << endl; #endif } } if(a()<0) {::negate(coeffs[0]); ::negate(coeffs[2]);} } void cubic::mathews_reduce(unimod& m) { int s=1; bigint k; bigfloat alpha; m.reset(); while(s) { s=0; if(mat_c1()<0) { s=1; invert(m); #ifdef DEBUG cout << "invert: " << (*this) << endl; #endif } alpha = real_root(); k = Iround(-alpha/2 - I2bigfloat(b())/I2bigfloat(2*a())); x_shift(k,m); #ifdef DEBUG cout << "Shift by "<0) { s=1; x_shift(plus1,m); #ifdef DEBUG cout << "Shift by +1: "<<(*this)<0) { s=1; x_shift(minus1,m); #ifdef DEBUG cout << "Shift by -1: "<<(*this)<=0) { cout<<"Error: real_root called with positive dicriminant!\n"; return to_bigfloat(0); } bigfloat P = I2bigfloat(p_semi()); bigfloat Q = I2bigfloat(q_semi()); bigfloat A = I2bigfloat(a()); if(is_zero(P)) { bigfloat Q = I2bigfloat(q_semi()); bigfloat R = I2bigfloat(r_semi())/Q; bigfloat eta3 = I2bigfloat(d())/A - (I2bigfloat(c())*R)/(3*A); bigfloat eta = cube_root(eta3); bigfloat alpha = -eta - R; return alpha; } bigfloat U = I2bigfloat(u_semi()); bigfloat delta = sqrt(-3*discr); bigfloat gamma1 = (-Q+delta)/(2*P); // roots of Hessian bigfloat gamma2 = (-Q-delta)/(2*P); // bigfloat eta3 = (U-3*A*delta)/(U+3*A*delta); bigfloat eta = cube_root(eta3); bigfloat alpha = (eta*gamma1-gamma2)/(eta-1); return alpha; } eclib-2013-01-01/libsrc/isogs.cc0000644000175200017520000003652511774563612013040 00000000000000// isogs.cc: implementation of class IsogenyClass and related functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #define DEBUG #ifdef MPFP #define EPS1 0.0001 #else #define EPS1 0.1 // slower than 0.001 but doesn't miss so many isogenies // when in ordinary double precision... #endif #define close(x,y,e) (abs((x)-(y))<(e)) vector lisog(const CurveRed& CR, Cperiods& cp, long ell, int verbose) //INPUT: a curve of type CurveRed, so we know its invariants & conductor // the periods of the curve in a Cperiods type // a prime ell (primality not checked) //OUTPUT: an array of the curves isogenous to the given curve (possibly empty) { if(ell==2) return twoisog(CR,verbose); if(ell==3) return threeisog(CR,verbose); bigcomplex x,X,y,Y,z; bigint a1,a2,a3,a4,a6, b2,b4,b6,b8; CR.getai(a1,a2,a3,a4,a6); CR.getbi(b2,b4,b6,b8); bigfloat ra1=I2bigfloat(a1),ra2=I2bigfloat(a2),ra3=I2bigfloat(a3), ra4=I2bigfloat(a4),ra6=I2bigfloat(a6), rb2=I2bigfloat(b2),rb4=I2bigfloat(b4),rb6=I2bigfloat(b6); // b8 isn't used if (verbose>1) cout<<"\nra1: "< ans; // other loop variables: bigcomplex t, w, ti, ui; bigint ell1, ad4, ad6, lad4, lad6; bigfloat rad4, rad6; bigfloat xell(to_bigfloat(ell)); static bigfloat two(to_bigfloat(2)); static bigfloat three(to_bigfloat(3)); static bigfloat four(to_bigfloat(4)); static bigfloat five(to_bigfloat(5)); static bigfloat six(to_bigfloat(6)); static bigfloat seven(to_bigfloat(7)); ell1 = ell; bigint ell2 = sqr(ell1); bigint ell3 = ell1*ell2; bigint ell4 = ell2*ell2; bigint ell6 = ell2*ell4; for (subgroup = 1; subgroup <= nsubgroups; subgroup++) { if (ell==2) { if (subgroup==1) z = w1/two; else if (subgroup==2) z = w2/two; else z = (w1 + w2)/two; } else { if (subgroup==1) z = w1/xell; else if (type==1) z = (w1 - w2 - w2)/xell; else z = w2/xell; } t = w = to_bigfloat(0); if (verbose>1) cout<<"Subgroup: "<1) cout<<"bigint values are "<0) cout << "Testing curve " << newcurve << endl; Curvedata newCD(newcurve,1); if ((Curve)CR == (Curve)newCD) continue; // cout<<" ## Warning! curve possibly "<1) cout<<"new curve:\n"<<(Curve)newCD<1) cout << "Not close enough\n"; rad4 = rad4*I2bigfloat(ell4); rad6 = rad6*I2bigfloat(ell6); if (verbose>1) cout<<"new a4: "<1) cout<<"bigint values are "<0) cout << "Testing curve " << newcurve << endl; Curvedata newCD(newcurve,1); if ((Curve)CR == (Curve)newCD) cout<<" ## Warning! curve possibly "<1) cout<<"new curve:\n"<<(Curve)newCD<1) cout << "Not close enough\n"; } } // ends for-loop return ans; } int semistable(const CurveRed& CR) { int ans=1; vector plist = getbad_primes(CR); vector::iterator pvar = plist.begin(); while(pvar!=plist.end()) if(getord_p_N(CR,*pvar++)>1) return 0; return ans; } int comprat(const bigint& n1, const bigint& d1, const bigint& n2, const bigint& d2) { return n1*d2==n2*d1; } vector getelllist(const CurveRed& CR) { static const bigint j11a = BIGINT(-32768); static const bigint j11b = BIGINT(-121); static const bigint j11c = BIGINT(-24729001); static const bigint nj17a = BIGINT(-297756989); static const bigint dj17a = BIGINT(2); static const bigint nj17b = BIGINT(-882216989); static const bigint dj17b = BIGINT(131072); static const bigint j37a = BIGINT(-9317); static const bigint j37b = atoI("-162677523113838677"); static const bigint j19 = BIGINT(-884736); static const bigint j43 = BIGINT(-884736000); static const bigint j67 = atoI("-147197952000"); static const bigint j163 = atoI("-262537412640768000"); static const bigint one = BIGINT(1); vector ans; ans.reserve(4); ans.push_back(2); ans.push_back(3); ans.push_back(5); ans.push_back(7); bigint N = getconductor(CR); if(!semistable(CR)) { ans.push_back(13); bigint njay=pow(getc4(CR),3); bigint djay=getdiscr(CR); bigint g=gcd(njay,djay); if(!is_one(g)) {njay/=g; djay/=g;} if(djay<0) {djay=-djay; njay=-njay;} // Thanks to Mark Watkins if(is_one(djay)) { if((njay==j11a)||(njay==j11b)||(njay==j11c)) ans.push_back(11); else {if((njay==j37a)||(njay==j37b)) ans.push_back(37); else {if(njay==j19) ans.push_back(19); else {if(njay==j43) ans.push_back(43); else {if(njay==j67) ans.push_back(67); else {if(njay==j163) ans.push_back(163); }}}}} } // end if integral cases else // check with j17a, j17b { if(div(17,N)) if(comprat(njay,djay,nj17a,dj17a)|| comprat(njay,djay,nj17b,dj17b)) ans.push_back(17); } } return ans; } IsogenyClass::IsogenyClass(const CurveRed& C, int verbose) { verb=verbose; cp = Cperiods(C); if(verb) { cout << endl; C.output(cout); cout<<"\nPeriod lattice:\n" << cp << endl; } llist = getelllist(C); ss = semistable(C); if(verb) { cout << "Curve is ";if(!ss)cout<<"NOT ";cout<<"semistable."<(MAXNCURVES*MAXNCURVES,0); // initialized to 0 } void IsogenyClass::process(long i) // process i'th curve { vector lworks(nell); // only used when i=0 CurveRed thisc = curves[i]; if (verb) cout << "Working on curve " << i+1 << ": " << (Curve)thisc << endl; Cperiods pers(thisc); vector::iterator lvar=llist.begin(); long il=0, ell, n; while(lvar!=llist.end()) { ell = *lvar++; if (verb) cout << "trying l = " << ell << "..." << flush; vector lisogcurves = lisog(thisc,pers,ell,verb); if (verb) cout << lisogcurves.size() << " isogenous curves found." << endl; if(i==0) { // cout<<"setting lworks["<::iterator oldCi=curves.begin(); while(oldCi!=curves.end()) { if ((Curve)newc==(Curve)(*oldCi++)) { isnew=0; matset(i,j,ell); matset(j,i,ell); } j++; } if (isnew) { curves.push_back(newc); fromlist.push_back(i); isoglist.push_back(ell); matset(i,ncurves,ell); matset(ncurves,i,ell); ncurves++; if (verb) cout << "new # " << ncurves << endl; } else if (verb) cout << "repeat" << endl; } } // end of ell loop if(i==0) // reset llist to good l only; { vector goodllist; for(long i=0; i0) os << " is "<< isoglist[i]<<"-isogenous to curve "<::const_iterator pi; pi=C.the_bad_primes.begin(); while(pi!=C.the_bad_primes.end()) os << C.reduct_array[*pi++].ord_p_discr << sep; pi=C.the_bad_primes.begin(); while(pi!=C.the_bad_primes.end()) os << C.reduct_array[*pi++].ord_p_j_denom << sep; pi=C.the_bad_primes.begin(); while(pi!=C.the_bad_primes.end()) os << C.reduct_array[*pi++].c_p << sep; pi=C.the_bad_primes.begin(); while(pi!=C.the_bad_primes.end()) os << C.reduct_array[*pi++].Kcode.code << sep; os << nell << sep; for(il=0; il IsogenyClass::getmat() const { vector ans(ncurves*ncurves); long i,j; for(i=0; i twoisog(const CurveRed& CR, int verbose) //INPUT: a curve of type CurveRed //OUTPUT: an array of the curves 2-isogenous to the given curve //(possibly empty) { if(verbose>1) cout<<"In twoisog with CR = "<1) cout<<"In twoisog with CD = "< tt = two_torsion(CD); // include [0:1:0] vector ans; if(tt.size()==1) return ans; bigint a1,a2,a3,a4,a6,b2,b4,b6,b8; CR.getai(a1,a2,a3,a4,a6); CR.getbi(b2,b4,b6,b8); unsigned int i; for(i=1; i // if USE_PARI_FACTORING is set we use the pari C library for factoring // (via a string interface defined in parifact.h/cc) // if USE_GP_FACTORING is set we use gp for factoring (via a fifo) #include // for unlink() (not needed on linux) #include #ifdef USE_GP_FACTORING #include #endif #include // Utilities for debugging output -- for example, from gdb you can give the command // p show(a) // to see a where a is a bigint or vector bigint show(const bigint& a) {cout< show(const vector& a) {cout< mpdivs = pdivs(m); #ifdef CHECK_SQRT_MOD cout<<"prime factors are "<& mpdivs) { // Some trivial cases require no work: if(is_one(m)) {x=0; return 1;} if(is_zero(a)) {x=0; return 1;} if(is_one(a)) {x=1; return 1;} bigint mm, p, xp, q; int e; x=0; mm=1; for(vector::const_iterator pr = mpdivs.begin(); pr!=mpdivs.end(); pr++) { p=*pr; e = val(p,m); if(e==0) continue; if(p==2) {if(!sqrt_mod_2_power(xp,a,e)) return 0;} else {if(!sqrt_mod_p_power(xp,a,p,e)) return 0;} q=pow(p,e); if(pr==mpdivs.begin()) x=xp; else x=chrem(x,xp,mm,q); mm*=q; } #ifdef CHECK_SQRT_MOD if(ndiv(m,sqr(x)-a)) cout<<"Error in sqrt_mod_m with a="<& bplist, bigint& x) // Solves x^2=a mod b, returns success/fail { // Assumes b square-free, primes factors in bplist bigint u, v, p, amodp, xmodp, m; int res=1; x=0; m=1; for(vector::const_iterator pr = bplist.begin(); res&&(pr!=bplist.end()); pr++) { p=*pr; if(p==2) { xmodp=odd(a); } else // odd p { amodp = a%p; if(is_zero(amodp)) xmodp=0; else { if(legendre(amodp,p)==-1) return 0; if(amodp<0) amodp+=p; // sqrt_mod_p wants it between 0 and p-1 sqrt_mod_p(xmodp,amodp,p); } } // Now Chinese xmodp with previous (x mod m) bezout(m,p,u,v); x = x*v*p+xmodp*u*m; m*=p; x = mod(x,m); } return 1; } // // bigint divisor lists etc // extra_prime_class the_extra_primes; // The one and only instance void initprimes(const string pfilename, int verb) { if(verb) { cout<<"Computed " << nprimes() << " primes, "; cout << "largest is " << maxprime() << "\n"; } the_extra_primes.read_from_file(pfilename,verb); if(verb) the_extra_primes.show(); } extra_prime_class::~extra_prime_class() { // write_to_file(string("PRIMES").c_str()); } void extra_prime_class::write_to_file(const string pfilename, int verb) { if(the_primes.size()==0) return; if(verb) cout << "writing primes to file " << pfilename << endl; ofstream pfile(pfilename.c_str()); copy(the_primes.begin(),the_primes.end(), ostream_iterator(pfile, "\n")); if(verb) cout << "finished writing primes to file " << pfilename << endl; } void extra_prime_class::read_from_file(const string pfilename, int verb) { ifstream pfile(pfilename.c_str()); if(!pfile) // default: no primes file exists { return; } pfile>>ws; if(pfile.eof()) // primes file exists but is empty { return; } if(verb) cout << "reading primes from file " << pfilename << endl; bigint xp; while(pfile>>xp>>ws, (xp!=0) ) { if(verb) cout << "read extra prime " << xp << endl; the_extra_primes.add(xp); if(pfile.eof()) break; } if(verb) cout << "finished reading primes from file " << pfilename << endl; } vector pdivs_use_factorbase(bigint& n, const std::set factor_base); vector pdivs_trial_div(bigint& n, const bigint& pmax=BIGINT(maxprime())); //#define DEBUG_GP_FACTORING // The following uses pari's factorization externally if available. // However, numbers less than #define TRIAL_DIV_BOUND BIGINT(100000000) //#define TRIAL_DIV_BOUND BIGINT(2) // will be handled by trial division, and pari/gp will only be called // once primes factors less than #define TRIAL_DIV_PRIME_BOUND BIGINT(10000) //#define TRIAL_DIV_PRIME_BOUND BIGINT(1) //have been divided out. This is to reduce the overheads involved //with calling gp externally #ifdef USE_GP_FACTORING vector pdivs_gp(const bigint& number, int trace) { #ifdef DEBUG_GP_FACTORING trace=2; #endif if(!the_pari_slave.is_running()) { #ifdef DEBUG_GP_FACTORING cout<<"Could not find gp, using default factorization (trial division)" << endl; #endif return pdivs_trial(number,trace); } vector plist; bigint n=abs(number); if(n<2) return plist; // empty! // for small n just use trial division... if(n0) cout<<"after using factorbase, have factors "<0 will be changed; returns prime factors from factor base and divides out from n vector pdivs_use_factorbase(bigint& n, const std::set factor_base) { vector plist; if(n<2) return plist; std::set::const_iterator pri = factor_base.begin(); while((n>1)&&(pri!=factor_base.end())) { bigint p=*pri++; if(divide_out(n,p)) plist.push_back(p); } return plist; } // n>0 will be changed; returns prime factors p pdivs_trial_div(bigint& n, const bigint& pmax) { vector plist; if(n<2) return plist; primevar pr; long p=2, r; bigint mp, q; mp=2; while ( (n>1) && (pr.ok()) && (mp<=pmax)) { if (::divides(n,p,q,r)) // then found a prime factor { plist.push_back(mp); // add it to the list n=q; divide_out(n,mp); // divide it out from n } // Now we might be able to conclude that the cofactor is prime: if(n>1) if (sqr(mp)>n) { plist.push_back(n); the_extra_primes.add(n); n=1; } pr++; p = pr.value(); mp=p; } return plist; } vector pdivs_trial(const bigint& number, int trace) { if(trace) cout<<"In pdivs_trial() with number = " << number << endl; vector plist; bigint n = abs(number), q, mp, mr; if(n<2) return plist; // use prime base first... plist=pdivs_use_factorbase(n,the_extra_primes.the_primes); if(n<2) return plist; if(trace) cout<< "After using factor base, n= " < // bigint // read_bigint_from_string(string intstr) // { // istringstream intin(intstr.c_str()); // bigint p; // intin>>p; // free(intstr); // this string was malloc'ed by the pari library! // return p; // } int is_prime(const bigint& n) { ostringstream oss; oss< read_vec_from_string(string vecstr) { // cout<<"parsing output string "< plist; istringstream vecin(vecstr); bigint p; char c; vecin>>skipws>>c; // swallow leading "[" while(c!=']') { vecin>>p; // cout<<"Reading p="<>skipws>>c; // swallow ",", but it might turn out to be "]" } // cout<<"Finished reading from string"< factor(const bigint& n, int proof=1) { ostringstream oss; oss< plist = read_vec_from_string(factor(oss.str())); if(proof) for(vector::const_iterator pi=plist.begin(); pi!=plist.end(); pi++) { bigint p =*pi; if(!is_prime(p)) { cout<<"WARNING: pari's factor() returned p="<

pdivs_pari(const bigint& number, int trace) { vector plist; bigint n=abs(number); if(n<2) return plist; // empty! // for small n just use trial division... if(n0) cout<<"after using factorbase, have factors "< pdivs(const bigint& number, int trace) { #ifdef USE_PARI_FACTORING return pdivs_pari(number); #else #ifdef USE_GP_FACTORING return pdivs_gp(number, trace); #else return pdivs_trial(number, trace); #endif #endif } vector posdivs(const bigint& number) { const vector& plist=pdivs(number); return posdivs(number, plist); } vector posdivs(const bigint& number, const vector& plist) { int np = plist.size(); int e, nu = 1; int nd=nu; vector elist; elist.reserve(np); vector::const_iterator pr = plist.begin(); while(pr!=plist.end()) { e=val(*pr++,number); elist.push_back(e); nd*=(1+e); } // cout<<"In posdivs (0) : elist = "< dlist(1,BIGINT(1)); // cout<<"In posdivs (1) : dlist = "<1) {check=3; m1/=d; m2/=d; m3*=d;} else check-=1; if(check) { d=abs(gcd(m1,m3)); if(d>1) {check=3; m1/=d; m2*=d; m3/=d; c1*=d;} else check-=1; } if(check) { d=abs(gcd(m2,m3)); if(d>1) {check=3; m1*=d; m2/=d; m3/=d; c2*=d;} else check-=1; } } #ifdef CHECK_LEM3 if( (a==sqr(c1)*m1*m3) && (b==sqr(c2)*m2*m3) && (gcd(m1,m3)==1) && (gcd(m2,m3)==1) && (gcd(m1,m2)==1) ) {;} else { cout<<"Error in rusin_lem3("<0?Ifloor(x+0.5):Iceil(x-0.5));} #define BIG 100000 // not used in new version bigint Ifloor(double x) // bigfloats are just doubles in this case { bigint ans; ans =0; int s=1; if(x==0.0) return ans; if(x<0) {x=-x; s=-1;} //#define DEBUG_IFLOOR int e; double y = frexp(x,&e); #ifdef DEBUG_IFLOOR cout<<"x="< Introotscubic(const bigint& a, const bigint& b, const bigint& c) { ZZX f; vec_pair_ZZX_long factors; bigint cont; SetCoeff(f,3); // sets it to 1 SetCoeff(f,2,a); SetCoeff(f,1,b); SetCoeff(f,0,c); //cout<<"About to factor the monic cubic "< iroots; for(int i=0; i Introotsquartic(const bigint& a, const bigint& b, const bigint& c, const bigint& d) { ZZX f; vec_pair_ZZX_long factors; bigint cont; SetCoeff(f,4); // sets it to 1 SetCoeff(f,3,a); SetCoeff(f,2,b); SetCoeff(f,1,c); SetCoeff(f,0,d); // cout<<"About to factor the monic quartic "< iroots; for(int i=0; i eps ) { c = Iround( xx ); rc=I2bigfloat(c); x2 = x0 + c*x1; x0 = x1; x1 = x2; y2 = y0 + c*y1; y0 = y1; y1 = y2; diff = abs( x - I2bigfloat(x2)/I2bigfloat(y2) ); // cout<<"x2 = "< #include const bigint MBIGPRIME=atoI(string("6074000003").c_str()); // will convert this string to an bigint //This is nearly the largest p such that (p/2)^2 < 2^63. // Definitions of member operators and functions: mat_m::mat_m(long nr, long nc) { nro=nr; nco=nc; long n=nr*nc; entries=new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint* m1=entries; while(n--) *m1++ = 0; } mat_m::mat_m(const mat_m& m) { nro=m.nro; nco=m.nco; long n = nro*nco; entries=new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *m1=entries, *m2=m.entries; while(n--) *m1++ = *m2++; } mat_m::mat_m(const mat_i& m) { nro=m.nro; nco=m.nco; long n = nro*nco; entries=new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *m1=entries; int *m2=m.entries; while(n--) *m1++ = *m2++; } mat_m::mat_m(const mat_l& m) { nro=m.nro; nco=m.nco; long n = nro*nco; entries=new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *m1=entries; long *m2=m.entries; while(n--) *m1++ = *m2++; } mat_m::~mat_m() { delete[] entries; } void mat_m::init(long nr, long nc) // assigns to zero matrix of given size; { // with defaults (0,0) releases all space. long n = nr*nc; if (nro*nco!=n) // delete old space; { // replace with new. delete[] entries; entries = new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} } nro = nr; nco = nc; bigint *m1=entries; while(n--) *m1++ = 0; } bigint& mat_m::operator()(long i, long j) const // returns ref to (i,j) entry { if ((0=minint)&&(mij<=maxint)) { if(is_zero(mij)) *ansij=0; else { int aij = I2int(mij); *ansij =aij; if(BIGINT(*ansij)!=mij) { cout<<"Problem: I2int("<=minlong)&&(mij<=maxlong)) { if(is_zero(mij)) *ansij=0; else { long aij = I2long(mij); *ansij = aij; if(BIGINT(*ansij)!=mij) { cout<<"Problem: I2int("<>(istream& s, mat_m& m) { long n=m.nro*m.nco; bigint* mij=m.entries; while(n--) s >> (*mij++); return s; } mat_m colcat(const mat_m& a, const mat_m& b) { long nc, nr = a.nro, nca = a.nco, ncb = b.nco; mat_m ans(nr,nca+ncb); bigint *ansij=ans.entries, *aij=a.entries, *bij=b.entries; if (nr==b.nro) while(nr--) { nc=nca; while(nc--) *ansij++ = *aij++; nc=ncb; while(nc--) *ansij++ = *bij++; } else { cout << "colcat: matrices have different number of rows!" << "\n"; abort(); } return ans; } mat_m rowcat(const mat_m& a, const mat_m& b) { long n, nra = a.nro, nc = a.nco, nrb = b.nro; mat_m ans(nra+nrb,nc); bigint *ansij=ans.entries, *aij=a.entries, *bij=b.entries; if (nc==b.nco) { n = nra*nc; while(n--) *ansij++ = *aij++; n = nrb*nc; while(n--) *ansij++ = *bij++; } else { cout << "rowcat: matrices have different number of columns!" << "\n"; abort(); } return ans; } mat_m directsum(const mat_m& a, const mat_m& b) { long n,c, nra=a.nro, nca=a.nco, nrb=b.nro, ncb=b.nco; mat_m ans(nra+nrb,nca+ncb); bigint* ansij=ans.entries, *aij=a.entries, *bij=b.entries; n=nra; while(n--) { c=nca; while(c--) *ansij++ = *aij++; c=ncb; while(c--) *ansij++ = 0; } n=nrb; while(n--) { c=nca; while(c--) *ansij++ = 0; c=ncb; while(c--) *ansij++ = *bij++; } return ans; } void elimrows(mat_m& m, long r1, long r2, long pos) //plain elimination, no clearing { long nc=m.nco; bigint *mr1 = m.entries + (r1-1)*nc, *mr2 = m.entries + (r2-1)*nc; bigint p = mr1[pos-1], q=mr2[pos-1]; while(nc--) { (*mr2)= (p*(*mr2))-(q*(*mr1)); mr1++; mr2++; } } void elimrows1(mat_m& m, long r1, long r2, long pos) //elimination + clearing { elimrows(m,r1,r2,pos); m.clearrow(r2); } void elimrows2(mat_m& m, long r1, long r2, long pos, const bigint& last) //elimination + divide by last pivot { elimrows(m,r1,r2,pos); m.divrow(r2,last); } // Definition of non-friend functions mat_m operator+(const mat_m& m) {return m;} mat_m operator-(const mat_m& m) {return BIGINT(-1)*m;} mat_m operator+(const mat_m& m1, const mat_m& m2) {mat_m ans(m1); ans+=m2; return ans;} mat_m operator-(const mat_m& m1, const mat_m& m2) {mat_m ans(m1); ans-=m2; return ans;} mat_m operator*(const bigint& scal, const mat_m& m) {mat_m ans(m); ans*=scal; return ans;} mat_m operator*(scalar scal, const mat_m& m) {mat_m ans(m); ans*=BIGINT(scal); return ans;} mat_m operator/(const mat_m& m, const bigint& scal) {mat_m ans(m); ans/=scal; return ans;} int operator!=(const mat_m& m1, const mat_m& m2) {return !(m1==m2);} vec_m operator*(const mat_m& m, const vec_m& v) { long r=m.nro, c=m.nco; bigint *mp,*vp,*wp; vec_m w(r); if (c==v.d) { mp=m.entries; wp=w.entries; while(r--) { vp=v.entries; c=m.nco; while(c--) *wp += (*mp++)*(*vp++); wp++; } } else { cout << "Incompatible sizes in *(mat_m,vec_m)\n"; abort(); } return w; } mat_m midmat(long n) { mat_m ans(n,n); long i; bigint one; one=1; for (i=1; i<=n; i++) ans.set(i,i,one); return ans; } mat_m transpose(const mat_m& m) { long i,j,nr,nc; nr=ncols(m); nc=nrows(m); mat_m ans(nr, nc); for (i=1; i<=nr; i++) for (j=1; j<=nc; j++) ans.set(i,j, m(j,i)); return ans; } mat_m submatrix(const mat_m& m, const vec_i& iv, const vec_i& jv) {long i,j; long nr = dim(iv); long nc = dim(jv); mat_m ans(nr,nc); for (i=1; i<=nr; i++) for (j=1; j<=nc; j++) ans.set(i,j, m(iv[i],jv[j])); return ans; } mat_m echelonp(const mat_m& m, vec_i& pcols, vec_i& npcols, long& rk, long& ny, bigint& d, const bigint& pr); mat_m echelon(const mat_m& m, vec_l& pcols, vec_l& npcols, long& rk, long& ny, bigint& d, int method) { vec_i pc, npc; mat_m ans = echelon(m,pc,npc,rk,ny,d,method); pcols.init(rk); npcols.init(ny); int i; for (i=1; i<=rk; i++) pcols[i]= pc[i]; for (i=1; i<=ny; i++) npcols[i]=npc[i]; return ans; } mat_m echelon(const mat_m& m, vec_i& pcols, vec_i& npcols, long& rk, long& ny, bigint& d, int method) { //N.B. case 1 is for consistency with matrix.cc only: redundant. switch (method) {case 0: return echelon0(m,pcols,npcols,rk,ny,d); case 1: return echelon0(m,pcols,npcols,rk,ny,d); case 2: return echelonp(m,pcols,npcols,rk,ny,d,MBIGPRIME); default: return echelon0(m,pcols,npcols,rk,ny,d); } } void elim(bigint *m, long nc, long r1, long r2, long pos) {bigint *mr1=m+r1*nc, *mr2=m+r2*nc; bigint p = mr1[pos], q = mr2[pos]; while(nc--) { (*mr2)=(p*(*mr2))-(q*(*mr1)); mr1++; mr2++; } } void clear(bigint* row, long nc) {long n=nc; bigint *rowi=row; bigint g; while((n--)&&(!is_one(g))) g=gcd(g,*rowi++); if (sign(g)<0) g=-g; if(is_zero(g)||is_one(g)) return; n=nc; rowi=row; while(n--) (*rowi++) /= g; } mat_m echelon0(const mat_m& m1, vec_i& pc, vec_i& npc, long& rk, long& ny, bigint& d) { long nr, nc, r,c,r2,r3,rmin,i; bigint min, mr2c,lastpivot; rk=0; ny=0; r=0; lastpivot=1; nc=m1.nco; nr=m1.nro; bigint *m, *mi1, *mi2, *mij; bigint temp; m = new bigint[nr*nc]; long n=nr*nc; mij=m; mi1=m1.entries; while(n--) *mij++ = *mi1++; int *pcols = new int[nc]; int *npcols = new int[nc]; for (c=0; (c0) && ((mr2cr) //swap rows { mi1=m+r*nc; mi2=m+rmin*nc; n=nc; while(n--) {temp = *mi1; *mi1++ = *mi2; *mi2++ = temp;} } for (r3 = r+1 ; r30) // Back-substitute and even up pivots {for (r=0; r0) && ((mr2cr) m.swaprows(r,rmin); for (r3 = r+1 ; r3<=nr; r3++) elimrows2(m,r,r3,c,lastpivot); lastpivot=min; r++; } } return rk; } long nullity(const mat_m& m) { return ncols(m)-rank(m); } bigint trace(const mat_m& a) { long i; bigint ans; for (i=1; i<=nrows(a); i++) ans += a(i,i); return ans; } // CHARPOLY -- FADEEV'S METHOD vector charpoly(const mat_m& a) { long n = nrows(a); mat_m b(a); mat_m id(midmat(n)), tid; vector clist(n+1); bigint t = trace(a), ii; clist[n] = 1; clist[n-1] = -t; for (long i=2; i<=n; i++) { tid=t*id; b-=tid; b=b*a; // cout << b; // (for testing only) ii=i; t=trace(b)/ii; clist[n-i] = -t; } tid=t*id; if (b!=tid) { cout << "Error in charpoly: final b = " << (b-t*id); abort(); } return clist; } bigint determinant(const mat_m& m) { vector cp = charpoly(m); bigint det = cp[0]; if (nrows(m)%2==1) det=-det; return det; } mat_m addscalar(const mat_m& m, const bigint& c) { mat_m ans(midmat(nrows(m))); ans*=c; ans+=m; return ans; } vec_m apply(const mat_m& m, const vec_m& v) // same as *(mat_m, vec_m) { long nr=nrows(m), nc=ncols(m); vec_m ans(nr); if (nc==dim(v)) for (long i=1; i<=nr; i++) ans[i] = m.row(i)*v; else { cout << "Incompatible sizes in *(mat_m,vec_m)\n"; abort(); } return ans; } void elimp(const mat_m& m, long r1, long r2, long pos, const bigint& pr) { long nc=m.nco; bigint *mr1 = m.entries + (r1-1)*nc, *mr2 = m.entries + (r2-1)*nc; bigint p = mr1[pos-1], q=mr2[pos-1]; while(nc--) { (*mr2)= mod(mod(p*(*mr2),pr)-mod(q*(*mr1),pr),pr); mr1++; mr2++; } } //#define TRACE 1 mat_m echelonp(const mat_m& m1, vec_i& pcols, vec_i& npcols, long& rk, long& ny, bigint& d, const bigint& pr) { #ifdef TRACE cout << "In echelonp\n"; #endif /* TRACE */ long nc,nr,r,c,r2,r3,rmin; bigint min, mr2c,lastpivot, temp; nr=nrows(m1), nc=ncols(m1); mat_m m(nr,nc); for (c=1; c<=nc; c++) for (r=1; r<=nr; r++) m(r,c)=mod(m1(r,c),pr); // { // temp=m1(r,c); // temp=mod(temp,pr); // m(r,c)=temp; // } // don't simplify else memory leaks pcols.init(nc); npcols.init(nc); rk=0; ny=0; r=1; lastpivot=1; for (c=1; (c<=nc)&&(r<=nr); c++) { min = m(r,c); rmin = r; for (r2=r+1; (r2<=nr)&&(sign(min)==0); r2++) { mr2c = m(r2,c); if (0!=sign(mr2c)) { min=mr2c; rmin=r2 ;} } if (sign(min)==0) npcols[++ny] = c; else { pcols[++rk] = c; if (rmin>r) m.swaprows(r,rmin); for (r3 = r+1 ; r3<=nr; r3++) elimp(m,r,r3,c,pr); r++; } } for (c = rk+ny+1; c<=nc; c++) npcols[++ny] = c ; #ifdef TRACE cout << "Finished first stage; rk = " << rk; cout << ", ny = " << ny << "\n"; cout << "Back substitution.\n"; #endif /* TRACE */ pcols = pcols.slice(1,rk); npcols = npcols.slice(1,ny); // truncate index vectors if (ny>0) { for (r=1; r<=rk; r++) for (r2=r+1; r2<=rk; r2++) elimp(m,r2,r,pcols[r2],pr); for (r=1; r<=rk; r++) { const bigint& temp = m(r,pcols[r]); const bigint& fac = invmod(temp,pr); for (c=1; c<=nc; c++) { const bigint& tmp = fac*m(r,c); m(r,c)=mod(tmp,pr); } } } else for (r=1; r<=rk; r++) { for (c=1; c<=nc; c++) m(r,c)=(c==pcols[r]); // 0 or 1 ! } bigint modulus=pr; bigint lim=sqrt(pr>>1); #ifdef TRACE cout << "Finished second stage.\n Echelon matrix mod "<0) { for (r=1; r<=rk; r++) for (r2=r+1; r2<=rk; r2++) elimp(m,r2,r,pcols[r2],pr); for (r=1; r<=rk; r++) { mij = m.entries+(r-1)*nc; bigint fac = invmod(mij[pcols[r]-1],pr); n=nc; while(n--) {*mij = mod(fac * *mij, pr); mij++;} } } else { mij=m.entries; for (r=1; r<=rk; r++) for (c=1; c<=nc; c++) *mij++ = (c==pcols[r]); // 0 or 1 ! } return m.slice(rk,nc); } mat_m matmulmodp(const mat_m& m1, const mat_m& m2, const bigint& pr) { long j,k, m=m1.nro, n=m1.nco, p=m2.nco; mat_m m3(m,p); bigint *a=m1.entries, *b=m2.entries, *c=m3.entries, *bp, *cp; if (n==m2.nro) // algorithm from Dr Dobb's Journal August 1993 { while(m--) { bp=b; k=n; while(k--) { cp=c; j=p; while(j--) { *cp += mod(*a * *bp++, pr); *cp = mod(*cp,pr); cp++; } a++; } c += p; } } else { cout << "Incompatible sizes in mat_m product\n"; abort(); } return m3; } eclib-2013-01-01/libsrc/divpol.cc0000644000175200017520000001027011774563612013176 00000000000000// divpol.cc: implementations of functions for division polynomials ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // NB the external interface uses a simple vector of // coefficients rather than a polynomial type to simplify the // NTL interface #include #include #include vector makepdivpol(Curvedata* E, int p) { if(p==2) { bigint b2,b4,b6,b8; E->getbi(b2,b4,b6,b8); vector ans; ans.reserve(4); ans.push_back(b6); ans.push_back(2*b4); ans.push_back(b2); ans.push_back(BIGINT(4)); return ans; } // default for odd p: use recursive method bigint a1,a2,a3,a4,a6; E->getai(a1,a2,a3,a4,a6); return div_pol_odd(a1,a2,a3,a4,a6,p); } // div_pol_odd(a1,a2,a3,a4,a6,n) returns the coefficients of the // polynomial in x whose zeros are the (x-coordinates of the) non-zero // points P on E=[a1,a2,a3,a4,a6] satisfying nP=0 (odd n) // The poly itself is found recursively ZPoly div_pol_odd_rec(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, const bigint& a6, int n); vector div_pol_odd(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, const bigint& a6, int n) { ZPoly pol = div_pol_odd_rec(a1,a2,a3,a4,a6,n); int i, d = Degree(pol); vector ans; ans.reserve(d+1); for(i=0; i<=d; i++) ans.push_back(PolyCoeff(pol,i)); return ans; } ZPoly div_pol_odd_rec(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, const bigint& a6, int n) { ZPoly X; ZPolySetX(X); ZPoly f1 = X*(X*(X+a2)+a4)+a6; ZPoly f2 = a1*X+a3; ZPoly psi24=(BIGINT(4)*f1+f2*f2); psi24*=psi24; ZPoly ans; switch(n) { case 0: SetDegree(ans,0); SetCoeff(ans,0,0); return ans; case 1: case 2: SetDegree(ans,0); SetCoeff(ans,0,1); return ans; case 3: SetDegree(ans,4); SetCoeff(ans,4,3); SetCoeff(ans,3,a1*a1+4*a2); SetCoeff(ans,2,3*a1*a3+6*a4); SetCoeff(ans,1,3*a3*a3+12*a6); SetCoeff(ans,0,a1*a1*a6-a1*a3*a4+a2*a3*a3+4*a2*a6-a4*a4); return ans; case 4: SetDegree(ans,6); SetCoeff(ans,6,2); SetCoeff(ans,5,a1*a1+4*a2); SetCoeff(ans,4,5*a1*a3+10*a4); SetCoeff(ans,3,10*a3*a3+40*a6); SetCoeff(ans,2,10*a1*a1*a6-10*a1*a3*a4+10*a2*a3*a3+40*a2*a6-10*a4*a4); SetCoeff(ans,1,a1*a1*a1*a1*a6-a1*a1*a1*a3*a4+a1*a1*a2*a3*a3+8*a1*a1*a2*a6-a1*a1*a4*a4-4*a1*a2*a3*a4-a1*a3*a3*a3-4*a1*a3*a6+4*a2*a2*a3*a3+16*a2*a2*a6-4*a2*a4*a4-2*a3*a3*a4-8*a4*a6); SetCoeff(ans,0,a1*a1*a1*a3*a6-a1*a1*a3*a3*a4+2*a1*a1*a4*a6+a1*a2*a3*a3*a3+4*a1*a2*a3*a6-3*a1*a3*a4*a4+2*a2*a3*a3*a4+8*a2*a4*a6-a3*a3*a3*a3-8*a3*a3*a6-2*a4*a4*a4-16*a6*a6); return ans; default: // general case, use recursion // If n is odd, n=2m+1: if(n%2==1) { int m=(n-1)/2; ZPoly t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m); t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m+2)*t1*t1*t1; ZPoly t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m+1); t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m-1)*t2*t2*t2; if(m%2==1) return t1-psi24*t2; return psi24*t1-t2; } else // n is even, n=2m: { int m=n/2; ZPoly t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m-1); t1=div_pol_odd_rec(a1,a2,a3,a4,a6,m+2)*t1*t1; ZPoly t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m+1); t2=div_pol_odd_rec(a1,a2,a3,a4,a6,m-2)*t2*t2; return div_pol_odd_rec(a1,a2,a3,a4,a6,m)*(t1-t2); } } } eclib-2013-01-01/libsrc/fixc6.cc0000644000175200017520000000402211774563612012716 00000000000000// file fixc6.cc: implementation of fixc6 class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // the constructor initializes the static data member with all the // fixed values #include #include #include fixc6::fixc6() { #ifdef MPFP // Multi-Precision Floating Point return; #else long n=1; int i; bigint c4,c6; ifstream datafile("fixc6.data"); while(n) { datafile>>n>>i>>c6; if(n!=0) fixc6table[pair(n,i)] = c6; } datafile.close(); datafile.open("fixc4.data"); n=1; while(n) { datafile>>n>>i>>c4; if(n!=0) fixc4table[pair(n,i)] = c4; } datafile.close(); #endif // MPFP } // end of constructor void fixc6::operator()(long N, int i, bigint& c4, bigint& c6) { pair key(N,i+1); map,bigint>::const_iterator j = fixc6table.find(key); if(j!=fixc6table.end()) c6=j->second; j = fixc4table.find(key); if(j!=fixc4table.end()) c4=j->second; return; } map< pair, bigint > fixc6::fixc6table; map< pair, bigint > fixc6::fixc4table; fixc6 c4c6fixer; // the one and only instance of the class eclib-2013-01-01/libsrc/symb.cc0000644000175200017520000001347311774563612012663 00000000000000// FILE SYMB.CC: Implementations for symbols ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include // Friend of class symb: ostream& operator<< (ostream& s, const symb& sy) { s << "(" << sy.c << ":" << sy.d << ")"; return s; } //#define DEBUG_NORMALIZE symb symb::normalize() const { #ifdef DEBUG_NORMALIZE cout<<"Normalizing symbol "<<(*this)<modulus; long u=N->unitdiv(c); #ifdef DEBUG_NORMALIZE cout<<"scaling by u = "<reduce(xmodmul(c,u,n)); long dd=N->reduce(xmodmul(d,u,n))%(n/cc); #ifdef DEBUG_NORMALIZE cout<<"new c = "<(c,d)]=num; num++; // cout<<"Adding symbol "<,long>::const_iterator j = hashtable.find(pair(c,d)); if(j==hashtable.end()) return -1; // cout<<" is "<second<second; } symb symblist::item(long n) const { if ((n>num)||(n<0)) { cout<<"Error in symblist::item: index out of range!\n"; abort(); return symb(); } else return list[n]; } //Member functions for class symbdata: symbdata::symbdata(long n) :moddata(n),specials(nsymb2) { // cout << "In constructor symbdata::symbdata.\n"; // cout << "nsymb2 = " << nsymb2 << "\n"; if (nsymb2>0) { long ic,id,c,d,start; symb s; //N.B. dlist include d=1 at 0 and d=mod at end, which we don't want here for (ic=1; (ic0) // d invertible, with inverse kd return reduce(xmodmul(c,kd,modulus)); // (c:d) = (c*kd:1) else { long kc = code(c); if (kc>0) // (c:d) = (1:kc*d) if c invertible return modulus-code(xmodmul(kc,d,modulus)); else { long start = dstarts[noninvdlist[-kc]]; symb s(c,d,this); long ind = specials.index(s,start); if(ind<0) { cout<<"error in index(): symbol "<" << s << "-->" << j << "\n"; ok=0; } } if (ok) cout << "symbols check OK!\n"; else cout << "symbols check found errors!\n"; } modsym jumpsymb(symb s1, symb s2) { //Assuming s1==s2, returns closed modular symbol {g1(0),g2(0)} where gi<->si long c1=s1.cee(), c2=s2.cee(), d1=s1.dee(), d2=s2.dee(); return modsym(rational(-invmod(c1,d1),d1),rational(-invmod(c2,d2),d2)); } eclib-2013-01-01/libsrc/mvector.cc0000644000175200017520000002363111774563612013365 00000000000000// mvector.cc: implementations of multiprecision integer vector class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include // Definitions of member operators and functions: vec_m::~vec_m() { delete[] entries; } vec_m::vec_m(long n) { d=n; entries=new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *v=entries; while(n--) *v++=0; } vec_m::vec_m(long n, bigint* array) //array must have at least n elements! { d=n; entries=new bigint[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *v=entries; while(n--) *v++=*array++; } vec_m::vec_m(const vec_m& v) // copy constructor { d=v.d; entries=new bigint[d]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *v1=entries, *v2=v.entries; long n=d; while(n--) *v1++=*v2++; } vec_m::vec_m(const vec_i& v) { d=v.d; entries=new bigint[d]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *v1=entries; int *v2=v.entries; long n=d; while(n--) *v1++=*v2++; } vec_m::vec_m(const vec_l& v) { d=v.d; entries=new bigint[d]; if (!entries) {cout<<"Out of memory!\n"; abort();} bigint *v1=entries; long *v2=v.entries; long n=d; while(n--) *v1++=*v2++; } void vec_m::init(long n) // (re)-initializes { if (d!=n) // no point in deleting if same size { delete[] entries; d = n; entries=new bigint[d]; if (!entries) {cout<<"Out of memory!\n"; abort();} } bigint *v=entries; while(n--) *v++=0; } vec_m& vec_m::operator=(const vec_m& v) // assignment { if (this==&v) return *this; if (d!=v.d) // no point in deleting if new is same size { delete[] entries; d = v.d; entries=new bigint[d]; if (!entries) {cout<<"Out of memory!\n"; abort();} } bigint *v1=entries, *v2=v.entries; long n=d; while(n--) *v1++=*v2++; return *this; } bigint& vec_m::operator[](long i) const { if ((i>0) && (i<=d)) return entries[i-1]; else {cout << "bad subscript in vec_m::operator[]\n"; abort(); return entries[0];} } vec_m& vec_m::operator+=(const vec_m& q2) { bigint* vi=entries, *wi=q2.entries; long i=d; if (d==q2.d) {while(i--)(*vi++)+=(*wi++);} else {cout << "Incompatible vec_ms in vec_m::operator+=\n"; abort();} return *this; } void vec_m::addmodp(const vec_m& w, const bigint& pr) { bigint* vi=entries, *wi=w.entries; long i=d; if (d==w.d) {while(i--) {*vi = mod((*wi++)+(*vi),pr);vi++;}} else {cout << "Incompatible vec_ms in vec_m::addmodp\n";abort();} } vec_m& vec_m::operator-=(const vec_m& q2) { bigint* vi=entries; bigint* wi=q2.entries; long i=d; if (d==q2.d) {while(i--)(*vi++)-=(*wi++);} else {cout << "Incompatible vec_ms in vec_m::operator-=\n";abort();} return *this; } vec_m& vec_m::operator*=(const bigint& scal) { bigint* vi=entries; long i=d; while (i--) (*vi++) *= scal; return *this; } vec_m& vec_m::operator/=(const bigint& scal) { bigint* vi=entries; long i=d; while (i--) (*vi++) /= scal; return *this; } vec_m vec_m::slice(long first, long last) const // returns subvec_m { if (last==-1) {last=first; first=1;} long n = last-first+1; vec_m ans(n); bigint *entriesi=entries+(first-1), *ansi=ans.entries; long i=n; while (i--) *ansi++ = *entriesi++; return ans; } vec_m vec_m::operator[](const vec_i& index) const//returns v[index[j]] {long dd = dim(index); vec_m w(dd); for(long i=1; i<=dd;i++) w[i] = entries[index[i]-1]; return w; } vec_m vec_m::operator[](const vec_l& index) const {long dd = dim(index); vec_m w(dd); for(long i=1; i<=dd;i++) w[i] = entries[index[i]-1]; return w; } bigint vec_m::sub(long i) const { if ((i>0) && (i<=d)) return entries[i-1]; else {bigint zero; cout << "bad subscript in vec_m::sub\n"; abort(); return zero;} } void vec_m::set(long i, const bigint& x) { if ((i>0) && (i<=d)) entries[i-1]=x; else {cout << "bad subscript in vec_m::set\n";abort();} } void vec_m::add(long i, const bigint& x) { if ((i>0) && (i<=d)) entries[i-1]+=x; else {cout << "bad subscript in vec_m::add\n";abort();} } vec_l vec_m::shorten(long x) const //converts to a vector of longs { vec_l ans(d); bigint *v1=entries; long *v2=ans.entries; long n=d; while(n--) { bigint& veci = *v1++; if(is_long(veci)) *v2 = I2long(veci); else { cout << "Problem shortening bigint " << veci << " to a long!" << endl; abort(); } v2++; } return ans; } vec_i vec_m::shorten(int x) const //converts to a vector of ints { vec_i ans(d); bigint *v1=entries; int *v2=ans.entries; long n=d; while(n--) { bigint& veci = *v1++; if(is_int(veci)) *v2 = I2int(veci); else { cout << "Problem shortening bigint " << veci << " to an int!" << endl; abort(); } v2++; } return ans; } // Definitions of non-member, friend operators and functions bigint operator*(const vec_m& v, const vec_m& w) { long dim=v.d; bigint dot; bigint* vi=v.entries, *wi=w.entries; if (dim==w.d) while (dim--) dot+= (*vi++)*(*wi++); else { cout << "Unequal dimensions in dot product\n"; abort(); } return dot; } int operator==(const vec_m& v, const vec_m& w) { long dim=v.d; long equal = (dim==w.d); bigint* vi=v.entries, *wi=w.entries; while ((dim--) && equal) equal = ((*vi++)==(*wi++)); return equal; } int trivial(const vec_m& v) { int ans=1, i=v.d; bigint* vi=v.entries; while ((i--)&&ans) ans=(is_zero(*vi++)); return ans; } ostream& operator<<(ostream& s, const vec_m& v) { long i=v.d; bigint* vi=v.entries; s << "["; while (i--) {s<<(*vi++); if(i)s<<",";} s << "]"; return s; } istream& operator>>(istream& s, vec_m& v) { long i = v.d; bigint* vi = v.entries; while (i--) s >> (*vi++); return s; } bigint mvecgcd(const vec_m& v) { long i=v.d; bigint g; bigint *vi=v.entries; while ((i--)&&(!is_one(g))) g=gcd(g,*vi++); return g; } void swapvec(vec_m& v, vec_m& w) {bigint *temp; if (v.d==w.d) {temp=v.entries; v.entries=w.entries; w.entries=temp;} else {cout << "Attempt to swap vec_ms of different lengths!\n";abort();} } int member(const bigint& a, const vec_m& v) {int ans=0; long i=dim(v); bigint* vi=v.entries; while (i--&&!ans) ans=(a==(*vi++)); return ans; } // Definition of non-friend operators and functions vec_m express(const vec_m& v, const vec_m& v1, const vec_m& v2) { vec_m ans(3); static bigint one; one=1; bigint v1v1 = v1 * v1; bigint v1v2 = v1 * v2; bigint v2v2 = v2 * v2; bigint vv1 = v * v1; bigint vv2 = v * v2; ans[1]= vv1*v2v2 - vv2*v1v2; ans[2]= vv2*v1v1 - vv1*v1v2; ans[3]= v1v1*v2v2 - v1v2*v1v2; bigint g = mvecgcd(ans); if (g>one) ans/=g; if (ans[3]*v!=ans[1]*v1+ans[2]*v2) { cout << "Error in express: v is not in \n"; abort(); } return ans; } vec_m lift(const vec_m& v, const bigint& pr) { long i, d = dim(v); vec_m nums(d); bigint lim = sqrt(pr>>1), nu, de, g; g=1; // g = least common denom. after lifting via modrat vec_m denoms(d); for (i=1; i<=d; i++) { bigint& vi=v[i]; modrat(vi,pr,lim,nu,de); nums[i]=nu; denoms[i]=de; g=lcm(g,de); } for (i=1; i<=d; i++) nums[i]*=(g/denoms[i]); return nums; } int liftok(vec_m& v, const bigint& pr) { long i, d = dim(v); bigint g, nu, de; int success=1, succ; bigint lim = sqrt(pr>>1); for (i=1, g=1; i<=d; i++) { bigint& vi=v[i]; succ=modrat(vi,pr,lim,nu,de); success = success && succ; // Can't say success=success&&modrat(...) as then after first fail it does // not call modrat at all due to clever compiler! g=lcm(g,de); } for (i=1; i<=d; i++) v[i] = mod(g*v[i],pr); return success; } bigint dotmodp(const vec_m& v1, const vec_m& v2, const bigint& pr) { bigint ans; for(long i=1; i<=dim(v1); i++) ans=mod(ans+mod(v1[i]*v2[i],pr),pr); return ans; } long dim(const vec_m& v) {return v.d;} int operator!=(const vec_m& v, const vec_m& w) { return !(v==w);} vec_m operator+(const vec_m& v) {return v;} vec_m operator-(const vec_m& v) {vec_m ans(v); ans*=BIGINT(-1); return ans;} vec_m operator+(const vec_m& v1, const vec_m& v2) {vec_m ans(v1); ans+=v2; return ans;} vec_m addmodp(const vec_m& v1, const vec_m& v2, const bigint& pr) {vec_m ans(v1); ans.addmodp(v2,pr); return ans;} vec_m operator-(const vec_m& v1, const vec_m& v2) {vec_m ans(v1); ans-=v2; return ans;} vec_m operator*(const bigint& scal, const vec_m& v) {vec_m ans(v); ans*=scal; return ans;} // NB cannot rely on coercion for next function as compiler tends to // construct a zero vector from the long and use dot product! vec_m operator*(long scal, const vec_m& v) {vec_m ans(v); ans*=BIGINT(scal); return ans;} vec_m operator/(const vec_m& v, const bigint& scal) {vec_m ans(v); ans/=scal; return ans;} void makeprimitive(vec_m& v) { bigint g=mvecgcd(v); if(!(is_one(g)||is_zero(g))) v/=g;} void elim(const vec_m& a, vec_m& b, long pos) { (b*=a[pos])-=(b[pos]*a);} void elim1(const vec_m& a, vec_m& b, long pos) { (b*=a[pos])-=(b[pos]*a); makeprimitive(b);} void elim2(const vec_m& a, vec_m& b, long pos, const bigint& lastpivot) { ((b*=a[pos])-=(b[pos]*a))/=lastpivot;} eclib-2013-01-01/libsrc/mwprocs.cc0000644000175200017520000010350211774563612013374 00000000000000// mwprocs.cc: implementation of class mw for Mordell-Weil basis ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// //#define DEBUG_QSIEVE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // // some locally called general functions, belong in library maybe: // // unlikely to be called by anything but find_inf: vector roots_of_cubic(const Curve& E) { bigint a1,a2,a3,a4,a6; E.getai(a1,a2,a3,a4,a6); bigfloat ra1=I2bigfloat(a1), ra2=I2bigfloat(a2), ra3=I2bigfloat(a3), ra4=I2bigfloat(a4), ra6=I2bigfloat(a6); bigcomplex c1 = ra2 + ra1*(ra1/4) ; bigcomplex c2 = ra4 + ra1*(ra3/2) ; bigcomplex c3 = ra6 + ra3*(ra3/4) ; return solvecubic(c1,c2,c3); } bigfloat min_real(vector array) { //cout<<"In min_real() with array:\t"< r)) {minr = r; first=0;} } } //cout<<"minr finally " << minr << "\n"; return minr; } int order_real_roots(vector& bnd, vector roots); //checks (and returns) how many roots are actually real, and puts those in //bnd, in increasing order, by calling set_the_bound int set_the_bounds(vector& bnd, bigfloat x0, bigfloat x1, bigfloat x2); //This transforms (if possible) x0, x1 and x1 into double; the search //should be made on [x0,x1]U[x2,infty] so if x1 or x2 overflows, the search //is on [x0,infty]. The function returns 3 in the first case, 1 in the second. //If x0 overflows, it returns 0. A warning is printed out. #define matentry(m,i,j) *((m)+((i)*MAXRANK)+(j)) bigfloat det(bigfloat *m, long m_size); // fwd declaration: det and detminor jointly recursive bigfloat* get_minor(bigfloat *m, long m_size, long i0, long j0) { long i, j, ii, jj; bigfloat *minor = new bigfloat[MAXRANK*MAXRANK]; for (i=0; i=i0)ii++; for (j=0; j=j0) jj++; matentry(minor,i,j) = matentry(m,ii,jj); } } return minor; } bigfloat det_minor(bigfloat *m, long m_size, long i0, long j0) { bigfloat *minor = get_minor(m,m_size,i0,j0); bigfloat det_return = det(minor, m_size-1); delete [] minor; return det_return; } bigfloat det(bigfloat *m, long m_size) { switch (m_size) { case 0: return to_bigfloat(1); break; case 1: return matentry(m,0,0); break; case 2: return matentry(m,0,0)*matentry(m,1,1) - matentry(m,1,0)*matentry(m,0,1); break; default: // use recursion /* // Old naive minor-expansion method: bigfloat ans = 0; long sign = 1, j; for (j=0; j0) // swap rows 0, i0: { ans=to_bigfloat(-1); for(j=0; j cleardenoms(vector alpha) { long len = alpha.size(); vector nlist(len); // returned vector dlist(len); long i, lcmd = 1; bigfloat x, last=alpha[len-1]; for (i=0; i < len-1; i++) // i doesn't include rank (new value) { x = alpha[i] / last; ratapprox(x, nlist[i], dlist[i]); lcmd = (lcmd*dlist[i]) / ::gcd(lcmd, dlist[i]); // ie lcm(d, dlist[i]) // ie we find the lcm of whole of dlist #ifdef DEBUG cout<<"ratapprox: of "<< x <<" is "<& Plist, int sat) { // process the points without saturation, do that at the end if(verbose) cout<<"Processing "<::const_iterator P=Plist.begin(); P!=Plist.end(); P++) flag = (process(*P,0)); if(verbose) cout<<"Finished processing the points (which had rank "<0)&&(rank>0)) { if (verbose) cout<<"saturating up to "<1) { basis = satsieve.getgens(); if(verbose) cout<<"Gained index "< 0) { if (verbose) cout<<" is torsion point, order "<0) { satsieve.set_points(basis); if (verbose) cout<<"saturating up to "<1) { basis = satsieve.getgens(); if(verbose) cout<<"Gained index "< alpha(rank1); // to store cofactors long detsign = ( odd(rank) ? +1 : -1 ); //set for flip before first use for (i=0; i < rank; i++) { detsign = -detsign; alpha[i] = det_minor(height_pairs, rank1, i, rank) * detsign; #ifdef DEBUG cout<<"alpha["< 1.0e-4 ) { reg = newreg; #ifdef DEBUG cout << "treating as NON-zero" << "\n"; #endif basis.push_back(P); rank=rank1; if (verbose) cout<<" is generator number "<0) { satsieve.reset_points(basis); if (verbose) cout<<"saturating up to "<1) { basis = satsieve.getgens(); if(verbose) cout<<"Gained index "< sat) #ifdef DEBUG cout << "treating as ZERO" << "\n"; cout << "Finding a linear relation between P and current basis\n"; #endif vector nlist = cleardenoms(alpha); long index = nlist[rank]; #ifdef DEBUG cout<<"index = "<1) { cout<<"Difference = "<1) { cout<<"Difference = "<0) && ( (imin==-1) || (ni 1 ) { for (i=0; i <= rank; i++) { r = mod(nlist[i], min); q = (nlist[i] - r) / nlist[imin]; if ( r!=0 ) { basis[imin] += q*basis[i]; imin=i; min=abs(r); nlist[imin]=r; #ifdef DEBUG if (verbose) { for (j=0; j < rank; j++) cout< pts; bigint ib = index_bound(E,basis,pts,0,(verbose>1)); // Must make sure that the new points have the correct Curvedata pointer! for(unsigned int i=0; i1)) { cout<<"after search, gained index "<1) { basis = satsieve.getgens(); // completely recompute the height pairing matrix for (int i=0; i < rank; i++) { mat_entry(i,i) = height(basis[i]); for (int j=0; j < i; j++) { mat_entry(i,j) = mat_entry(j,i) = height_pairing(basis[i], basis[j]); } } long ind = I2long(index); reg /= (ind*ind); if(verbose) { cout<<"Gained index "< roots=solvecubic(c1,c2,c3); vector bnd(3); int nrr=order_real_roots(bnd,roots); #ifdef DEBUG_QSIEVE cout<getai(a1,a2,a3,a4,a6); int ncomp = getconncomp(*E); posdisc = ncomp==2; long i, j; // find pt of order two in E(R) with minimal x-coord vector roots = roots_of_cubic(*E); if(posdisc) { x1=real(roots[0]); x2=real(roots[1]); x3=real(roots[2]); orderreal(x3,x2,x1); // so x1=aux) f -=aux; // df += ddf; if(df >=aux) df -=aux; // ddf +=dddf; if(ddf>=aux) ddf-=aux; // } } // end of aux loop #ifdef DEBUG_SIEVE if(verbose) { cout<<"squares lists:\n"; for(i=0; i2^31 // and overflows // On 64-bit machines, h_lim must be < 43.668. long i,j; // set initial bounds for point coefficients alim = I2long(Ifloor(exp(h_lim))); clim = clim1 = clim2 = clim0 = I2long(Ifloor(exp(h_lim / 2))); long temp; if(posdisc) { if(x2<-1) { temp = I2long(Ifloor(sqrt(alim/(-x2)))); if(clim1>temp) clim1=temp; } if(x1>1) { temp = I2long(Ifloor(sqrt(alim/x1))); if(clim1>temp) clim1=temp; } } if (x3>1) { temp = I2long(Ifloor(sqrt(alim/x3))); if(clim2>temp) clim2=temp; } clim=clim2; if(posdisc) if(clim1>clim2) clim=clim1; if (verbose) cout<< "sieve::search: trying a up to "<=aux) {xcc-=aux; flag-=aux;} // } // } // else // c, aux have common factor // { // if(odd(aux)&&((csq%aux)==0)) // { // int* flag = xgood_mod_aux[index]; // int* sqs = squares[index]; // x=aux; // while(x--) *flag++ = *sqs++; // } // end of if(odd(aux)) // else //default: full recomputation { pd1 = posmod(d1 , aux); pd2 = posmod(d2 , aux); pd3 = posmod(d3 , aux); pd4 = posmod(d4 , aux); pd6 = posmod(d6 , aux); long dddf= 24%aux; long ddf = posmod(2*(pd1*pd1)%aux + 8*pd2+24 , aux); long df = posmod(pd1*(pd1+2*pd3)%aux + 4*(pd4+pd2+1) , aux); long f = posmod(((pd3*pd3)%aux+4*pd6) , aux); int* flag = xgood_mod_aux[index]; int* sqs = squares[index]; long x=aux; #ifdef DEBUG_SIEVE if(verbose) { cout<<"aux = "<< aux <<"\n "; cout<<"pd1,...,pd6 = "<=aux) f -=aux; df += ddf; if(df >=aux) df -=aux; ddf +=dddf; if(ddf>=aux) ddf-=aux; } } // end of default case // } // end of non-coprime case } // end of aux loop #ifdef DEBUG_SIEVE if(verbose) { for(i=0; i1) { for(i=0; iamin) amin=temp; temp = I2long(Ifloor(csq*x2)); if(tempamin) amin=temp; a_search(amin,amax); } } // ends c- loop delete []cflag; } // end of sieve::search() void sieve::search_range(bigfloat xmin, bigfloat xmax, bigfloat h_lim) { // N.B. h_lim MUST be < 21.48 else exp(h_lim)>2^31 and overflows long i; // set initial bounds for point coefficients alim = I2long(Ifloor(exp(h_lim))); clim = clim1 = clim2 = clim0 = I2long(Ifloor(exp(h_lim / 2))); long temp; if(xmax<-1) { temp = I2long(Ifloor(sqrt(alim/(-xmax)))); if(clim1>temp) clim1=temp; } if(xmin>1) { temp = I2long(Ifloor(sqrt(alim/xmin))); if(clim1>temp) clim1=temp; } clim=clim2; if(clim1>clim2) clim=clim1; if (verbose) cout<< "sieve::search: trying a up to "<clim1) continue; // some preliminary calculations of multiples of c etc. csq = c*c /* long */; c2 = csq /* bigint */; c3 = c*c2; c4 = c2*c2; c6 = c2*c4; d1 = a1*c; d2 = a2*c2; d3 = a3*c3; d4 = a4*c4; d6 = a6*c6; long amin = -alim, amax = alim; long temp = I2long(Iceil(csq*xmin)); if(temp>amin) amin=temp; temp = I2long(Ifloor(csq*xmax)); if(temp=0); i--) { long& amodi = amod[i]; amodi++; if (amodi == auxs[i]) amodi = 0; if(try_x) { try_x = xgood_mod_aux[i][amodi]; if(!try_x) modhits[i]++; } } if (!try_x) continue; pb=a; pb*=d1; pb+=d3; // pb = a*d1 + d3; // qb = d6 + a*(d4 + a*(d2 + a)); qb=a; qb+=d2; qb*=a; qb+=d4; qb*=a; qb+=d6; db = sqr(pb); db += (4*qb); if(isqrt(db,rdb)) { b = rdb-pb; b/=2; ac = a*c; Point P(*E, ac, b, c3); mwbasis->process(P); npoints++; } } // ends a-loop } void sieve::a_simple_search(const long& amin, const long& amax) { bigint pb,qb,db,rdb,rdb2,b,ac; long a; if (verbose) cout<<"sieve::search: trying c = "<process(P); npoints++; } } // ends a-loop } void sieve::stats(void) { cout << "\nNumber of points found: "<& bnd, vector roots) {//checks (and returns) how many roots are actually real, and puts those in //bnd, in increasing order, by calling set_the_bound long i,nrr=0; vector real_roots; for (i=0;i<3;i++) { if (is_approx_zero(roots[i].imag())) { real_roots.push_back(roots[i].real()); if (is_approx_zero(real_roots[nrr])) real_roots[nrr]=0; nrr++; } } // cout<<"nrr = "<& bnd, bigfloat x0, bigfloat x1, bigfloat x2) { if (doublify(x0,bnd[0])) { cout<<"##WARNING##: lowest bound "< /* Prime number procs; adapted from Pari */ // These have not been stl-ized at all since they work just fine... primeclass the_primes; // The one and only instance primeclass::primeclass() { pdiffptr=0; // will be allocated in init() ifstream pfile("MAXPRIME"); if(!pfile) { init(1000000); // default value } else { long maxnum; pfile>>maxnum; init(maxnum); } } primeclass::primeclass(long maxnum) { pdiffptr=0; // will be allocated in init() init(maxnum); } void primeclass::init(long maxnum) /* initializes variable pdiffptr */ /* to give primes up to maxnum */ { register long k,size=(maxnum+257)>>1; if(pdiffptr) delete [] pdiffptr; byteptr p= new unsigned char[size+1]; if (!p) {cout<<"Out of memory in primeclass::init!"<=fin) break; *r++=(q-s)<<1; s=q; } *r++=0; NPRIMES=r-p-1; BIGGESTPRIME=((s - p) << 1) + 1; // cout<<"Near end of init, NPRIMES = "< primeclass::getfirst (long n) /* returns list of first n primes */ { // cout << "In primeclass::getfirst("< ans; reset(); int ok=1; for (long i=0; (ia) p=a; // N.B. this causes a=1 to return 1. Beware! } if (p==0) {p=a; cout<<"No prime divisor found for "< pdivs(long aa) {vector plist; primevar pr; long a = abs(aa);long p; while ( (a>1) && (pr.ok())) { p = pr; pr++; if (a%p==0) { plist.push_back(p); while (a%p==0) a/=p; //divide out by all the p's in a } else if (p*p>a) { plist.push_back(a); a=1; } } if (a>1) {plist.push_back(a);} //In case of p-factors outside range, assume //the cofactor is prime. return plist; } vector posdivs(long a, const vector& plist) { // cout << "In posdivs with a = " << a << endl; // cout << plist.size() << " primes: " < dlist(1,1); // cout << "Divisor 0 = 1" << endl; vector::const_iterator pr = plist.begin(); while(pr!=plist.end()) { p=*pr++; e = val(p,a); dlist.resize((e+1)*dlist.size()); for (j=0; j alldivs(long a, const vector& plist) {//cout << "In alldivs with a = " << a << endl; // cout << plist.size() << " primes: " < dlist(1,1); // cout << "Divisor 0 = 1" << endl; dlist.push_back(-1); // cout << "Divisor 1 = -1" << endl; vector::const_iterator pr = plist.begin(); while(pr!=plist.end()) { p = *pr++; e = val(p,a); dlist.resize((e+1)*dlist.size()); for (j=0; j sqdivs(long a, const vector& plist) { long j,k,p,e,nd = 1; vector dlist(1,1); vector::const_iterator pr = plist.begin(); while(pr!=plist.end()) { p = *pr++; e = val(p,a)/2; dlist.resize((e+1)*dlist.size()); for (j=0; j sqfreedivs(long a, const vector& plist) { long j,k,p,e,nd = 1; vector dlist(1,1); vector::const_iterator pr = plist.begin(); while(pr!=plist.end()) { p = *pr++; e = 1; dlist.resize((e+1)*dlist.size()); for (j=0; j=0) c=a%b; else c=b-((-a)%b); if (c>(b>>1)) c-=b; return(c); } long posmod(long a, long b) { long c=a%b; if (c<0) return(c+b); return(c); } long gcd(long a, long b) { long c; while (b!=0) {c=a%b; a=b; b=c;} return abs(a); } int gcd(int a, int b) { int c; while (b!=0) {c=a%b; a=b; b=c;} return abs(a); } long lcm(long a, long b) { long g=gcd(a,b); if(g==0) return 0; return a*(b/g); } long bezout(long aa, long bb, long& xx, long& yy) {long a,b,c,x,oldx,newx,y,oldy,newy,q; oldx = 1; oldy = 0; x = 0; y = 1; a = aa; b = bb; while (b!=0) { q = a/b; c = a - q*b; a = b; b = c; newx = oldx - q*x; oldx = x; x = newx; newy = oldy - q*y; oldy = y; y = newy; } if (a<0) {xx=-oldx; yy=-oldy; return(-a);} else {xx= oldx; yy= oldy; return( a);} } long invmod(long a, long p) {long g,x,y; g=bezout(a,p,x,y); if (g==1) return x; else { cout << "invmod called with " << a << " and " << p << " -- not coprime!\n"; abort(); return 0; } } int modrat(int n, int m, float lim, int& a, int& b) { long la,lb,ln=n,lm=m; int ans = modrat(ln,lm,lim,la,lb); a=la; b=lb; return ans; } int modrat(long n, long m, float lim, long& a, long& b) {long q,r,t,qq,rr,tt,quot; // cout<<"modrat("<1) { aa = aa % bb; if (aa<0) {aa=-aa; ans*=chi4(bb);} while (!(aa%4)) {aa/=4;} if (!(aa%2)) {aa/=2; ans *= chi2(bb);} ans*=hilbert2(aa,bb); long c=bb; bb=aa; aa=c; } return ans; } long legendre(long a, long b) { return (((gcd(a,b)==1) && (b%2)) ? leg(a,b) : 0); } // Function which returns 1 and sets e such that 2**e=n if n is a power of 2. // If the "roundup" flag is set and n is not a power of 2 it increases n to // the next power of 2 (and returns 0) int intlog2(long& n, long& e, int roundup) { e = 0; if (n<1) {if(roundup) n=1; return 0;} long m=n; while (m) { m >>= 1; e++; } e--; m=1<>=r; } else return 0; } x1=x%y; if (x1<0) x1+=y; while (x1) { r=val2(x1); if (r) { if (odd(r) && labs((y&7)-4) == 1) s= -s; x1>>=r; } if (y&2 && x1&2) s= -s; z=y%x1; y=x1; x1=z; } return (y==1)? s: 0; } long val2(unsigned long z) { int v=0; while (!(z&1)) {v++; z>>=1;} return v; } int is_squarefree(long n) { if(n%4==0) return 0; if(n%9==0) return 0; if(n%25==0) return 0; if(n%49==0) return 0; vectorplist = pdivs(n); for(unsigned int i=0; i1) return 0; return 1; } int is_valid_conductor(long n) { long m=n, p, e; e=0; while(!(m&1)) {e++; m>>=1;} if(e>8) return 0; e=0; while(!(m%3)) {e++; m/=3;} if(e>5) return 0; vectorplist = pdivs(m); for(unsigned int i=0; i2) return 0; } return 1; } // The following is no longer used long old_kronecker(long d, long n) { long ans=0; long m=n, d4=d%4; if(d4<0)d4+=4; if ((gcd(d,n)==1) && ((d4==0)||(d4==1))) { ans=1; while (!(m%4)) m/=4; if (!(m%2)) {m/=2; ans*=((d-1)%8 ? -1 : 1);} ans *= legendre(d,m); } return ans; } /* END OF FILE */ eclib-2013-01-01/libsrc/interface.cc0000644000175200017520000001373011774563612013645 00000000000000// interface.cc: implementation of non-inline functions from interface.h ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include // integers and rationals int I2int(const ZZ& x) { if(IsZero(x)) return 0; if(!is_int(x)) { cout<<"Attempt to convert "<((0.25 * (l - 3)) * (NTL_BITS_PER_LONG * LOG2)); n = 1 + static_cast(3.591 * x); a=x; log(u, a); if (sign(u) > 0) u=-u; a=u; v=b=to_bigfloat(1); for (k = 1; k <= n; k++) { mul(b, b, x); mul(b, b, x); div(b, b, (k * k)); mul(a, a, x); mul(a, a, x); div(a, a, k); add(c, a, b); div(a, c, k); add(u, u, a); add(v, v, b); } div(y, u, v); } long prec() {return RR::precision();} void setprec(long p) { RR::SetPrecision(p);} RR atan(const RR& x) // translated from LiDIA { long i, j, ex, t = prec(); // t stores input precision for restoring later long m, u, f; RR y; if (IsZero(x)) // atan(0)=0 return to_RR(0); ex = x.exponent() + t; if (ex > t) setprec(ex + NTL_BITS_PER_LONG - ex % NTL_BITS_PER_LONG); RR a=to_RR(1); RR tmp(x); m = 0; if (sign(tmp)<0) // compute atan(|x|) and negate later { m = 1; tmp=-tmp; } if (compare(tmp,a) == 0) // atan(1)-Pi/4 { y=Pi()/to_RR(4); if (m) NTL::negate(y,y); setprec(t); return y; } ex = tmp.exponent() + prec(); u = 0; if (ex > 0) { inv(tmp, tmp); u = 1; } ex = tmp.exponent() + prec(); f = 0; RR q(tmp); if (ex > -10) while (tmp.exponent() + prec() > -10) { mul(q, q, tmp); add(q, q, a); SqrRoot(q, q); add(q, q, a); div(tmp, tmp, q); q=tmp; f++; } power(a, tmp, 2); ex = tmp.exponent() + prec(); if (ex < 0) ex = -ex; ex <<= 1; j = prec() / ex; if (j & 1) j++; y = inv(to_RR(2 * j + 1)); setprec(4 * ex); for (i = j; i >= 1; i--) { mul(y, y, a); q=inv(to_RR(2 * i - 1)); setprec(prec() + 2 * ex); if (prec() > t) setprec(t); NTL::negate(y,y); add(y, y, q); } setprec(t); mul(y, y, tmp); y*=power2_RR(f); if (u) { a=Pi()/to_RR(2); sub(y, y, a); NTL::negate(y,y); } if (m) NTL::negate(y,y); return y; } RR asin (const RR & x) { if (sign(x-1) == 0) return Pi()/2; if (sign(x+1) == 0) return -Pi()/2; RR t = 1-x*x; if (sign(t)<0) { cout<<"asin called with arguments "< 1"<>(istream& is, CC& z) { RR r, i; char c; is >> c; if (c == '(') { is >> r >> c; if (c == ',') { is >> i >> c; if (c == ')') z = CC(r, i); else is.setstate(ios_base::failbit); } else if (c == ')') z = CC(r, to_RR(0)); else is.setstate(ios_base::failbit); } else { is.putback(c); is >> r; z = CC(r, to_RR(0)); } return is; } eclib-2013-01-01/libsrc/smatrix_elim.cc0000644000175200017520000000346511774563612014406 00000000000000// smatrix_elim.cc: implementation of class smat_elim ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Original version by Luiz Figueiredo #include #include #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #undef ssubspace #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #define ssubspace ssubspace_i #include "smat_elim.cc" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #undef ssubspace #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #define ssubspace ssubspace_l #include "smat_elim.cc" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #undef ssubspace eclib-2013-01-01/libsrc/svec.cc0000644000175200017520000003266711774563612012657 00000000000000// svec.cc: implementation of sparse integer vector class svec ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // ONLY to be included by svector.cc inline scalar xmm(scalar a, scalar b, scalar m) { //return xmodmul(a,b,m); //return (a*b) % m; return (a*(int64_t)b) % m; //return (scalar)(((long)a*(long)b) % (long)m); } inline scalar xmm0(scalar a, scalar b) { //return xmodmul(a,b,m); //return (a*b) % m; return (a*(int64_t)b) % BIGPRIME; //return (scalar)(((long)a*(long)b) % (long)m); } // Definitions of member operators and functions: svec::svec(const vec& v) { d = dim(v); scalar vi; for(int i = 1; i <= d; i++ ) if((vi=v[i])) // assignment not equality! entries[i]=vi; } svec::svec (int dim, scalar* a) // conversion constructor :d(dim) { int i=0; scalar* ai=a; for( ; i::const_iterator wi=entries.begin(); wi!=entries.end(); wi++) v[wi->first] = wi->second; return v; } scalar svec::elem(int i) const // returns i'th entry { map::const_iterator vi = entries.find(i); if(vi==entries.end()) return 0; return vi->second; } void svec::set(int i, scalar a) { if(a) entries[i]=a; #if(0) // else // a==0 so kill the i'entry if it is there { map::iterator vi = entries.find(i); if(vi!=entries.end()) entries.erase(vi); } #endif } void svec::erase(int i) { map::iterator vi = entries.find(i); if(vi==entries.end()) { cout<<"Error in svec::erase(): cannot delete missing entry #"<::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=wi->second; wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=wi->second; wi++; } else { scalar sum = (vi->second) + (wi->second); if(sum) {vi->second = sum; vi++;} else {vi++; entries.erase(wi->first);} wi++; } } } return *this; } svec& svec::operator-=(const svec& w) { if (d!=w.d) { cout << "Incompatible svecs in svec::operator-=()\n"; abort(); return *this; } map::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=-wi->second; wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=-wi->second; wi++; } else { scalar diff = (vi->second) - (wi->second); if(diff) {vi->second = diff; vi++;} else {vi++; entries.erase(wi->first);} wi++; } } } return *this; } svec& svec::add_scalar_times(const svec& w, scalar a) { if (d!=w.d) { cout << "Incompatible svecs in svec::add_scalar_times()\n"; abort(); return *this; } if(a==0) return *this; map::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=a*(wi->second); wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=a*(wi->second); wi++; } else { scalar sum = (vi->second) + a* (wi->second); if(sum) {vi->second = sum; vi++;} else {vi++; entries.erase(wi->first);} wi++; } } } return *this; } svec& svec::operator*=(scalar scal) { // if(scal==0) cout<<"Attempt to multiply svec by 0\n"<::iterator vi=entries.begin(); vi != entries.end(); vi++) (vi->second)*=scal; return *this; } void svec::reduce_mod_p(const scalar& p) { scalar a; map::iterator vi, vi2; for( vi=entries.begin(); vi != entries.end(); ) { a = mod(vi->second,p); if(a) {(vi->second)=a; vi++;} else {vi2=vi; vi++; entries.erase(vi2->first);} } } svec& svec::mult_by_scalar_mod_p(scalar scal, const scalar& p) { // if(xmod(scal,p)==0) cout<<"Attempt to multiply svec by 0\n"<::iterator vi=entries.begin(); vi != entries.end(); vi++) (vi->second)=xmm(vi->second,scal,p); return *this; } svec& svec::add_scalar_times_mod_p(const svec& w, scalar a, const scalar& p) { if (d!=w.d) { cout << "Incompatible svecs in svec::add_scalar_times()\n"; abort(); return *this; } if(a==0) return *this; map::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=xmm(a,(wi->second),p); wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=xmm(a,(wi->second),p); wi++; } else { scalar sum = xmod((vi->second) + xmm(a, (wi->second),p),p); if(sum) {vi->second = sum; vi++;} else {vi++; entries.erase(wi->first); } wi++; } } } // reduce_mod_p(p); return *this; } svec& svec::add_scalar_times_mod_p(const svec& w, scalar a, std::set& ons, std::set& offs, const scalar& p) { ons.clear(); offs.clear(); if (d!=w.d) { cout << "Incompatible svecs in svec::add_scalar_times()\n"; abort(); return *this; } if(a==0) return *this; map::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=xmm(a,(wi->second),p); ons.insert(wi->first); wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=xmm(a,(wi->second),p); ons.insert(wi->first); wi++; } else { scalar sum = xmod((vi->second) + xmm(a, (wi->second),p),p); if(sum) {vi->second = sum; vi++;} else {vi++; entries.erase(wi->first); offs.insert(wi->first);} wi++; } } } // reduce_mod_p(p); return *this; } svec& svec::add_mod_p(const svec& w, const scalar& p) { if (d!=w.d) { cout << "Incompatible svecs in svec::add_scalar_times()\n"; abort(); return *this; } map::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=wi->second; wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=wi->second; wi++; } else { scalar sum = xmod((vi->second) + (wi->second),p); if(sum) {vi->second = sum; vi++;} else {vi++; entries.erase(wi->first); } wi++; } } } return *this; } svec& svec::sub_mod_p(const svec& w, const scalar& p) { if (d!=w.d) { cout << "Incompatible svecs in svec::add_scalar_times()\n"; abort(); return *this; } map::const_iterator wi=w.entries.begin(); map::iterator vi=entries.begin(); while(wi!=w.entries.end()) { if(vi==entries.end()) { while(wi!=w.entries.end()) { entries[wi->first]=-(wi->second); wi++; } } else { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) { entries[wi->first]=-(wi->second); wi++; } else { scalar sum = xmod((vi->second) - (wi->second),p); if(sum) {vi->second = sum; vi++;} else {vi++; entries.erase(wi->first); } wi++; } } } return *this; } svec& svec::operator/=(scalar scal) { if(scal==0) { cout<<"Attempt to divide svec by 0\n"<::iterator vi=entries.begin(); vi != entries.end(); vi++) (vi->second)/=scal; return *this; } // Definitions of non-member, friend operators and functions int eqmodp(const svec& v1, const svec& v2, const scalar& p) { if(v1.d!=v2.d) return 0; map::const_iterator vi; for(vi=v1.entries.begin(); vi!=v1.entries.end(); vi++) if(xmod((vi->second)-(v2.elem(vi->first)),p)!=0) return 0; for(vi=v2.entries.begin(); vi!=v2.entries.end(); vi++) if(xmod((vi->second)-(v1.elem(vi->first)),p)!=0) return 0; return true; } int operator==(const svec& v1, const vec& v2) { if(v1.d!=dim(v2)) return 0; for(int i=1; i<=v1.d; i++) if(v2[i]!=v1.elem(i)) return 0; return 1; } ostream& operator << (ostream& s, const svec& v) { map::const_iterator vi; s<<"["; for(vi=v.entries.begin(); vi!=v.entries.end(); vi++) { if(vi!=v.entries.begin()) s<<","; s << "("<first<<":"<second<<")"; } s<<"]"; return s; } scalar operator*(const svec& v, const svec& w) //dot prod { scalar ans=0; if((v.entries.size()==0)||(w.entries.size()==0)) return ans; map::const_iterator vi=v.entries.begin(), wi=w.entries.begin(); while((vi!=v.entries.end())&&(wi!=w.entries.end())) { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) {wi++;} else { ans+=(vi->second)*(wi->second); vi++; wi++; } } return ans; } scalar operator*(const svec& v, const vec& w) //dot prod { scalar ans=0; if((v.entries.size()==0)) return ans; map::const_iterator vi; for(vi=v.entries.begin(); vi!=v.entries.end(); vi++) ans+=(vi->second)* w[vi->first]; return ans; } scalar dotmodp(const svec& v, const vec& w, scalar pr) { scalar ans=0; map::const_iterator vi; for(vi=v.entries.begin(); vi!=v.entries.end(); vi++) ans=xmod(ans+xmm(vi->second,w[vi->first],pr),pr); return ans; } scalar dotmodp(const svec& v, const svec& w, scalar pr) { scalar ans=0; if((v.entries.size()==0)||(w.entries.size()==0)) return ans; map::const_iterator vi=v.entries.begin(), wi=w.entries.begin(); while((vi!=v.entries.end())&&(wi!=w.entries.end())) { if((vi->first)<(wi->first)) {vi++;} else if((wi->first)<(vi->first)) {wi++;} else { ans=xmod(ans+xmm(vi->second,wi->second,pr),pr); vi++; wi++; } } return ans; } scalar content(const svec& v) { scalar ans=0; map::const_iterator vi; for(vi=v.entries.begin(); (ans!=1)&&(vi!=v.entries.end()); vi++) ans=gcd(ans,vi->second); return ans; } scalar make_primitive(svec& v) // divides by & returns content { scalar c=content(v); v/=c; return c; } eclib-2013-01-01/libsrc/mglobsol.cc0000644000175200017520000004251011774563612013521 00000000000000// mglobsol.cc: implementation of class quartic_sieve and functions for quartic solubility testing ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // (1) simple search with function ratpoint() // (2) sieve-assisted search using class quartic_sieve #include int test(const bigint& x, const bigint& z, const bigint& y2, bigint&xx, bigint&yy, bigint&zz) { bigint y; int ans = isqrt(y2,y); if (ans) { xx=x; yy=y; zz=z; } return ans; } int ratpoint(const quartic& g, const bigint& min, const bigint& max, bigint& xx, bigint&yy, bigint& zz) { bigint a=g.geta(), b=g.getb(), c=g.getcc(), d=g.getd(), e=g.gete(); bigint n,sx,gg; int found = 0; // Check for rational points at 0 or infinity: if(isqrt(a,n)) {xx=1; yy=n; zz=0; return 1;} if(isqrt(e,n)) {xx=0; yy=n; zz=1; return 1;} bigint x,x2,x3,x4,z,z2,z3,z4,ax4,bx3z,cx2z2,dxz3,ez4; static const bigint zero = BIGINT(0); static const bigint one = BIGINT(1); for (n=min; (n<=max) && (!found); ++n) { if (n==1) { found=test( one, zero, a, xx, yy, zz); // pt at infty iff a square if (!found) found=test( zero, one, e, xx, yy, zz); // 0 iff e square } else { for (sx=1; (sxgeta(); b=g->getb(); c=g->getcc(); d=g->getd(); e=g->gete(); nwprimes= 0; easy=0; if(isqrt(a,roota)) easy+=1; if(isqrt(e,roote)) easy+=2; // if(easy&1) cout<<"Easy case: "<1) { cout << "Finished constructing quartic_sieve, using "; switch(moduli_option) { case 1: cout << "ten primes 3..31"; break; case 2: cout << "three composite moduli"; break; case 3: cout << "prime powers"; break; } cout << endl; } } quartic_sieve::~quartic_sieve() { if(nwprimes) { delete[] wprimes; delete[] uprimes;} if(use_stoll) // using Stoll search so rest not needed. return; delete[] auxs; for(long i=0; ix2) {t=x1; x1=x2; x2=t;} if(x2>x3) {t=x2; x2=x3; x3=t;} if(x3>x4) {t=x3; x3=x4; x4=t;} // now x4 is biggest if(x1>x2) {t=x1; x1=x2; x2=t;} if(x2>x3) {t=x2; x2=x3; x3=t;} // now x3 is second biggest if(x1>x2) {t=x1; x1=x2; x2=t;} #ifdef DEBUG_RANGES cout << "sort returns roots "<=maxnpoints) return npoints; if(easy&2) // e is a square with root roote { pu=0; pv=roote; pw=1; npoints++; // cout<<"Easy case: "<=maxnpoints) return npoints; // Now do some harder work: if(use_stoll) return stoll_search(h_lim,posxonly); // set initial bounds for point coefficients ulim = (long)floor(exp(h_lim)); if (verbose) cout << "quartic_sieve::search: trying u,w up to "<gettype(); bigcomplex * roots = g->getroots(); bigfloat x1, x2, x3, x4,t, zero=to_bigfloat(0); switch (type) { case 0: default: // no roots info known #ifdef DEBUG_RANGES cout << "sieve::search: no info about real roots.\n"; #endif search_range(0,zero,0,zero,posxonly); return npoints; break; case 1: // no real roots #ifdef DEBUG_RANGES cout << "sieve::search: no real roots.\n"; #endif search_range(0,zero,0,zero,posxonly); return npoints; break; case 3: // 2 real roots, one or two ranges x1 = real(roots[2]); x2 = real(roots[3]); if(x1>x2) {t=x1; x1=x2; x2=t;} #ifdef DEBUG_RANGES cout << "sieve::search: type 3, real roots "<0) { search_range(1,x2,0,zero,posxonly); // x20) { search_range(1,x2,1,x3,posxonly); // x2 coef(5); coef[0]=e; coef[1]=d; coef[2]=c; coef[3]=b; coef[4]=a; qsieve s(this, 4, coef, to_bigfloat(h_lim), verbose); // Find and set search intervals int type = g->gettype(), lb_flag; bigcomplex * roots = g->getroots(); vector real_roots(4); int nrr=0; bigfloat x1, x2, x3, x4, t; switch (type) { case 0: case 1: default: // no roots info known or no real roots #ifdef DEBUG_RANGES if(type==0) cout << "sieve::stoll_search: no info about real roots.\n"; else cout << "sieve::search: no real roots.\n"; #endif s.set_intervals(real_roots,0,0,posxonly); break; case 3: // 2 real roots, one or two ranges nrr=2; x1 = real(roots[2]); x2 = real(roots[3]); if(x1>x2) {t=x1; x1=x2; x2=t;} #ifdef DEBUG_RANGES cout << "sieve::search: type 3, real roots "<0) if(wprimes[0]==2) odd_w_only=1; long wstep = 1+odd_w_only; if(odd_w_only) { if(!odd(wstart)) wstart++; } int* wflag = new int[10000]; int odd_u_only=0; if(nwprimes>0) if(uprimes[0]==2) odd_u_only=1; long ustep = 1+odd_u_only; for (w = wstart; (w <= ulim) && (npoints10); int use_gcd_table = use_w_sieve&&(w<10000)&&((last_u-first_u)>(w/2)); long umodw=0; int w_vars_set = 0; if(use_w_sieve) { // some preliminary calculations of multiples of w etc. w2 = sqr(BIGINT(w)); w3 = w*w2; w4 = w2*w2; aw = a; bw = b*w; cw = c*w2; dw = d*w3; ew = e*w4; for ( i=0; i < num_aux; i++) umod[i] = posmod(first_u-ustep, auxs[i]); // set up flag array of residues coprime to w if(use_gcd_table) { umodw = posmod(first_u-ustep,w); wflag[0]=(w==1); for(i=1; i<=w-i; i++) wflag[i] = wflag[w-i] = (gcd(i,w)==1); } // set the main flag matrix for (long index = 0; index < num_aux; index++) { aux = auxs[index]; paw = posmod(aw, aux); pbw = posmod(bw, aux); pcw = posmod(cw, aux); pdw = posmod(dw, aux); pew = posmod(ew, aux); long ddddf= posmod(24*paw , aux); long dddf = posmod(36*paw + 6*pbw , aux); long ddf = posmod(14*paw + 6*pbw + 2*pcw , aux); long df = posmod(paw+pbw+pcw+pdw, aux); long f = posmod(pew , aux); int* flag = xgood_mod_aux[index]; int* sqs = squares[index]; long x=aux; while(x--) { *flag++ = sqs[f]; f += df; if(f >= aux) f -= aux; df += ddf; if(df >= aux) df -= aux; ddf += dddf; if(ddf >= aux) ddf -= aux; dddf += ddddf; if(dddf >= aux) dddf -= aux; } } // end of aux loop } // end of if(use_w_sieve) for (u=first_u; (u <= last_u) && (npoints= auxs[i]) umodi -= auxs[i]; if(u_is_ok) { u_is_ok = xgood_mod_aux[i][umodi]; // if(!u_is_ok) // cout<<"(u,w)=("<=w) umodw-=w; u_is_ok = wflag[umodw]; // true if gcd(u,w)=1 } if(!u_is_ok) continue; // Check that u has no impossible prime factors: for(nwp=0; (nwp #include #include unimod operator*(const unimod& a, const unimod& b) { return unimod( a.m11*b.m11 + a.m12*b.m21, a.m11*b.m12 + a.m12*b.m22, a.m21*b.m11 + a.m22*b.m21, a.m21*b.m12 + a.m22*b.m22 ); } scaled_unimod operator*(const scaled_unimod& a, const scaled_unimod& b) { return scaled_unimod( a.m00*b.m00, a.m11*b.m11 + a.m12*b.m21, a.m11*b.m12 + a.m12*b.m22, a.m21*b.m11 + a.m22*b.m21, a.m21*b.m12 + a.m22*b.m22 ); } eclib-2013-01-01/libsrc/mrank1.cc0000644000175200017520000015171711774563612013106 00000000000000// mrank1.h -- implementation of class rank1 for general 2-descent ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include // from qcurves library #include // from qcurves library #include #include #include #include #define USE_BIGINTS #include #include #include #ifdef USE_BIGINTS //#define DEFAULT_NAUX 12 #define DEFAULT_NAUX 8 #else #define DEFAULT_NAUX 5 #endif // For testing: defines the strategy for dealing with large quartics // 1 for original BSD criteria // 2 for simple version of JC+MS criteria (Lemma 5.1 only) // 3 for optimal JC+MS criteria, with 2-adic refinement (uses twoadic.h) // So far, the options only affect the criteria for using small // quartics only, not the handling of large quartics using the exact // 2-adic index. // 4 for intelligent handling of large quartics when 2-adic index is 2 // or 4. When index=2 we can abort large quartic search as soon as // one is found; when index=2 we can abort after two are found // provided that they are independent modulo small quartics. #ifndef LARGE_Q #define LARGE_Q 4 #endif #ifndef QSIEVE_OPT #define QSIEVE_OPT 0 // uses Stoll's sieve #endif #define SQUARE_A_FIRST //#define NO_PADIC_FILTERING //#define SHOW_ABC_RANGES //#define DEBUG_AH #define maxnquartics 2048 // OK for curves of rank 12 or less. #define abceps 0.001 // used in abc-test #define ROUNDADJUST 0.001 // Amount add/subtracted before rounding for safety long roundtemp; inline int FITS_IN_LONG(const bigfloat& x) {return (x<=MAXLONG)&&(x>=MINLONG);} inline void ROUNDUP(long& a,const bigfloat& x) { if(FITS_IN_LONG(x)) return Iasb(a,ceil((x)-ROUNDADJUST)); cout<<"Attempt to round "<1) cout<<":"; if(aux_types[i]==1) switch(vec[i]) { case 15: cout<<"0"; break; case 5: cout<<"1"; break; default: cout<<"?"; } else switch(vec[i]) { case 15: cout<<"00"; break; case 5: cout<<"01"; break; case 3: cout<<"10"; break; case 1: cout<<"11"; break; default: cout<<"??"; } // cout<<"("<3 if(!btype) { if (extra2&&(twoadic_index==2)) // then 2 is pivotal {btype=1; pivtype=2;} } #endif if(!btype) { if (ipivot>=0) // then we have a pivotal odd prime {btype=1; pivtype=1;} } int atype = !btype; // NB We do not use 2 as a pivotal prime when the 2-adic index is 4, // since we have not implemented the corresponding local map from // quartics to (Z/2Z)^2 which maps large quartics to one of the // three non-trivial elements. So when the 2-adic index is 4, we // only use large quartics for pivoting when there is an odd pivotal // prime suitable. if(atype) {qlist=qlista; thisnumber=nquarticsa; nfl=nfirstlota; ab='A';} else {qlist=qlistb; thisnumber=nquarticsb; nfl=nfirstlotb; ab='B';} qlist[thisnumber].assign(a,b,c,d,e,croots,type,ii,jj,disc); thisq=qlist+thisnumber; if (verbose) cout << (*thisq) << "\t"; if (verbose>1) { cout << "(ipivot = "<trivial(); // else certainly nontrivial if (trivial) { if (verbose) cout << "--trivial"<set_equiv_code(eqplist); firsti = (extra2==1 ? nfl : 0); for (i=firsti; newone && (i1) cout<<"\nipivot = "<=nfl) H=posmod(hscale*H,auxpiv); // Check if it would now be sieved out: long fl = flags[ipivot][a][H]; if(verbose>1) cout<<(i+1)<<"-th quartic in list has flag = "<1) cout<<" (pivotal prime =" << auxs[ipivot] << ")";} cout<2 else // use 2-adic refinement to determine index (case 1) { bigint a = -27*ii/4; bigint b = -27*jj/4; if(verbose>1) cout<<"Case 1 with a = I/4 = "<2 else // use 2-adic refinement to determine index (case 2) { bigint a = -7-27*(ii-1)/4; bigint b = -14-27*(jj-2)/4; if(verbose>1) cout<<"Case 2 with a = (I-1)/4 = "<2 cout<<"2-adic index = "<1 vector plist0 = getbad_primes(*the_curve); // sorted by construction // now make sure 2 and 3 are in the list of primes vector p23; p23.push_back(BIGINT(2)); p23.push_back(BIGINT(3)); set_union(plist0.begin(),plist0.end(),p23.begin(),p23.end(),back_inserter(plist)); // cout<<"\nplist0 = "<1) { cout << ah_count << "\t (a,b,c) triples in search region\n"; cout << ah_sieve_1 << "\t failed c-divisiblity,\n"; cout << ah_sieve_2 << "\t failed syzygy sieve,\n"; cout << ah_sieve_0 << "\t passed sieve.\n"; cout << ah_rfail << "\t failed syzygy after sieving,\n"; cout << ah_dfail << "\t failed d-integrality,\n"; cout << ah_efail << "\t failed e-integrality,\n"; cout << ah_extra2fail << "\t failed extra-2 divisibility conditions,\n"; cout << ah_pass << "\t passed all and produced quartics.\n"; } clear_sieve(); // clears memory allocated by aux_init() return; } // End of getquartics() void rank1::getquartics1() { if (verbose) cout<<"Looking for quartics with I = "<< ii << ", J = " << jj << endl; static bigint zero = BIGINT(0); IJ_curve = Curvedata(zero,zero,zero,-27*ii,-27*jj,0); // don't minimise if (posdisc) { gettype(2); // get type 2s first as they are a subgroup of index 1 or 2 if(!have_eggpoint) gettype(1); } else { gettype(3); } } // of getquartics1() void rank1::gettype(int t) // new hybrid version 13/2/96 { type=t; long a,astep, amin=0, amax=0, firsta, lasta; long b,bstep; long c,cstep,cmod3; int a_is_odd, b_is_odd, a_div_by_4; int a_positive; bigint I48=48*ii, J64=64*jj; static const bigint m27=BIGINT(-27); static const bigfloat root27=sqrt(to_bigfloat(27)); static const bigfloat zero=to_bigfloat(0); bigint rsq, r, rem, h, d, e, ee; bigfloat r1, r2, r3, xr; long efactor, cfactor; bigcomplex c1; // Unnecessary initializations to keep -Wall happy: bigfloat phi=zero,phi1,phi2,phi3; bigfloat amax0=zero, amin0, amax2, amin2, amax3, amin3; bigfloat hmin=zero, hmax=zero, hmin0=zero, hmax0=zero, hmin2, hmax2, htemp; bigfloat const6=zero,const5=zero,const3=zero,const2=zero; int extraextra2 = div(64,ii)&&div(128,jj); // Pascale's extra condition cfactor = 1; cmod3 = mod(jj,3); if (verbose) cout << "Looking for Type " << t << " quartics:\n"; // Set phi to be the real root in type 3, // else set the phi_i to be the three real roots // in descending order phi1 > phi2 > phi3: switch(type) { case 1: phi1 = real(cphi[0]); phi2 = real(cphi[1]); phi3 = real(cphi[2]); orderreal(phi1,phi2,phi3); // decreasing order hmax0 = 4*(phi3*phi3-xii)/3; if(verbose>1) cout<<"phi1 = "<0) const6 = sqrt(const2); // const2 must be >0 but avoid rounding problems hmin0 = 4*const5/3; amax0 = (abs(cphi[0]-cphi[1]) + 2*abs(cphi[0]-cphi[2]))/18; // (2*sqrt(phi^2-I)+sqrt(phi^2-4I))/6*sqrt(3) if(verbose>1) { cout<<"After sorting, phi = "<0) { amax2 = (phi+const6)/6; // const6 = sqrt(phi^2-4I) amax3 = 2*const5/(9*phi); // const5 = phi^2-I if(verbose>1) { if((amax2amax2) amax2=amax3; // so amax2=max of two previous if(amax2>amax0) { amax2=amax0; // so amax2=min of two previous } ROUNDDOWN(amax,amax2); amin2= -const6/root27; if(amin2<-amax0) { amin2=-amax0; cout<<"New a lower bound worse, not using -- should NOT happen!\n"; } ROUNDUP(amin,amin2); } else // phi<0 { amax2= const6/root27; if(amax2>amax0) { amax2=amax0; cout<<"New a upper bound worse, not using -- should NOT happen!\n"; } ROUNDDOWN(amax,amax2); amin0 = -amax0; // this and the two following are all negative amin2 = (phi-const6)/6; amin3 = 2*const5/(9*phi); // const5 = phi^2-I if(verbose>1) { if((amin0amin3) amin2=amin3; // so amin2=min of two previous if(amin21) cout<<"Search range for a: ("<1) cout<<"Search range for a: ("<=0; a_positive--) #ifdef SQUARE_A_FIRST for(a_positive=2; a_positive>=0; a_positive--) #else for(a_positive=1; a_positive>=0; a_positive--) #endif { #ifdef SQUARE_A_FIRST int square_a_only = (a_positive==2); #endif if (a_positive) { firsta=amin; if(firsta<1) firsta=1; lasta =amax; if(firsta>lasta) continue; a=firsta-1; astep=1; if(verbose) { cout << "Trying positive a from " << firsta << " up to " << lasta; #ifdef SQUARE_A_FIRST if(square_a_only) cout << " (square a first...)"; else cout << " (...then non-square a)"; #endif cout<< endl; } } else // negative range will be traversed downwards! { firsta=amax; if(firsta>-1) firsta=-1; lasta =amin; if(firsta10000) { if(verbose) cout<<"**************\na range too big, quitting\n*************\n"; success=0; return; } #endif long iaux; long *amodi, *hmodi, *auxi, *hstepmodi, *hscalemodi, *astepmodi; int ***flagsi; int **flagai; iaux=num_aux; amodi=amod; auxi=auxs; astepmodi=astepmod; while(iaux--) { *amodi++ = posmod(a, *auxi); *astepmodi++ = posmod(astep,*auxi); auxi++; } while(a!=lasta) { a+=astep; for(iaux=0, amodi=amod, auxi=auxs, flagai=flaga, flagsi=flags, astepmodi=astepmod; iaux=(*auxi)) (*amodi)-=(*auxi); *flagai = (*flagsi)[*amodi]; } #ifdef SQUARE_A_FIRST // First time through positive a, only look at square a: if(a_positive) { long roota=(long)(sqrt((double)a)+0.1); if((square_a_only)!=(a==roota*roota)) continue; } #endif // // Tests: not(4|a) if extra2, not(2|a) if extraextra2: // a_is_odd = (a&1); a_div_by_4 = !(a&3); if ((! (extra2 && (a_div_by_4))) && (! (extraextra2 && !(a_is_odd))) ) { #ifdef SHOW_ABC_RANGES if(verbose)cout<<"a = "<1) cout<<"hmin = "<1) cout<<"hmax1 = "<1) cout<<"hmax2 = "<hmax2) hmax = hmax2; //if(verbose>1) cout<<"hmax = "<hmax) { // cout<<"Empty H-range! hmin = "<hmin) { // cout<<"Empty H-range! hmin = "<cmax) continue; // Skip to next b #ifdef SHOW_ABC_RANGES if(verbose)cout<<":\tcmin = "<=(*auxi)) (*hmodi)-=(*auxi); } int flagok = (b_is_odd || even(c-Imod2)); if(!flagok) {ah_sieve_1++; continue;} ipivot=-1; for(iaux=0, hmodi=hmod, flagai=flaga; flagok&&(iaux0)&&(!(thisflag&8))&&(ipivot==-1)) { ipivot=iaux; pivflag=thisflag; } #endif } if(!flagok) {ah_sieve_2++; continue;} // We have an (a,b,c)-triple which passes the sieve test ah_sieve_0++; bigfloat xh=8*xa*c-xbb3; int ok=1; // Check that rounding has not put us outside the range: if((a_positive&&((xh>hmax)||(xhhmin)||(xh1) cout<<"(a,b,c)=("<abceps) {ah_dfail++; continue;} #endif #ifdef USE_BIGINTS ee=ii_cc+sb3*d; #ifdef DEBUG_AH cout<<"\n ii,b3,d,ee = "<abceps) {ah_efail++; continue;} d = Iround(xd); e = Iround(xe); #endif #ifdef DEBUG_AH cout << ":\n [" << a<<","<0 check that the type is correct if(posdisc) { bigint habcde = biga8*bigc-bigbb3; bigint qabcde = habcde*habcde-16*biga*biga*ii; // =3*Q if(type==1) { if((habcde<0)&&(qabcde>0)) { cout<<"Error: constructed quartic "; cout<<"[" << a<<","<=0)||(qabcde<=0)) { cout<<"Error: constructed quartic "; cout<<"[" << a<<","<3 if((extra2)&&(have_large_quartics)) { if (verbose) { cout << "Exiting search for large quartics after "; cout << "finding enough globally soluble ones.\n"; } return; } #endif // LARGE_Q>3 } // end of b-sign-loop } // end of c loop } // end of b conditions } // end of b loop } // end of a conditions } // end of main a loop } // end of loop on sign of a if (verbose) cout << "Finished looking for Type " << t << " quartics.\n"; } // end of gettype() rank1::rank1(Curvedata* ec, int verb, int sel, long lim1, long lim2,long n_aux) : rank12(ec,verb,sel,lim1,lim2,n_aux,1) { traceequiv=0; success=1; // the default! if(num_aux==-1) num_aux=DEFAULT_NAUX; if(verbose>1) { cout << "Using (a,b,c) search with (a,h) sieve and algebraic method\n"; #ifdef USE_BIGINTS cout << "(with bigints to solve the syzygy)\n"; #else cout << "(with bigfloats to solve the syzygy)\n"; #endif } qlista = new quartic[maxnquartics]; qlistb = new quartic[maxnquartics]; qlistbflag = new int[maxnquartics]; croots = new bigcomplex[4]; the_curve->getci(c4,c6); d1728 = c4*c4*c4-c6*c6; if (is_zero(d1728)) {cout<<"Curve is singular\n"; success=0; return;} // Set up the transformation [u,r,s,t] from the minimal model to the model // [0,0,0,-27*c4,-54*c6]; from these we will later obtain (by simple scaling) // the transformations to the IJ-curve for various I,J bigint a1,a2,a3,a4,a6,b2=getb2(*the_curve); the_curve->getai(a1,a2,a3,a4,a6); tr_u=6; tr_r=3*b2; tr_s=3*a1; tr_t=108*a3; vector ir = Introotscubic( BIGINT(0),-27*c4,-54*c6); n0=ir.size()+1; long e0,e1,e2; if(!intlog2(n0,e0,0)) { success=0; cout<<"!!! Fatal error: n0=#E[2]="<1) { cout<<"After getquartics(): \n"; cout<<"n1 = "<"; cout<<"= "<0)&&(npoints2>0); if(explanation_needed) { cout<<"p-adic filtration expresses E(Q)/2E(Q) as a direct sum A+B\n"; cout<<"where A = E(Q)\\cap\\sum 2E(Q_p) for certain primes p.\n"; cout<<"We list all nonzero points of A, and generators of B\n"; } if(npoints1>0) { if(explanation_needed) { cout << "Points in A:\n"; } else { cout << "Points covering E(Q)/2E(Q):\n"; } for (long i=0; i0) { if(explanation_needed) { cout << "Points generating B:\n"; } else { cout << "Points generating E(Q)/2E(Q):\n"; } for (long i=0; i0)&&(npoints2>0); if(explanation_needed) { cout<<"p-adic filtration expresses E(Q)/2E(Q) as a direct sum A+B\n"; cout<<"where A = E(Q)\\cap\\sum 2E(Q_p) for certain primes p.\n"; cout<<"We list all nonzero points of A, and generators of B\n"; } if(npoints1>0) { if(explanation_needed) { cout << "Points in A:\n"; } else { cout << "Points covering E(Q)/2E(Q):\n"; } for (long i=0; i0) { if(explanation_needed) { cout << "Points generating B:\n"; } else { cout << "Points generating E(Q)/2E(Q):\n"; } for (long i=0; i rank1::getpoints() // We construct a set of coset reps for 2E(Q) in E(Q) given // reps for the subgroup A in pointlist1 and // gens for the complementary subgroup B in pointlist2 { long np = (1+npoints1) << npoints2; vector ans; long j, k, ip=1+npoints1; ans.push_back(Point(the_curve,BIGINT(0),BIGINT(1),BIGINT(0))); ans.insert(ans.end(),pointlist1.begin(),pointlist1.end()); ans.resize(np); for(j=0; j rank1::getgens() const // Returns a set of generators for E(Q) mod 2E(Q) // (but not necessarily independent) { vector ans; ans.reserve(pointlist1.size()+pointlist2.size()); copy(pointlist1.begin(),pointlist1.end(),back_inserter(ans)); copy(pointlist2.begin(),pointlist2.end(),back_inserter(ans)); return ans; } void rank1::aux_init() // define auxiliary moduli and squares { long i, j, a; auxs = new long[num_aux]; phimod = new long*[num_aux]; aux_flags = new int[num_aux]; aux_types = new int[num_aux]; squares = new int*[num_aux]; flags = new int**[num_aux]; flaga = new int*[num_aux]; amod = new long[num_aux]; hmod = new long[num_aux]; hstepmod = new long[num_aux]; astepmod = new long[num_aux]; hscalemod = new long[num_aux]; auxs[0]=9; // treated specially aux_flags[0]=1; aux_types[0]=0; for(i=0; i0) { auxs[i]=p; aux_flags[i] = 1; aux_types[i] = 1; if(nr>1) aux_types[i] = 2; i++; } } // report on which primes will be used: if((verbose>1)&&(num_aux>0)) { cout<<"(a,h) sieving using " <1)&&(num_aux>0)) cout<<"finished aux_init()"<1)&&(num_aux>0)) cout<<"starting flag_init()"<0) { a4phi[0] = (4*a*phimod[i][0])%aux2; if(case2) { a4phi[1] = (4*a*phimod[i][1])%aux2; a4phi[2] = (4*a*phimod[i][2])%aux2; } } int *flagsiah = *flagsia; for(h=0; h0) { cout << "Code count for p = " << aux << ":\n"; cout << 0 << "\t"<< 15 << "\t"<< 5 << "\t"<< 3 << "\t"<< 1 << "\n"; for(icc=0; icc<5; icc++) cout< #include #include #include #include #include #include #include #define REDUCE_B //#define DEBUG_REDUCE //#define DEBUG_ONESTEP //#define DEBUG_FIRSTSTEP //#define USE_OLD_BSD // to use bsd-reduction for type 3 (worse!) void reduce_b(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m) { bigint a4=a<<2; bigint bmod4a = mod(b,a4); bigint alpha; divide_exact((bmod4a-b),a4,alpha); if(is_zero(alpha)) return; xshift(alpha,a,b,c,d,e,m); return; } bigfloat show(bigfloat x) {cout< cphi = solvecubic( c1, c2, c3); #ifdef DEBUG_REDUCE cout<<"Three roots phi are initially "<a*phi2>a*phi3 if((is_negative(H))&&(H*H>16*a*a*ii)) { type = 2; realphi = phi2; phi = phi2; #ifdef DEBUG_REDUCE cout<<"Type = 2, phi = "<h int one_step(const bigfloat& x0, const bigfloat& y0, const bigfloat& h, bigint& a, bigint& b, bigint& c, bigint& d); unimod reduce_quad_1(const bigfloat& b, const bigfloat& c); unimod reduce_quad_2(const bigfloat& b, const bigfloat& c); unimod reduce_quad(const bigfloat& b, const bigfloat& c) { return reduce_quad_1(b,c); } // Given a pos. def. quadratic x^2+b*x+c, returns a unimod which // reduces it (whose inverse takes its root into the fundamental // region). unimod reduce_quad_1(const bigfloat& bb, const bigfloat& cc) { bigfloat b=bb, c=cc; bigfloat dz = 4*c-b*b; // should be positive! bigfloat xz = -b/2; bigfloat yz = sqrt(abs(dz))/2; #ifdef DEBUG_REDUCE_QUAD bigfloat az = c; cout << "Before any reduction:\n"; cout << "Covariant quadratic has coefficients 1, "<1 if(g>1) {c/=g; d/=g;} #ifdef DEBUG_FIRSTSTEP cout<<"first_step returns (a,b;c,d) = ("<0)) {type=2; nrr=4;} // 4 real roots else {type=1; nrr=0;} // 0 real roots } #ifdef DEBUG_ROOTS cout<<"Type = " << type << " ("< cphi = solvecubic( c1, c2, c3); #ifdef DEBUG_ROOTS cout<<"Roots of cubic are "<0) orderreal(phi1,phi2,phi3); else orderreal(phi3,phi2,phi1); #ifdef DEBUG_ROOTS cout<<"phi = "<0) r1 = -r1; #ifdef DEBUG_ROOTS cout<<"r_i = "<0; } vector quartic::rational_roots() const // returns rational roots { bigint num; int i, start = (type==1)? 5 : (type==2)? 1 : 3; bigint ac = a*c, a2d = a*a*d, a3e = a*a*a*e; bigfloat ra = I2bigfloat(a); vector ans; for (i = start; i<=4 ; i++) { num = Iround(ra*real((roots)[i-1])); if (((((num+b)*num+ac)*num+a2d)*num+a3e)== 0) ans.push_back(bigrational(num,a)); } return(ans); } void quartic::make_zpol() { if(have_zpol) return; bigint b2 = sqr(b); asq=sqr(a); p = -H_invariant(a,b,c); psq = sqr(p); r = R_invariant(a,b,c,d); have_zpol=1; } // find the number of roots of aX^4 + bX^3 + cX^2 + dX + e = 0 (mod p) // except 4 is returned as 3 so result is 0,1,2 or 3. long quartic::nrootsmod(long p) const { #ifdef TEST_EQCODE cout << "Counting roots mod " << p << " of " << (*this) << "\n"; #endif long ap = mod(a,p); long bp = mod(b,p); long cp = mod(c,p); long dp = mod(d,p); long ep = mod(e,p); #ifdef TEST_EQCODE cout << "reduced coefficients: " << ap <<","<< bp <<","<< cp <<","<< dp <<","<< ep << "\n"; #endif long nroots = (ap==0); // must count infinity as a root! for (long i = 0; (i < p)&&(nroots<3) ; i++) { long temp = ((((ap*i+bp)*i + cp)*i + dp)*i + ep); if ((temp%p)==0) {nroots++;} } if(nroots==4) return 3; #ifdef TEST_EQCODE cout << "returning code " << nroots << "\n"; #endif return nroots; } unsigned long quartic::set_equiv_code(const vector& plist) { #ifdef TEST_EQCODE cout << "Setting equiv_code for " << (*this) << "\n"; #endif equiv_code=0; #ifdef NEW_EQUIV // else leave all codes 0, i.e. disable this test for(unsigned long i=0; i #include #include #include #include #include #include #include #define PRE_SATURATION_SEARCH_LIMIT 8 // Constructor: // // sel is selmer_only switch // firstlim is bound on |x|+|z| // secondlim is bound on log max {|x|,|z| }, i.e. logarithmic // n_aux only relevant for general 2-descent when 2-torsion trivial // n_aux=-1 causes default to be used (depends on method) // second_descent only relevant for descent via 2-isogeny two_descent::two_descent(Curvedata* ec, int verb, int sel, long firstlim, long secondlim, long n_aux, int second_descent) :verbose(verb), selmer_only(sel), e_orig(*ec) { qai.resize(5); bigint a1,a2,a3,a4,a6; ec->getai(a1,a2,a3,a4,a6); v=BIGINT(1); qai[0]=a1; qai[1]=a2; qai[2]=a3; qai[3]=a4; qai[4]=a6; do_the_descent(firstlim,secondlim,n_aux,second_descent); } //#define DEBUG_Q_INPUT two_descent::two_descent(vector ai, int verb, int sel, long firstlim, long secondlim, long n_aux, int second_descent) :verbose(verb), selmer_only(sel) { // Construct Curvedata from rational coeffs & get the scaling // factor v used #ifdef DEBUG_Q_INPUT cout<<"two_descent constructor called with "<1) ; if(two_torsion_exists) r12=new rank2(&e_min,verbose,selmer_only,firstlim,secondlim,second_descent); else r12=new rank1(&e_min,verbose,selmer_only,firstlim,secondlim,n_aux); success=r12->ok(); rank = r12->getrank(); rank_bound = r12->getrankbound(); selmer_rank = r12->getselmer(); certain=r12->getcertain(); // the last parameter here is set to a known upper bound on the rank mwbasis = new mw(&e_min,verbose>2,1,rank_bound); } void two_descent::report_rank() const { if(!success) {cout << "Failed to compute rank\n"; return;} if(selmer_only) { cout << "selmer-rank = " << selmer_rank << endl; cout << "upper bound on rank = " << rank_bound << endl; } else { if(verbose) { if(two_torsion_exists) { cout << "\nUsed descent via 2-isogeny with isogenous curve E' = "<<(Curve)(getEprime())<regulator(), newreg=to_bigfloat(1); long search_rank=0; if ((r12->getrank()>0) || !(r12->getcertain())) { if(verbose) cout <<"Searching for points (bound = "<search(hlim); if(verbose) cout<<"done:"<getrank(); newreg=mwbasis->regulator(); if(verbose) cout<<" found points which generate a subgroup of rank "<process(r12->getgens(),0); // no saturation yet if(verbose) cout <<"done:"<getrank(); if(verbose) { if(rank>search_rank) cout << "2-descent increases rank to "< unsat; int sat_ok = mwbasis->saturate(index,unsat,sat_bd,1); // The last parameter 1 says not to bother with 2-saturation! if(verbose) cout <<"done:"<1) { cout <<" *** saturation increased group by index "<regulator()<getrank(); fullmw=sat_ok; // (rank==0); } } vector two_descent::getbasis() // returns points on original model { vectorplist=mwbasis->getbasis(); vectorqlist(rank); for (int i=0; i two_descent::getpbasis() // returns points on integral model { vectorplist=mwbasis->getbasis(); for (int i=0; i0)) cout<<"Transferring points from minimal curve "<<(Curve)e_min <<" back to original curve " <<"["<plist=mwbasis->getbasis(); for (int i=0; i0) { cout << "The basis given is for a subgroup of full rank of the Mordell-Weil group\n"; cout << " (modulo torsion), possibly of index greater than 1\n"; if(sat_bound>0) cout << " (but not divisible by any prime less than " <0) { cout << "If the rank is equal to the lower bound, the basis given "; cout << "is for the full Mordell-Weil group (modulo torsion).\n"; } } else { if(rank>0) { cout << "Even if the lower bound is strict, "; cout << "the basis given is for a subgroup of the Mordell-Weil group\n "; cout << " (modulo torsion), possibly of index greater than 1.\n"; } cout<plist=getbasis(); cout<<"[["< //#ifdef NEW_EQUIV int new_equiv(quartic* q1, quartic* q2, int info) { if(info) { cout<<"Checking equivalence of " << *q1 << " and " << *q2 << "\n"; } bigint& ii=q1->ii; bigint& jj=q1->jj; if (!(ii==q2->ii && jj==q2->jj && q1->disc==q2->disc && q1->type== q2->type)) { if (info) { cout << "equiv failed on first test!\n"; cout << "First has I="<ii<<", J="<jj<<","; cout << " disc="<disc<<", type="<type<make_zpol(); q2->make_zpol(); bigint& p1=q1->p; bigint& p2=q2->p; bigint& r1=q1->r; bigint& r2=q2->r; bigint& p1sq=q1->psq; bigint& p2sq=q2->psq; bigint& a1=q1->a; bigint& a2=q2->a; bigint& a1sq=q1->asq; bigint& a2sq=q2->asq; const bigint& a1a2=a1*a2; const bigint& p1p2=p1*p2; const bigint& p = (32*a1a2*ii + p1p2)/3; const bigint& s = (-256*jj*a1a2*(a1*p2+a2*p1) + 64*ii*(p1sq*a2sq+p2sq*a1sq+p1p2*a1a2) - p1sq*p2sq) / 27; const bigint& r = r1*r2; if(info) cout<<"u-poly = [1,0, " << -2*p<< ", "<<-8*r<<", "<getroots(); bigfloat xa1=I2bigfloat(a1), xa2=3*I2bigfloat(a2); bigcomplex rz1=xa1*(roots1[0]+roots1[1]-roots1[2]-roots1[3]); bigcomplex rz2=xa1*(roots1[0]-roots1[1]+roots1[2]-roots1[3]); bigcomplex rz3=xa1*(roots1[0]-roots1[1]-roots1[2]+roots1[3]); bigcomplex t = I2bigfloat(a1*p2-a2*p1), tt=1/I2bigfloat(3*a1); bigcomplex rzw1 = rz1*sqrt((xa2*rz1*rz1+t)*tt); bigcomplex rzw2 = rz2*sqrt((xa2*rz2*rz2+t)*tt); bigcomplex rzw3 = rz3*sqrt((xa2*rz3*rz3+t)*tt); bigcomplex u; for(long k=0; k<4; k++) { switch(k) { case 0: u=rzw1+rzw2+rzw3; break; case 1: u=rzw1+rzw2-rzw3; break; case 2: u=rzw1-rzw2+rzw3; break; case 3: u=rzw1-rzw2-rzw3; break; } if(is_approx_zero(imag(u))) { bigint uu = Iround(real(u)); bigint uu2=uu*uu; bigint fuu1 = (uu2-2*p)*uu2+s; bigint fuu2 = 8*r*uu; if(fuu1==fuu2) { if(info) cout<<"Root u = "<& dlist, int info); int allperms[24][4] = {{0,1,2,3},{1,0,2,3},{0,1,3,2},{1,0,3,2}, // Up to here for Type III {2,3,0,1},{2,3,1,0},{3,2,0,1},{3,2,1,0}, // Up to here for Type I {0,2,1,3},{0,2,3,1},{0,3,1,2},{0,3,2,1}, {1,2,0,3},{1,2,3,0},{1,3,0,2},{1,3,2,0}, {2,0,1,3},{2,0,3,1},{2,1,0,3},{2,1,3,0}, {3,0,1,2},{3,0,2,1},{3,1,0,2},{3,1,2,0},}; // All for Type II int testd(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const bigint& as, const bigint& bs, const bigint& cs, const bigint& ds, const bigint& es, const bigint& dd, const bigint& al, const bigint& be, const bigint& ga, const bigint& de, int info) { bigint d2 = dd*dd; bigint al2=al*al, al3=al2*al, al4=al3*al; bigint ga2=ga*ga, ga3=ga2*ga, ga4=ga3*ga; bigint temp = ga4*es + al*ga3*ds + al2*ga2*cs + al3*ga*bs + al4*as - d2*a; if (!is_zero(temp)) return 0; bigint de2=de*de, de3=de2*de, de4=de3*de; bigint be2=be*be, be3=be2*be, be4=be3*be; temp = de4*es + be*de3*ds + be2*de2*cs + be3*de*bs + be4*as - d2*e; if (!is_zero(temp)) return 0; temp = 4*ga3*de*es + (3*al*ga2*de+be*ga3)*ds + 2*(al2*ga*de+al*be*ga2) * cs + (3*al2*be*ga+al3*de)*bs + 4*al3*be*as - d2*b; if (!is_zero(temp)) return 0; temp = 4*ga*de3*es + (3*be*ga*de2+al*de3)*ds + 2*(be2*ga*de+al*be*de2)*cs + (be3*ga+ 3*al*be2*de)*bs + 4*al*be3*as - d2*d; if (!is_zero(temp)) return 0; temp = 6*ga2*de2*es + 3*(be*ga2*de+al*ga*de2) * ds + (be2*ga2+ 4*al*be*ga*de+al2*de2) * cs + 3*(al*be2*ga+al2*be*de) * bs + 6*al2*be2*as - d2*c; if (!is_zero(temp)) return 0; return 1; } /* end of testd() */ bigcomplex crossratio(const bigcomplex& x1,const bigcomplex& x2,const bigcomplex& x3,const bigcomplex& x4) { return ((x1-x3)*(x2-x4))/((x1-x4)*(x2-x3)); } int rootsequiv(const quartic* q1, const quartic* q2, int i, const vector& dlist, int info) { int ans=0; bigcomplex *x = q1->getroots(); bigcomplex *y = q2->getroots(); bigcomplex x1=x[0], x2=x[1], x3=x[2], x4=x[3]; bigcomplex y1=y[allperms[i][0]],y2=y[allperms[i][1]], y3=y[allperms[i][2]],y4=y[allperms[i][3]]; //cout<<"X-roots ("<0.1) {if (info) {cout << i+1 << ": Cross-ratios unequal: "<getdisc()<<":\n"; // cout << dlist << endl; } bigint d; vector::const_iterator dvar; for (dvar=dlist.begin(); dvar!=dlist.end() && (!ans); dvar++) { d = *dvar; bigfloat rscale = sqrt(abs(I2bigfloat(d)/det)); bigfloat rscaler = floor(rscale+0.5); if(abs(rscale-rscaler)<0.001) { bigint al = Iround(rscale*alpha), be = Iround(rscale*beta ), ga = Iround(rscale*gamma), de = Iround(rscale*delta); bigint ddet = abs(al*de-be*ga); if(d==ddet) { if (info) {cout << "d = " << d << endl; cout<<"rscale = "<geta(),q1->getb(),q1->getcc(),q1->getd(),q1->gete(), q2->geta(),q2->getb(),q2->getcc(),q2->getd(),q2->gete(), d,al,be,ga,de,info); } } } return ans ; } // of rootsequiv() int equiv(const quartic* q1, const quartic* q2, const vector& dlist, int info) { bigint iiq1 = q1->getI(), jjq1 = q1->getJ(), discq1 = q1->getdisc(); bigint iiq2 = q2->getI(), jjq2 = q2->getJ(), discq2 = q2->getdisc(); int typeq1 = q1->gettype(), typeq2 = q2->gettype(); if(info) { cout<<"Checking equivalence of \n"; q1->dump(cout); cout<<"and\n"; q2->dump(cout); } if (iiq1==iiq2 && jjq1==jjq2 && discq1==discq2 && typeq1== typeq2) { int nperms = (typeq1==1)? 8 : (typeq1==2)? 24 : 4; if (info) cout << "Params agree; calling rootsequiv "< // for unlink() (not needed on linux) #include #include #include //#define DEBUG_PARI_SLAVE parislave the_pari_slave; // The one and only instance // test if we have an executable gp to use... int do_we_have_pari(string& gp_path) { string path_to_gp(getenv("PATH_TO_GP")); if (path_to_gp.str().size()==0) gp_path = string("/usr/local/bin/gp"); else gp_path = string(path_to_gp)+string("gp"); string comm = string("[ -x ") + gp_path + string(" ]"); #ifdef DEBUG_PARI_SLAVE cout<<"In do_we_have_pari, command="<>ans; #ifdef DEBUG_PARI_SLAVE cout<<"Read ans="< parislave::factor(const bigint& n, int proof) { vector plist; bigint p; if(dummy) { #ifdef DEBUG_PARI_SLAVE cout<<"Calling pdivs_trial()"<>skipws>>c; // swallow leading "[" first=0; gpout>>p; #ifdef DEBUG_PARI_SLAVE cout<<"Reading p="<>skipws>>c>>skipws; // swallow ",", but it might turn out to be "]" } #ifdef DEBUG_PARI_SLAVE cout<<"Finished reading from gp output"<::const_iterator pi=plist.begin(); pi!=plist.end(); pi++) { p =*pi; if(!is_prime(p)) { cout<<"WARNING: pari's factor() returned p="<1) { d/=g; bp=b.entries; n=nr*nc; while(n--) (*bp++)/=g; } vec p = s1.pivots[s2.pivots]; return subspace(b,p,d); } //Don't think the following is ever actually used... mat expressvectors(const mat& m, const subspace& s) { vec p = pivots(s); long n = dim(s); mat ans(n,ncols(m)); for (int i=1; i<=n; i++) ans.setrow(i, m.row(p[i])); return ans; } //This one is used a LOT mat restrict_mat(const mat& m, const subspace& s, int cr) { long i,j,k,d = dim(s), n=m.nro; if(d==n) return m; // trivial special case, s is whole space scalar dd = s.denom; mat ans(d,d); const mat& sb = s.basis; scalar *ap, *a=m.entries, *b=sb.entries, *bp, *c=ans.entries, *cp, *pv=s.pivots.entries; for(i=0; i0; j--) { jj = npcols[j]; basis(jj,j) = 1; for(i=rank; i>0; i--) { scalar temp = -m(i,jj); for(t=rank; t>i; t--) { tt=pcols[t]; temp -= xmodmul(m(i,tt),basis(tt,j),pr); temp = xmod(temp,pr); } basis(pcols[i],j) = mod(temp,pr); } } subspace ans(basis, npcols, 1); return ans; } subspace pimage(const mat& m, scalar pr) { vec p,np; long rank, nullity; const mat& b = transpose(echmodp(transpose(m),p,np,rank,nullity,pr)); subspace ans(b,p,1); return ans; } subspace peigenspace(const mat& m1, scalar lambda, scalar pr) { const mat& m = addscalar(m1,-lambda); subspace ans = pkernel(m,pr); return ans; } subspace psubeigenspace(const mat& m1, scalar l, const subspace& s, scalar pr) { const mat& m = prestrict(m1,s,pr); const subspace& ss = peigenspace(m, l*(denom(s)),pr); subspace ans = pcombine(s,ss,pr); return ans; } //Attempts to lift from a mod-p subspace to a normal Q-subspace by expressing //basis as rational using modrat and clearing denominators // subspace lift(const subspace& s, scalar pr, int trace) { scalar dd; const mat& m = liftmat(s.basis,pr,dd,trace); subspace ans(m, pivots(s), dd); return ans; } eclib-2013-01-01/libsrc/mat.cc0000644000175200017520000012333412071067052012454 00000000000000// mat.cc: implementation of integer matrix classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Only to be included by matrix.cc #define LONGLONG scalar // long longs caused memory alocation bugs // N.B. if = long long, uncomment abs() below // Definitions of member operators and functions: mat::mat(long nr, long nc) { nro=nr; nco=nc; long n=nr*nc; entries=new scalar[n]; if (!entries) {cout<<"Out of memory in mat constructor!\n"; abort();} scalar* m1=entries; while(n--) *m1++ = 0; } mat::mat(const mat& m) { nro=m.nro; nco=m.nco; long n = nro*nco; entries=new scalar[n]; if (!entries) {cout<<"Out of memory in mat constructor!\n"; abort();} scalar *m1=entries, *m2=m.entries; while(n--) *m1++ = *m2++; } mat::~mat() { delete[] entries; } void mat::init(long nr, long nc) // assigns to zero mat of given size; { // with defaults (0,0) releases all space. long n = nr*nc; if (nro*nco!=n) // delete old space; { // replace with new. delete[] entries; entries = new scalar[n]; if (!entries) {cout<<"Out of memory!\n"; abort();} } nro = nr; nco = nc; scalar *m1=entries; while(n--) *m1++ = 0; } scalar& mat::operator()(long i, long j) const // returns ref to (i,j) entry { if ((01) { nc=nco; mij = entries+(r-1)*nco; while(nc--) (*mij++) /= g; } } else { cout << "Bad row number " << r << " in clearrow (nro="<ma) ma=*mij; else if (*mijma)ma=mi; colwidths[j]=ma; } mij=entries; while(nr--) { s << "["; nc=nco; j=0; while(nc--) { s.width(colwidths[j]); s<<(*mij); // s.form("%*d",colwidths[j],*mij); if(nc) s<<" "; mij++; j++; } s<<"]\n"; } delete[]colwidths; } //binary file I/O // Not supported by libstdc++-v3, it seems //#ifdef THIS_USED_TO_WORK_WITH_GCC_2_95 #if(1) void mat::dump_to_file(string filename) const { ofstream fout(filename.c_str(),ofstream::binary); fout.write((char*)&nro,sizeof(nro)); fout.write((char*)&nco,sizeof(nco)); fout.write((char*)entries,nro*nco*sizeof(scalar)); fout.close(); } void mat::read_from_file(string filename) { ifstream fin(filename.c_str()); fin.read((char*)&nro,sizeof(nro)); fin.read((char*)&nco,sizeof(nco)); delete[] entries; entries = new scalar[nro*nco]; fin.read((char*)entries,nro*nco*sizeof(scalar)); fin.close(); } #else void mat::dump_to_file(string filename) const { ofstream fout(filename.c_str()); fout<>nro>>nco; long size=nro*nco; delete[] entries; entries = new scalar[size]; scalar* m=entries; while(size--) fin>>*m++; fin.close(); } #endif istream& operator>>(istream& s, mat& m) { long n=m.nro*m.nco; scalar* mij=m.entries; while(n--) s >> (*mij++); return s; } mat colcat(const mat& a, const mat& b) { long nc, nr = a.nro, nca = a.nco, ncb = b.nco; mat ans(nr,nca+ncb); scalar *ansij=ans.entries, *aij=a.entries, *bij=b.entries; if (nr==b.nro) while(nr--) { nc=nca; while(nc--) *ansij++ = *aij++; nc=ncb; while(nc--) *ansij++ = *bij++; } else { cout << "colcat: matrices have different number of rows!" << "\n"; abort(); } return ans; } mat rowcat(const mat& a, const mat& b) { long n, nra = a.nro, nc = a.nco, nrb = b.nro; mat ans(nra+nrb,nc); scalar *ansij=ans.entries, *aij=a.entries, *bij=b.entries; if (nc==b.nco) { n = nra*nc; while(n--) *ansij++ = *aij++; n = nrb*nc; while(n--) *ansij++ = *bij++; } else { cout << "rowcat: matrices have different number of columns!" << "\n"; abort(); } return ans; } mat directsum(const mat& a, const mat& b) { long n,c, nra=a.nro, nca=a.nco, nrb=b.nro, ncb=b.nco; mat ans(nra+nrb,nca+ncb); scalar* ansij=ans.entries, *aij=a.entries, *bij=b.entries; n=nra; while(n--) { c=nca; while(c--) *ansij++ = *aij++; c=ncb; while(c--) *ansij++ = 0; } n=nrb; while(n--) { c=nca; while(c--) *ansij++ = 0; c=ncb; while(c--) *ansij++ = *bij++; } return ans; } void elimrows(mat& m, long r1, long r2, long pos) //plain elimination, no clearing { long nc=m.nco; scalar *mr1 = m.entries + (r1-1)*nc, *mr2 = m.entries + (r2-1)*nc; scalar p = mr1[pos-1], q=mr2[pos-1]; while(nc--) { (*mr2)= (p*(*mr2))-(q*(*mr1)); mr1++; mr2++; } } void elimrows1(mat& m, long r1, long r2, long pos) //elimination + clearing { elimrows(m,r1,r2,pos); m.clearrow(r2); } void elimrows2(mat& m, long r1, long r2, long pos, scalar last) //elimination + divide by last pivot { elimrows(m,r1,r2,pos); m.divrow(r2,last); } // Definition of non-friend functions mat operator+(const mat& m) { return m; } mat operator-(const mat& m) { return (-1)*m; } mat operator+(const mat& m1, const mat& m2) { mat ans(m1); ans+=m2; return ans; } mat operator-(const mat& m1, const mat& m2) { mat ans(m1); ans-=m2; return ans; } mat operator*(scalar scal, const mat& m) { mat ans(m); ans*=scal; return ans; } mat operator/(const mat& m, scalar scal) { mat ans(m); ans/=scal; return ans; } int operator!=(const mat& m1, const mat& m2) { return !(m1==m2); } vec operator*(const mat& m, const vec& v) { long r=m.nro, c=m.nco; scalar *mp,*vp,*wp; vec w(r); if (c==v.d) { mp=m.entries; wp=w.entries; while(r--) { vp=v.entries; c=m.nco; while(c--) *wp += (*mp++)*(*vp++); wp++; } } else { cout << "Incompatible sizes in *(mat,vec)\n"; abort(); } return w; } mat idmat(scalar n) { mat ans(n,n); long i; for (i=1; i<=n; i++) ans.set(i,i,1); return ans; } mat transpose(const mat& m) { long i,j,nr,nc; nr=ncols(m); nc=nrows(m); mat ans(nr, nc); for (i=1; i<=nr; i++) for (j=1; j<=nc; j++) ans.set(i,j, m(j,i)); return ans; } mat submat(const mat& m, const vec& iv, const vec& jv) {long i,j; long nr = dim(iv); long nc = dim(jv); mat ans(nr,nc); for (i=1; i<=nr; i++) for (j=1; j<=nc; j++) ans.set(i,j, m(iv[i],jv[j])); return ans; } mat echelon(const mat& entries, vec& pcols, vec& npcols, long& rk, long& ny, scalar& d, int method) { switch (method) {case 0: return echelon0(entries,pcols,npcols,rk,ny,d); case 1: return echelonl(entries,pcols,npcols,rk,ny,d); case 2: return echelonp(entries,pcols,npcols,rk,ny,d,BIGPRIME); default: return echelon0(entries,pcols,npcols,rk,ny,d); } } //#define DEBUG_ECH_0 //N.B. if(q==0) the following multiplies row r2 by p, which looks //redundant. However, it is important to keep this in as in echelon0 //we must guarentee divisibility by "lastpivot". We do not want to keep //computing contents of rows as this is slower. // Used in forward elimination in echelon0 void conservative_elim(scalar *m, long nc, long r1, long r2, long pos) {scalar *mr1=m+r1*nc, *mr2=m+r2*nc; scalar p = mr1[pos], q = mr2[pos]; if(p==1) if(q==0) {;} // nothing to do else if(q==1) while(nc--) { (*mr2)-=(*mr1); mr1++; mr2++; } else // general q while(nc--) { (*mr2)-=(q*(*mr1)); mr1++; mr2++; } else // p!=1; we cannot assume p>0 if(q==0) // must still multiply r2 by p while(nc--) { (*mr2)*=p; mr2++; } else if(q==1) while(nc--) { (*mr2)=(p*(*mr2))-(*mr1); mr1++; mr2++; } else // general q while(nc--) { (*mr2)=(p*(*mr2))-(q*(*mr1)); mr1++; mr2++; } } // This version does not multiply row r1 by p unnecessarily // (used in back substitution) void elim(scalar *m, long nc, long r1, long r2, long pos) {scalar *mr1=m+r1*nc, *mr2=m+r2*nc; scalar p = mr1[pos], q = mr2[pos]; #ifdef DEBUG_ECH_0 long n; cout<<"In elim with p = "<0 if(q==0) {;} // nothing to do else if(q==1) while(nc--) { (*mr2)=(p*(*mr2))-(*mr1); mr1++; mr2++; } else // general q while(nc--) { (*mr2)=(p*(*mr2))-(q*(*mr1)); mr1++; mr2++; } } void clear(scalar* row, long nc) {long n=nc; scalar *rowi=row; scalar g = 0; while((n--)&&(g!=1)) g=gcd(g,*rowi++); if (g<0)g=-g; if (g>1) { n=nc; rowi=row; while(n--) (*rowi++) /= g; } } //#ifndef DEBUG_ECH_0 //#define DEBUG_ECH_0 //#endif #ifdef DEBUG_ECH_0 void show(scalar* m, long nr, long nc) { long i,j; scalar* mij = m; for(i=0; ir) //swap rows { #ifdef DEBUG_ECH_0 cout<<"Swapping rows "<1) { mi1 = m+r3*nc; n=nc; while(n--) { if(*mi1%lastpivot) cout<<"Error in echelon0! Entry "<<(*mi1) <<" not divisible by lastpivot "<0) // Back-substitute and even up pivots {for (r=0; rr) m.swaprows(r,rmin); // for (r3 = r+1 ; r3<=nr; r3++) // elimrows2(m,r,r3,c,lastpivot); // lastpivot=min; // r++; // } // } // for (c = rk+ny+1; c<=nc; c++) npcols[++ny] = c; // pcols = pcols.slice(rk); // npcols = npcols.slice(ny); // truncate index vectors // // cout << "In echelon:\n"; // // cout << "pcols = " << pcols << "\n"; // // cout << "npcols = " << npcols << "\n"; // d=1; // lastpivot=1; // if (ny>0) // {for (r=1; r<=rk; r++) m.clearrow(r); // for (r=1;r<=rk; r++) // for (r2=r+1; r2<=rk; r2++) // elimrows1(m,r2,r,pcols[r2]); // for (r=1; r<=rk; r++) // d = (d*m(r,pcols[r]))/gcd(d,m(r,pcols[r])); // d = abs(d); // for (r=1; r<=rk; r++) // {long fac = d/m(r,pcols[r]); // m.multrow(r,fac); // } // } // else // for (r=1; r<=rk; r++) // for (c=1; c<=nc; c++) // m.set(r,c, (c==pcols[r])); // 0 or 1 ! // return m.slice(rk,nc); // } long rank(const mat& entries) { long rk,nr,nc,r,c,r2,r3,rmin; long min, mr2c,lastpivot; rk=0; r=1; lastpivot=1; mat m(entries); nc=ncols(m); nr=nrows(m); for (c=1; (c<=nc)&&(r<=nr); c++) { min = abs(m(r,c)); rmin = r; for (r2=r+1; (r2<=nr)&&(min!=1); r2++) { mr2c = abs(m(r2,c)); if ((0r) m.swaprows(r,rmin); for (r3 = r+1 ; r3<=nr; r3++) elimrows2(m,r,r3,c,lastpivot); lastpivot=min; r++; } } return rk; } long nullity(const mat& m) { return ncols(m)-rank(m); } long trace(const mat& a) { long i; long ans=0; for (i=1; i<=nrows(a); i++) ans += a(i,i); return ans; } /* OLD VERSION vector charpoly(const mat& a) { long i,k,r,n = nrows(a); vec tlist = vec(n); mat apower(a); vector clist(n+1); tlist[1] = trace(a); for (i=2; i<=n; i++) { apower*=a; tlist[i] = trace(apower); } clist[n]=1; for (k=1; k<=n; k++) { long temp = 0; for (r=1; r<=k; r++) temp+= tlist[r]*clist[n+r-k]; clist[n-k]= -temp/k; } return clist; } */ // NEW VERSION -- FADEEV'S METHOD vector charpoly(const mat& a) { long n = nrows(a); mat b(a); mat id(idmat((scalar)n)); vector clist(n+1); long t = trace(a); clist[n] = 1; clist[n-1] = -t; for (long i=2; i<=n; i++) { b=a*(b-t*id); // cout << b; // (for testing only) t=trace(b)/i; clist[n-i] = -t; } if (!(b==t*id)) { cout << "Error in charpoly: final b = " << (b-t*id); abort(); } return clist; } long determinant(const mat& m) { vector cp = charpoly(m); long det = cp[0]; if (nrows(m)%2==1) det=-det; return det; } mat addscalar(const mat& m, scalar c) { return m+(c*idmat((scalar)nrows(m))); } vec apply(const mat& m, const vec& v) // same as *(mat, vec) { long nr=nrows(m), nc=ncols(m); vec ans(nr); if (nc==dim(v)) for (long i=1; i<=nr; i++) ans[i] = m.row(i)*v; else { cout << "Incompatible sizes in *(mat,vec)\n"; abort(); } return ans; } /* Need this when LONGLONG = long long! LONGLONG abs(LONGLONG a) {return ((a<0) ? -a : a); } */ LONGLONG lgcd(LONGLONG aa, LONGLONG bb) {LONGLONG a,b,c; a=aa; b=bb; while (b!=0) {c=a%b; a=b; b=c;} return ((a<0) ? -a : a); } LONGLONG llcm(LONGLONG a, LONGLONG b) {LONGLONG g = lgcd(a,b); if (g==0) return 0; return a*(b/g); } void lelim(LONGLONG *m, long nc, long r1, long r2, long pos) {LONGLONG *mr1=m+r1*nc, *mr2=m+r2*nc; scalar p = mr1[pos], q = mr2[pos]; while(nc--) { (*mr2)=(p*(*mr2))-(q*(*mr1)); mr1++; mr2++; } } void lclear(LONGLONG* row, long nc) {long n=nc; LONGLONG *rowi=row; LONGLONG g = 0; while((n--)&&(g!=1)) g=lgcd(g,*rowi++); if (g<0)g=-g; if (g>1) { n=nc; rowi=row; while(n--) (*rowi++) /= g; } } // The following version of echelon uses long-long-integers for internal // calculation and a minimum of function calls; the structures vec and // mat are used for input/output but not internally. mat echelonl(const mat& entries, vec& pc, vec& npc, long& rk, long& ny, scalar& d) { long nr, nc, r,c,r2,r3,rmin,i; long min, mr2c,lastpivot; rk=0; ny=0; r=0; lastpivot=1; nc=entries.nco; nr=entries.nro; LONGLONG *m, *mi1, *mi2, *mij; LONGLONG temp; m = new LONGLONG[nr*nc]; long n=nr*nc; mij=m; mi1=entries.entries; while(n--) *mij++ = (LONGLONG)(*mi1++); scalar *pcols = new scalar[nc]; scalar *npcols = new scalar[nc]; for (c=0; (cr) //swap rows { mi1=m+r*nc; mi2=m+rmin*nc; n=nc; while(n--) {temp = *mi1; *mi1++ = *mi2; *mi2++ = temp;} } for (r3 = r+1 ; r30) // Back-substitute and even up pivots {for (r=0; rr) m.swaprows(r,rmin); for (r3 = r+1 ; r3<=nr; r3++) elimp(m,r,r3,c,pr); r++; } } for (c = rk+ny+1; c<=nc; c++) npcols[++ny] = c ; #ifdef TRACE cout << "Finished first stage; rk = " << rk; cout << ", ny = " << ny << "\n"; cout << "Back substitution.\n"; #endif /* TRACE */ pcols = pcols.slice(1,rk); npcols = npcols.slice(1,ny); // truncate index vectors if (ny>0) { for (r=1; r<=rk; r++) for (r2=r+1; r2<=rk; r2++) elimp(m,r2,r,pcols[r2],pr); for (r=1; r<=rk; r++) { scalar fac = xmod(invmod(m(r,pcols[r]),pr),pr); for (c=1; c<=nc; c++) m(r,c)=xmodmul(fac,m(r,c),pr); } } else for (r=1; r<=rk; r++) {for (c=1; c<=nc; c++) m(r,c)=(c==pcols[r]); // 0 or 1 ! } scalar modulus=pr; float lim=floor(sqrt(pr/2.0)); #ifdef TRACE cout << "Finished second stage.\n Echelon mat mod "<0) { for (r=1; r<=rk; r++) for (r2=r+1; r2<=rk; r2++) elimp(m,r2,r,pcols[r2],pr); for (r=1; r<=rk; r++) { mij = m.entries+(r-1)*nc; scalar fac = xmod(invmod(mij[pcols[r]-1],pr),pr); n=nc; while(n--) {*mij = xmodmul(fac , *mij, pr); mij++;} } } else { mij=m.entries; for (r=1; r<=rk; r++) for (c=1; c<=nc; c++) *mij++ = (c==pcols[r]); // 0 or 1 ! } return m.slice(rk,nc); } // Possible FLINT_LEVEL values are as follows. // // 0: no FLINT support (or a version <2.3) // 1: support for 64-bit nmod_mat (standard from version 2.3) // 2: support for 32-bit hmod_mat (non-standard, from version 2.3) // // The configure script should have detected whether the functions // nmod_mat_rref and/or hmod_mat_rref are available to be used here. // #if FLINT_LEVEL!=0 //#define TRACE_FLINT_RREF #include "flint/fmpz.h" #if (SCALAR_OPTION==1)&&(FLINT_LEVEL==2) #include "flint/hmod_mat.h" #undef uscalar #undef mod_mat #undef mod_mat_init #undef mod_mat_clear #undef mod_mat_entry #undef mod_mat_rref #define uscalar hlimb_t // unsigned int #define mod_mat hmod_mat_t // uses unsigned ints #define mod_mat_init hmod_mat_init #define mod_mat_clear hmod_mat_clear #define mod_mat_entry hmod_mat_entry #define mod_mat_rref hmod_mat_rref #else #include "flint/nmod_mat.h" #undef uscalar #undef mod_mat #undef mod_mat_init #undef mod_mat_clear #undef mod_mat_entry #undef mod_mat_rref #define uscalar mp_limb_t // unsigned long #define mod_mat nmod_mat_t // uses unsigned longs #define mod_mat_init nmod_mat_init #define mod_mat_clear nmod_mat_clear #define mod_mat_entry nmod_mat_entry #define mod_mat_rref nmod_mat_rref #endif #include "flint/profiler.h" // FLINT has two types for modular matrices: standard in FLINT-2.3 has // nmod_mat_t with entries of type mp_limb_t (unsigned long); // non-standard (in an optional branch) is hmod_mat_t, with entries // hlimb_t (unsigned int). We use the former when scalar=long and the // latter when scalar=int, provided that the optional functions are // present, which should have been determined by the configure script. // The unsigned scalar types are #define'd as uscalar. mat ref_via_flint(const mat& M, scalar pr) { long nr=nrows(M), nc=ncols(M); long i, j, n=max(nr,nc); // copy of the modulus for FLINT uscalar mod = (uscalar)pr; // create flint matrix copy of M: mod_mat A; mod_mat_init(A, nr, nc, mod); for(i=0; i #include #include quadratic::~quadratic() {delete [] coeffs;} void quadratic::init() { coeffs = new bigint[3]; } bigint quadratic::coeff(int i) {if((i>=0)&&(i<=2)) return coeffs[i]; else {bigint ans; return ans;}} bigint quadratic::operator[](int i) const {if((i>=0)&&(i<=2)) return coeffs[i]; else {bigint ans; return ans;}} void quadratic::transform(const unimod& m) { bigint newq0 = eval(m.m11, m.m21); bigint newq2 = eval(m.m12, m.m22); coeffs[1] = 2 * (coeffs[0]*m.m11*m.m12 + coeffs[2]*m.m21*m.m22) + coeffs[1] * (m.m11*m.m22+m.m12*m.m21); coeffs[0] = newq0; coeffs[2] = newq2; } void quadratic::x_shift(const bigint& a, unimod& m) { const bigint& aq0=a*coeffs[0]; coeffs[2]+= (aq0+coeffs[1])*a; coeffs[1]+= 2*aq0; m.x_shift(a); } void quadratic::y_shift(const bigint& a, unimod& m) { const bigint& aq2=a*coeffs[2]; coeffs[0]+= (aq2+coeffs[1])*a; coeffs[1]+= 2*aq2; m.y_shift(a); } void quadratic::invert(unimod& m) { swap(coeffs[0],coeffs[2]); coeffs[1]=-coeffs[1]; m.invert(); } void quadratic::reduce(unimod& m) { // cout<<"Reducing quadratic "<<(*this)< #include #include #include #include #include #include #include #include #include #include #include #include #include #include // If point search bound is greater than this, output a warning // message and reduce to this value: const int max_search_bound = 18; void saturator::reset_points(const vector& PP) { Plist=PP; Plistx=PP; unsigned int i; for(i=0; i0) { if(verbose>1) cout<< "saturator: adding "<1) cout<<"done, now max prime = "<1) cout<<"Continuing with q="<1) cout<<"Trying q="<2) cout<<"Initializing q = "<10)); Eqlist.push_back(Eq); sieve.assign(Eq); } else { sieve.assign(*Eqptr); Eqptr++; newq=(Eqptr==Eqlist.end()); // cout<<"Using stored reduced curve mod "<1) cout<<"Using q = "<2) { cout<<"Adding "<2) { cout<<"New rank = "<1) cout<<"rank increases by "<<(newTLrank-TLrank)<<" to "<1) cout<0: int saturator::enlarge() { if(TLrank==rank) return 0; // no enlargement; should not be called in this case vec ker = basis(pkernel(TLimage, p)).col(1); if(verbose>0) cout<<"possible kernel vector = "<0) cout<<"This point may be in "< Pi; if(order(Q)==-1) // non-torsion point Pi=division_points(*E,Q,p); if(Pi.size()==0) { if(verbose>0) cout<<"...but it isn't! " <<"(this may be due to insufficient precision)"<0) cout<<"...and it is! "<0) cout<<"Replacing old generator #"<<(keepi+1) <<" with new generator "<1) cout<<"Testing "<1) cout<<"Points not (yet) proved to be "<

1) cout<<" enlargement failed!"<1) cout<<"Points not (yet) proved to be "<

=0)) { cout<<"Points have successfully been "<

0) cout<<"Index gain = "<0) while(pi--) index *= p; pvar++; p=pvar; } return index; } int l2i(long i) {return (int)i;} vector lv2iv(const vector& v) { vector ans; transform(v.begin(),v.end(),inserter(ans,ans.end()),ptr_fun(l2i)); return ans; } int i2l(int i) {return (long)i;} vector iv2lv(const vector& v) { vector ans; transform(v.begin(),v.end(),inserter(ans,ans.end()),ptr_fun(i2l)); return ans; } int saturator::do_saturation(vector plist, bigint& index, vector& unsat, int maxntries) { vectoriplist = lv2iv(plist), iunsat; int ans = do_saturation(iplist,index,iunsat,maxntries); unsat = iv2lv(iunsat); return ans; } int saturator::do_saturation(vector plist, bigint& index, vector& unsat, int maxntries) { unsigned int i; int pi, p; int success=1; index=1; if(verbose) cout<<"Checking saturation at "<=0, -1 if failed if(pi<0) { cout<0) { cout<<"Points have successfully been "<

& unsat, bigint& index, long sat_bd, int egr, int maxntries, int odd_primes_only) { // Determine the primes at which saturation is necessary: all those // up to index bound (but truncated at sat_bd unless this is -1), // and also the "Tamagawa primes" if the egr option is set vector satprimes; primevar pr; if(odd_primes_only) pr++; // useful after a 2-descent int p=pr.value(); bigint ib = index_bound(E,Plist,egr,(verbose>1)); bigint ib0=ib; if(sat_bd==-1) sat_bd=SAT_MAX_PRIME; int bound_too_big = (ib>sat_bd); if(verbose) cout<<"Saturation index bound = "< "< pCoTorsion(const vector& AllTorsion, int p) { long i, maxorder=0, ntorsion = AllTorsion.size(); vector ans; // Case 0: if(ndivides(p,ntorsion)) return ans; // empty // find point Q of maximal order: Point P,Q; for(i=0; (imaxorder) { Q=P; maxorder=order(Q); } } ans.push_back(Q); // Case 1: if((maxorder==ntorsion)||(p>2)) return ans; // p-torsion is cyclic, return Q (generator) // Now order is 4, 8, 12 and torsion is not cyclic: add either // 2-torsion point not a multiple of Q: Q = (maxorder/2)*Q; // the 2-torsion point to avoid for(i=0; i& points, bigint& index, vector& unsat, long sat_bd, int egr, int verbose) { saturator sieve(&C,verbose); sieve.set_points(points); int ans = sieve.saturate(unsat, index, sat_bd, egr, (verbose)); points = sieve.getgens(); return ans; } // Bound for the index of saturation for the given set of points. If // egr is set it determines the egr subgroup of the group the points // generate and only searches for points with egr, This might be faster // in some cases... // // Flaw: the point search carried out in order to find a lower bound // for the height of non-torsion points might find points which gain // some index on the input points, but we do not use this. Of course // the caller can do their own points search first, in which case // there is no (or less) loss, except that the searching has been done // twice. Some redesign would be needed to optimize this -- for // example, index_bound could be part of the mw class. // // New version 08/08/06: uses class CurveHeightConst and strategy in // ANTS7 paper to find a lower bound for the height of egr non-torsion // points // bigint index_bound(Curvedata* C, vector& points, int egr, int verbose) { if(verbose) cout<<"Entering index_bound("<<(Curve)(*C)<<")"<max_search_bound) { cout<<"\n***Warning: search bound of "<hcx) lambda=hcx; if(verbose) cout<<"Using lambda = "< #include #undef scalar #undef vec #undef mat #undef subspace #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #include "sub.cc" #undef scalar #undef vec #undef mat #undef subspace #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #include "sub.cc" #undef scalar #undef vec #undef mat #undef subspace eclib-2013-01-01/libsrc/mrank2.cc0000644000175200017520000010544311774563612013102 00000000000000// mrank2.cc: implementation of class rank2 for descent via 2-isogeny ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include // for setbase(), used for hex output of codes #include #include #include #include #include #include #include #include #include #include #ifndef QSIEVE_OPT #define QSIEVE_OPT 0 // uses Stoll's sieve #endif //#define DEBUG_ROOTS //#define DEBUG_SQF //#define DEBUG_ELS //#define DEBUG_GLS // bound on first descent search when a second descent is going to be done #define FIRST_DESCENT_BOUND 8 #define MAX_R 5 // will not attempt to list all coset reps // for 2E(Q) in E(Q) if rank is more than this void rank2::makepoint(const bigint& c,const bigint& d1,const bigint& d2, const bigint& x, const bigint& y, const bigint& z, int which) { Point P(ee); if (verbose) cout<<" (x:y:z) = ("<FIRST_DESCENT_BOUND) lim3=FIRST_DESCENT_BOUND; if(qs.search(lim3, 1, 1)) // maxnpoints, pos-x-only { qs.getpoint(x,y,z); makepoint(c,d1,d2,x,y,z,which); return 1; } if (verbose) cout<<" no rational point found (hlim="<1) { if(which) cout<<"\n"; cout<<"Finding els gens for E"; if(which) cout<<"'"; cout<<" (c"; if(which) cout<<"'"; cout<<"= "<& supp = (which? supp1 : supp0); long ns = supp.size(); if(verbose>1) { cout<<"Support (length "<31) {cout<<"Too many primes dividing d!\n"; abort();} long mask=0, maxn=1< elsgens; // use all torsion: added 24/6/02 // Find and process torsion vector torsion; if(which) torsion=torsion_points(eedash); else torsion=torsion_points(ee); long it,ntorsion=torsion.size(); #ifdef DEBUG_ELS cout<<"Number of torsion points = "<orderT1) {T1=T; orderT1=orderT;} } #ifdef DEBUG_ELS cout<<"Generator of maximal order = "<1) cout<<"Processing torsion d1 = " << d1 << endl; #endif index=makeindex(supp, d1, d1x); d1=d1x; // the square-free part, = d1/square #ifdef DEBUG_ELS if(verbose>1) cout<<"Squarefree part of d1 = " << d1 << endl; #endif if(mask&index) continue; if(index) { elsgens.push_back(d1); nelsgens++; if(verbose>1) cout<<"Adding (torsion) els generator #"<1) cout<1) cout<<"Testing d1 = "<1) cout<<"Adding els generator #"<1) cout<1) cout<<"not locally soluble at p = "<1) { cout<<"After els sieving, nelsgens = " << nelsgens; cout << endl; cout<<"2-rank of S^{phi"; if(which) cout<<"'"; cout<<"}(E"; if(!which) cout<<"'"; cout<<") = "<0) cout<<"(els)gens: "<& elsgens = (which? elsgens1: elsgens0); long nelsgens = (which? els1: els0); long nt2gens = (which? nt2gens1: nt2gens0); bigint d1, d2, badp, x,y,z; unsigned long els2mask; long index; long maxn=1< els2gens; bitspace els2_space(nelsgens); // first record the torsion contribution: for(index=0; index1) cout<<"Processing torsion d1 = " << d1 << ":"<1) cout<<"Adding (torsion) els2 generator #"<<(nels2gens) <<": d1 = " << d1 <1) cout<<"res = " << res << endl; #endif if(res) { els2gens.push_back(d1); nels2gens++; els2_space.augment(els2mask,els2piv); #ifdef DEBUG_ELS cout<<"now bitmask = "<1) cout<<"Adding els2 generator #"<& elsgens = (which? els2gens1: els2gens0); long nelsgens = (which? els21: els20); long nt2gens = (which? nt2gens1: nt2gens0); vector gls_gens; bitspace gls_space(nelsgens); long glspiv, maxn = 1<1) { cout<<"Adding (torsion) gls generator #"<<(nglsgens+1) <<": d1 = " << d1 <1) { cout<<"Adding gls generator #"<<(nglsgens) <<": d1 = " << d1; #ifdef DEBUG_GLS cout<<" (g_pos = "<1) { cout<<"After gls sieving, nglsgens = " << nglsgens << endl; cout<< "shortfall in rank from first descent = "<1) { cout<<"(c,d) =("<getai(a1,a2,a3,a4,a6); fullnpoints = npoints = 0; rank = 0; // default value if failure occurs int best_isogeny=0, best_rank_bound=999999; success = 1; int n, scaled=0; if (odd(a1) || odd(a3)) { s2= a1*a1+ 4*a2; s4= 8*(a1*a3+ 2*a4); s6= 16*(a3*a3+ 4*a6); scaled=1; } else { s2=a2; s4=a4; s6=a6; } vector xlist = Introotscubic(s2,s4,s6); ntwo_torsion = xlist.size(); if (ntwo_torsion==0) { success=0; if (verbose) cout << "No points of order 2\n"; return; } if(verbose) cout << "\n" << ntwo_torsion << " points of order 2:\n"; // If there are 3 points of order 2, we order them (for consistency: // otherwise the order can be machine dependent) if(ntwo_torsion==3) sort(xlist.begin(),xlist.end()); two_torsion.resize(ntwo_torsion); for(n=0; n0) cout<<", "; cout<1)) { cout<<"****************************"<best_rank_bound); rank_bound=best_rank_bound; if(verbose&&best_isogeny>0) { cout<<"After second local descent, combined upper bound on rank = " <"; cout<<"= " << index2 << "\n\n"; long lb, ub; int lb1, eq; if(do_second_descent) { cout<<"Information on III(E/Q):\n"; lb = 1; lb1=1; ub = sha1; eq=(lb==ub); cout<<"\t#III(E/Q)[phi'] "; if(eq) cout<<"= "<0) makegens(); if(rank<=MAX_R)makepoints(); } // end of "else" clause after if(selmer_only) } void rank2::makegens() { Curvedata ee_min; bigint u, r, s, t, x, y, z; int i; ee_min=ee.minimalize(u,r,s,t); if(verbose) { cout<<"-------------------------------------------------------\n"; cout << "\nList of points on E = " << (Curve)ee_min << ":\n"; cout<<"\nI. Points on E mod phi(E')\n"; if(npoints1==0) cout << "--none (modulo torsion).\n\n"; } for(i=0; i0) return; // avoids calling this twice int i, j; long smallindex = index2/(1+ntwo_torsion); fullnpoints=1; // will be smallindex fullpointlist.resize(smallindex); fullpointlist[0]=Point(the_curve); if(verbose&&(rank>0)) { cout<<"-------------------------------------------------------\n"; cout << "Computing full set of "<0)) cout << "done.\n" << endl; } void rank2::listpoints() { makepoints(); cout << "Points on curve E = " << (Curve)(*the_curve) << " covering E(Q)/2E(Q), modulo torsion:"; if(rank==0) cout<<" none."; else if(rank>MAX_R) cout << "Too many to list ("<MAX_R) cout << "Too many to list ("<>30))>>32)*BIGPRIME; r -= ( ((r>=TWO_BIGPRIME)?BIGPRIME:0) + ((r>=BIGPRIME)?BIGPRIME:0) ); /* // check: scalar r2 = (a*(int64_t)b) % BIGPRIME; if (r!=r2) { cout << "Problem with "<=BIGPRIME)?BIGPRIME:0); return c; } //#define TRACE_LISTS //#define TRACE_FIND int smat_elim::list::listsize; void smat_elim::list::clear( int m) { delete [] list_array; list_array = new type [m]; num = 0; maxsize = m; index = 0; } smat_elim::list::list( int m) { list_array = new type [m]; num = 0; maxsize = m; index = 0; } smat_elim::list::~list( ) { delete [] list_array; } void smat_elim::list::grow() { int growth = (maxsize==0? listsize : maxsize/2 + 1); type *new_array = new type [ maxsize + growth]; if( !new_array ) { cerr << "memory exhausted"; abort(); } type* newi = new_array; type *P = list_array; int s = maxsize; // while(s--) *newi++ = *P++; size_t n = s*sizeof(type); memmove(newi,P,n); maxsize += growth; delete [] list_array; list_array=new_array; } int smat_elim::list::find( type& X, int ub, int lb ) { // returns highest number i, lb <= i <= ub, such that list_array[i] <= X // or returns ub+1 if list_array[ub]X int i; #ifdef TRACE_FIND cout<<"\n\t\tfinding "< ind; r-- ) array[1] = *array--; // array[1] = X; type *source = list_array+num-1; type *dest = list_array+num; size_t n = sizeof(type)*(num-ind); memmove(dest, source, n); list_array[ind]=X; num++; } } #ifdef TRACE_LISTS cout<<", result is "<<(*this)<put( X ); } num = L.num; } else { type *new_array = new type [ maxsize + L.num ]; type *na = new_array; for( int r = 0, ind = 0; r < L.num; r++ ) { type X = L.next(); ind = find( X, num-1, ind ); if( list_array[ind] != X ) { while( index < ind ) *na++ = next(); *na++ = X; } } while( index < num ) *na++ = next(); delete [] list_array; list_array = new_array; maxsize += L.num; L.index = index = 0; num = na - new_array; } #ifdef TRACE_LISTS cout<<"Result is "<<(*this)<reduce_mod_p(BIGPRIME); // cout<<"smat_elim::init() after reducing:\n"<<(smat)(*this)<list::put(r); } // cout<<"At end of init(), columns are: \n"; // for( l = 0; l < nco; l++ ) // cout<<(l+1)<<": "<0) { #if TRACE_ELIM cout<<"Starting back-substitution..."< -1 ) { pc[++k] = i; new_row[k-1] = elim_col[i-1]; } else npc[++ny] = i; } /* write basis for kernel */ #if TRACE_ELIM cout<<"Constructing basis for kernel..."<num<<" "; // cout<num == 1 ) {col1=col0+1; L.put(col1);} #if TRACE_ELIM cout<<"Step 1, list size = "<num < 1 ) continue; int row = (column+col0-1)->next(); normalize( row, col0 ); /* update column */ int *pos = col[row]; int d = *pos++; while( d-- ) { int c = *pos++ - 1; (column + c)->remove(row); if((column + c)->num == 1) {col1=c+1; L.put( col1 ); // cout<<"List size increases to "<=0; col0-- ) { scalar val = (column+col0)->num; if( val == 2 || val == 1 ) {col1=col0+1; L.put(col1);} } while( (col0 = L.next()) != -1 ) { if( (column+col0-1)->num < 1 ) continue; int row = (column+col0-1)->next(); normalize( row, col0 ); clear_col( row, col0, L, 0, 1 ); eliminate( row, col0 ); free_space( col0 ); } } void smat_elim::step4 ( ) { int* lightness = new int[nco]; int M, i, wt, r, row; // Find maximum column weight int maxcolwt=0; for( i = 0; i < nco; i++ ) { wt = (column+i)->num; if( maxcolwt < wt) maxcolwt=wt; } int Mstep = int(maxcolwt/100); if (Mstep==0) Mstep=1; #if TRACE_ELIM cout<<"Step 4, max column weight = "<= 4; M--) for( M = maxcolwt; M >= 3; M-=Mstep) { #if TRACE_ELIM cout<<"Step 4, M = "<num; if( 0 < wt && wt <= M ) {*l++ = 1; nlight++;} //light else *l++ = 0; //heavy; includes columns already eliminated } #if TRACE_ELIM cout<<", "<num; if( (wt>0) && (mincolwt > wt) ) {col0=i+1; mincolwt=wt;} } if (col0==-1) return; // this is how the while(1) is ended #if TRACE_ELIM // cout<<"... wt "<next(); normalize( row, col0 ); list temp(0); clear_col( row, col0, temp ); eliminate( row, col0 ); free_space( col0 ); #if TRACE_ELIM report(); #endif } step5dense(); } void smat_elim::back_sub ( ){ /* Back substitution */ for( int n = rank; n; n-- ) { int row = elim_row[n-1]; int* pos = col[row] + 1; for( int j = 0; j < *col[row]; j++ ) { int e = elim_col[*pos++-1]; if( e != -1 && e != row ) { elim( e, row, -val[row][j] ); j = -1; pos = col[row] + 1; } } } } void smat_elim::normalize( int row, int col0) { int d = *col[row]; int count = find( col0, col[row]+1, d-1 ); if( col[row][count+1] != col0 ) { cerr << "error in normalize "; abort(); } if( val[row][count] != 1 ) { scalar invValue = invmod0( val[row][count]); scalar *values = val[row]; while(d--) { *values = xmm0( *values , invValue ); values++; } } } void smat_elim::eliminate( int& row, int& col0 ) //1<=col0<=nco; { // cout<<"Eliminating (r,c)=("<num; int d = col[row][0]; int *pos1 = col[row]+1; int temp; if( numRow == 1 ) { for( int s = 0; s < d; s++ ) { int c = pos1[s] - 1; (column + c)->remove(row); if( fc ) check_col( c, L ); // check condition for cols if( M ) { int l = (column+c)->num; if( 0 < l && l <= M ) li[c] = 1; // col is light else li[c] = 0; // heavy; } } return; } list::listsize = numRow; /* for the d cols in col[row], these lists will contain rows to be taken * in/out of column */ list *list_row_out = new list [d]; list *list_row_in = new list [d]; if( !list_row_out ) {cerr << "memory exhausted"; abort();}; if( !list_row_in ) {cerr << "memory exhauted"; abort();}; list* lri = list_row_in, *lro = list_row_out; /* eliminate col from other rows cutting col */ int di = d; scalar *veci1 = val[row]; (column+col0-1)->index = 0; //reset index for iteration for( int l = 0; l < numRow; l++ ) { int row2 = (column+col0-1)->next(); if( row2 == row ) continue; int *pos2 = col[row2]; int d2 = *pos2++; int ind = find(col0, pos2, d2-1); if( pos2[ind] != col0 ) { cerr << "error in clear_col"; abort(); } int d2i = d2; scalar *oldVal = val[row2]; int *oldMat = col[row2]; scalar *veci2 = oldVal; scalar v2 = mod0(BIGPRIME-veci2[ind]); int *P = col[row2] = new int [ d + d2 + 1 ]; P++; scalar *V = val[row2] = new scalar [ d + d2 ]; /* do row2+= v2*row1 */ int k = 0; /*k will be # of non-zero entries of sum*/ while( d && d2 ) { if( *pos1 < *pos2 ) { lri[di-d].put(row2); *P++ = *pos1++; *V++ = xmm0( v2,(*veci1++) ); d--; } else if(( *P++ = *pos2++ ) < *pos1 ) { *V++ = *veci2++; d2--; } else { if( (*V++ = addmod0(xmm0(v2,(*veci1++)) , (*veci2++))) == 0) { lro[di-d].put(row2); V--; P--; k--;} temp=*pos1++; // unused, but prevents compiler warning d--; d2--; } k++; } if( d == 0 ) while( d2 ) { *P++ = *pos2++; *V++ = *veci2++; k++; d2--; } else while( d ) { lri[di-d].put(row2); *P++ = *pos1++; *V++ = xmm0(v2,(*veci1++)); k++; d--; } *col[row2] = k; if( fr ) check_row(d2i, row2, L); // check condition for rows delete [] oldMat; delete [] oldVal; d = di; // reset d, pos1 and veci1 pos1 -= d; veci1 -= d; } /* update column */ for( int t = 0; t < di; t++ ) { int c = col[row][t+1]-1; (column+c)->remove(row); column[c].remove(list_row_out[t]); (column+c)->put(list_row_in[t]); if( fc ) check_col( c, L ); // check condition for cols if( M ) { int l = (column+c)->num; if( 0 < l && l <= M ) li[c] = 1; // col is light else li[c] = 0; // heavy; } } delete [] list_row_out; delete [] list_row_in; } void smat_elim::free_space( int col0 ) { (column+col0-1)->clear(); } void smat_elim::check_row (int d, int row2, list& L ) { if( *col[row2] < 3 ) { if( *col[row2] == 0 ) position[row2] = 0; //if d <= 2 then row2 was already in the list, so else if( d > 2 ) L.put(row2); } } void smat_elim::check_col( int c, list& L ) { int c1, val = (column+c)->num; if( val == 2 || val == 1 ) {c1=c+1; L.put(c1);} } int smat_elim::get_weight( int row, int* lightness ) { int wt = 0; int *pos = col[row]; int d = *pos++; while( d-- ) wt += lightness[ *pos++ - 1 ]; return wt; } int smat_elim::n_active_cols() // number of active columns { // Remaining cols are those with positive column weight int j, nrc; for(j=nrc=0; jnum)>0) nrc++; return nrc; } int smat_elim::n_active_rows() // number of active rows { // Remaining rows are those with "position" code -1 or those which are empty int i, nrr; for(i=nrr=0; i0) && (position[i] == -1) ) nrr++; return nrr; } long smat_elim::n_active_entries() // number of active entries { // Remaining cols are those with positive column weight int j; long n=0; for(j=0; jnum); return n; } double smat_elim::active_density() // density of non-eliminated part { double d = n_active_entries(); int n = n_active_cols(); if (!n) return 0; d /= n; n = n_active_rows(); if (!n) return 0; d /= n; return d; } void smat_elim::report() { cerr << n_active_entries() << " active entries in (" << n_active_rows() << "," << n_active_cols() << ") active (rows, cols). Active density = " << active_density() << endl; cerr<<"Rank so far = "< remaining_rows, remaining_cols; // Remaining rows are those with "position" code -1 or those which are empty int i, j; for(i=0; i0) && (position[i] == -1) ) remaining_rows.push_back(i+1); int nrr = remaining_rows.size(); // Remaining cols are those with positive column weight for(j=0; jnum)>0) remaining_cols.push_back(j+1); int nrc = remaining_cols.size(); #if TRACE_DENSE cout<::const_iterator vi; vector::const_iterator rci; for (i=0; ifirst)) j++; dmat.set(i+1,j+1,vi->second); } } // (2) reduce this to echelon form #if TRACE_DENSE cout<<"Constructed dense matrix" <0) && (i<=d)) return entries[i-1]; else {cout << "bad subscript in vec::operator[]\n"; abort(); return entries[0];} } vec& vec::operator+=(const vec& q2) { scalar* vi=entries, *wi=q2.entries; long i=d; if (d==q2.d) {while(i--)(*vi++)+=(*wi++);} else {cout << "Incompatible vecs in vec::operator+=\n"; abort();} return *this; } void vec::addmodp(const vec& w, scalar pr) { scalar* vi=entries, *wi=w.entries; long i=d; if (d==w.d) {while(i--) {*vi = xmod((*wi++)+(*vi),pr);vi++;}} else {cout << "Incompatible vecs in vec::addmodp\n"; abort(); } } vec& vec::operator-=(const vec& q2) { scalar* vi=entries; scalar* wi=q2.entries; long i=d; if (d==q2.d) {while(i--)(*vi++)-=(*wi++);} else {cout << "Incompatible vecs in vec::operator-=\n"; abort();} return *this; } vec& vec::operator*=(scalar scal) { scalar* vi=entries; long i=d; while (i--) (*vi++) *= scal; return *this; } vec& vec::operator/=(scalar scal) { scalar* vi=entries; long i=d; while (i--) (*vi++) /= scal; return *this; } vec vec::slice(long first, long last) const // returns subvector { if (last==-1) {last=first; first=1;} long n = last-first+1; vec ans(n); scalar *veci=entries+(first-1), *ansi=ans.entries; long i=n; while (i--) *ansi++ = *veci++; return ans; } vec vec::operator[](const vec& index) const // returns v[index[j]] {long i=index.d; vec w(i); scalar* wi=w.entries, *indexi=index.entries; while (i--) (*wi++) = entries[(*indexi++)-1]; return w; } scalar vec::sub(long i) const { if ((i>0) && (i<=d)) return entries[i-1]; else {cout << "bad subscript in vec::sub\n"; abort(); return 0;} } void vec::set(long i, scalar x) { if ((i>0) && (i<=d)) entries[i-1]=x; else {cout << "bad subscript in vec::set\n"; abort(); } } void vec::add(long i, scalar x) { if ((i>0) && (i<=d)) entries[i-1]+=x; else {cout << "bad subscript in vec::add\n"; abort(); } } // Definitions of non-member, friend operators and functions scalar operator*(const vec& v, const vec& w) { long dim=v.d, dot=0; scalar* vi=v.entries, *wi=w.entries; if (dim==w.d) while (dim--) dot+= (*vi++)*(*wi++); else { cout << "Unequal dimensions in dot product\n"; abort(); } return dot; } int operator==(const vec& v, const vec& w) { long dim=v.d; long equal = (dim==w.d); scalar* vi=v.entries, *wi=w.entries; while ((dim--) && equal) equal = ((*vi++)==(*wi++)); return equal; } int trivial(const vec& v) { int ans=1, i=v.d; scalar* vi=v.entries; while ((i--)&&ans) ans=((*vi++)==0); return ans; } ostream& operator<<(ostream& s, const vec& v) { long i=v.d; scalar* vi=v.entries; s << "["; while (i--) {s<<(*vi++); if(i)s<<",";} s << "]"; return s; } istream& operator>>(istream& s, vec& v) { long i = v.d; scalar* vi = v.entries; while (i--) s >> (*vi++); return s; } vec iota(scalar n) { vec v(n); scalar* entriesi=v.entries; long i=0; while (i1) ans/=g; if (ans[3]*v!=ans[1]*v1+ans[2]*v2) { cout << "Error in express: v is not in \n"; abort(); } return ans; } vec lift(const vec& v, scalar pr) { long i, d = dim(v); vec ans(d); int success, succ; float lim = sqrt(pr/2.0); scalar g, nu, de; // = least common denom. after lifting via modrat for (i=1, g=1, success=1; i<=d; i++) { succ = modrat(ans[i],pr,lim,nu,de); de=abs(de); success = success && succ; g=lcm(g,de); } for (i=1; i<=d; i++) ans[i] = mod(xmodmul(g,ans[i],pr),pr); //Repeat if any failures were found if(!success) { for (i=1, g=1, success=1; i<=d; i++) { succ = modrat(ans[i],pr,lim,nu,de); de=abs(de); success = success && succ; g=lcm(g,de); } for (i=1; i<=d; i++) ans[i] = mod(xmodmul(g,ans[i],pr),pr); } if(!success) { cout << "vec failed to lift from mod " << pr << " after two rounds.\n"; abort(); } return ans; } //#define LIFT_DEBUG int liftok(vec& v, scalar pr) { long i0, i, j, d = dim(v); scalar g, nu, de, seed=10; int success, succ; float lim = sqrt(pr/2.0)-1; scalar maxallowed = 10*int(lim); #ifdef LIFT_DEBUG cout<<"Lifting vector v = "<lim, and works as long as // (1) there is a lift with all entried at most 10*lim, (2) at least // one entry has the correct denominator, which is equaivalent to // requiring that in the primitive rescaling, there is an entry // coprime to the first non-zero entry. vec newv = v; scalar vi0, inv_vi0, vi, maxvi=0; for(i0=1; i0<=d; i0++) { // scale so that i0'th entry is 1 mod p, then reduce vector // entries mod p to lie in (-p/2,p/2), and find the maximum // entry: while((vi0=mod(v[i0],pr))==0) {i0++;} // skip over any zero entries inv_vi0=invmod(vi0,pr); for (i=1; i<=d; i++) { v[i]=vi=mod(xmodmul(inv_vi0,v[i],pr),pr); maxvi=max(maxvi,abs(vi)); } #ifdef LIFT_DEBUG cout<<"Reduced v = "<1))cout<<"Found denom of "< // for unlink() (not needed on linux) #define USE_SPARSE 1 #include // STORE_OPMATS flag: only relevant when bigmats=1. Each opmat (on // ambient space) is stored in a temporary disk file when first // computed, then read in when needed later. Otherwise recomputed // each time -- saves on memory at the expense of speed //#define STORE_OPMATS #include subspace sparse_combine(const subspace& s1, const subspace& s2); mat sparse_restrict(const mat& m, const subspace& s); smat restrict_mat(const smat& m, const subspace& s); // CLASS FORM_FINDER (was called splitter) #ifdef STORE_OPMATS static string opmatfilename() { stringstream tmp; tmpmatdir << getenv("TMPMATDIR"); if (tmp.str().size()==0) {tmp.clear(); tmp << "/tmp";} tmp << "/opmatXXXXXX"; char* f = tmp.c_str(); mkstemp(f); string filename(f); delete [] f; // cout << "opmatfilename() returns "<matden(); dimen = h->matdim(); depth=0; nest = new ssubspace*[maxd]; // nest[0] = new ssubspace(dimen); // this just wastes space, but we must now // treat depth 0 differently in go_down() subdim=dimen; eiglist = vector(maxd); submats = new smat[maxd]; #ifdef STORE_OPMATS havemat = new int[maxd]; int i=maxd; while(i--) havemat[i]=0; opfilenames.resize(maxd+1); // filenames and files will be created as needed #endif targetdim = 1; if(!plusflag) // full conjmat not needed when plusflag is true { targetdim=2; if(bigmats) { conjmat=h->s_opmat(-1,dual); #ifdef STORE_OPMATS opfilenames[maxd]=opmatfilename(); // cout<<"Writing conjmat to file " << opfilenames[maxd] << "\n"; conjmat.dump_to_file(opfilenames[maxd]); conjmat.init(0,0); // release space until needed #endif } } } form_finder::~form_finder(void) { // while(depth+1) delete nest[depth--]; #ifdef STORE_OPMATS long i; for(i=0; is_opmat(i,dual,verbose); opfilenames[i]=opmatfilename(); // cout<<"Writing matrix "<s_opmat(i,dual,verbose); #endif } void form_finder::make_submat() { if(bigmats) { make_opmat(depth); // fetch the_opmat from file, or compute if(depth==0) { submats[depth]=the_opmat; } else { if(verbose>1) cout<<"restricting the_opmat to subspace..."<1) cout<<"done."<s_opmat(depth,1,verbose); else { submats[depth] = h->s_opmat_restricted(depth,*nest[depth],1,verbose); } } } } void form_finder::go_down(long eig, int last) { if(verbose>1) cout<<"Increasing depth to "<1) cout<<"after scaling, eig = "<1) cout<<"Using sparse elimination (size = " <3) cout<<"submat = "<0)&&(nrows(submats[depth])>1000))||last) submats[depth]=smat(0,0); // to save space (will recompute when needed) if(verbose>1) cout<<"done (dim = "<1) cout<<"done."<1) cout<<"Eigenvalue "<0)) cout<<" eig " << eig << " gives new subspace at depth "<0) { delete nest[depth]; submats[depth]=smat(0,0); depth--; } if(depth) subdim = dim(*nest[depth]); else subdim = dimen; } void form_finder::make_basis() { if(subdim!=targetdim) { cout<<"error in form_finder::make_basis with eiglist = "; for(int i=0; i0 ssubspace *spm0, *spm; SCALAR eig = denom1; // if(depth) eig*=denom(*s); smat subconjmat; // only used when depth>0 if(bigmats) { #ifdef STORE_OPMATS conjmat.read_from_file(opfilenames[maxdepth]); #endif if(depth) subconjmat=restrict_mat(conjmat,*s); else subconjmat=conjmat; // will only be a 2x2 in this case (genus 1 only!) #ifdef STORE_OPMATS conjmat=smat(0,0); #endif } else { subconjmat=h->s_opmat_restricted(-1,*s,1,verbose); } for(long signeig=+1; signeig>-2; signeig-=2) { SCALAR seig; seig=eig; if(signeig<0) {seig=-eig;} if(depth) { spm0 = new ssubspace(eigenspace(subconjmat,seig)); spm = new ssubspace(combine(*s,*spm0)); delete spm0; } else spm = new ssubspace(eigenspace(subconjmat,seig)); if(dim(*spm)!=1) { cout<<"error in form_finder::makebasis; "; cout<<"\nfinal ("; if(signeig>0)cout<<"+"; else cout<<"-"; cout<<") subspace has dimension "<0) bplus = getbasis1(spm); else bminus = getbasis1(spm); delete spm; } } vec form_finder::getbasis1(const ssubspace* s) { VEC b = basis(*s).as_mat().col(1); #ifdef MODULAR if(!liftok(b,MODULUS)) cout << "Unable to lift eigenvector from mod " << MODULUS << endl; #else makeprimitive(b); #endif #ifdef MULTI scalar n=0; // dummy variable to gt the right type in next line return b.shorten(n); #else return b; #endif } void form_finder::recover(vector< vector > eigs) { for(unsigned int iform=0; iform10) n=10; copy(eigs[iform].begin(), eigs[iform].begin() + n, ostream_iterator(cout, " ")); cout<<"..."<& eigs) { if(verbose) cout<<"Entering form_finder, depth = "<targetdim) && (depthuse(bplus,bminus,eigs); return; } void form_finder::find() { vector subeiglist(eiglist.begin(),eiglist.begin()+depth); if (verbose) cout << "In formfinder, depth = " << depth << ", aplist = " << subeiglist << ";\t"; int dimold = h->dimoldpart(subeiglist); if (verbose) cout<<"dimsofar="<mindepth)) { make_basis(); h->use(bplus,bminus,subeiglist); return; } if (depth==maxdepth) { if (1) // we want to see THIS message whatever the verbosity level! { cout << "\nFound a "< t_eigs = h->eigrange(depth); vector::const_iterator apvar=t_eigs.begin(); if(verbose) cout<<"Testing eigenvalues "< #include // Definitions of nonmember, nonfriend operators and functions: msubspace combine(const msubspace& s1, const msubspace& s2) { bigint d = s1.denom * s2.denom; mat_m b1=s1.basis, b2=s2.basis; long nr = b1.nro, nc = b2.nco; mat_m b = b1*b2; bigint g; long n=nr*nc; bigint* bp=b.entries; while ((n--)&&(!is_one(g))) g=gcd(g,*bp++); if(!(is_zero(g)||is_one(g))) { d/=g; bp=b.entries; n=nr*nc; while(n--) (*bp++)/=g; } vec_i p = s1.pivots[s2.pivots]; return msubspace(b,p,d); } //This one is used a LOT mat_m restrict_mat(const mat_m& m, const msubspace& s) { long i,j,k,d = dim(s), n=m.nro; bigint dd = s.denom; mat_m ans(d,d); const mat_m& sb = s.basis; bigint *ap, *a=m.entries, *b=sb.entries, *bp, *c=ans.entries, *cp; int *pv=s.pivots.entries; for(i=0; i>1); mat_m m = s.basis; bigint *mp; if(trace) { cout << "Lifting mod-p msubspace.\n basis mat_m mod "< #include #include #include bigfloat ssqrt(const bigfloat& x) { if(x<0) { cout<<"Attempts to take real square root of "<0, z-w2/2 is real // and 0\le z-w2/2\le w1. // Here, [w1,w2] is the standard period lattice basis // c.f. Cohen page 399 //#define DEBUG_ELOG bigcomplex ellpointtoz(const Curvedata& E, const Cperiods& per, const bigfloat& x, const bigfloat& y) { bigint a1,a2,a3,a4,a6; E.getai(a1,a2,a3,a4,a6); bigfloat ra1=I2bigfloat(a1); bigfloat ra2=I2bigfloat(a2); bigfloat ra3=I2bigfloat(a3); bigfloat xP(x), yP(y); int posdisc = (sign(getdiscr(E))>0); bigcomplex e1,e2,e3; getei(E,e1,e2,e3); if (posdisc) reorder1(e1,e2,e3); else reorder2(e1,e2,e3); bigfloat re1=real(e1); bigcomplex w1,w2; per.getwRI(w1,w2); #ifdef DEBUG_ELOG cout<<"w1 = "< ans; ans.push_back(cx); ans.push_back(cy); return ans; } // Second function, expects to return a rational point. // User supplies a denominator for the point; if it doesn't work, the // Point returned is 0 on the curve Point ellztopoint(Curvedata& E, Cperiods& per, const bigcomplex& z, const bigint& den) { if(is_zero(z)) {return Point(E);} vector CP = ellztopoint(E,per,z); bigcomplex cx=CP[0],cy=CP[1]; bigint nx,ny,dx,dy; boundedratapprox(real(cx),nx,dx,den); boundedratapprox(real(cy),ny,dy,den); #ifdef DEBUG_EZP cout<<"Rounded x = "< division_points_by2(Curvedata& E, const Point& P) { #ifdef DEBUG_DIVBY2 cout<<"Trying to divide P="< q; // quartic coefficients q.push_back(xPd); q.push_back(-4*xPn); q.push_back(-(b4*xPd+b2*xPn)); q.push_back(-2*(b6*xPd+b4*xPn)); q.push_back(-(b8*xPd+b6*xPn)); #ifdef DEBUG_DIVBY2 cout<<"Looking for rational roots of "< xans = roots(q); // q.rational_roots(); #ifdef DEBUG_DIVBY2 cout<<"Possible x-coordinates:"< ans; for(vector::const_iterator x=xans.begin(); x!=xans.end(); x++) { vector x_points = points_from_x(E,*x); for(vector::const_iterator Qi=x_points.begin(); Qi!=x_points.end(); Qi++) { Point Q = *Qi; if(2*Q==P) // as it might = -P { #ifdef DEBUG_DIVBY2 cout << "Solution found: " << Q << endl; #endif ans.push_back(Q); } } } return ans; } //#define DEBUG_DIVPT // Returns a (possibly empty) vector of solutions to m*Q=P vector division_points(Curvedata& E, const Point& P, int m) { if(m==2) return division_points_by2(E,P); Cperiods cp(E); return division_points(E,cp,P,m); } vector division_points(Curvedata& E, Cperiods& per, const Point& P, int m) { #ifdef DEBUG_DIVPT cout<<"division_points("<<(Curve)E<<","< ans; if(m==0) { cout<<"division_points() called with m=0!"<0); int k, egg; Point Q(E); bigcomplex z(to_bigfloat(0)), w; bigint den; int zero_flag = P.iszero(); if(zero_flag) { den=BIGINT(1); if(even(m)) ans=two_torsion(E); // computed algebraically else ans.push_back(P); // (more robust) } else { z = elliptic_logarithm(E,per2,P); den=getZ(P); } #ifdef DEBUG_DIVPT cout<<"posdisc= "<0)||(!zero_flag)) { Q = ellztopoint(E,per2,w,den); if(!Q.iszero() &&(m*Q==P) &&(find(ans.begin(),ans.end(),Q)==ans.end())) ans.push_back(Q); } if(even(m)) { Q = ellztopoint(E,per2,w+half_w2,den); if(!Q.iszero() &&(m*Q==P) &&(find(ans.begin(),ans.end(),Q)==ans.end())) ans.push_back(Q); } } } } else // negative discriminant (so z is real) { for(k=0; k torsion_points(Curvedata& E,int m) { Cperiods cp(E); return torsion_points(E,cp,m); } vector torsion_points(Curvedata& E, Cperiods& per, int m) { Point P(E); return division_points(E,per,P,m); } void boundedratapprox(bigfloat x, bigint& a, bigint& b, const bigint& maxden) { // cout<<"bounded ratapprox of "< eps ) { c = Iround( xx ); rc=I2bigfloat(c); x2 = x0 + c*x1; x0 = x1; x1 = x2; y2 = y0 + c*y1; y0 = y1; y1 = y2; diff = abs( x - I2bigfloat(x2)/I2bigfloat(y2) ); // cout<<"x2 = "<1), res; if(verb) { cout<<"Using desc2("< factorbase = plist; int factorbase_enlarged=0; // We only need to factorize x0, z0 if some d3 passes the Hilbert // symbol test, since we use their factorizations to solve q1=d3 but // NOT to test whether q1=d3 and q3=d3 are soluble. We'll carry out // the following only when necessary: // factorbase=vector_union(factorbase,pdivs(x0)); // factorbase=vector_union(factorbase,pdivs(z0)); // The quadratics q1, q3 have discriminants 4*d2, 4*d1, and resultant d'. if(xverb) { cout<<"q1-coeffs: "<& plist, const vector& factorbase, double hlim, const quadratic& q1, const quadratic& q3, bigint& x, bigint& y, bigint& z, int verb, int selmer_only) // Processes an individual d3 // Returns -1 if not els // 0 if els but no point found // +1 if els and point found // // if selmer_only==1, returns 0 or -1, with no point searching // // We only pass d3 to process_d3 if the Hilbert symbols tests show // that both q1=d3 and q3=d3 are soluble (but this does not yet imply // that they are simultaneously soluble). { int xverb=verb>1; if(verb) cout<<"Processing d3 = "< ggbadp, ggextrap; quadratic Q1, Q2, Q3; int resd3 = solve_conic_param(q1,d3,factorbase,Q1,Q2,Q3); if(!resd3) { cout<<"Problem solving q1=d3!\n"<1) { if(xverb) cout<<"Dividing quartic by "<1); if(extras) // then we have introduced some extra bad primes { if(xverb) cout<<"Having to factorize ggD = "<1) {x3/=fac; z3/=fac;} // cout<<"x3="<1) {q1xz/=fac; q3xz/=fac;} bigint x2 = abs(q1(q1xz,q3xz)); bigint z2 = abs(q3(q1xz,q3xz)); //NB These abs() are OK because x2,z2 do have the same sign fac=gcd(x2,z2); if(fac>1) {x2/=fac; z2/=fac;} bigint y2 = q0(x2,z2); if(isqrt(x2,x)&&isqrt(z2,z)&&isqrt(y2,y)) { if(verb) { cout<<"Point on original quartic is "; show_xyz(x,y,z); cout< #include #include #include #include #include #include inline int testbit(long a, long i) {return (a& (1< emptyset(emptylist, emptylist + 33); // Implementation of oldforms member functions oldforms::oldforms(long intp, const level* iN, int verbose, int plus) { N=iN; ntp=intp; nap = ntp; noldclasses = totalolddim = 0; plusflag=plus; vector::const_iterator d; for(d=(N->dlist).begin();d!=(N->dlist).end();d++) { long M=*d; if(M<11) continue; if(M==(N->modulus)) continue; getoldclasses(M,verbose); } if(verbose) cout<<"Finished getting oldclasses "<modulus; if ((d>10) && (n>d)) { if(verbose) cout << "Getting oldclasses for divisor M = " << d << "\n"; newforms olddata(d,verbose); olddata.createfromdata(1,25,1); long nforms=olddata.n1ds; if(nforms==0) return; if(olddata.nap<25) { olddata.addap(25); olddata.output_to_file(); } if(verbose>1) cout << "Computing W multiplicities." << "\n"; long m = n/d; long k=0, xmult, mult, j, beta, q; vector betalist; // =new long[N->npdivs]; vector::const_iterator qj=(N->plist).begin(); while(qj!=(N->plist).end()) { beta=val(*qj++,m); if(beta>0) k++; betalist.push_back(beta); } if(verbose>1) cout<<"betas: "< nextoldformap(nap); vector::iterator betai; vector::const_iterator aqj; primevar pr; long iform, c, ip, p, aq; int bit; for(iform=0; iform& aqlist=olddata.nflist[iform].aqlist; nextoldformap = olddata.nflist[iform].aplist; if(verbose>1) { cout<<"form #"<<(iform+1)<<": "<<"aqlist="<0) { oldformap.push_back(nextoldformap); oldclassdims.push_back(mult); oldlevels.push_back(d); noldclasses++; } } } } } long oldforms::dimoldpart(vector aplist) const { long ans = 0; if (aplist.size()==0) return 0; // all lists "start with" a null list! for (long i=0; i0) { long nap0=nap; if(nap0>20) nap0=20; cout << "\nOld classes\n~~~~~~~~~~~\n"; cout << "Level Dimension " << primes(nap0) << "\n"; for (long i=0; i(oldformap[i].begin(),oldformap[i].begin()+nap0); cout << "\n"; } } cout<<"Total number of oldclasses = "< //#define DEBUG_LLL //#define TRACE_LLL #define DEBUG_LIST_SHORT_VECS void show(const int n, const vec_m* b, const bigint** lambda, const bigint* d); void redi(const int n, const int k, const int l, vec_m* b, bigint** lambda, const bigint* d); void swapi(const int n, const int k, const int kmax, vec_m* b, bigint** lambda, bigint* d); void step3(const int n, int& k, const int kmax, vec_m* b, bigint** lambda, bigint* d); // b is an array of n+1 vectors indexed from 0 to n. // b[1]...b[n] are the lattice basis, while b[0] holds the coefficients // of the (diagonal) Gram matrix, so the inner product of b[i] and b[j] // is sum(k,b[0][k]b[i][k]*b[j][k]). // void lll_reduce(const int n, vec_m* b) { int i, j, k, kmax; bigint u; bigint* d = new bigint[n+1]; bigint ** lambda = new bigint*[n]; for(i=0; ikmax) { kmax=k; for(j=1; j<=k; j++) { bigint* lambda_j = lambda[j-1]; u=sdot(b,k,j); for(i=1; i 2*val(poly[1])) { // cout<<" has a 2-adic root via Hensel"< 2*val(poly[1])) && (2*val(poly[0]) + val(poly[3]) > 3*val(poly[1]))) { // cout<<" has a 2-adic root via Newton Polygon"< OK */ if((v & 0x1) == 0) { c >>= v; c &= 0x7; if(c == 1) return 1; sq = (((c & 0x3) == 3) ? 2 : 3) + v; } else sq = v+1; /* if not, see if we can already read off that it's impossible */ /* to have a point with integral 2-adic x-coordinate. */ for(j = 1; j <= 3; j++) if(val(poly[j]) < sq) goto refine; return 0; refine: /* now we must refine */ { long newpoly[4]; /* construct poly(2x+1) */ for(j = 0; j < 4; j++) newpoly[j] = poly[j]; for(j = 0; j < 4; j++) { long h = newpoly[3]; for(k = 2; k >= j; k--) h = newpoly[k] += h; newpoly[j] <<= j; } if(try1(newpoly)) return 1; /* success with 2x */ /* construct poly(2x) */ for(j = 0; j < 4; j++) newpoly[j] = poly[j]< val(poly[1]) and a vertex of the Newton polygon at 1, i.e., val(poly[0]) + val(poly[2]) > 2*val(poly[1]) and 2*val(poly[0]) + val(poly[3]) > 3*val(poly[1]) . The condition in the code comes from Hensel's lemma and implies the conditions given above. */ long try1(bigint poly[4]) { long c, v, sq, j, k; bigint mc; /* see if we can lift to obtain a zero of poly. */ /* the condition is val(poly[0]) > 2*val(poly[1]). */ #ifdef SHOW_POLY cout<<"("< 2*val(poly[1])) { // cout<<" has a 2-adic root via Hensel"< 2*val(poly[1])) && (2*val(poly[0]) + val(poly[3]) > 3*val(poly[1]))) { // cout<<" has a 2-adic root via Newton Polygon"< OK */ if((v & 0x1) == 0) { mc >>= v; c = posmod(mc,8); //& 0x7; if(c == 1) return 1; sq = (((c & 0x3) == 3) ? 2 : 3) + v; } else sq = v+1; /* if not, see if we can already read off that it's impossible */ /* to have a point with integral 2-adic x-coordinate. */ for(j = 1; j <= 3; j++) if(val(poly[j]) < sq) goto refine; return 0; refine: /* now we must refine */ { bigint newpoly[4]; /* construct poly(2x) */ for(j = 0; j < 4; j++) newpoly[j] = poly[j]<= j; k--) h = newpoly[k] += h; newpoly[j] <<= j; } if(try1(newpoly)) return 1; /* success with 2x */ return 0; } } long case1(long a, long b) // A=4a, B=4b { // cout<<"In case1() with a="<>=2; c >>=1; a <<=1; } else // any solution x must be odd { d = a+b+c/2+(d+2)/4; c = 3*a+2*b+c/2+1; b = 3*a+b; a = 2*a; } } } //JC's version: /* long case2(long a, long b) // A=4a+1, B=4b+2 { // cout<<"In case2() with a="<>=2; c >>=1; a <<=1; } } } */ //MS's version: long case2(long a, long b) // A=4a+1, B=4b+2 { long c=a+1, d=a+b+1; // The polynomial in 4x+1 is (16, 12, 4*c, d) long d8=d&7, c2=c&1; long d4=d8&3; if((d4==2)||(d4==3)) return 0; if(d4==1) return (c2==0||(d8==1)); if(c2==1) return 1; // Now, d = 0 mod 4. Divide by 4 and replace c,d by c/2,d/4 // to get (4, 3, 2*c, d) d>>=2; c>>=1; a=1; b=0; // The polynomial is (4*a, 3*(4*b+1), 2*c, d) while(1) { d8=d&7; d4=d8&3; if(c&1) // c odd { switch(d4){ case 0: return 1; break; case 2: return 0; break; case 1: return (d8==1); break; case 3: { // replace f(x) by f(2x+1)/4 and loop d = a + 3*b + (c+1)/2 + (d+1)/4 ; c = 3*a + 6*b + (c+3)/2; b += a ; a <<= 1; } } } else // c even { switch(d4){ case 1: return 1; break; case 3: return 0; break; case 2: return (((d8+4*(a+b)+2*c+2)&7) == 0); case 0: { // replace f(x) by f(2x)/4 and loop d >>= 2; c >>= 1; a <<= 1; } } } } } // bigint versions of case1() and case2(): long case1(bigint a, bigint b) // A=4a, B=4b { // cout<<"In case1() with a="<>=2; c >>=1; a <<=1; } else // any solution x must be odd { d = a+b+c/2+(d+2)/4; c = 3*a+2*b+c/2+1; b = 3*a+b; a = 2*a; } } } long case2(bigint a, bigint b) // A=4a+1, B=4b+2 { bigint c=a+1, d=a+b+1; // The polynomial in 4x+1 is (16, 12, 4*c, d) long d8=posmod(d,8), c2=posmod(c,2); long d4=d8&3; if((d4==2)||(d4==3)) return 0; if(d4==1) return (c2==0||(d8==1)); if(c2==1) return 1; // Now, d = 0 mod 4. Divide by 4 and replace c,d by c/2,d/4 // to get (4, 3, 2*c, d) d>>=2; c>>=1; a=1; b=0; // The polynomial is (4*a, 3*(4*b+1), 2*c, d) while(1) { d8=posmod(d,8); d4=d8&3; c2=posmod(c,2); if(c2) // c odd { switch(d4){ case 0: return 1; break; case 2: return 0; break; case 1: return (d8==1); break; case 3: { // replace f(x) by f(2x+1)/4 and loop d = a + 3*b + (c+1)/2 + (d+1)/4 ; c = 3*a + 6*b + (c+3)/2; b += a ; a <<= 1; } } } else // c even { switch(d4){ case 1: return 1; break; case 3: return 0; break; case 2: return ((posmod(-4*(a+b)-2*c-2,8)) == d8); case 0: { // replace f(x) by f(2x)/4 and loop d >>= 2; c >>= 1; a <<= 1; } } } } } eclib-2013-01-01/libsrc/svector.cc0000644000175200017520000000274311774563612013374 00000000000000// svector.cc: implementation of class svec (sparse integer vectors) ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #undef scalar #undef vec #undef mat #undef subspace #undef svec #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #include "svec.cc" #undef scalar #undef vec #undef mat #undef subspace #undef svec #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #include "svec.cc" #undef scalar #undef vec #undef mat #undef subspace #undef svec eclib-2013-01-01/libsrc/sieve_search.cc0000644000175200017520000007444111774563612014353 00000000000000// sieve_search.cc: implementations of classes point_processor and qsieve ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // File : sieve_search.c // Author : John Cremona, Sophie Labour // Adaption of M. Stoll's and J. Cremona's code // Last change : SL, Apr 21 1999, first definitions // Last change : JC, Dec 2 1999, adapted for direct use in mwrank et al. // Last change : JC, Aug 19 2002, adapted for stdc++ library #include // for qsort #include #include #include //debug info printed out if DEBUG_QS is defined to 0; more info if defined to 1 //#define DEBUG_FORBIDDEN //#define DEBUG_QS 0 //#define DEBUG_QS 1 int compare_entries(const void *a, const void *b) { double diff = (((entry *)a)->r - ((entry *)b)->r); return (diff > 0) ? 1 : (diff < 0) ? -1 : 0; } // *********************************************************** // Class qsieve // *********************************************************** //char qsieve::init_made = 0; long qsieve::prime[QS_NUM_PRIMES] = {3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251}; double qsieve::ratio1_def = 1000; double qsieve::ratios2[QS_MAX_DEGREE+1] = { 0, 2.5, 4, 5, 6.5, 7.5, 9, 10.5, 12, 14, 15.5 }; double qsieve::ratio1 = 0.0; double qsieve::ratio2 = 0.0; long qsieve::tech = QS_DEFAULT_TECH; void qsieve::init_data() { init_made=0; bits= new bit_array[QS_LONG_LENGTH]; squares= new char*[QS_NUM_PRIMES]; is_f_square= new char*[QS_NUM_PRIMES]; pnn= new long[QS_NUM_PRIMES]; kpa= new long[QS_NUM_PRIMES]; check_denom=1; use_squares=0; odd_nums=0; num_surv1=0; num_surv2=0; long i; for (i=0;i coeff, int verb) : curve(acurve), degree(deg), verbose(verb) { long i; for (i=0;i<=degree;i++) c[i]=coeff[i]; #ifdef DEBUG_QS cout<<"In qsieve constructor, degree = "< coeff, bigfloat h_limx, int verb) : curve(acurve), degree(deg), verbose(verb) { double h_lim; doublify(h_limx,h_lim); long i; for (i=0;i<=degree;i++) c[i]=coeff[i]; #ifdef DEBUG_QS cout<<"In qsieve constructor, degree = "< coeff, double h_lim, double up, double low, int verb) : verbose(verb), curve(acurve), degree(deg) { long i; for (i=0;i<=degree;i++) c[i]=coeff[i]; #ifdef DEBUG_QS cout<<"In qsieve constructor, degree = "< interv,int nb_bnd,int start_low,int pos_x_only) { #ifdef DEBUG_QS cout<<"Entering set_intervals with nb_bnd="<interv[i+1]"<=height) j=nb_bnd; //done else { domain[num_inter].up=interv[j]; num_inter++; uplow++; j++; //goto next lower bound } } else //lower bound { if ((num_inter>0) && (interv[j]interv[i+1]"<=height) j=nb_bnd; //done else { domain[num_inter].low=interv[j]; uplow++; j++; //goto next upper bound } } } } if (uplow&1) //finish last interval { domain[num_inter].up=height; num_inter++; } #ifdef DEBUG_QS cout<<"Number of intervals:"<= 0 && sieve_primes1 > sieve_primes2) sieve_primes1 = sieve_primes2; else { if(sieve_primes1 > QS_NUM_PRIMES) sieve_primes1 = QS_NUM_PRIMES; } } } void qsieve::set_sieve_primes2(long sp2) { sieve_primes2=sp2; if(sieve_primes2 < 0) sieve_primes2 = 0; else { if(sieve_primes1 >= 0 && sieve_primes1 > sieve_primes2) sieve_primes2 = sieve_primes1; else { if(sieve_primes2 > QS_NUM_PRIMES) sieve_primes2 = QS_NUM_PRIMES; } } } void qsieve::init_f() { // if (verbose) // cout<<"Entering init_f"<= 0 ; n--) { s *= a; s += coeffs_mod_p[pn][n]; s %= p; } if((is_f_square[pn][a]=squares[pn][s])) np++; //np is the number of a / f(a) is a square mod p } // Fill array with info for p prec[pn].p = p; prec[pn].n = pn; if(degree&1 || squares[pn][coeffs_mod_p[pn][degree]]) { prec[pn].r = ((double)(np*(p-1) + p))/((double)(p*p)); } else { prec[pn].r = (double)np/(double)p; /* denominator divisible by p is excluded */ if(check_denom && (p > 7)) { forbidden[fdc] = p; fdc++; } } } #ifdef DEBUG_FORBIDDEN cout<<"Forbidden divisors of the denominator (>7): fdc="<= 0) ? sieve_primes2-1 : QS_NUM_PRIMES-1; double prod; if(ratio1 == 0.0) ratio1 = ratio1_def; prod = ratio1; for(n = 0; n < m; n++) { prod *= prec[n].r; if(prod < 1.0) break; } sieve_primes1 = n + 1; } if(sieve_primes2 < 0) { long n; if(ratio2 == 0.0) ratio2 = ratios2[degree]; for(n = sieve_primes1; n < QS_NUM_PRIMES; n++) if(ratio2*(1.0 - prec[n].r) < 1.0) break; sieve_primes2 = n; } for(n = 0; n < sieve_primes2; n++) { pnn[n] = prec[n].n; sieves[n].p = prime[pnn[n]]; } if (verbose) { cout<<"Using speed ratios "<0) { cout<<"Sieving primes:\n First stage: "; long i; for(i = 0; i < sieve_primes1; i++) cout< tech and k*p maximal <= tech otherwise if(p > tech) kp = p; else kp = (tech/p) * p; kpa[pn] = kp; //determine which quotients a/b are excluded mod p bb = (b_high >= p) ? p : b_high + 1; for (b=0;b>QS_LONG_SHIFT; if(aa == 0) aa = 1; if(!odd_nums) { //initialize help[][] for(b = 0; b < bb; b++) for(a = 0; a <= aa; a++) help[b][a] = bit_zero; if(p < (long)QS_LONG_LENGTH) //small p for(a = 0; a < p; a++) { if(is_f_square[pnn[pn]][a]) for(b = 1; b < bb; b++) { long ab = (a * b) % p; long i; for(i = 0; i <= (long)QS_LONG_LENGTH/p; i++) //repeat the pattern { help[b][ab>>QS_LONG_SHIFT] |= bits[ab & QS_LONG_MASK]; ab += p; } } } else for(a = 0; a < p; a++) { if(is_f_square[pnn[pn]][a]) for(b = 1; b < bb; b++) { long ab = (a * b) % p; help[b][ab>>QS_LONG_SHIFT] |= bits[ab & QS_LONG_MASK]; } } } if(odd_nums || use_opt) { // prepare help2 for(b = 0; b < bb; b++) for(a = 0; a <= aa; a++) help2[b][a] = bit_zero; if(p < (long)QS_LONG_LENGTH) for(a = 0; a < p; a++) { if(is_f_square[pnn[pn]][a]) for(b = 1; b < bb; b++) { long ab = (a * b) % p; ab = (ab&1) ? (ab-1)>>1 : (ab-1+p)>>1; for(i = 0; i <= (long)QS_LONG_LENGTH / p; i++) { help2[b][ab>>QS_LONG_SHIFT] |= bits[ab & QS_LONG_MASK]; ab += p; } } } else for(a = 0; a < p; a++) { if(is_f_square[pnn[pn]][a]) for(b = 1; b < bb; b++) { long ab = (a * b) % p; ab = (ab&1) ? (ab-1)>>1 : (ab-1+p)>>1; help2[b][ab>>QS_LONG_SHIFT] |= bits[ab & QS_LONG_MASK]; } } } if(!odd_nums) { //fill that bit pattern into sieve[pn][][] //sieve[pn][b][a0] has the same semantics as help[b][a0], but here, a0 runs from 0 to kp-1 and all bits are filled. for(b = 1; b < bb; b++) { bit_array *si = sieve[pn][b]; bit_array *he = help[b]; long p1 = (QS_LONG_LENGTH/p + 1) * p; long diff_shift = p1 & QS_LONG_MASK; long diff = QS_LONG_LENGTH - diff_shift; bit_array diff_mask = ~(all_ones<>QS_LONG_SHIFT; for(a = 0; a < wp; a++) si[a] = he[a]; long a1; for(a1 = a ; a < p; a++) { he[a1] |= (he[(a1 == wp) ? 0 : a1 + 1] & diff_mask)<>= diff; } } } if(odd_nums || use_opt) { //fill in sieve2 for the case of only odd numerators */ for(b = 1; b < bb; b++) { bit_array *si = sieve2[pn][b]; bit_array *he = help2[b]; long p1 = (QS_LONG_LENGTH/p + 1) * p; long diff_shift = p1 & QS_LONG_MASK; long diff = QS_LONG_LENGTH - diff_shift; bit_array diff_mask = ~(all_ones<>QS_LONG_SHIFT; //copy the first chunk from help2[b][] into sieve2[pn][b][] for(a = 0; a < wp; a++) si[a] = he[a]; //now keep repeating the bit pattern, rotating it in help2 long a1; for(a1 = a ; a < kp; a++) { he[a1] |= (he[(a1 == wp) ? 0 : a1 + 1] & diff_mask)<>= diff; } } } // implement check for denominator divisble by p { bit_array pattern = bit_zero; if((degree & 1L) || squares[pnn[pn]][coeffs_mod_p[pnn[pn]][degree]]) pattern = ~bit_zero; if(!odd_nums) for(a = 0; a < kp; a++) sieve[pn][0][a] = pattern; if(odd_nums || use_opt) for(a = 0; a < kp; a++) sieve2[pn][0][a] = pattern; } } } } long qsieve::sift(long b) //In M. Stoll's code: "The following procedure is the heart of the matter. The overall speed of the program highly depends on the quality of the code the compiler produces for the innermost loops. It is advisable to force the compiler to put the variables surv, siv0, siv1 into registers. With gcc-2.7.2.1, I got a speedup of more than 30% ! -- MS" //For now, the restrictions on the registers used on a ix86 machine have been removed. They consist in assigning surv to "%ecx", siv1 to "%ebx", i and siv0 to "%edi", j to "%esi". ("on an ix86 machine with sufficiently new gcc; this will produce much better code in the sift function, resulting in a considerable speedup (> 30% on my machine -- MS)") { #if DEBUG_QS>0 cout<<"\nEntering sift b="<0 cout<<"num_inter="< hb) return(total); low = (long)floor(b*inter.low); } if(inter.up >= hb) high = height; else { if(inter.up < -hb) high = -height-1; else high = (long)ceil(b*inter.up); } high++; } if(use_odd_nums) { low >>= 1; high--; high >>= 1; } #ifdef DEBUG_QS cout<<"low = "<0 cout<<"After calling process(), halt_flag = "<0 cout<<"After calling process(), halt_flag = " <0 cout<<"After calling process(), halt_flag = "< 0 && prec[0].r == 0.0) { cout<<"sieve_primes2 = "<0 cout<<"After calling sift(), total = "<piby2) || (theta<=-piby2)) y=-y; #ifdef DEBUG_CAGM cout<<"Relative error = "< roots(3); if (is_zero(abs(disc))) {if (is_zero(abs(p3))) // triple root {roots[0]=roots[1]=roots[2]= mc1over3; } else // double root {roots[0]=roots[1]= (c1*c2 - to_bigfloat(9)*c3)/( p3+p3); roots[2]=-( roots[0] + roots[0]+c1); } } else // distinct roots { bigcomplex q = (((mc1over3+c1)*mc1over3 +c2)*mc1over3 +c3); // = F(mc1over3); if (is_approx_zero(abs(p3))) // pure cubic { roots[0]=-cube_root(q); roots[1]=w*roots[0]; roots[2]=w*roots[1]; roots[0]+=mc1over3; roots[1]+=mc1over3; roots[2]+=mc1over3; } else {bigcomplex d = to_bigfloat(729)*q*q+ to_bigfloat(4)*p3*p3*p3; #ifdef DEBUG_CUBIC cout << "q = " << q << ", p3 = " << p3 << ", d = " << d << "\n"; #endif bigcomplex t1cubed = to_bigfloat(0.5)*(sqrt(d)- to_bigfloat(27)*q); #ifdef DEBUG_CUBIC cout << "t1cubed = " << t1cubed << endl; #endif if (is_approx_zero(abs(t1cubed))) // approximately pure cubic { #ifdef DEBUG_CUBIC cout << "t1cubed approx 0 so treating as pure cubic " << endl; #endif roots[0]=-cube_root(q); roots[1]=w*roots[0]; roots[2]=w*roots[1]; roots[0]+=mc1over3; roots[1]+=mc1over3; roots[2]+=mc1over3; for(i=0; i<3; i++) { bigcomplex z = roots[i], fz, fdashz; for(iter=0; iter solverealquartic(const bigfloat& a, const bigfloat& b, const bigfloat& c, const bigfloat& d, const bigfloat& e) { #ifdef DEBUG cout<<"In solverealquartic with (a,b,c,d,e)=("<0)) {type=2; nrr=4;} // 4 real roots else {type=1; nrr=0;} // 0 real roots } bigcomplex c1(to_bigfloat(0)), c2(-3*ii), c3(jj); #ifdef DEBUG cout<<"Type = " << type << " ("< cphi = solvecubic( c1, c2, c3); vector roots(4); bigfloat a4=4*a; bigfloat oneover4a = to_bigfloat(1)/a4; #ifdef DEBUG cout<<"Roots of cubic are:\n"<0) orderreal(phi1,phi2,phi3); else orderreal(phi3,phi2,phi1); #ifdef DEBUG cout<<"phi = "<0) r1 = -r1; #ifdef DEBUG cout<<"r_i = "< introotscubic(long a, long b, long c, int& nr) { bigcomplex za(to_bigfloat(a)), zb(to_bigfloat(b)), zc(to_bigfloat(c)); vector croots = solvecubic(za,zb,zc); vector iroots; int i; long x,cx; for (i=0; i<3; i++) { cout << "Complex root = " << croots[i] << endl; bigfloat xx = croots[i].real(); Iasb(x,xx); cout << "Rounds to " << x << endl; if (x==0) {if (c==0) iroots.push_back(x);} else { cx = c/x; if (x*cx==c) if (((x+a)*x+b+cx) == 0) iroots.push_back(x); } } return iroots; } eclib-2013-01-01/libsrc/getcurve.cc0000644000175200017520000000572011774563612013531 00000000000000// getcurve.cc: implementation of function getcurve() for curve input ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include int getcurve(Curvedata& CD, int verb) { Curve C0; if(verb) cout << "Enter curve: "; cin>>ws; if(cin.eof()) return 0; // quit if EOF reached cin >> C0; if (verb) cout << endl; if(C0.isnull()) return 0; // quit if null curve entered CD = Curvedata(C0,0); // DON'T change coords if(CD.isnull()) // input curve was singular, non-null { cout<& ai, int verb) { // read the coefficients, either as "a1 a2 a3 a4 a6" or as // "[a1,a2,a3,a4,a6]" using code essentially the same as in // ../qcurves/curve.cc ai.resize(5); if(verb) cerr << "Enter curve: "; cin>>ws; if(cin.eof()) return 0; // quit if EOF reached char c; cin.get(c); #ifdef DEBUG_Q_INPUT cout<<"First char read = "<> ai[0] >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } cin >> ai[1] >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } cin >> ai[2] >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } cin >> ai[3] >> c; if(c!=',') { cout << "syntax error on curve input" << endl; abort(); } cin >> ai[4] >> c; if(c!=']') { cout << "syntax error on curve input" << endl; abort(); } #ifdef DEBUG_Q_INPUT cout<> ai[0] >> ai[1] >> ai[2] >> ai[3] >> ai[4]; #ifdef DEBUG_Q_INPUT cout< #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Code for Silverman bound double logplus(double x) { double ax = fabs(x); if(ax<1) return 0; return log(ax); } double hj(const Curvedata& CD, double& realjay) { bigint c4, c6, njay, djay; c4=getc4(CD); c6=getc6(CD); njay = pow(c4,3); djay = getdiscr(CD); if((djay==0)||(njay==0)) {realjay=0; return 0;} double g = I2double(gcd(njay,djay)); double xnjay = I2double(njay)/g; double xdjay = I2double(djay)/g; realjay = xnjay/xdjay; double x = log(fabs(xnjay)); double y = log(fabs(xdjay)); if(x0"<0) htc = -log(dv)/3; else { cout<<"Precision problem in cps_real(): dv = "<0"<0) htc = -log(mindv)/3; else { cout<<"Precision problem in cps_real(): min(dv,dvd) = "<0"<0) { te[0]=i1l; te[1]=i1u; if (numint==2) { te[2]=i2l; te[3]=i2u; } } if (numint!=0) { // Roots of g rt=solvequartic(to_bigfloat(0),-b4,-2.0*b6,-b8); for (i=0; i<4; i++) { if (is_approx_zero(rt[i].imag())) { rr=rt[i].real(); if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } } } // Roots of f (again!) rt=solvecubic(b2/4.0,b4/2.0,b6/4.0); for (i=0; i<3; i++) { if (is_approx_zero(rt[i].imag())) { rr=rt[i].real(); if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } } } // Roots of f+g rt=solvequartic(to_bigfloat(4),b2-b4,2.0*(b4-b6),b6-b8); for (i=0; i<4; i++) { if (is_approx_zero(rt[i].imag())) { rr=rt[i].real(); if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } } } // Roots of g-f // Change from NPS rt=solvequartic(to_bigfloat(-4),-(b2+b4),-2.0*(b4+b6),-(b6+b8)); for (i=0; i<4; i++) { if (is_approx_zero(rt[i].imag())) { rr=rt[i].real(); if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } } } // Roots of f' if (-24.0*b4+b2*b2>=0.0) { rn=sqrt(-24.0*b4+b2*b2); rr=(-b2+rn)/12.0; if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } rr=(-b2-rn)/12.0; if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } } // Roots of g' rt=solvecubic(to_bigfloat(0),-b4/2.0,-b6/2.0); for (i=0; i<3; i++) { if (is_approx_zero(rt[i].imag())) { rr=rt[i].real(); if (is_in_int(rr,i1l,i1u,i2l,i2u,numint)) { te[tec]=rr; tec=tec+1; } } } } bigfloat dv=to_bigfloat(0); // Evaluate |f|, |g| at each of the tec(>0) x-values in array te: for (i=0; i=0) { d=sqrt(d); a1=1/(2*a); x=a1*(-b+d); if((x<=1)&&(x>=-1)) ans.push_back(x); x=a1*(-b-d); if((x<=1)&&(x>=-1)) ans.push_back(x); } return ans; } vector reals_in ( vector& v) { vector vr; vector::iterator vi = v.begin(); while(vi!=v.end()) { if(is_real(*vi)) vr.push_back((*vi).real()); vi++; } return vr; } vector reals_in_11 ( vector& v) { vector vr; vector::iterator vi = v.begin(); while(vi!=v.end()) { if(is_real(*vi)) { bigfloat x = (*vi).real(); if((x<=1)&&(x>=-1)) vr.push_back(x); } vi++; } return vr; } int interval_test(const bigfloat& x, const vector rts, int debug) { // rts will have size 1 or 3, and be ordered if(debug) cout<<"Interval test("<=rts[0]); else ans = ((x>=rts[0]) && (x<=rts[1])) || (x>=rts[2]); if(debug) cout<<"\t returns "< reals_in_interval ( vector& v, const vector rts) { vector vr; vector::iterator vi = v.begin(); bigfloat x; while(vi!=v.end()) { if(is_real(*vi)) { x=(*vi).real(); if(interval_test(x,rts,1)) vr.push_back(x); } vi++; } return vr; } // Inserts from C in to S the elements which are real and between -1 // and +1 void include_real_11(std::set& S, const vector& C) { bigfloat x; vector::const_iterator Ci = C.begin(); while(Ci!=C.end()) { if(is_real(*Ci)) { x = (*Ci).real(); if((x<=1)&&(x>=-1)) S.insert(x); } Ci++; } } inline int in_fund_region(const bigcomplex& z) { return (imag(z)>0)&&(abs(z)>0.999)&&(abs(2*real(z))<1.001); } //#define HTB_DEBUG // This gives a lower bound on non-torsion points; experimental, not // very good (and not always positive?!! bigfloat lower_height_bound_alt(const Curvedata& CD) { static bigfloat log2 = log(to_bigfloat(2)); bigcomplex w1, w2; Cperiods pers(CD); bigcomplex tau = gettau(pers); #ifdef HTB_DEBUG cout<<"\nAfter normalizing, periods are: "<max_search_bound) { cout<<"\n***Warning: search bound of "<hcx) lambda=hcx; if(verbose) cout<<"Using lambda = "<12) { cout<<"factorial(long) called with n = "< getai(a1,a2,a3,a4,a6); if(egr_flag) CG=ComponentGroups(*E); iso = !((a1==0)&&(a3==0)); c.resize(4); if(iso) { c[0]=16*getb6(*E); c[1]= 8*getb4(*E); c[2]= getb2(*E); c[3]=1; } else { c[0]=a6; c[1]=a4; c[2]=a2; c[3]=1; } } int point_min_height_finder::process(const bigint& x, const bigint& y, const bigint& z) { bigint rz; isqrt(z,rz); bigint x1=x*rz, y1=y, z1=z*rz; if(iso) { y1 -= (a1*x1+4*a3*z1); x1 *= 2; z1 *= 8; } Point P(E, x1,y1,z1); if(P.isvalid()) { if(order(P)<0) { int egr=1; bigint p0; if(egr_flag) egr=CG.HasGoodReduction(P,p0); if(egr) { bigfloat hP=height(P); if(is_zero(hP)) return 0; if(verbose) cout<<"Found point "<1)); bigcomplex c1(I2bigfloat(c[2])), c2(I2bigfloat(c[1])), c3(I2bigfloat(c[0])); vector roots=solvecubic(c1,c2,c3); // cout<<"solvecubic("< bnd(3); int nrr=order_real_roots(bnd,roots); s.set_intervals(bnd,nrr,1); s.search(); } //#define debugLB /////////////////////////////////////////////////////////////////////// // // class Interval represents a closed interval [lh,rh] where either // empty=1; or empty=0 and lh <= rh; flags rhinf, lhinf denote // rh=infty and lh=-infty resp. // /////////////////////////////////////////////////////////////////////// ostream& operator<< (ostream& os, const Interval& I) { if(I.empty) os<<"[]"; else { os<<"["; if(I.lhinf) os << "-infty"; else os << I.lh; os << ","; if(I.rhinf) os << "+infty"; else os << I.rh; os << "]"; } return os; } void Interval::intersect(const Interval& I) { if(empty) return; if(I.empty) {empty=1; return;} if(lhinf) { lhinf=I.lhinf; lh=I.lh; } else if(!I.lhinf) lh=max(lh,I.lh); if(rhinf) { rhinf=I.rhinf; rh=I.rh; } else if(!I.rhinf) rh=min(rh,I.rh); if((!lhinf)&&(!rhinf)&&(lh>rh)) empty=1; } vector intersect(const vector& L1, const vector& L2) { vector ans; vector::const_iterator I, J; for(I=L1.begin(); I!=L1.end(); I++) for(J=L2.begin(); J!=L2.end(); J++) { Interval K = intersect(*I,*J); if(!K.is_empty()) ans.push_back(K); } return ans; } /////////////////////////////////////////////////////////////////////// // // class Interval01 represents a closed subinterval [lh,rh] of [0,1], // where either empty=1; or empty=0 and lh <= rh. // /////////////////////////////////////////////////////////////////////// ostream& operator<< (ostream& os, const Interval01& I) { if(I.empty) os<<"[]"; else os<<"[" << I.lh << "," << I.rh << "]"; return os; } void Interval01::intersect(const Interval01& I) { if(empty) return; if(I.empty) {empty=1; return;} lh=max(lh,I.lh); rh=min(rh,I.rh); empty=(lh>rh); } vector intersect(const vector& L1, const vector& L2) { vector ans; vector::const_iterator I, J; for(I=L1.begin(); I!=L1.end(); I++) for(J=L2.begin(); J!=L2.end(); J++) { Interval01 K = intersect(*I,*J); if(!K.is_empty()) ans.push_back(K); } return ans; } Interval01 operator/(const Interval01& I, const long n) { if(I.empty) return I; return Interval01(I.lh/to_bigfloat(n),I.rh/to_bigfloat(n)); } Interval01 operator+(const Interval01& I, const bigfloat& shift) { if(I.empty) return I; return Interval01(I.lh+shift,I.rh+shift); } /////////////////////////////////////////////////////////////////////// // // Implementation of class CurveHeightConst // /////////////////////////////////////////////////////////////////////// CurveHeightConst::CurveHeightConst(const Curvedata& CD) : Curvedata(CD), Cperiods(CD) { c = to_bigfloat(egr_height_constant(*this)); // =-log(alpha) in ANTS7 e3 = get_e3(); n_max=10; n_ann=25; // i.e. all p<100 ann = annihilators(*this,n_ann); #ifdef debugLB cout<<"e3 = "< CurveHeightConst::canonicalHeightInterval01(const bigfloat& target, long k) { vector solution; solution.push_back(Interval01(to_bigfloat(0.5),to_bigfloat(1))); // i.e. image of [e3,+infty] under psi #ifdef debugLB cout<<"testing target bound "< CurveHeightConst::solveLEQ01(long n, const bigfloat& B) { #ifdef debugLB cout<<"solveLEQ01("< ans; if(B < e3) return ans; #ifdef debugLB cout<<"B = "<= B vector CurveHeightConst::solveGEQ01(long n, const bigfloat& B) { if(B <= e3) { vector ans; ans.push_back(Interval01()); // i.e.[0,1] return ans; } vector ans; bigfloat x0=psi(B); bigfloat oneovern = to_bigfloat(1)/to_bigfloat(n); Interval01 I(to_bigfloat(0),1-x0); I=I/n; for(int i=0; i CurveHeightConst::ordinates(const bigfloat& x) { vector ans; static const bigfloat four=to_bigfloat(4), two=to_bigfloat(2); bigfloat d = ((four*x+I2bigfloat(b2))*x+(two*I2bigfloat(b4)))*x+I2bigfloat(b6); if(d<0) return ans; bigfloat y = -(I2bigfloat(a1)*x+I2bigfloat(a3))/two; if(d==0) {ans.push_back(y); return ans;} d=sqrt(d)/two; // positive ans.push_back(d+y); // the larger value ans.push_back(-d+y); // the smaller value return ans; } // elliptic log function (called psi in the paper) with domain // [e3,infty], codomain [0.5,1] bigfloat CurveHeightConst::psi(const bigfloat& x) { if(x CurveHeightConst::solveLEQ(long n, const bigfloat& B) { vector ans; if(B < e3) return ans; vector xlist=solveEllNPower(n,B); if(n%2) // n is odd { ans.push_back(Interval(e3,xlist[0])); for(int i=1; i= B vector CurveHeightConst::solveGEQ(long n, const bigfloat& B) { vector ans; if(B <= e3) { ans.push_back(Interval(e3)); // i.e.[e3,infty] return ans; } vector xlist=solveEllNPower(n,B); int i; if(n%2) // n is odd { for(i=1; i CurveHeightConst::solveEllNPower01(long n, const bigfloat& x1) { vector ans; if(x1 CurveHeightConst::solveEllNPower(long n, const bigfloat& x1) { vector ans=solveEllNPower01(n,x1); bigfloat om=real(get_real_period()); for(int i=0; i #include #include #include #include // constructors curvemodq::curvemodq(void) { Fq=0; // cout<<"In curvemodq default constructor, Fq = "<abs(imag(e3))) {swap(e1,e3);} if(abs(imag(e1))>abs(imag(e2))) {swap(e1,e2);} else if(abs(imag(e2))>abs(imag(e3))) {swap(e2,e3);} #if(0) cout<<"Leaving reorder2() with \n"; cout<<"e1="<1) wRI+=wR; wI = bigcomplex(to_bigfloat(0),2*imag(wRI)); } else { wI=wRI; } w1=wR; w2=wRI; #ifdef DEBUG cout << "Before lattice normalization, \n"; cout << "wR = " << wR << " (should be real)\n"; cout << "wI = " << wI << " \n"; cout << "wRI = " << wRI << " \n"; cout << "real(wRI)/real(wR) = "<0.99) { cout << "Warning from Cperiods::store_sums: qtau = " << qtau << " is not small!\n"; } w1squared = w1*w1; w1cubed = w1*w1squared; bigcomplex term = one, qtm = qtau; sum3=to_bigfloat(0); for (bigfloat m=to_bigfloat(1); ! SMALL(term); m+=1) { term = qtm*m / (one - qtm); qtm *= qtau; sum3 += term; #ifdef DEBUG cout<<"term = "<piby2) || (theta<=-piby2)) y=-y; #ifdef DEBUG_CAGM cout<<"x = "<> (istream& is, bigrational& r); bigrational& operator+=(const bigrational&); bigrational& operator+=(bigint); bigrational& operator-=(const bigrational&); bigrational& operator-=(bigint); bigrational& operator*=(const bigrational&); bigrational& operator*=(bigint); bigrational& operator/=(const bigrational&); bigrational& operator/=(bigint); bigrational operator+(); bigrational operator-(); friend bigint floor(const bigrational& r); friend bigint ceil(const bigrational& r); operator bigfloat(); // conversion operator // Implementation private: bigint n, d; }; // Inline bigrational functions inline void bigrational::cancel() // cancel *this in situ { bigint g = gcd(n,d); if (g>1) {n/=g; d/=g;} if (d<0) {n=-n; d=-d;} } inline bigrational::bigrational(bigint num_val, bigint den_val) { n=num_val; d=den_val; (*this).cancel(); } inline bigrational::bigrational(const bigrational& q) :n(q.n), d(q.d) {;} inline bigrational::bigrational(const rational& q) :n(BIGINT(q.n)), d(BIGINT(q.d)) {;} inline void bigrational::operator=(const bigrational& q) {n=q.n; d=q.d;} inline void bigrational::operator=(const rational& q) {n=BIGINT(q.n); d=BIGINT(q.d);} inline bigrational bigrational::operator+() { return *this; } inline bigrational bigrational::operator-() { return bigrational(-n, d); } // Definitions of compound-assignment operator member functions inline bigrational& bigrational::operator+=(const bigrational& q2) { n = n*q2.d+d*q2.n; d *= q2.d; (*this).cancel(); return *this; } inline bigrational& bigrational::operator+=(bigint num_val2) { n += d*num_val2; return *this; } inline bigrational& bigrational::operator-=(const bigrational& q2) { n = n*q2.d-d*q2.n; d *= q2.d; (*this).cancel(); return *this; } inline bigrational& bigrational::operator-=(bigint num_val2) { n -= d*num_val2; return *this; } inline bigrational& bigrational::operator*=(bigint num_val2) { n*=num_val2; (*this).cancel(); return *this; } inline bigrational& bigrational::operator/=(bigint num_val2) { d*=num_val2; (*this).cancel(); return *this; } inline bigrational::operator bigfloat() {return I2bigfloat(n)/I2bigfloat(d);} // Definitions of non-member bigrational functions inline bigint num(const bigrational& q) { return q.n; } inline bigint den(const bigrational& q) { return q.d; } inline bigrational recip(const bigrational& q) { return bigrational(q.d, q.n); } inline bigint round(const bigrational& q) { return q.n / q.d; //provisional -- should fix rounding direction. } // Definitions of non-member binary operator functions inline bigrational operator+(const bigrational& q1, const bigrational& q2) { return bigrational(q1.n*q2.d + q2.n*q1.d, q1.d * q2.d); } inline bigrational operator+(bigint num_val1, const bigrational& q2) { return bigrational(num_val1*q2.d + q2.n, q2.d); } inline bigrational operator+(const bigrational& q1, bigint num_val2) { return bigrational(q1.n + num_val2*q1.d, q1.d); } inline bigrational operator-(const bigrational& q1, const bigrational& q2) { return bigrational(q1.n*q2.d - q2.n*q1.d, q1.d * q2.d); } inline bigrational operator-(bigint num_val1, const bigrational& q2) { return bigrational(num_val1*q2.d - q2.n, q2.d); } inline bigrational operator-(const bigrational& q1, bigint num_val2) { return bigrational(q1.n - num_val2*q1.d, q1.d); } inline bigrational operator*(const bigrational& q1, bigint num_val2) { return bigrational(q1.n*num_val2, q1.d); } inline bigrational operator*(bigint num_val1, const bigrational& q2) { return bigrational(q2.n*num_val1, q2.d); } inline bigrational operator*(const bigrational& q1, const bigrational& q2) { return bigrational(q1.n*q2.n, q1.d*q2.d); } inline bigrational operator/(const bigrational& q1, bigint num_val2) { return bigrational(q1.n, q1.d*num_val2); } inline bigrational operator/(const bigrational& q1, const bigrational& q2) { return bigrational(q1.n*q2.d, q1.d*q2.n); } inline bigrational operator/(bigint num_val1, const bigrational& q2) { return bigrational(q2.d*num_val1, q2.n); } inline int operator==(const bigrational& q1, const bigrational& q2) { return q1.n*q2.d == q2.n*q1.d; } inline int operator!=(const bigrational& q1, const bigrational& q2) { return q1.n*q2.d != q2.n*q1.d; } inline ostream& operator<<(ostream& s, const bigrational& q) { if(q.d==0) s<<"oo"; else { s << q.n; if (q.d!=1) {s << "/" << q.d;} } return s; } inline istream& operator>> (istream& is, bigrational& r) { char c; bigint n,d=BIGINT(1); is>>n; if(!is.eof()) { is.get(c); if(c=='/') { is>>d; } else { is.putback(c); } } r=bigrational(n,d); return is; } // NB gcd(n,d)=1 and d>0: inline bigint floor(const bigrational& r) { return (r.n-(r.n%r.d))/r.d; } inline bigint ceil(const bigrational& r) { if(r.d==BIGINT(1)) return r.n; return BIGINT(1) + (r.n-(r.n%r.d))/r.d; } #endif eclib-2013-01-01/libsrc/eclib/illl.h0000644000175200017520000000346611774563612013566 00000000000000// illl.h: declarations of functions for integer LLL ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Integral LLL algorithm (Cohen's book page 94) // // b is an array of n+1 vectors indexed from 0 to n. // b[1]...b[n] are the lattice basis, while b[0] holds the coefficients // of the (diagonal) Gram matrix, so the inner product of b[i] and b[j] // is sum(k,b[0][k]b[i][k]*b[j][k]). // #ifndef _ILLL_H #define _ILLL_H 1 //flags that this file has been included #include "mvector.h" bigint sdot(const vec_m* b, int i, int j); void lll_reduce(const int n, vec_m* b); // // Uses Pohst-Zassenhaus Algorithm (page 190) to find all vectors of // length < c, where the quadratic form is again given by b[0]. // // NB The following DOES NOT WORK: I blindly implemented P-Z without // doing the necessary preliminary completing of the square. // So DO NOT USE // //void list_short_vecs(const int n, vec_m* b, const bigint& c); #endif eclib-2013-01-01/libsrc/eclib/nfd.h0000644000175200017520000000324311774563612013372 00000000000000// File NFD.H: class for newforms of any dimension ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// bigint inverse(const mat_m& a, mat_m& ainv); void showmatrix(const mat_m& m); void showmatrix(const mat& m); class nfd { private: mat_m tp0; // a defining matrix mat_m V; mat_m W,Winv,WinvV,Winv_scaled; mat projcoord; long coord_fac; bigint Wdetnum, Wdetdenom; vector minpol; // min poly of alpha, field generator public: vector Hscales; vector Sscales; msubspace S; // the basis homspace* h1; // the ambient modular symbol space bigint dH, dS, dHS; nfd(void) {;} nfd(homspace* in_h1, int one_p, int w_split, int mult_one, int verbose=0); void display(void) const; mat_m oldheckeop(long p); mat_m heckeop(long p); vec_m ap(long p); }; eclib-2013-01-01/libsrc/eclib/vec.h0000644000175200017520000001357211774563612013406 00000000000000// vec.h: declaration of integer vector classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Should not be included directly by user: include vector.h instead // We cannot use one macro to prevent this being included twice since // we want it to be included twice by vector.h! We must use two // different ones class svec; class subspace; class vec; vec iota(scalar n); // (1,2,...,n) class vec { friend class svec; friend class smat; friend class smat_elim; friend class vec_m; friend class mat; friend class subspace; public: // constructors vec(long n=0); vec(long n, scalar* arr); vec(const vec&); // copy constructor ~vec(); // destructor // member functions & operators void init(long n=0); // (re)-initializes vec& operator=(const vec&); // assignment scalar& operator[](long i) const; // the i'th component vec& operator+=(const vec&); void addmodp(const vec&, scalar); vec& operator-=(const vec&); vec& operator*=(scalar); vec& operator/=(scalar); vec slice(long,long=-1) const; // returns subvec vec operator[](const vec&) const; // subscript composition void set(long i, scalar x); // sets v[i]=x void add(long i, scalar x); // v[i]+=x scalar sub(long i) const; // same as v[i] (no ref) const scalar* get_entries()const {return entries;} // non-member (friend) functions and operators friend long dim(const vec&); // the dimension friend scalar operator*(const vec&, const vec&); // dot product friend scalar operator*(const svec&, const vec&); friend vec operator*(const mat& m, const vec& v); friend int operator==(const vec&, const vec&); friend int operator!=(const vec&, const vec&); friend int trivial(const vec&); // v==zerovec? // add/sub row i of mat to v (implemented in mat.cc) friend void add_row_to_vec(vec& v, const mat& m, long i); friend void sub_row_to_vec(vec& v, const mat& m, long i); friend ostream& operator<< (ostream&s, const vec&); friend istream& operator>> (istream&s, vec&); friend vec iota(scalar n); // (1,2,...,n) friend scalar vecgcd(const vec&); friend void swapvec(vec& v, vec& w); friend int member(scalar a, const vec& v);//tests if a=v[i] for some i friend mat restrict_mat(const mat& m, const subspace& s, int cr=0); friend mat_m restrict_mat(const mat_m& m, const msubspace& s); friend mat prestrict(const mat& m, const subspace& s, scalar pr, int cr=0); friend mat_m prestrict(const mat_m& m, const msubspace& s, const bigint& pr); // Implementation private: long d; scalar * entries; }; // Declaration of non-member, non-friend functions vec operator+(const vec&); // unary vec operator-(const vec&); // unary vec operator+(const vec&, const vec&); vec addmodp(const vec&, const vec&, scalar); vec operator-(const vec&, const vec&); inline vec operator*(scalar, const vec&); // componentwise vec operator/(const vec&, scalar); // componentwise void makeprimitive(vec& v); void elim(const vec& a, vec& b, long pos); void elim1(const vec& a, vec& b, long pos); void elim2(const vec& a, vec& b, long pos, scalar lastpivot); vec reverse(vec& order); vec express(const vec& v, const vec& v1, const vec& v2); vec lift(const vec& v, scalar pr); //lifts a mod-p vector to a rational //and scales to a primitive vec in Z. int liftok(vec& v, scalar pr); //lifts a mod-p vector in place to a rational //and scales to a primitive vec in Z; returns success scalar dotmodp(const vec& v1, const vec& v2, scalar pr); // inline function definitions inline long dim(const vec& v) {return v.d;} inline int operator!=(const vec& v, const vec& w) { return !(v==w);} inline vec operator+(const vec& v) { return v;} inline vec operator-(const vec& v) { return (-1)*v;} inline vec operator+(const vec& v1, const vec& v2) { vec ans(v1); ans+=v2; return ans;} inline vec addmodp(const vec& v1, const vec& v2, scalar pr) { vec ans(v1); ans.addmodp(v2,pr); return ans;} inline vec operator-(const vec& v1, const vec& v2) { vec ans(v1); ans-=v2; return ans;} inline vec operator*(scalar scal, const vec& v) { vec ans(v); ans*=scal; return ans;} inline vec operator/(const vec& v, scalar scal) { vec ans(v); ans/=scal; return ans;} inline void makeprimitive(vec& v) { scalar g=vecgcd(v); if (g>1) v/=g;} inline void elim(const vec& a, vec& b, long pos) { (b*=a[pos])-=(b[pos]*a);} inline void elim1(const vec& a, vec& b, long pos) { (b*=a[pos])-=(b[pos]*a); makeprimitive(b);} inline void elim2(const vec& a, vec& b, long pos, scalar lastpivot) { ((b*=a[pos])-=(b[pos]*a))/=lastpivot;} eclib-2013-01-01/libsrc/eclib/elog.h0000644000175200017520000000726511774563612013561 00000000000000// elog.h: declarations of elliptic logarithm functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _ELOG_H_ #define _ELOG_H_ #include "curve.h" #include "points.h" #include "cperiods.h" ////////////////////////////////////////////////////////////////////////// // // Functions for passing between the complex torus C/L and a // Weierstrass model for an elliptic curve // ////////////////////////////////////////////////////////////////////////// // 1. Elliptic logarithm // Given an elliptic curve and its (precomputed) periods, and a real // or rational (but NOT complex) point P=(x,y), returns the unique // complex number z such that // (1) \wp(z)=x+b2/12, \wp'(z)=2y+a1*x+a3, // (2) either z is real and 0\le z\lt w1, or Delta>0, z-w2/2 is real // and 0\le z-w2/2\le w1. // Here, [w1,w2] is the standard period lattice basis // c.f. Cohen page 399 // First & second functions: P=[x,y] with x,y real; maps to z mod lattice bigcomplex ellpointtoz(const Curvedata& E, const Cperiods& per, const bigfloat& x, const bigfloat& y); inline bigcomplex ellpointtoz(const Curvedata& E, const Cperiods& per, const vector P) {return ellpointtoz(E,per,P[0],P[1]);} // Third function: P=rational point; maps to z mod lattice inline bigcomplex elliptic_logarithm(const Curvedata& E, const Cperiods& per, const Point& P) { if(P.iszero()) return bigcomplex(to_bigfloat(0)); bigfloat xP, yP; P.getrealcoordinates(xP,yP); return ellpointtoz(E,per,xP,yP); } // 2. Weierstrass functions (interface to cperiods.h/cc) // Cperiods is a class containing a basis for the period lattice L; // it knows how to compute points from z mod L; so this function // effectively does the same as PARI's ellztopoint() // // First function: given z mod L, returns complex vector [x,y] vector ellztopoint(Curvedata& E, Cperiods& per, const bigcomplex& z); // Second function, expects to return a rational point. // User supplies a denominator for the point; if it doesn't work, the // Point returned is 0 on the curve Point ellztopoint(Curvedata& E, Cperiods& per, const bigcomplex& z, const bigint& den); // Returns a (possibly empty) vector of solutions to m*Q=P // First version will compute the Cperiods itself, so best to use the // second one if more than one call is to be made for the same curve vector division_points(Curvedata& E, const Point& P, int m); vector division_points(Curvedata& E, Cperiods& per, const Point& P, int m); // Returns a vector of solutions to m*Q=0 (including Q=0) // First version will compute the Cperiods itself, so best to use the // second one if more than one call is to be made for the same curve vector torsion_points(Curvedata& E,int m); vector torsion_points(Curvedata& E, Cperiods& per, int m); #endif eclib-2013-01-01/libsrc/eclib/points.h0000644000175200017520000001361312071067052014125 00000000000000// points.h: declarations of Point class for points on elliptic curves ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // originally adapted from Elliptic.h by Oisin McGuiness // allow for multiple includes #ifndef _PELLIPTIC_ #define _PELLIPTIC_ #include "curve.h" // // class for points on elliptic curves // class Point : public P2Point { Curvedata *E; // pointer to the curve that the point is on int ord; // order: 0 if not calculated yet, -1 if infinite bigfloat height; // -1.0 if not calculated yet, 0.0 for torsion point public: // constructors Point(void) : P2Point(), E(0), ord(0), height(to_bigfloat(-1.0)) { ; } Point(Curvedata &EE) // set to point at infinity : P2Point(0,1,0), E(&EE), ord(1), height(to_bigfloat(0.0)) { ; } Point(Curvedata *EE) // set to point at infinity : P2Point(0,1,0), E(EE), ord(1), height(to_bigfloat(0.0)) { ; } Point(Curvedata &EE, const bigint& x, const bigint& y, const bigint& z) : P2Point(x,y,z), E(&EE), ord(0), height(to_bigfloat(-1.0)) { ; } Point(Curvedata &EE, const P2Point& P) : P2Point(P), E(&EE), ord(0), height(to_bigfloat(-1.0)) { ; } Point(Curvedata *EE, const bigint& x, const bigint& y, const bigint& z) : P2Point(x,y,z), E(EE), ord(0), height(to_bigfloat(-1.0)) { ; } Point(Curvedata *EE, const P2Point& p) : P2Point(p), E(EE), ord(0), height(to_bigfloat(-1.0)) { ; } Point(Curvedata &EE, const bigint& x, const bigint& y) : P2Point(x,y), E(&EE), ord(0), height(to_bigfloat(-1.0)) { ; } Point(Curvedata *EE, const bigint& x, const bigint& y) : P2Point(x,y), E(EE), ord(0), height(to_bigfloat(-1.0)) { ; } Point(const Point& Q) : P2Point(Q), E(Q.E), ord(Q.ord), height(Q.height) { ; } ~Point(void) {;} // input and output are inherited from P2Point class but the input // function must initialize the ord and height fields too friend istream& operator>>(istream & is, Point& P) { is>>(P2Point&)P; P.ord=0; P.height=to_bigfloat(-1.0); // NB P's Curve should have been set when it was constructed. return is; } // test of equality of points int operator==(const Point& Q) const { if(E != Q.E) return 0 ; // different curves! return eq(*this,Q); } int operator!=(const Point& Q) const { return !(*this == Q); } // assignment (p.init(.) is quicker than p=Point(.) for existing p) void init(Curvedata &EE, const bigint& x, const bigint& y, const bigint& z) {E=&EE; X=x; Y=y; Z=z; reduce(); ord=0; height=-1.0; } void init(Curvedata *EE, const bigint& x, const bigint& y, const bigint& z) {E=EE; X=x; Y=y; Z=z; reduce(); ord=0; height=-1.0; } void init(Curvedata &EE, const bigint& x, const bigint& y) {E=&EE; X=x; Y=y; Z = 1; ord=0; height=-1.0; } void init(Curvedata *EE, const bigint& x, const bigint& y) {E=EE; X=x; Y=y; Z = 1; ord=0; height=-1.0; } void operator=(const Point& Q) // P1 = P2 { E=Q.E; X=Q.X ; Y=Q.Y; Z=Q.Z; ord=Q.ord; height=Q.height; } friend Point transform(const Point& p, Curvedata* newc, const bigint& u, const bigint& r, const bigint& s, const bigint& t, int back=0); void operator+=(const Point&) ; // P1 += P2 ; order and height unknown void operator-=(const Point&) ; // P1 -= P2 ; ditto // addition of points, etc Point operator+(const Point &) const ; // P1 + P2 Point operator-(const Point &) const ; // P1 - P2 Point operator-(void) const ; // -P Point twice(void) const ; // doubles P friend Point operator*(int, const Point&) ; // n*P // access functions Curve getcurve() const {return *E;} friend int order(Point& p); // calculate and set if not set friend int order(Point& p, vector&multiples); // also create and return list of multiples friend bigfloat height(Point& P); //calculate and set if not set friend bigfloat realheight(const Point& P); friend bigfloat pheight(const Point& P, const bigint& p); // useful logical tests int iszero() const { return isinfinite(); } int isvalid() const ; // P on its curve ? }; // end of point class // list of 0,1 or 2 points with given x-coordinate: vector points_from_x(Curvedata &E, const bigrational& x); // the real x and y coords of the point void realify_point(const Point& P, bigfloat&x, bigfloat& y); // the real component of the canonical height bigfloat realheight(const bigfloat& x, const Curvedata* E); // the height pairing of two points bigfloat height_pairing(Point& P, Point& Q); // regulator of a list of n points bigfloat regulator(vector& points); // not a const array; heights get set. // torsion functions // N.B. Don't make the params const here vector two_torsion(Curvedata& E); vector three_torsion_x(Curvedata& E); vector three_torsion(Curvedata& E); vector torsion_points(Curvedata& E); inline long ntorsion(Curvedata& E) { return E.get_ntorsion(); } // end of file: points.h #endif eclib-2013-01-01/libsrc/eclib/tlss.h0000644000175200017520000000446711774563612013621 00000000000000// tlss.h: definition of class TLSS for sieving E(Q)/pE(Q) at one prime q ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // NB: TLSS = Tate--Lichtenbaum--Samir-Siksek: we use a simple // discrete log a la Siksek when the p-torsion in E(F_q) is cyclic, // else use the Tate-Lichtenbaum pairing // allow for multiple includes #ifndef _TLSS_ #define _TLSS_ class TLSS { private: int p; // the prime to saturate at. int rank; // p-rank of E mod q (0,1,2) bigint q; // the modulus bigint q1p; // = (q-1)/p; galois_field Fq; // F_q vector mu_p; // all p'th roots mod q curvemodqbasis Emodq; // E over F_q (including its structure) vector Pi; // basis for p-torsion of E(F_q) (length = rank = 0,1,2) vector TLpolys; // in the function field Fq(E) int verbose; void init_tlpolys(void); public: TLSS(void) :Emodq() {;} void assign(const curvemodqbasis& E) {Emodq=E; Fq=get_field(Emodq); q=Fq.characteristic(); } void init(int pp, int verb=0); void init(int pp, const vector& pdivpol, int verb=0); ~TLSS() {; } // apply map to P, result in (ntp*)[0..p-1]: vector map1point(const Point& P) const; // apply map to all P in Plist, result is a (ntp*#Plist) matrix: mat map_points(const vector& Plist) const; // give the current p-rank int get_rank() const {return rank;} }; #endif // #define _TLSS_ eclib-2013-01-01/libsrc/eclib/marith.h0000644000175200017520000001564111774563612014114 00000000000000// marith.h: declarations of integer arithmetic functions (multiprecision) ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _MARITH_H #define _MARITH_H #include "arith.h" bigint bezout(const bigint& aa, const bigint& bb, bigint& xx, bigint& yy); int divides(const bigint& a, const bigint& b, bigint& q, bigint& r); int divides(const bigint& a, long b, bigint& q, long& r); // returns 1 iff remainder r==0 bigint Iround(bigfloat x); bigint Ifloor(bigfloat x); bigint Iceil(bigfloat x); bigint posmod(const bigint& a, const bigint& b); // a mod b in range 0--(b-1) long posmod(const bigint& a, long b); int isqrt(const bigint& a, bigint& root); int divide_exact(const bigint& aa, const bigint& bb, bigint& c); // c = a/b with error message if remainder is non-zero long divide_out(bigint& a, const bigint& d); long divide_out(bigint& a, long d); // divides a by d as many times as possible returning number of times (but none if a=0!) bigint show(const bigint& a); vector show(const vector& a); // extra_primes is a set holding extra big primes found or added manually. class extra_prime_class { public: std::set the_primes; extra_prime_class() {;} ~extra_prime_class(); void read_from_file(const string pfilename, int verb=0); void write_to_file(const string pfilename, int verb=0); int contains(const bigint& p) { return the_primes.find(p)!=the_primes.end(); } void add(const bigint& p) { if(p>maxprime()) the_primes.insert(p); } void show() { cout << "Extra primes in list: "; copy(the_primes.begin(),the_primes.end(), ostream_iterator(cout, " ")); cout << endl; } }; extern extra_prime_class the_extra_primes; // The one and only instance void initprimes(const string pfilename, int verb=0); // // divisors // // The following uses trial division: vector pdivs_trial(const bigint& number, int trace=0); // The following uses gp factorization externally if available: vector pdivs_gp(const bigint& number, int trace=0); // The following uses pari library's factorization if available: vector pdivs_pari(const bigint& number, int trace=0); // The following uses one of the above vector pdivs(const bigint& number, int trace=0); vector posdivs(const bigint& number, const vector& plist); vector posdivs(const bigint& number); vector alldivs(const bigint& number, const vector& plist); vector alldivs(const bigint& number); vector sqdivs(const bigint& number, const vector& plist); vector sqdivs(const bigint& number); vector sqfreedivs(const bigint& number, const vector& plist); vector sqfreedivs(const bigint& number); void sqfdecomp(const bigint& a, bigint& a1, bigint& a2, vector& plist, int trace_fact=0); // a must be non-zero, computes square-free a1 and a2>0 such that a=a1*a2^2 // plist will hold prime factors of a void sqfdecomp(const bigint& a, vector& plist, bigint& a1, bigint& a2); // a must be non-zero, computes square-free a1 and a2>0 such that a=a1*a2^2 // plist already holds prime factors of a // Given a, b, lem3 returns m1 etc so that a=c1^2*m1*m12, b=c2^2*m2*m12 // with m1, m2, m12 pairwise coprime. At all times these equations hold, // and at each step the product m1*m2*m12 is decreased by a factor d, // so the process terminates when the coprimality condition is satisfied. void rusin_lem3(const bigint& a, const bigint& b, bigint& m1, bigint& m2, bigint& m12, bigint& c1, bigint& c2); // Solves x-a1(mod m1), x=a2(mod m2) bigint chrem(const bigint& a1, const bigint& a2, const bigint& m1, const bigint& m2); // // general purpose routines -- bigint overloads // bigint mod(const bigint& a, const bigint& b); // a mod b in range +- half b long mod(const bigint& a, long b); long val(const bigint& factor, const bigint& number); long val(long factor, const bigint& number); int div(const bigint& factor, const bigint& number); int div(long factor, const bigint& number); inline int ndiv(const bigint& factor, const bigint& number) { return !div(factor, number);} inline int ndiv(long factor, const bigint& number) { return !div(factor, number);} long bezout(const bigint& aa, long bb, bigint& xx, bigint& yy); bigint invmod(const bigint& a, const bigint& p); // -a mod p long invmod(const bigint& a, long p); int m1pow(const bigint& a); int chi2(const bigint& a); int chi4(const bigint& a); int hilbert2(const bigint& a, const bigint& b); int hilbert2(const bigint& a, long b); int hilbert2(long a, const bigint& b); int legendre(const bigint& a, const bigint& b); int legendre(const bigint& a, long b); int kronecker(const bigint& d, const bigint& n); int kronecker(const bigint& d, long n); // See hilbert.h for hilbert symbol functions long gcd(const bigint& a, long b); int modrat(const bigint& n, const bigint& m, const bigint& lim, /* return values: */ bigint& a, bigint& b); int sqrt_mod_2_power(bigint& x, const bigint& a, int e); int sqrt_mod_p_power(bigint& x, const bigint& a, const bigint& p, int e); int sqrt_mod_m(bigint& x, const bigint& a, const bigint& m); int sqrt_mod_m(bigint& x, const bigint& a, const bigint& m, const vector& mpdivs); // Second version of sqrt_mod_m requires mpdivs to hold a list // of primes which contains all those which divide m; if it acontains // extras that does not matter. int modsqrt(const bigint& a, const vector& bplist, bigint& x); // Solves x^2=a mod b with b square-free, returns success/fail // root-finding functions: vector Introotscubic(const bigint& a, const bigint& b, const bigint& c); vector Introotsquartic(const bigint& a, const bigint& b, const bigint& c, const bigint& d); // find the number of roots of X^3 + bX^2 + cX + d = 0 (mod p) // roots are put in r which should be allocated of size 3 int nrootscubic(long b, long c, long d, long p, long* roots); void ratapprox(bigfloat x, bigint& a, bigint& b); void ratapprox(bigfloat x, long& a, long& b); #endif // end of file marith.h eclib-2013-01-01/libsrc/eclib/sqfdiv.h0000644000175200017520000000445311774563612014123 00000000000000// sqfdiv.h : declaration of class sqfdiv for managing square-free divisors ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class sqfdiv { vector* primebase; // includes all relevant primes bigint d; // product of current subset long np; // number in current subset int positive; // flag for sign long factor; // counts log_2 of saving index since initialisation vector subgp; // subgp factored out (complete) vector gens; // generators of latter long nsub, maxnsub, ngens, maxngens; // current, max number in subgp vector pivs; public: sqfdiv(const bigint& dd, int posd, vector* plist); void usediv(const bigint& e); vector getdivs() const; vector getsupp(int bothsigns=0) const; vector getsubgp() {return vector(subgp.begin(),subgp.begin()+nsub);} long getfactor() {return factor;} void display(); }; bigint sqfred(const bigint& a, const vector& plist); inline bigint sqfred(const bigint& a) { return sqfred(a,pdivs(a));} bigint sqfmul(const bigint& a, const bigint& b); bigint makenum(const vector& supp, long mask); long makeindex(const vector& supp, const bigint& n, bigint& n0); // support(n) is like pdivs(n) but includes -1 always // (except for n=0, but it should never be called with 0) vector support(const bigint& n); eclib-2013-01-01/libsrc/eclib/reader.h0000644000175200017520000000363711774563612014074 00000000000000// reader.h: class for reading curves from file/tty ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include // for gcc >= 4.3 #define TTY "/dev/tty" class CurveReader { private: int tty_input; ifstream in; public: CurveReader() { tty_input=0; string filename; cerr << "Enter a filename for curve input (or tty): "; cin >> filename; cerr<<"filename entered is "<>(Curve& c) { if(tty_input) { cerr<<"Enter a curve (null to exit): "<>ws; if(cin.eof()) {cerr<>c; } else { in>>ws; if(in.eof()) return 0; in >> c; } return !c.isnull(); } }; eclib-2013-01-01/libsrc/eclib/ffmod.h0000644000175200017520000000727511774563612013727 00000000000000// ffmod.h: declaration of class ffmodq and Weil pairing functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // ffmodq is the function field of an elliptic curve mod a prime q // (or more precisely the affine coordinate ring Fq[x,y]) // allow for multiple includes #ifndef _FFMOD_ #define _FFMOD_ #include "curve.h" #include "curvemod.h" #include "pointsmod.h" class ffmodq{ public: static galois_field Fq; // the constant field static curvemodq E; // the curve mod q static FqPoly f1, f2; // f2=a1*x+a3, f2=x^3+a2*x^2+a4*x+a6 FqPoly h1, h2; // for h1+y*h2 public: // constructors // special one to initialize the curve and field only: ffmodq(const curvemodq& EE); // normal ones: ffmodq(void) { init_h1h2(); FqPolyAssign0(h1); FqPolyAssign0(h2); } ffmodq(const gf_element& c) { init_h1h2(); FqPolyAssignGF(h1,c); FqPolyAssign0(h2); } ffmodq(const bigint& c) { init_h1h2(); FqPolyAssignZ(h1,c); FqPolyAssign0(h2); } ffmodq(const FqPoly& hh1) { init_h1h2(); h1=hh1; FqPolyAssign0(h2); } ffmodq(const FqPoly& hh1, const FqPoly& hh2) {h1=hh1; h2=hh2;} // initialization void init_f1f2(void); void init_h1h2(void) { FqPolySetField(h1,Fq); FqPolySetField(h2,Fq); } // assignment void operator=(const ffmodq& a) {h1=a.h1; h2=a.h2;} // equality test int operator==(const ffmodq& b) const; int operator!=(const ffmodq& b) const {return !((*this)==b);} // output void output(ostream& os) const; // addition, subtraction, multiplication ffmodq operator+(const ffmodq& b) const; ffmodq operator-(const ffmodq& b) const; ffmodq operator*(const ffmodq& b) const; ffmodq operator*(const FqPoly& h) const; // division ffmodq operator/(const FqPoly& h) const; ffmodq operator/(const ffmodq& b) const; // evaluation at a point: gf_element evaluate(const pointmodq& P) const; gf_element operator()(const pointmodq& P) const {return this->evaluate(P);} // vertical line through a point: friend ffmodq vertical(const pointmodq& P); // tangent at a point: friend ffmodq tangent(const pointmodq& P); // chord between points: friend ffmodq chord(const pointmodq& P, const pointmodq& Q); }; // weil_pol(T,m): T is a point of finite order m; returns a function // f_T whose divisor is m(T)-m(0). // The second version evaluates that at another point S without // actually computing the polynomial ffmodq weil_pol(const pointmodq& T, int m); gf_element evaluate_weil_pol(const pointmodq& T, int m, const pointmodq& S); gf_element weil_pairing(const pointmodq& S, const pointmodq& T, int m); inline ostream& operator<<(ostream& os, const ffmodq& f) { f.output(os); return os; } #endif eclib-2013-01-01/libsrc/eclib/parifact.h0000644000175200017520000000214111774563612014410 00000000000000/* parifact.h: integer factorization using libpari, interface via strings */ ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include using namespace std; string factor(const string n); int is_prime(const string p); eclib-2013-01-01/libsrc/eclib/polys.h0000644000175200017520000000442312071067052013756 00000000000000// polys.h : defines interface to NTL polynomials ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // allow for multiple includes #ifndef _POLYS_ #define _POLYS_ // NB --warning! In NTL there is a universal modulus set by a single // call to ZZ_p::init(q). #include "interface.h" // scalars #include "gf.h" // scalars #include "bigrat.h" #include #include #define ZPoly ZZX #define PolyCoeff(f,i) coeff((f),(i)) #define ZPolySetX(f) SetX(f); #define SetDegree(f,d) #define Degree(f) deg((f)) #define FqPoly ZZ_pX #define NewFqPoly(field,name) FqPoly name #define FqPolySetField(f,field) // do nothing #define FqPolyAssignGF(f,c) f=((c)) #define FqPolyAssignZ(f,c) f=(to_ZZ_p(c)) #define FqPolyAssign0(f) f=to_ZZ_p(0) #define FqPolyAssign1(f) f=to_ZZ_p(1) #define FqPolyEval(f,c) eval((f),to_ZZ_p(c)) #define FqPolyAssignX(f) SetX(f) #define GetField(f) (galois_field(ZZ_p::modulus())) vector rootsmod(const vector& coeffs, bigint p); vector roots(const FqPoly& f); vector roots(const vector& coeffs); // find the number of roots of X^3 + bX^2 + cX + d = 0 (mod p) int nrootscubic(const bigint& bb, const bigint& cc, const bigint& dd, const bigint& p); FqPoly reduce(const ZPoly& f, const galois_field& Fq); inline FqPoly reduce(const ZPoly& f, const bigint& q) {return reduce(f,galois_field(q));} #endif // #define _POLYS_ eclib-2013-01-01/libsrc/eclib/twoadic.h0000644000175200017520000000462211774563612014257 00000000000000// twoadic.h: declarations of functions for existence of 2-adic points ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Case 1 is A=0, B=0, x=2 (mod 4) // Case 2 is A=1, B=2, x=1 (mod 4) // Here A = -27*I, B = -27*J // The following macros are due to Michael Stoll: #define HIGH 0x7FFF /* 2-adic valuation function */ #define val1(a,s) (((a)&(0x1<<(s))) ? (s) : (s)+1) #define val2(a,s) (((a)&(0x3<<(s))) ? val1(a,s) : val1(a,(s)+2)) #define val4(a,s) (((a)&(0xF<<(s))) ? val2(a,s) : val2(a,(s)+4)) #define val8(a,s) (((a)&(0xFF<<(s))) ? val4(a,s) : val4(a,(s)+8)) #define val16(a) (((a)&0xFFFF) ? val8(a,0) : val8(a,16)) inline long val(long a){long r = (a) ? val16(a) : HIGH; return r;} inline long val(bigint a){long r = (a==0) ? HIGH: val(2,a); return r;} // try1(poly), with poly a deg 3 polynomial in x, determines if // there is a 2-adic integer a such that poly(a) is a square // in Q_2. Returns 1 if successful, 0 otherwise. // These were originally used to determine the index in the ambiguous // cases, but were much slower than the non-recursive functions, // called case1() and case2() // In all cases the return value is 0 if the index is 1 // and 1 if the index is 2 // so add 1 to get the index, which is also the "number of I,J pairs" long try1(long poly[4]); long try1(bigint poly[4]); long case1(long a, long b); // A=4a, B=4b long case2(long a, long b); // A=4a+1, B=4b+2 long case1(bigint a, bigint b); // A=4a, B=4b long case2(bigint a, bigint b); // A=4a+1, B=4b+2 eclib-2013-01-01/libsrc/eclib/mmatrix.h0000644000175200017520000001315111774563612014303 00000000000000// mmatrix.h: declarations of multiprecision integer matrix class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_MMATRIX_H) #define _MMATRIX_H 1 //flags that this file has been included #include "mvector.h" #include "matrix.h" class mat_m { friend class msubspace; public: // constructors mat_m(long nr=0, long nc=0); mat_m(const mat_m&); // copy constructor mat_m(const mat_i&); mat_m(const mat_l&); // destructor ~mat_m(); // member functions & operators void init(long nr=0, long nc=0); mat_m& operator=(const mat_m&); // assignment with copy bigint& operator()(long i, long j) const; // returns ref to (i,j) entry mat_m slice(long,long,long=-1,long=-1) const;// returns submatrix bigint sub(long i, long j) const; // returns the (i,j) entry vec_m row(long i) const; // returns row i (as a vector) vec_m col(long j) const; // returns col j (as a vector) void set(long i, long j, const bigint& x); // sets the (i,j) entry to x void add(long i, long j, const bigint& x); // adds x to the (i,j) entry void setrow(long i, const vec_m& v); void setcol(long i, const vec_m& v); void swaprows(long r1, long r2); void multrow(long r, const bigint& scal); void divrow(long r, const bigint& scal); void clearrow(long r); mat_m& operator+=(const mat_m&); mat_m& operator-=(const mat_m&); mat_m& operator*=(const bigint&); mat_m& operator/=(const bigint&); // shortens to a matrix o ints or longs if possible //the parameter here is a dummy just to distinguish these mat_i shorten(int) const; mat_l shorten(long) const; // non-member (friend) functions and operators friend long nrows(const mat_m&); friend long ncols(const mat_m&); friend mat_m operator*(const mat_m&, const mat_m&); friend vec_m operator*(const mat_m&, const vec_m&); friend int operator==(const mat_m&, const mat_m&); friend ostream& operator<< (ostream&s, const mat_m&); friend istream& operator>> (istream&s, mat_m&); friend mat_m colcat(const mat_m& a, const mat_m& b); friend mat_m rowcat(const mat_m& a, const mat_m& b); friend mat_m directsum(const mat_m& a, const mat_m& b); friend void elimrows(mat_m& m, long r1, long r2, long pos); //plain elimination, no clearing friend void elimrows1(mat_m& m, long r1, long r2, long pos); //elimination + clearing friend void elimrows2(mat_m& m, long r1, long r2, long pos, const bigint& last); //elimination + divide by last pivot friend mat_m echelon0(const mat_m& m, vec_i& pcols, vec_i& npcols, long& rk, long& ny, bigint& d); friend void elimp(const mat_m& m, long r1, long r2, long pos, const bigint& pr); friend mat_m echmodp(const mat_m& m, vec_i& pcols, vec_i& npcols, long& rk, long& ny, const bigint& pr); friend msubspace combine(const msubspace& s1, const msubspace& s2); friend mat_m restrict_mat(const mat_m& m, const msubspace& s); friend msubspace lift(const msubspace& s, const bigint& pr, int =0); friend msubspace pcombine(const msubspace& s1, const msubspace& s2, const bigint& pr); friend mat_m prestrict(const mat_m& m, const msubspace& s, const bigint& pr); friend mat_m matmulmodp(const mat_m&, const mat_m&, const bigint& pr); // Implementation private: long nro,nco; bigint * entries; // stored in one array, by rows }; // Declaration of non-friend functions mat_m operator+(const mat_m&); // unary mat_m operator-(const mat_m&); // unary mat_m operator+(const mat_m& m1, const mat_m& m2); mat_m operator-(const mat_m& m1, const mat_m& m2); mat_m operator*(const bigint& scal, const mat_m& m); mat_m operator/(const mat_m& m, const bigint& scal); int operator!=(const mat_m& m1, const mat_m& m2); mat_m midmat(long n); // = multi-idmat mat_m transpose(const mat_m& m); mat_m submatrix(const mat_m& m, const vec_i& iv, const vec_i& jv); mat_m echelon(const mat_m& m, vec_i& pcols, vec_i& npcols, long& rk, long& ny, bigint& d, int method=0); mat_m echelon(const mat_m& m, vec_l& pcols, vec_l& npcols, long& rk, long& ny, bigint& d, int method=0); long rank(const mat_m&); long nullity(const mat_m&); bigint trace(const mat_m&); vector charpoly(const mat_m&); bigint determinant(const mat_m&); mat_m addscalar(const mat_m&, const bigint&); vec_m apply(const mat_m&, const vec_m&); #endif eclib-2013-01-01/libsrc/eclib/curvesort.h0000644000175200017520000000730211774563612014657 00000000000000// FILE CURVESORT.H: isogeny class id codes etc ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #define USE_NEW_CODE_LETTERS int BA[] = {1,0}; int ACB[] = {0,2,1}; int BAC[] = {1,0,2}; int BCA[] = {1,2,0}; int CAB[] = {2,0,1}; int CBA[] = {2,1,0}; int ABDC[] = {0,1,3,2}; int ACBD[] = {0,2,1,3}; int ACDB[] = {0,2,3,1}; int ADBC[] = {0,3,1,2}; int ADCB[] = {0,3,2,1}; int BACD[] = {1,0,2,3}; int BADC[] = {1,0,3,2}; int BCAD[] = {1,2,0,3}; int BCDA[] = {1,2,3,0}; int BDAC[] = {1,3,0,2}; int CABD[] = {2,0,1,3}; int CBAD[] = {2,1,0,3}; int CDAB[] = {2,3,0,1}; int CDBA[] = {2,3,1,0}; int DABC[] = {3,0,1,2}; int DACB[] = {3,0,2,1}; int DBAC[] = {3,1,0,2}; int DCAB[] = {3,2,0,1}; int AEBDC[] = {0,4,1,3,2}; int AECBD[] = {0,4,2,1,3}; int AEDCB[] = {0,4,3,2,1}; int BCADE[] = {1,2,0,3,4}; int BCAED[] = {1,2,0,4,3}; int BEACD[] = {1,4,0,2,3}; int BECAD[] = {1,4,2,0,3}; int CEADB[] = {2,4,0,3,1}; int CABDE[] = {2,0,1,3,4}; int CEDAB[] = {2,4,3,0,1}; int CEDBA[] = {2,4,3,1,0}; int DAECB[] = {3,0,4,2,1}; int DCAEB[] = {3,2,0,4,1}; int DBCAE[] = {3,1,2,0,4}; int EABDC[] = {4,0,1,3,2}; int EACBD[] = {4,0,2,1,3}; int EBCAD[] = {4,1,2,0,3}; int EDACB[] = {4,3,0,2,1}; int ADECFB[] = {0,3,4,2,5,1}; int AECDBF[] = {0,4,2,3,1,5}; int BADECF[] = {1,0,3,4,2,5}; int BDAECF[] = {1,3,0,4,2,5}; int BFADCE[] = {1,5,0,3,2,4}; int CABEDF[] = {2,0,1,4,3,5}; int CAFBDE[] = {2,0,5,1,3,4}; int CEABDF[] = {2,4,0,1,3,5}; int DABFEC[] = {3,0,1,5,4,2}; int DCABEF[] = {3,2,0,1,4,5}; int EABCDF[] = {4,0,1,2,3,5}; int EBACDF[] = {4,1,0,2,3,5}; int ECABDF[] = {4,2,0,1,3,5}; int AEDBGFC[] = {0,4,3,1,6,5,2}; int AFGDEBC[] = {0,5,6,3,4,1,2}; int ECFBDGA[] = {4,2,5,1,3,6,0}; int EFCAGDB[] = {4,5,2,0,6,3,1}; int EFGCABD[] = {4,5,6,2,0,1,3}; int FGACBED[] = {5,6,0,2,1,4,3}; int FGBDACE[] = {5,6,1,3,0,2,4}; int FGDBAEC[] = {5,6,3,1,0,4,2}; int FGDBEAC[] = {5,6,3,1,4,0,2}; int FGDEABC[] = {5,6,3,4,0,1,2}; int AGBDEFHC[] = {0,6,1,3,4,5,7,2}; int AFHCGDEB[] = {0,5,7,2,6,3,4,1}; int BECADFGH[] = {1,4,2,0,3,5,6,7}; int EGBAFHCD[] = {4,6,1,0,5,7,2,3}; int GBEAHDFC[] = {6,1,4,0,7,3,5,2}; int booknumber0(int level, int form); // permutes numbers starting from 0 const char alphabet[] = "abcdefghijklmnopqrstuvwxyz"; int booknumber(int level, int form); // permutes numbers starting from 1 // new-new codes (from 01.08.05) are: // a,b,...,z,ba,bb,...,bz,ca,cb,... etc., i.e. straight base 26 with // digits a=0, b=1, ..., z=25 // Function to convert new code to integer (from 0) for any length of code. // NB N=176400 has 516 < 26^2 newforms, with codes from a to vt! int codeletter_to_int(string code); // i counts from 0! // Function to convert integer (from 0) to new code string new_codeletter(int i); // i counts from 0! #ifdef USE_NEW_CODE_LETTERS inline string codeletter(int i) {return new_codeletter(i);} #else inline string codeletter(int i) {return old_codeletter(i);} #endif eclib-2013-01-01/libsrc/eclib/p2points.h0000644000175200017520000001103211774563612014374 00000000000000// p2points.h: declarations of P2Point class for points in P^2(Q) ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // allow for multiple includes #ifndef _P2POINT_ #define _P2POINT_ #include "bigrat.h" // // class for points in P^2(Q), used as base for points on elliptic curves etc. // class P2Point{ friend class Point; bigint X ; // homogeneous coordinates bigint Y ; bigint Z ; void reduce(); //divide out coordinate gcd public: // constructors P2Point(void) // not a real point { X=0; Y=0; Z=0;} P2Point(const bigint& x, const bigint& y, const bigint& z) : X(x), Y(y), Z(z) { reduce(); } P2Point(const bigint& x, const bigint& y, long z) : X(x), Y(y), Z(BIGINT(z)) { reduce(); } P2Point(const bigint& x, long y, long z) : X(x), Y(BIGINT(y)), Z(BIGINT(z)) { reduce(); } P2Point(long x, long y, long z) : X(BIGINT(x)), Y(BIGINT(y)), Z(BIGINT(z)) { reduce(); } P2Point(const bigint& x, const bigint& y) : X(x), Y(y), Z(BIGINT(1)) { ; } // no need to reduce /* The following creates ambiguities owing to the bigint->bigrational coercion P2Point(const bigrational& x, const bigrational& y) : X(num(x)*den(y)), Y(num(y)*den(x)), Z(den(x)*den(y)) { reduce(); } */ P2Point(const P2Point& Q) :X(Q.X), Y(Q.Y), Z(Q.Z) { ; } ~P2Point(void) {;} // input and output friend inline ostream& operator<<(ostream & os, const P2Point& P) {return os << "[" << P.X << ":" << P.Y << ":" << P.Z << "]" ;} friend inline void output_pari(ostream&os, const P2Point& P) { bigint xp=P.X, yp=P.Y, zp=P.Z; if(is_zero(zp)) {os<<"[0]"; return;} if(is_one(zp)) {os<<"["<>(istream & is, P2Point& P); // test of equality of points int operator==(const P2Point& Q) const { return eq(*this,Q); } int operator!=(const P2Point& Q) const { return !(*this == Q); } friend int eq(const P2Point&P, const P2Point&Q); // assignment (p.init(.) is quicker than p=P2Point(.) for existing p) void init(const bigint& x, const bigint& y, const bigint& z) {X=x; Y=y; Z=z; reduce(); } void init(const bigint& x, const bigint& y) {X=x; Y=y; Z = BIGINT(1); } void operator=(const P2Point& Q) // P1 = P2 { X=Q.X ; Y=Q.Y; Z=Q.Z; } // Coordinate transforms useful for elliptic curve points friend P2Point scale(const P2Point& P, const bigint& u, int back=0); friend P2Point scale(const P2Point& P, long u=1, int back=0); friend P2Point shift(const P2Point& P, const bigint& r, const bigint& s, const bigint& t, int back=0); friend P2Point transform(const P2Point& P, const bigint& u, const bigint& r, const bigint& s, const bigint& t, int back=0); void getcoordinates(bigint& x, bigint& y, bigint& z) const {x=X; y=Y; z=Z; } void getaffinecoordinates(bigrational& x, bigrational& y) const {x=bigrational(X,Z); y=bigrational(Y,Z); } void getrealcoordinates(bigfloat&x, bigfloat& y) const; friend inline bigint getX(const P2Point& p) {return p.X; } friend inline bigint getY(const P2Point& p) {return p.Y; } friend inline bigint getZ(const P2Point& p) {return p.Z; } int isintegral() const { return Z==BIGINT(1); } int isinfinite() const { return Z==BIGINT(0); } }; // end of p2point class // the real x and y coords of the point inline void realify_point(const P2Point& P, bigfloat&x, bigfloat& y) { P.getrealcoordinates(x,y); } // end of file: p2points.h #endif eclib-2013-01-01/libsrc/eclib/sub.h0000644000175200017520000000657611774563612013430 00000000000000// sub.h: declaration of class subspace ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // SCALAR_OPTION must be set to 1 or 2 by including file class subspace { public: // constructors subspace(int n=0); subspace(const mat& b, const vec& p, scalar d); subspace(const subspace& s); // destructor ~subspace(); // assignment void operator=(const subspace& s); // member functions & operators inline void clear() { pivots.init(); basis.init();} inline scalar den() const {return denom;} // the denominator inline vec pivs() const {return pivots;} // the pivot vector inline mat bas() const {return basis;} // the basis matrix // non-member (friend) functions and operators friend int dim(const subspace& s); // the dimension friend scalar denom(const subspace& s); // the denominator friend vec pivots(const subspace& s);// the pivot vector friend mat basis(const subspace& s) ;// the basis matrix friend subspace combine(const subspace& s1, const subspace& s2); friend mat restrict_mat(const mat& m, const subspace& s, int cr); friend subspace pcombine(const subspace& s1, const subspace& s2, scalar pr); friend mat prestrict(const mat& m, const subspace& s, scalar pr, int cr); friend subspace lift(const subspace& s, scalar pr, int trace); // Implementation private: scalar denom; vec pivots; mat basis; }; // Declarations of nonmember, nonfriend operators and functions: mat expressvectors(const mat& m, const subspace& s); subspace kernel(const mat& m, int method=0); subspace image(const mat& m, int method=0); subspace eigenspace(const mat& m, scalar lambda, int method=0); subspace subeigenspace(const mat& m, scalar l, const subspace& s, int method=0); //The following work with subspaces "mod p" using "echmodp" from //matrix.h/cc to do gaussian elimination. The "denom" of each is 1. subspace oldpkernel(const mat& m, scalar pr); subspace pkernel(const mat& m, scalar pr); subspace pimage(const mat& m, scalar pr); subspace peigenspace(const mat& m, scalar lambda, scalar pr); subspace psubeigenspace(const mat& m, scalar l, const subspace& s, scalar pr); inline int dim(const subspace& s) {return ncols(s.basis);} // the dimension inline scalar denom(const subspace& s) {return s.denom;} // the denominator inline vec pivots(const subspace& s) {return s.pivots;} // the pivot vector inline mat basis(const subspace& s) {return s.basis;} // the basis matrix eclib-2013-01-01/libsrc/eclib/interface.h0000644000175200017520000002110412071067052014543 00000000000000// interface.h: used to provide common interface for LiDIA or NTL ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // The following macro switches can be used: it is best to define them // in Makefiles rather than changing this file. // 1. NTL_INTS Use NTL for bigints (no bigrationals) // 2. NTL_ALL Use NTL also for bigfloats (RR) and bigcomplexes (CC) // 3. (neither) Defaults to NTL_ALL #ifndef _INTERFACE_H_ #define _INTERFACE_H_ #ifdef NTL_ALL #define NTL_INTS #define MPFP #endif #include #include #include #include #include #include #include #include //#include #include #include using namespace std; #include "templates.h" #ifndef MININT #define MININT numeric_limits::min() #endif #ifndef MINLONG #define MINLONG numeric_limits::min() #endif #ifndef MAXINT #define MAXINT numeric_limits::max() #endif #ifndef MAXLONG #define MAXLONG numeric_limits::max() #endif // integers and rationals // Some of the following were defined for compatibility with LiDIA, which is no longer supported #include #include using namespace NTL; #define bigint ZZ //#define bigrational QQ // not defined in NTL #define BIGINT(val) to_ZZ(val) inline bigint atoI(const char* s) {return to_ZZ(s);} inline int odd(const int& a) {return a&1;} inline int even(const int& a) {return !(a&1);} inline int odd(const long& a) {return a&1;} inline int even(const long& a) {return !(a&1);} inline int is_zero(const bigint& x) {return IsZero(x);} inline int is_positive(const bigint& x) {return sign(x)>0;} inline int is_negative(const bigint& x) {return sign(x)<0;} inline int is_one(const bigint& x) {return IsOne(x);} inline int odd(const bigint& a) {return IsOdd(a);} inline int even(const bigint& a) {return !IsOdd(a);} inline void rshift(const bigint& a, long i, bigint& c) {RightShift(c,a,i);} inline void lshift(const bigint& a, long i, bigint& c) {LeftShift(c,a,i);} #ifdef setbit #undef setbit #endif inline void setbit(bigint& a, int e) {SetBit(a,e);} inline long lg(const bigint& x) {return NumBits(x)-1;} inline int is_long(const bigint& a) {return (a<=MAXLONG)&&(a>=MINLONG);} inline int is_int(const bigint& a) {return (a<=MAXINT)&&(a>=MININT);} // The following are not in NTL & need defining int I2int(const bigint& x); // too long to inline long I2long(const bigint& x); // too long to inline inline double I2double(const bigint& x) {return to_double(x);} inline void longasI(long& a, const bigint& x) {a = I2long(x);} inline void negate(bigint& a) {a=-a;} inline void sqrt(bigint& a, const bigint& b) {SqrRoot(a,b);} inline bigint sqrt(const bigint& a) {bigint b; sqrt(b,a); return b;} inline void square(bigint& a, const bigint& b) {sqr(a,b);} inline bigint gcd(const bigint& a, const bigint& b) {return GCD(a,b);} inline bigint lcm(const bigint& a, const bigint& b) {if (IsZero(a) && IsZero(b)) return ZZ::zero(); else return a*(b/GCD(a,b));} // In NTL add, sub, mul, div are defined with result in first place inline void addx(const bigint& a, const bigint& b, bigint& c) {add(c,a,b);} inline void subx(const bigint& a, const bigint& b, bigint& c) {sub(c,a,b);} inline void divx(const bigint& a, const bigint& b, bigint& c) {div(c,a,b);} inline void mulx(const bigint& a, const bigint& b, bigint& c) {mul(c,a,b);} inline bigint pow(const bigint& a, long e) {return power(a,e);} //N.B. no power to bigint exponent in NTL inline long jacobi(const bigint& a, const bigint& p) {return Jacobi(a,p);} inline void sqrt_mod_p(bigint & x, const bigint & a, const bigint & p) {SqrRootMod(x,a,p); if(x>(p-x)) x= p-x;} inline void power_mod(bigint& ans, const bigint& base, const bigint& expo, const bigint& m) {PowerMod(ans,base,expo,m);} inline void nearest(bigint& c, const bigint& a, const bigint& b) {bigint a0=(a%b); c = (a-a0)/b; if(2*a0>b) c+=1;} inline bigint roundover(const bigint& a, const bigint& b) {bigint a0=(a%b); bigint c = (a-a0)/b; if(2*a0>b) c+=1; return c;} #define bigint_mod_long(a,m) (a%m) // Reals and Complexes #ifdef NTL_ALL #include #define bigfloat RR RR Pi(); RR Euler(); RR atan(const RR&); RR asin(const RR&); inline RR pow(const RR& a, int e) {return power(a,e);} inline RR pow(const RR& a, long e) {return power(a,e);} namespace NTL { inline RR cosh(const RR& x) {return (exp(x)+exp(-x))/2;} inline RR sinh(const RR& x) {return (exp(x)-exp(-x))/2;} inline RR tan(const RR& x) {return sin(x)/cos(x);} RR atan2(const RR&, const RR&); inline int is_approx_zero(const RR& x) // {return abs(x)=0) return 0; // cout<<"x="< typedef complex CC; #define bigcomplex CC inline void set_precision(long n) {RR::SetPrecision(long(n*3.33));RR::SetOutputPrecision(n);} inline void set_precision(const string prompt) {long n; cerr<>n; set_precision(n);} inline long decimal_precision() {return long(RR::precision()*0.3);} inline int is_approx_zero(const bigcomplex& z) {return is_approx_zero(z.real())&&is_approx_zero(z.imag());} inline RR to_bigfloat(const int& n) {return to_RR(n);} inline RR to_bigfloat(const long& n) {return to_RR(n);} inline RR to_bigfloat(const double& x) {return to_RR(x);} inline RR I2bigfloat(const bigint& x) { return to_RR(x);} inline int doublify(const bigfloat& x, double& d){ d=to_double(x); return 0;} inline long longify(bigfloat x) {return to_long(x);} inline int is_zero(bigfloat x) {return IsZero(x);} inline int is_zero(bigcomplex z) {return IsZero(z.real()) && IsZero(z.imag());} inline void Iasb(bigint& a, bigfloat x) {RoundToZZ(a,x);} inline void Iasb(long& a, bigfloat x) {ZZ n; RoundToZZ(n,x); a=I2long(n);} istream& operator>>(istream& is, CC& z); inline CC pow(const CC& a, int e) {return exp(to_RR(e)*log(a));} inline CC pow(const CC& a, long e) {return exp(to_RR(e)*log(a));} inline CC pow(const CC& a, const RR& e) {return exp(e*log(a));} ////////////////////////////////////////////////////////////////// #else // C doubles and libg++ Complexes ////////////////////////////////////////////////////////////////// // reals #define bigfloat double inline long decimal_precision() {return 15;} inline int is_zero(double x) {return fabs(x)<1e-15;} inline int is_approx_zero(double x) {return fabs(x)<1e-10;} inline void set_precision(long n) {cout.precision(n);} inline void set_precision(const string prompt) {cout.precision(15);} #define Pi() (3.1415926535897932384626433832795028841) #define Euler() (0.57721566490153286060651209008240243104) inline double round(double x) {return floor(x+0.5);} inline void Iasb(long& a, double x) {a = (long)x;} inline long longify(double x) {return (long)x;} inline int doublify(const bigfloat& x, double& d) {d=x; return 0;} inline double to_bigfloat(const int& n) {return double(n);} inline double to_bigfloat(const long& n) {return double(n);} inline double to_bigfloat(const double& x) {return x;} inline bigfloat I2bigfloat(const bigint& x) {return I2double(x);} // complexes #include #define bigcomplex complex inline int is_zero(const bigcomplex& z) {return is_zero(z.real())&&is_zero(z.imag());} inline int is_approx_zero(const bigcomplex& z) {return is_approx_zero(z.real())&&is_approx_zero(z.imag());} ////////////////////////////////////////////////////////////////// #endif // NTL_ALL ////////////////////////////////////////////////////////////////// #undef setbit #endif // #define _INTERFACE_H_ eclib-2013-01-01/libsrc/eclib/fixc6.h0000644000175200017520000000432611774563612013645 00000000000000// file fixc6.h: declaration of class for "fixing" large c6 values ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Background: for curves with large c6, the value cannot be computed // with sufficient precision without using multiprecision floating // point arithmetic, which slows down all the other cases // unnecessarily. To avoid this, after first computing the "correct" // c6 value once in multiprecision, we add that value to a table // indexed by (level, form#), and look up in the table when we need // the value. // The fixc6 class has two static data members, of type map< // pair, bigint> such that an entry ((N,i),c6) or ((N,i),c4) // says that the c6 or c4 value for form i at level N is c6 or c4. Of // course, for most (N,i) pairs this is blank -- and we must avoid // inserting wrong dummy entries of the form ((N,i),0). // April 2005: added facility for fixing c4 as well as c6, but the // class name is unchanged class fixc6 { static map< pair, bigint > fixc4table; static map< pair, bigint > fixc6table; public: fixc6(); // global initializer, see fixc6.cc void operator()(long N, int i, bigint& c4, bigint& c6); // look up value, changes c4 and/or c6 if there's an entry in the table, // otherwise leaves unchanged }; extern fixc6 c4c6fixer; // the one and only instance of the class eclib-2013-01-01/libsrc/eclib/svector.h0000644000175200017520000000424011774563612014306 00000000000000// svector.h: manage declarations for sparse integer vector classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_SVECTOR_H) #define _SVECTOR_H 1 //flags that this file has been included #include "vector.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #include "svec.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #include "svec.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim // SCALAR_OPTION may be set to 1 or 2 by user #if (SCALAR_OPTION==1) #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #else #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #endif // else user must use the unabbreviated names #endif eclib-2013-01-01/libsrc/eclib/getcurve.h0000644000175200017520000000227511774563612014453 00000000000000// getcurve.h: declaration of function getcurve() for curve input ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Read in a curve as [a1,a2,a3,a4,a6] with ai integers: int getcurve(Curvedata& CD, int verb); // Read in a curve as [a1,a2,a3,a4,a6] with ai rational: int getcurve(vector& ai, int verb); eclib-2013-01-01/libsrc/eclib/curve.h0000644000175200017520000002634611774563612013760 00000000000000// curve.h: declarations of elliptic curve classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // originally adapted from Elliptic.h by Oisin McGuiness // allow for multiple includes #ifndef _ELLIPTIC_ #define _ELLIPTIC_ #include "p2points.h" #include class Curve; class Curvedata; class CurveRed; class Point; class IsogenyClass; //general test: int valid_invariants(const bigint& c4, const bigint& c6); //true if valid void c4c6_to_ai(const bigint& c4, const bigint& c6, bigint& a1, bigint& a2, bigint& a3, bigint& a4, bigint& a6, bigint& b2, bigint& b4, bigint& b6, bigint& b8); void c4c6_to_ai(const bigint& c4, const bigint& c6, bigint& a1, bigint& a2, bigint& a3, bigint& a4, bigint& a6); void minimise_c4c6(const bigint& c4, const bigint& c6, const bigint& discr, bigint& newc4, bigint& newc6, bigint& newdiscr, bigint& u); // // base class for bare elliptic curve // class Curve{ friend class Point; friend class IsogenyClass; public: int isnull() const {return ((a1==0)&&(a2==0)&&(a3==0)&&(a4==0)&&(a6==0));} void getai(bigint& aa1, bigint& aa2, bigint& aa3, bigint& aa4, bigint& aa6) const {aa1=a1; aa2=a2; aa3=a3; aa4=a4; aa6=a6; } // input and output void output(ostream& os) const { os<<"["<& qai, bigint& scale); Curvedata(const Curve& c, int min_on_init = 0); Curvedata(const bigint& cc4, const bigint& cc6, int min_on_init = 0); Curvedata(const Curvedata& c, int min_on_init = 0); // nb compiler cannot generate copy because constructor from // curve overrides. // But default assign, destruct suffice void operator=(const Curvedata& c); void minimalize(); // Changes self in situ void factor_discr() {if(!discr_factored){ the_bad_primes=pdivs(discr); discr_factored=1; }} Curvedata minimalize(bigint& u, bigint& r, bigint& s, bigint& t) const; // Self unchanged and returns transformation void transform(const bigint& r, const bigint& s, const bigint& t); // NB u = 1; // the more general case is not implemented here void output(ostream& os) const; void input(istream& is); long get_ntorsion(); // implemented in points.cc void getbi(bigint& bb2, bigint& bb4, bigint& bb6, bigint& bb8) const {bb2=b2; bb4=b4; bb6=b6; bb8=b8; } void getci(bigint& cc4, bigint& cc6) const {cc4=c4; cc6=c6; } friend inline bigint getb2(const Curvedata& c) {return c.b2; } friend inline bigint getb4(const Curvedata& c) {return c.b4; } friend inline bigint getb6(const Curvedata& c) {return c.b6; } friend inline bigint getb8(const Curvedata& c) {return c.b8; } friend inline bigint getc4(const Curvedata& c) {return c.c4; } friend inline bigint getc6(const Curvedata& c) {return c.c6; } friend inline bigint getdiscr(const Curvedata& c) {return c.discr; } friend inline int getconncomp(const Curvedata& c) {return c.conncomp; } friend inline vector getbad_primes(Curvedata& c) { if(!c.discr_factored) c.factor_discr(); return c.the_bad_primes; } protected: bigint b2 ; bigint b4 ; bigint b6 ; bigint b8 ; bigint c4 ; bigint c6 ; bigint discr ; int minimal_flag; // 0 if .minimalize() has not been called int discr_factored; // 0 if discr has not yet been factored vector the_bad_primes; //prime divisors of discriminant int conncomp ; // number of components (1 or 2) long ntorsion; // 0 if .gettorsion() not called } ; // function to find "optimal x shift" of a given curve Curvedata opt_x_shift(const Curvedata& C, bigint& k); /* // // further derived class for curve, invariants and periods: // class CurvedataExtra : public Curvedata{ public: CurvedataExtra(const Curvedata&) ; virtual void output(ostream& os) const; void input(istream& is) {cout<<"*** You cannot input a CurvedataExtra -- must be just Curve\n"; abort(); } void getroots(bigfloat& r1, bigfloat& r2, bigfloat& r3) const {r1=roots[0]; r2=roots[1]; r3=roots[2]; } // NB caller should then look at conncomp to see how many are set friend inline bigfloat getperiod(const CurvedataExtra c) {return c.period; } protected: bigfloat roots[3] ; // real two-division points; NB if there's only one, // it is stored in roots[2] bigfloat period ; // smallest real period * conncomp } ; */ // // CurveRed class call Tates algorithm as constructor, // stores the info as member variables // class Kodaira_code just holds an int which "codes" the type as follows: // (this coding originally from R.G.E.Pinch) // // Im -> 10*m // I*m -> 10*m+1 // I, II, III, IV -> 1, 2, 3, 4 // I*, II*. III*, IV* -> 5, 6, 7, 8 // class Kodaira_code { public: int code; // Kodaira_code(int k = 0) : code(k) {;} Kodaira_code(const Kodaira_code& c) : code(c.code) {;} void operator=(int k) {code=k;} void operator=(const Kodaira_code& c) {code=c.code;} friend ostream& operator<<(ostream& os, const Kodaira_code& c); }; // utility function for converting Kodaira codes to the Pari coding // Kodaira Symbol My coding Pari Coding // I0 0 1 // I*0 1 -1 // Im (m>0) 10*m m+4 // I*m (m>0) 10*m+1 -(m+4) // II, III, IV 2, 3, 4 m // II*. III*, IV* 7, 6, 5 -m int PariKodairaCode(Kodaira_code Kod); class Reduction_type { public: int ord_p_discr; int ord_p_N; int ord_p_j_denom; Kodaira_code Kcode; // NB the constructor makes this from an int int c_p; int local_root_number; // Reduction_type(int opd=0, int opN=0, int opj=0, int kc=1, int cp=1, int rno=0) : ord_p_discr(opd), ord_p_N(opN), ord_p_j_denom(opj), Kcode(kc), c_p(cp), local_root_number(rno) {} void operator=(const Reduction_type& r) {ord_p_discr=r.ord_p_discr;ord_p_N=r.ord_p_N;ord_p_j_denom=r.ord_p_j_denom; Kcode=r.Kcode;c_p=r.c_p; local_root_number=r.local_root_number;} }; inline ostream& operator<<(ostream& os, const Reduction_type& R); class CurveRed : public Curvedata { friend class IsogenyClass; protected: map reduct_array; // maps p -> its reduction type bigint N; //the conductor public: CurveRed() : Curvedata() {N=0;} CurveRed(const Curvedata& E); // construct by Tate's algorithm // arg E need not be minimal, but the reduced form will be ~CurveRed(); CurveRed(const CurveRed& E); void operator=(const CurveRed& E); // The full display function is not const, since if called they will // compute and set the local root numbers if necessary void display(ostream& os); // full output void output(ostream& os) const; // just the curvedata and conductor private: // functions for setting local root numbers: int neron(long p, int kod); // p = 2 or 3 void setLocalRootNumber(const bigint& p); void setLocalRootNumber2(); void setLocalRootNumber3(); void setLocalRootNumber_not_2_or_3(const bigint& p); public: // member access functions: friend inline vector getbad_primes(const CurveRed& c) {return c.the_bad_primes; } friend inline bigint getconductor(const CurveRed& c) {return c.N; } friend int getord_p_discr(const CurveRed& c, const bigint& p); friend int getord_p_N(const CurveRed& c, const bigint& p); friend int getord_p_j_denom(const CurveRed& c, const bigint& p); friend int getc_p(const CurveRed& c, const bigint& p); friend int prodcp(const CurveRed& c); friend int LocalRootNumber(CurveRed& c, const bigint& p); friend int GlobalRootNumber(CurveRed& c); friend Kodaira_code getKodaira_code(const CurveRed& c, const bigint& p); // the returned value casts as a character array; to use coded as int, // say declared Kodaira_code Kc, just use public member Kc.code friend bigint Trace_Frob(CurveRed& c, const bigint& p); }; inline ostream& operator<<(ostream& os, const Curve& c) { c.output(os); return os; } inline ostream& operator<<(ostream& os, const Curvedata& c) { c.output(os); return os; } inline ostream& operator<<(ostream& os, const CurveRed& c) { c.output(os); return os; } inline istream& operator>>(istream& is, Curve& c) { c.input(is); return is ; } inline istream& operator>>(istream& is, Curvedata& c) { c.input(is); return is ; } //Reads the curve (ai) and computes the rest. inline int GlobalRootNumber(const Curvedata& E) { CurveRed C(E); return GlobalRootNumber(C); } // end of file: curve.h #endif eclib-2013-01-01/libsrc/eclib/mat.h0000644000175200017520000001440512071067052013372 00000000000000// mat.h: declarations for integer matrix classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Not to be included directly by user: use matrix.h // // SCALAR_OPTION must be set to 1 or 2 by including file #ifndef LONG_MIN #define LONG_MIN (-LONG_MAX-1) #endif #ifndef INT_MIN #define INT_MIN (-INT_MAX-1) #endif class mat { friend class subspace; friend class mat_m; friend class smat; friend class svec; friend class smat_elim; public: // constructors mat(long nr=0, long nc=0); mat(const mat&); // copy constructor // destructor ~mat(); // member functions & operators void init(long nr=0, long nc=0); mat& operator=(const mat&); // assignment with copy scalar& operator()(long i, long j) const; // returns ref to (i,j) entry mat slice(long,long,long=-1,long=-1) const;// returns submatrix scalar sub(long i, long j) const; // returns the (i,j) entry vec row(long i) const; // returns row i (as a vec) vec col(long j) const; // returns col j (as a vec) void set(long i, long j, scalar x); // sets the (i,j) entry to x void add(long i, long j, scalar x); // adds x to the (i,j) entry void setrow(long i, const vec& v); void setcol(long i, const vec& v); void swaprows(long r1, long r2); void multrow(long r, scalar scal); void divrow(long r, scalar scal); void clearrow(long r); mat& operator+=(const mat&); mat& operator-=(const mat&); mat& operator*=(scalar); mat& operator/=(scalar); const scalar* get_entries()const{return entries;} void output(ostream&s=cout) const; void output_pari(ostream&s=cout) const; void output_pretty(ostream&s=cout) const; void dump_to_file(string filename) const; // binary output void read_from_file(string filename); // binary input // non-member (friend) functions and operators friend long nrows(const mat&); friend long ncols(const mat&); friend void add_row_to_vec(vec& v, const mat& m, long i); friend void sub_row_to_vec(vec& v, const mat& m, long i); friend mat operator*(const mat&, const mat&); friend vec operator*(const mat&, const vec&); friend int operator==(const mat&, const mat&); friend istream& operator>> (istream&s, mat&); friend mat colcat(const mat& a, const mat& b); friend mat rowcat(const mat& a, const mat& b); friend mat directsum(const mat& a, const mat& b); friend void elimrows(mat& m, long r1, long r2, long pos); //plain elimination, no clearing friend void elimrows1(mat& m, long r1, long r2, long pos); //elimination + clearing friend void elimrows2(mat& m, long r1, long r2, long pos, scalar last); //elimination + divide by last pivot friend mat echelon0(const mat& m, vec& pcols, vec& npcols, long& rk, long& ny, scalar& d); friend mat echelonl(const mat& m, vec& pcols, vec& npcols, long& rk, long& ny, scalar& d); friend void elimp(const mat& m, long r1, long r2, long pos, scalar pr); friend void elimp1(const mat& m, long r1, long r2, long pos, scalar pr); friend mat echelonp(const mat& m, vec& pcols, vec& npcols, long& rk, long& ny, scalar& d, scalar pr); friend mat echmodp(const mat& m, vec& pcols, vec& npcols, long& rk, long& ny, scalar pr); friend mat echmodp_uptri(const mat& m, vec& pcols, vec& npcols, long& rk, long& ny, scalar pr); friend mat ref_via_flint(const mat& M, vec& pcols, vec& npcols, long& rk, long& ny, scalar pr); friend subspace combine(const subspace& s1, const subspace& s2); friend mat restrict_mat(const mat& m, const subspace& s, int cr); friend mat liftmat(const mat& mm, scalar pr, scalar& dd, int trace=0); friend subspace lift(const subspace& s, scalar pr, int trace=0); friend subspace pcombine(const subspace& s1, const subspace& s2, scalar pr); friend mat prestrict(const mat& m, const subspace& s, scalar pr, int cr); friend mat matmulmodp(const mat&, const mat&, scalar pr); friend mat echmodp_d(const mat& mat, vec& pcols, vec& npcols, long& rk, long& ny, double pr); friend double sparsity(const mat& m); // Implementation private: long nro,nco; scalar * entries; // stored in one array, by rows }; // Declaration of non-friend functions inline ostream& operator<< (ostream&s, const mat&m) {m.output(s); return s;} mat operator+(const mat&); // unary mat operator-(const mat&); // unary mat operator+(const mat& m1, const mat& m2); mat operator-(const mat& m1, const mat& m2); mat operator*(scalar scal, const mat& m); mat operator/(const mat& m, scalar scal); int operator!=(const mat& m1, const mat& m2); mat idmat(scalar n); mat transpose(const mat& m); mat submat(const mat& m, const vec& iv, const vec& jv); mat echelon(const mat& m, vec& pcols, vec& npcols, long& rk, long& ny, scalar& d, int method=0); // default method 0: scalars long rank(const mat&); long nullity(const mat&); long trace(const mat&); vector charpoly(const mat&); long determinant(const mat&); mat addscalar(const mat&, scalar); vec apply(const mat&, const vec&); eclib-2013-01-01/libsrc/eclib/lambda.h0000644000175200017520000000356511774563612014052 00000000000000// lambda.h Declarations of functions which compute Silverman's ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // finite set Lambda_bad for a curve // N.B. (1) Uses my height normalization, double S's. // (3) Uses the local height normalization WITHOUT the log|Delta| // (2) Intended for use in computing Heegner points (not yet implemented) vector lambda_bad_1(const bigint& p, long kcode, long npd, long& nlambda); vector lambda_bad(const CurveRed& C, long& nlambda, int verbose=0); // kcode is Kodaira Code with usual coding 10*n for I_n, 10*m+1 for I*_m, // 1,2,3,4,5,6,7 for I,II,III,IV,IV*.III*,II* respectively // caller must delete returned array; first nlambda entries are filled. int make_point_from_x(Curvedata* CD, const bigint& a, const bigint& d, Point* P); int make_point_from_x(Curvedata* CD, const bigfloat& x, long maxdd, Point* P); int make_point_from_x_and_ht(Curvedata* CD, vector lambdas, const bigfloat& xp, const bigfloat& ht, Point* P); eclib-2013-01-01/libsrc/eclib/moddata.h0000644000175200017520000000456211774563612014241 00000000000000// FILE MODDATA.H: Declaration of class moddata ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include "rat.h" #include "xsplit.h" class level { friend class symb; friend class cusplist; friend class oldforms; friend class eigdata; friend class newform; friend class h1newform; friend class summer; //protected: public: // got tired of making everything friends... long modulus; int plusflag; int squarelevel; vector plist,dlist,primelist; long p0; // first good prime long npdivs,ndivs,sqfac,nap; long reduce(long res)const {res%=modulus; return (res<0)?modulus+res:res;} public: level(long n, long neigs=20); }; class moddata :public level { protected: long phi,psi,nsymb1,nsymb2; vector invlist,noninvlist,noninvdlist,dstarts,gcdtable,unitdivlist; long code(long res) const {return invlist[reduce(res)];} public: long nsymb; moddata(long n); //constructor void display() const; void abort(const string mess) const { cout<<"Out of memory ("<& dlist, int info); int new_equiv(quartic* q1, quartic* q2, int info); eclib-2013-01-01/libsrc/eclib/timer.h0000644000175200017520000000252611774563612013746 00000000000000// timer.h: declarations of timer functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _TIMER_H #define _TIMER_H 1 //flags that this file has been included void init_time(); void start_time(); void stop_time(); void show_time(ostream& s = cout); #ifndef TIME_CONICS #define TIME_CONICS 0 #endif void init_conic_timer(); void start_conic_timer(); void stop_conic_timer(); void show_conic_timer(ostream& s = cout); #endif eclib-2013-01-01/libsrc/eclib/bitspace.h0000644000175200017520000000374011774563612014417 00000000000000// bitspace.h: declaration of class bitspace for handling F_2 spaces ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class bitspace { private: long maxdim; long dim; long * pivs; // holds the position of the ith pivot unsigned long * gens; // holds the ith basis element unsigned long bitmask; // holds the bits of the pivs public: bitspace(long d); ~bitspace(); unsigned long getbitmask() {return bitmask;} long reduce(unsigned long& v, long start=0) const; // reduces v mod this, returns minimal i such that the reduced v has // ith bit set, or -1 if v reduces to 0. Assumes already reduced for i= maxsize ) { // cout<<"About to grow list from size "< rational_roots() const; // returns rational roots int trivial() const; // Checks for a rational root long nrootsmod(long p) const; friend ostream& operator<<(ostream& s, const quartic& q); friend int new_equiv(quartic* q1, quartic* q2, int info); friend void qc(quartic& g, const bigint& x0, const bigint& y0, const bigint& z0, Curvedata * E, Curvedata* IJ_curve, const bigint& tr_u, const bigint& tr_r, const bigint& tr_s, const bigint& tr_t, Point& P, int verbose); void dump(ostream& s) const { s<<"Coeffs: ("< solvecubic(const bigcomplex& c1, const bigcomplex& c2, const bigcomplex& c3); vector solvequartic(const bigcomplex& a, const bigcomplex& b, const bigcomplex& c, const bigcomplex& d); vector solverealquartic(const bigfloat& a, const bigfloat& b, const bigfloat& c, const bigfloat& d, const bigfloat& e); vector introotscubic(long a, long b, long c, int& nr); void quadsolve(const bigfloat& p, const bigfloat& q, bigcomplex& root1,bigcomplex& root2); #endif eclib-2013-01-01/libsrc/eclib/templates.h0000644000175200017520000000444211774563612014623 00000000000000// templates.h: some utility functions for vector classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// template inline ostream& operator<<(ostream& os, const vector& v) { os <<"[ "; copy(v.begin(),v.end(), ostream_iterator(cout, " ")); os << "]"; return os; } template inline void vec_out(ostream& os, const vector& v, unsigned int n=0) { unsigned int m=v.size(); bool trunc=0; if((n>0)&&(m>n)) {m=n; trunc=1;} os <<"[ "; copy(v.begin(),v.begin()+m, ostream_iterator(cout, " ")); if(trunc) os << "..."; os << "]"; } template inline ostream& operator<<(ostream& os, const std::set& v) { os <<"{ "; copy(v.begin(),v.end(), ostream_iterator(cout, " ")); os << "}"; return os; } // NB The following will only work properly, giving a result with no // repeats, if the input vectors are sorted! template vector vector_union(const vector& a, const vector& b) { // cout<<"merging "< c; set_union(a.begin(),a.end(),b.begin(),b.end(),inserter(c,c.end())); // cout<<"result is "< int startswith(const vector& a, const vector& b, long l, long from=0) { return equal(a.begin()+from,a.begin()+from+l,b.begin()+from); } eclib-2013-01-01/libsrc/eclib/matrix.h0000644000175200017520000000427511774563612014135 00000000000000// matrix.h: manage declarations of integer matrix classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_MATRIX_H) #define _MATRIX_H 1 //flags that this file has been included #include "vector.h" #include "limits.h" // MAX_INT gcc >= 4.3 #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #include "mat.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #include "mat.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim // SCALAR_OPTION may be set to 1 or 2 by user #if (SCALAR_OPTION==1) #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #else #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #endif // else user must use the unabbreviated names #endif eclib-2013-01-01/libsrc/eclib/mlocsol.h0000644000175200017520000000506511774563612014277 00000000000000// mlocsol.h: declaration of functions for local solubility of quartics ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include "mquartic.h" // Checks for solublility in Qp: int qpsoluble(const quartic& g, const bigint& p); int qpsoluble(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const bigint& p); int qpsoluble(const bigint& a, const bigint& c, const bigint& e, const bigint& p); // latter assumes b=d=0 int Rsoluble(const quartic& g); int Rsoluble(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e); // Checks for local solubility in Qp for all p in plist; //if not, badp will hold the first p for which NOT soluble in Qp: int locallysoluble(const quartic& g, const vector& plist, bigint& badp); int locallysoluble(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const vector& plist, bigint& badp); int locallysoluble(const bigint& a, const bigint& c, const bigint& e, const vector& plist, bigint& badp); // latter assumes b=d=0 /* Samir Siksek's Local Solubility Test for odd p */ int local_sol(const bigint& p,bigint *c, int verbose=0); // Checks for solublility in Qp int new_qpsoluble(const quartic& g, const bigint& p, int verbose=0); int new_qpsoluble(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const bigint& p, int verbose=0); int new_qpsoluble(const bigint& a, const bigint& c, const bigint& e, const bigint& p, int verbose=0); int new_zpsol(const bigint& a,const bigint& b,const bigint& c,const bigint& d, const bigint& e, const bigint& p, int verbose=0); eclib-2013-01-01/libsrc/eclib/GetOpt.h0000644000175200017520000001146011743231305014010 00000000000000/* Getopt for GNU. Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. (Modified by Douglas C. Schmidt for use with GNU G++.) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of `argv' so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable _POSIX_OPTION_ORDER disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #ifndef GetOpt_h #ifdef __GNUG__ #pragma interface #endif #define GetOpt_h 1 #include #include #include class GetOpt { private: /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Describe how to deal with options that follow non-option ARGV-elements. UNSPECIFIED means the caller did not specify anything; the default is then REQUIRE_ORDER if the environment variable _OPTIONS_FIRST is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options. Stop option processing when the first non-option is seen. This is what Unix does. PERMUTE is the default. We permute the contents of `argv' as we scan, so that eventually all the options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code zero. Using `-' as the first character of the list of option characters requests this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return EOF with `optind' != ARGC. */ enum OrderingEnum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }; OrderingEnum ordering; /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; void exchange (char **argv); public: /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ int optind; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr; int nargc; char **nargv; const char *noptstring; GetOpt (int argc, char **argv, const char *optstring); int operator () (void); }; #endif eclib-2013-01-01/libsrc/eclib/minim.h0000644000175200017520000000460311774563612013735 00000000000000// minim.h: declaration of quartic minimization functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// bigint g_content(const bigint& ga, const bigint& gb, const bigint& gc, const bigint& gd, const bigint& ge); // returns largest f s.t. f^2 divides all coeffs bigint root_p(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const bigint& p); // assuming p|I, p|J, returns the unique alpha mod p // modulo which quartic has a root of multiplicity at least 3 // returns -1 if multiple root is at infinity (if a=b=0 mod p) // (program does not actaully use this dubious feature) int minim_p(bigint& ga, bigint& gb, bigint& gc, bigint& gd, bigint& ge, const bigint& p, scaled_unimod& m); // assuming p^4|I, p^6|J, (or stronger conditions when p=2 or p=3) // returns an equivalent quartic with invariants divided by p^4, p^6; // m holds the transformation matrix, must be initialized (say with identity) // returns success, can be 0 only for p=2 int is_nonmin(int smallp, long vpi, long vpj, long vpd, int assume_locsol); // Given vpi = val(p,I) and vpj=val(p,J) returns 1 if non-minimal // smallp = p if p=2,3 else =1. // p=3: needs also vpd=val(p,disc) // p=2: may or may not be minimizable, but worth a try // (The commented out condition is sufficient but NOT necessary) void minim_all(bigint& ga, bigint& gb, bigint& gc, bigint& gd, bigint& ge, bigint& I, bigint& J, const vector& plist, scaled_unimod& m, int assume_locsol, int verb=0); eclib-2013-01-01/libsrc/eclib/version.h0000644000175200017520000000177711774563612014322 00000000000000// version.h: declaration of function show_version() ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // void show_version(); eclib-2013-01-01/libsrc/eclib/rat.h0000644000175200017520000001667012071067052013405 00000000000000// rat.h: declaration of rational number class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_RATIONAL_H) #define _RATIONAL_H 1 //flags that this file has been included #include "arith.h" class rational { friend class bigrational; public: // constructors rational(long num_val=0, long den_val=1); rational(const rational& q); void operator=(const rational& q); // rational manipulations void cancel(); // cancel *this in situ friend long num(const rational&); // the numerator friend long den(const rational&); // the denominator friend rational recip(const rational&); // reciprocal friend long round(const rational&); // nearest integer // Binary Operator Functions friend rational operator+(const rational&, const rational&); friend rational operator+(long, const rational&); friend rational operator+(const rational&, long); friend rational operator-(const rational&, const rational&); friend rational operator-(long, const rational&); friend rational operator-(const rational&, long); friend rational operator*(const rational&, const rational&); friend rational operator*(const rational&, long); friend rational operator*(long, const rational&); friend rational operator/(const rational&, const rational&); friend rational operator/(const rational&, long); friend rational operator/(long, const rational&); friend int operator==(const rational&, const rational&); friend int operator!=(const rational&, const rational&); friend ostream& operator<< (ostream&s, const rational&); friend istream& operator>> (istream& is, rational& r); rational& operator+=(const rational&); rational& operator+=(long); rational& operator-=(const rational&); rational& operator-=(long); rational& operator*=(const rational&); rational& operator*=(long); rational& operator/=(const rational&); rational& operator/=(long); rational operator+() const; rational operator-() const; friend long floor(const rational& r); friend long ceil(const rational& r); operator double(); // conversion operator operator bigfloat(); // conversion operator // Implementation private: long n, d; }; // Inline rational functions inline void rational::cancel() // cancel *this in situ { long g = ::gcd(n,d); if (g>1) {n/=g; d/=g;} if (d<0) {n=-n; d=-d;} } inline rational::rational(long num_val, long den_val) { n=num_val; d=den_val; (*this).cancel(); } inline rational::rational(const rational& q) :n(q.n), d(q.d) {;} inline void rational::operator=(const rational& q) {n=q.n; d=q.d;} inline rational rational::operator+() const { return *this; } inline rational rational::operator-() const { return rational(-n, d); } // Definitions of compound-assignment operator member functions inline rational& rational::operator+=(const rational& q2) { n = n*q2.d+d*q2.n; d *= q2.d; (*this).cancel(); return *this; } inline rational& rational::operator+=(long num_val2) { n += d*num_val2; return *this; } inline rational& rational::operator-=(const rational& q2) { n = n*q2.d-d*q2.n; d *= q2.d; (*this).cancel(); return *this; } inline rational& rational::operator-=(long num_val2) { n -= d*num_val2; return *this; } inline rational& rational::operator*=(long num_val2) { n*=num_val2; (*this).cancel(); return *this; } inline rational& rational::operator/=(long num_val2) { d*=num_val2; (*this).cancel(); return *this; } inline rational::operator double() {return double(n)/double(d);} inline rational::operator bigfloat() {return to_bigfloat(n)/to_bigfloat(d);} // Definitions of non-member rational functions inline long num(const rational& q) { return q.n; } inline long den(const rational& q) { return q.d; } inline rational recip(const rational& q) { return rational(q.d, q.n); } inline long round(const rational& q) { return q.n / q.d; //provisional -- should fix rounding direction. } // Definitions of non-member binary operator functions inline rational operator+(const rational& q1, const rational& q2) { return rational(q1.n*q2.d + q2.n*q1.d, q1.d * q2.d); } inline rational operator+(long num_val1, const rational& q2) { return rational(num_val1*q2.d + q2.n, q2.d); } inline rational operator+(const rational& q1, long num_val2) { return rational(q1.n + num_val2*q1.d, q1.d); } inline rational operator-(const rational& q1, const rational& q2) { return rational(q1.n*q2.d - q2.n*q1.d, q1.d * q2.d); } inline rational operator-(long num_val1, const rational& q2) { return rational(num_val1*q2.d - q2.n, q2.d); } inline rational operator-(const rational& q1, long num_val2) { return rational(q1.n - num_val2*q1.d, q1.d); } inline rational operator*(const rational& q1, long num_val2) { return rational(q1.n*num_val2, q1.d); } inline rational operator*(long num_val1, const rational& q2) { return rational(q2.n*num_val1, q2.d); } inline rational operator*(const rational& q1, const rational& q2) { return rational(q1.n*q2.n, q1.d*q2.d); } inline rational operator/(const rational& q1, long num_val2) { return rational(q1.n, q1.d*num_val2); } inline rational operator/(const rational& q1, const rational& q2) { return rational(q1.n*q2.d, q1.d*q2.n); } inline rational operator/(long num_val1, const rational& q2) { return rational(q2.d*num_val1, q2.n); } inline int operator==(const rational& q1, const rational& q2) { return q1.n*q2.d == q2.n*q1.d; } inline int operator!=(const rational& q1, const rational& q2) { return q1.n*q2.d != q2.n*q1.d; } inline ostream& operator<<(ostream& s, const rational& q) { if(q.d==0) s<<"oo"; else { s << q.n; if (q.d!=1) {s << "/" << q.d;} } return s; } inline istream& operator>> (istream& is, rational& r) { char c; long n,d=1; is>>n; if(!is.eof()) { is.get(c); if(c=='/') { is>>d; } else { is.putback(c); } } r=rational(n,d); return is; } // NB gcd(n,d)=1 and d>0: inline long floor(const rational& r) { return (r.n-(r.n%r.d))/r.d; } inline long ceil(const rational& r) { if(r.d==1) return r.n; return 1 + (r.n-(r.n%r.d))/r.d; } #endif eclib-2013-01-01/libsrc/eclib/hilbert.h0000644000175200017520000000450511774563612014256 00000000000000// hilbert.h: declarations of Hilbert symbol functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _HILBERT_H #define _HILBERT_H 1 //flags that this file has been included // In all the functions below, the value of the Hilbert symbol is 0 or // 1 (as an int) rather than +1 or -1, for efficiency; inline int eps4(const bigint& u) // u must be odd; m1pow(eps4(u))=chi4(u) { return (u+1)%4==0; // so 1 mod 4 gives 0, // 3 mod 4 gives 1 } inline int omega8(const bigint& u) // u must be odd; m1pow(omega8(u))=chi2(u) { return ((u-3)%8==0)||((u+3)%8==0); // so 1,7 mod 8 give 0, // 3,5 mod 8 give 1 } // Use p=0 for the infinite prime int local_hilbert(const bigint& a, const bigint& b, const bigint& p); inline int local_hilbert(const bigint& a, const bigint& b, const long& p) { return local_hilbert(a,b,BIGINT(p)); } // Returns 0 if soluble at all primes in list (or all dividing a*b, or // all dividing disc(q)*d) and at infinity; otherwise returns 1 and // puts the first insoluble prime into badp int global_hilbert(const bigint& a, const bigint& b, const vector& plist, bigint& badp); int global_hilbert(const bigint& a, const bigint& b, bigint& badp); int global_hilbert(const quadratic& q, const bigint& d, const vector& plist, bigint& badp); int global_hilbert(const quadratic& q, const bigint& d, bigint& badp); #endif eclib-2013-01-01/libsrc/eclib/mwprocs.h0000644000175200017520000001023611774563612014315 00000000000000// mwprocs.h: definition of class mw for Mordell-Weil basis ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include "interface.h" #include "compproc.h" #include "matrix.h" #include "subspace.h" #include "points.h" #include "polys.h" #include "curvemod.h" #include "pointsmod.h" #include "ffmod.h" #include "divpol.h" #include "tlss.h" #include "elog.h" #include "saturate.h" #include "sieve_search.h" // allow for multiple includes #ifndef _MWPROCS_ #define _MWPROCS_ // global to this file -- size of height_pairing matrix, equal // to maximum rank of any curve likely to study const int MAXRANK = 30; const int MAXSATPRIME = 20; // default saturation limit class mw : public point_processor { private: Curvedata *E; vector basis; int rank, maxrank; bigfloat *height_pairs; bigfloat reg; int verbose, process_points; bigfloat& mat_entry(int i, int j); bigint a1,a2,a3,a4,a6; int iso; saturator satsieve; public: mw(Curvedata*, int verb=0, int pp=1, int maxr=999); ~mw(); // processing of new points, with saturation at primes up to sat // (default MAXSATPRIME, none if sat==0) int process(const bigint& x, const bigint& y, const bigint& z); int process(const bigint& x, const bigint& y, const bigint& z, int sat); // as returned by ms's sieve; the point is (x/z,y/z^(3/2)) and z is square int process(const Point& P, int sat=MAXSATPRIME); int process(const vector& Plist, int sat=MAXSATPRIME); // saturate the current basis: int saturate(bigint& index, vector& unsat, long sat_bd=-1, int odd_primes_only=0); void search(bigfloat h_lim, int moduli_option=0, int verb=0); void search_range(bigfloat xmin, bigfloat xmax, bigfloat h_lim, int moduli_option=2, int verb=0); bigfloat regulator(void) {return reg;} vector getbasis() {vector b(basis.begin(),basis.begin()+rank); return b;} int getrank() {return rank;} }; inline bigfloat& mw::mat_entry(int i, int j) { return *(height_pairs + (i*MAXRANK) + j); } class sieve { private: Curvedata *E; bigint a1,a2,a3,a4,a6; bigint d1,d2,d3,d4,d6,c2,c3,c4,c6; long a,c; mw * mwbasis; int verbose, posdisc, firstnl; bigfloat xmin,x1,x2,x3; int num_aux; long* auxs; int** xgood_mod_aux; int** x1good_mod_aux; int** squares; long* amod; long *modhits; long npoints, ascore, amodc, alim, clim0, clim1, clim2, clim; int* cflag; int use_cflag; void a_search(const long& amin, const long& amax); void a_simple_search(const long& amin, const long& amax); public: sieve(void) {;} sieve(Curvedata * EE, mw* mwb, int moduli_option, int verb=0); ~sieve(); void search(bigfloat h_lim); void search_range(bigfloat xmin, bigfloat xmax, bigfloat h_lim); void stats(); // report sieving statistics }; int order_real_roots(vector& bnd, vector roots); //checks (and returns) how many roots are actually real, and puts those in //bnd, in increasing order, by calling set_the_bound int set_the_bounds(vector& bnd, bigfloat x0, bigfloat x1, bigfloat x2); //This transforms (if possible) x0, x1 and x1 into double; the search //should be made on [x0,x1]U[x2,infty] so if x1 or x2 overflows, the search //is on [x0,infty]. The function returns 3 in the first case, 1 in the second. //If x0 overflows, it returns 0. A warning is printed out. #endif eclib-2013-01-01/libsrc/eclib/cubic.h0000644000175200017520000001041411774563612013706 00000000000000// cubic.h: integer cubic class for unimodular transforms and reduction. ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // Notation: g(x,z) is replaced by g(m11*x+m12*z,m21*x+m22*z) // // Stored as bigint* arrays g of size 4 representing // g[0]*x^3+g[1]*x^2+g[2]*x+g[3] class unimod; class cubic { friend class unimod; private: bigint * coeffs; // will always have length 4 // init just allocates memory void init(); public: void set(long a, long b, long c, long d) {coeffs[0]=a; coeffs[1]=b; coeffs[2]=c; coeffs[3]=d;} void set(const bigint& a, const bigint& b, const bigint& c, const bigint& d) {coeffs[0]=a; coeffs[1]=b; coeffs[2]=c; coeffs[3]=d;} void set(const cubic& q) {coeffs[0]=q.coeffs[0]; coeffs[1]=q.coeffs[1]; coeffs[2]=q.coeffs[2]; coeffs[3]=q.coeffs[3];} cubic() {init(); set(0,0,0,0);} ~cubic(); cubic(const bigint& a, const bigint& b, const bigint& c, const bigint& d) {init(); set(a,b,c,d);} cubic(long a, long b, long c, long d) {init(); set(a,b,c,d);} cubic(const cubic& q) {init(); set(q);} void operator=(const cubic& g) {set(g);} inline bigint coeff(int i) {if((i>=0)&&(i<=3)) return coeffs[i]; else return coeffs[0];} inline bigint operator[](int i) const {if((i>=0)&&(i<=3)) return coeffs[i]; else return coeffs[0];} inline bigint a(void) const {return coeffs[0];} inline bigint b(void) const {return coeffs[1];} inline bigint c(void) const {return coeffs[2];} inline bigint d(void) const {return coeffs[3];} inline void set_coeff(int i, const bigint& a) {if((i>=0)&&(i<=3)) coeffs[i]=a;} inline bigint eval(const bigint& x, const bigint& z) const { bigint x2=sqr(x), z2=sqr(z); return a()*x*x2 + b()*x2*z + c()*x*z2 + d()*z*z2;} inline bigint eval(const bigint& x) const { bigint x2=sqr(x); return a()*x*x2 + b()*x2 + c()*x + d();} inline bigint disc() const { bigint b2=sqr(b()), c2=sqr(c()), ac=a()*c(), bd=b()*d(); return -27*sqr(a()*d()) + 18*ac*bd - 4*ac*c2 -4*bd*b2 + b2*c2; } inline void output(ostream& os=cout) const { os<<"["<=0 or z=0 and x>=0 int solve_conic(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const vector& factorbase, bigint& x, bigint& y, bigint& z, int method=4); int solve_conic(const bigint& a, const bigint& b, const bigint& c, const bigint& d, bigint& x, bigint& y, bigint& z, int method=4); // Solves axx+bxz+czz=dyy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, c, d, bb-4ac non-zero int solve_conic(const quadratic& q, const bigint& d, bigint& x, bigint& y, bigint& z, int method=4); int solve_conic(const quadratic& q, const bigint& d, const vector& factorbase, bigint& x, bigint& y, bigint& z, int method=4); int solve_conic_diag(const bigint& a, const vector& aplist, const bigint& b, const vector& bplist, bigint& x, bigint& y, bigint& z, int method); // Solves xx-azz=byy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, b non-zero square-free, their prime divisors in aplist, bplist void conic_mordell_reduce(const bigint& a, const bigint& b, const bigint& c, bigint& x0, bigint& y0, bigint& z0, int verb=0); // Given a>0, b>0, c<0, abc square-free and ax^2+by^2+cz^2=0 // reduces x, y, z in place using Mordell's method (page 48) // to achieve Holzer's bounds |z|<=sqrt(ab) etc. void conic_diag_reduce(const bigint& a, const bigint& b, bigint& x, bigint& y, bigint& z, int verb=0); // As above but with a,b square-free only, calls conic_mordell_reduce int solve_conic_param(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const vector& factorbase, quadratic& qx, quadratic& qy, quadratic& qz, int method=4, int verb=0); int solve_conic_param(const bigint& a, const bigint& b, const bigint& c, const bigint& d, quadratic& qx, quadratic& qy, quadratic& qz, int method=4, int verb=0); // Solves axx+bxz+czz=dyy for (x,y,z) not (0,0,0) and returns 1 // or returns 0 if not possible // Should have a, c, d, bb-4ac non-zero // qx,qy,qz are arrays of coeffs of parametrizing quadratics // with leading coeffs qx[0],qy[0],qz[0] one solution int solve_conic_param(const quadratic& q, const bigint& d, const vector& factorbase, quadratic& qx, quadratic& qy, quadratic& qz, int method=4, int verb=0); int solve_conic_param(const quadratic& q, const bigint& d, quadratic& qx, quadratic& qy, quadratic& qz, int method=4, int verb=0); int testsol(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& x, const bigint& y, const bigint& z, int verb=0); // Tests to see if a given solution is a non-trivial solution int testsol(const quadratic& q, const bigint& d, const bigint& x, const bigint& y, const bigint& z, int verb=0); int testlocsol(const bigint& a, const bigint& b, const bigint& c); // tests if ax^2+by^2+cz^2=0 is soluble, where a, b, c are pairwise // coprime and square-free int testlocsol(const bigint& a, const vector& alist, const bigint& b, const vector& blist, const bigint& c, const vector& clist); // tests if ax^2+by^2+cz^2=0 is soluble, where a, b, c are pairwise // coprime and square-free, their prime factors being in alist etc. int testlocsol(const bigint& a, const vector& alist, const bigint& b, const vector& blist); // tests if ax^2+by^2=z^2 is soluble, where a, b are // square-free, their prime factors being in alist and blist. int testparamsol(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const quadratic& qx, const quadratic& qy, const quadratic& qz, int verb=0); // Tests to see if a given parametrization is a solution int testparamsol(const quadratic& q, const bigint& d, const quadratic& qx, const quadratic& qy, const quadratic& qz, int verb=0); //miscellaneous test functions: void testmodsqrt(); void testsqf(); void testcancel(); // Output utilities: void show_xyz(const bigint& x, const bigint& y, const bigint& z); void show_cert(const bigint& p, const bigint& q, const bigint& r); void show_eqn(const bigint& a, const bigint& b, const bigint& c); void show_eqn_cert(const bigint& a, const bigint& b, const bigint& c, const bigint& p, const bigint& q, const bigint& r); void show_all(const bigint& a, const bigint& b, const bigint& c, const bigint& p, const bigint& q, const bigint& r, bigint& x, bigint& y, bigint& z); #endif eclib-2013-01-01/libsrc/eclib/divpol.h0000644000175200017520000000314511774563612014121 00000000000000// divpol.h: declaration of functions for division polynomials ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // allow for multiple includes #ifndef _DIVPOL_ #define _DIVPOL_ // These functions return the vector of coefficients (starting with // the constant term) rather than polynomial types // div_pol_odd(a1,a2,a3,a4,a6,n) returns the coefficients of the // polynomial in x whose zeros are the (x-coordinates of the) non-zero // points P on E=[a1,a2,a3,a4,a6] satisfying nP=0 (odd n) // The poly itself is found recursively vector div_pol_odd(const bigint& a1,const bigint& a2,const bigint& a3,const bigint& a4, const bigint& a6,int n); vector makepdivpol(Curvedata* EE, int p); #endif // #define _DIVPOL_ eclib-2013-01-01/libsrc/eclib/egr.h0000644000175200017520000001255111774563612013402 00000000000000// egr.h : declaration of functions for reduction of points & component groups ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // allow for multiple includes #ifndef _EGR_H_ #define _EGR_H_ // class to handle component groups at primes of bad reduction etc class ComponentGroups : public CurveRed { public: ComponentGroups(const Curvedata& CD) : CurveRed(CD) {;} ComponentGroups(const CurveRed& CR) : CurveRed(CR) {;} ComponentGroups(const Curve& C) : CurveRed(C) {;} ComponentGroups() : CurveRed() {;} // return 1 iff P mod p is nonsingular: int HasGoodReduction(const Point& P, const bigint& p); // return 1 iff P mod p is nonsingular for all p in plist; else return // 0 and put the first prime of bad reduction into p0: int HasGoodReduction(const Point& P, const vector& plist, bigint& p0); // return 1 iff P mod p is nonsingular for all p (including infinity); // else return 0 and put the first prime of bad reduction into p0: int HasGoodReduction(const Point& P, bigint& p0); // Returns [m] for cyclic of order m, [2,2] for 2*2 (type I*m, m even) vector ComponentGroup(const bigint& p); // Returns 1 iff P and Q have same image in the component group at p: int InSameComponent(const Point& P, const Point& Q, const bigint& p); // For reduction type Im, multiplicative reduction where component // group is cyclic of order m, returns a such that P mod p maps to a // mod m in the component group // N.B.1 This will always return a in the range [0..m/2] and CANNOT // distinguish between P and -P! Be warned! // N.B.2 The case of noncyclic component group is not handled here. long ImageInComponentGroup(const Point&P, const bigint& p, vector grp); long ImageInComponentGroup_Im(const Point&P, const bigint& p, int m); long ImageInComponentGroup_Im_pm(const Point&P, const bigint& p, int m); // Return least j>0 such that j*P has good reduction at p, i.e. the // order of the image of P in the component group at p; the component // group is given int OrderInComponentGroup(const Point& P, const bigint& p, vector grp); // replace (independent) points in Plist with a new set which spans // the subgroup of the original with good reduction at p, returning // the index int gr1prime(vector& Plist, const bigint& p); // replace (independent) points in Plist with a new set which spans // the subgroup of the original with good reduction at all p in plist, // returning the overall index int grprimes(vector& Plist, const vector& plist); // replace (independent) points in Plist with a new set which spans // the subgroup of the original with good reduction at all p, // returning the overall index int grprimes(vector& Plist) {return grprimes(Plist,the_bad_primes);} // replaces the (independent) points with a new set which spans the // subgroup of the original with good reduction at all p, // returning the overall index int egr_subgroup(vector& Plist, int real_too=1); // returns m = the lcm of the exponents of the component groups at all // bad primes (including infinity if real_too is 1), which is the lcm // of the Tamagawa numbers (except: 2 when component group is of type // 2,2). So with no further knowledge of the MW group we know that // m*P is in the good-reduction subgroup for all P bigint Tamagawa_exponent(int real_too=1); }; // returns the index in the subgroup generated by the given points of // its egr subgroup (the points are unchanged) bigint egr_index(const vector& Plist, int real_too=1); // Given a list of points P1,...,Pn and a prime p, this returns a // vector [c1,c2,...,cn] where the image of Pi in the component group // is ci mod m, where m is the exponent of the component group at p. // // Each ci is a vector of length 1 or 2 (the latter for when the // component group is C2xC2), not just an integer. // // If p=0 then m=1 or 2 (m=2 iff there are two real components and at // least one P_i is not in the connected component) // vector > MapPointsToComponentGroup(const CurveRed& CR, const vector& Plist, const bigint& p); // returns m = the lcm of the exponents of the component groups at all // bad primes (including infinity if real_too is 1), which is the lcm // of the Tamagawa numbers (except: 2 when component group is of type // 2,2). So with no further knowledge of the MW group we know that // m*P is in the good-reduction subgroup for all P inline bigint Tamagawa_exponent(const CurveRed& CR, int real_too=1) { return ComponentGroups(CR).Tamagawa_exponent(real_too); } #endif eclib-2013-01-01/libsrc/eclib/saturate.h0000644000175200017520000001350211774563612014452 00000000000000// saturate.h: declaration of class saturator for sieving E(Q)/pE(Q) ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // This is used for proving that points are p-saturated // allow for multiple includes #ifndef _SATURATE_ #define _SATURATE_ #ifndef MAX_REPEAT #define MAX_REPEAT 10 #endif // automatic saturation will only saturate at primes less than this, // unless overridden by the sat_bd parameter: const long SAT_MAX_PRIME = 1000; class saturator { private: Curvedata *E; // the curve vector Plist; // the points vector Plistp; // the p-cotorsion vector Plistx; // the points plus p-cotorsion vector AllTorsion; // all torsion on E vector pdivpol; // coefficients of p-division poly (not always used) int rank; // = #Plistx bigint disc; // discriminant of E int p; // current prime to saturate at int log_index; // current points have index p^log_index in original primevar qvar; // loops over possible sieving primes q vector Eqlist; // E mod q for q=3,5,... (good reduction) vector::iterator Eqptr; int newq; // =1 iff we are using q not yet cahced mat TLimage; int TLrank, stuck_counter, verbose, use_div_pols; // apply TL map (mod current q) to P, result in (ntp*)[0..p-1]: vector TLmap1(const Point& P); // apply TL map (mod current q) to Plistx, result is a (ntp*rank) matrix: mat TLmap(); // public: saturator(Curvedata* EE, int verb=0) :E(EE), verbose(verb) { #ifdef NTL_INTS use_div_pols=0;//1; #else use_div_pols=0; #endif disc = getdiscr(*E); AllTorsion = torsion_points(*EE); } ~saturator() {; } // initialize point list void set_points(const vector& PP) {Plist = PP;} // find next usable q and use it void nextq(); // keep on using q until saturated or stuck: int test_saturation(int pp, int ms=MAX_REPEAT); // try harder with same p (no initialization, but same point set) int test_saturation_extra(int pp, int ms=MAX_REPEAT); // enlarge basis if dim(kernel)>0: int enlarge(); // repeat testing saturation and enlarging until done: // returns log_p of index int do_saturation(int pp, int maxntries=10); // As above but for all primes up to p, returns index int do_saturation_upto(int maxp, int maxntries=10); // As above but for all primes in plist, returns success flag, sets // index and unsat = list of primes in plist at which // saturation failed int do_saturation(vector plist, bigint& index, vector& unsat, int maxntries=10); int do_saturation(vector plist, bigint& index, vector& unsat, int maxntries=10); // auto-saturate, after finding an upper bound on saturation index int saturate(vector& unsat, bigint& index, long sat_bd=-1, int egr=1, int maxntries=10, int odd_primes_only=0); // replace the generating points & reset matrices and ranks // (then can use test_saturation_extra()) // (for re-saturating at a prime p already used) void reset_points(const vector& PP); // get p-rank of input + p-cotorsion long getprank() const {return rank;}; // get rank of current image long getTLrank() const {return TLrank;}; // get current q: long get_q() const {return (long)qvar;}; // get current generators (not including p-cotorsion) vector getgens() const {return Plist;}; // get current generators (including p-cotorsion) vector getxgens() const {return Plistx;}; // get # steps since last rank increase long stuckfor() const {return stuck_counter;}; // get a nonzero kernel vector (if any) vec kernel_vector(); // test if saturated: int is_saturated() {return rank==TLrank;} }; // auxiliary functions, not part of the saturator class: // Use this where Torsion already computed: vector pCoTorsion(const vector& AllTorsion, int p); // Use this for a one-off computation where Torsion not yet computed: inline vector pCoTorsion(Curvedata* EE, int p) { return pCoTorsion(torsion_points(*EE),p); } // Saturate the given points automatically (using egr strategy if set) // Returns success flag and index, and (if success==0) a list of // primes at which saturation failed. The array points will be // changed (if necessary) into a basis for the saturation. // If sat_bd>-1 it is used to truncate the upper bound int saturate_points(Curvedata& C, vector& points, bigint& index, vector& unsat, long sat_bd=-1, int egr=1, int verbose=0); // Bound for the index of saturation for the given set of points If // egr is set it determines the egr subgroup of the group the points // generate and only searches for points with egr, This might be faster // in some cases... bigint index_bound(Curvedata* C, vector& points, int egr=1, int verbose=0); // Tamagawa primes: primes dividing any Tamagawa number vector tamagawa_primes(const Curvedata& C); #endif eclib-2013-01-01/libsrc/eclib/transform.h0000644000175200017520000000421411774563612014635 00000000000000// transform.h: declaration of quartic transformation functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // Notation: g(x,z) is replaced by g(m11*x+m12*z,m21*x+m22*z)/m00^2 // void apply_transform(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, const unimod& m); void apply_transform(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, const scaled_unimod& m); int check_transform(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const unimod& m, const bigint& xa, const bigint& xb, const bigint& xc, const bigint& xd, const bigint& xe); int check_transform(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const scaled_unimod& m, const bigint& xa, const bigint& xb, const bigint& xc, const bigint& xd, const bigint& xe); void xshift(const bigint& alpha, bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m); void zshift(const bigint& gamma, bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m); void m_invert(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, unimod& m); void m_invert(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, scaled_unimod& m); eclib-2013-01-01/libsrc/eclib/smat.h0000644000175200017520000001072611774563612013573 00000000000000// smat.h: declarations for sparse integer matrix class smat ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Original version by Luiz Figueiredo class smat { friend class smat_elim; protected: int nco; // number of columns int nro; // number of rows int **col; // holds cols of entries scalar **val; // holds values of entries public: // constructors smat (int nr=0, int nc = 0); smat (const smat&); // copy constructor smat (const mat &); // conversion constructor ~smat(); // destructor // member functions & operators mat as_mat( ) const; smat& operator=(const smat&); // assignment with copy scalar elem(int i, int j) const; // returns value of (i,j) entry smat& operator+= (const smat&); smat& operator+= (const scalar&); // adds scalar*identity smat& operator-= (const smat&); smat& operator-= (const scalar& s) // subtracts scalar*identity {this->operator+=(-s); return *this;} smat& operator*= (scalar); void sub_mod_p(const scalar& lambdal, const scalar& p=BIGPRIME); // subtracts scalar*identity mod p void reduce_mod_p(const scalar& p=BIGPRIME); smat& mult_by_scalar_mod_p (scalar scal, const scalar& p=BIGPRIME); smat& operator/= (scalar); mat operator*( const mat& ); void set_row ( int, int, int*, scalar* ); smat select_rows(const vec& rows) const; void setrow ( int i, const svec& v); // i counts from 1 svec row(int) const; // extract row i as an svec // non-member (friend) functions and operators friend inline int nrows(const smat& A) {return A.nro;} friend inline int ncols(const smat& A) {return A.nco;} friend inline vector dim(const smat& A) {vectord; d.push_back(A.nro);d.push_back(A.nco);return d;} friend vec operator* (smat& m, const vec& v); friend svec operator* ( const smat& A, const svec& v ); friend svec operator* ( const svec& v, const smat& A ); friend svec mult_mod_p( const smat& A, const svec& v, const scalar& p ); friend svec mult_mod_p( const svec& v, const smat& A, const scalar& p ); friend smat operator* ( const smat& A, const smat& B ); friend smat mult_mod_p ( const smat& A, const smat& B, const scalar& p ); friend smat transpose(const smat&); friend int operator==(const smat&, const smat&); // Equality mod p: friend int eqmodp(const smat&, const smat&, const scalar& p=BIGPRIME); friend ostream& operator<< (ostream&s, const smat&); friend istream& operator>> (istream&s, smat&); friend int get_population (const smat& ); //mainly used for testing friend inline double density (const smat& m) {return (((double)(get_population(m)))/m.nro)/m.nco;} friend void random_fill_in( smat&, int, scalar ); //the elimination program friend smat sidmat(scalar); // identity matrix friend smat liftmat(const smat& mm, scalar pr, scalar& dd, int trace=0); }; // Declaration of non-friend functions smat operator+(const smat&); // unary smat operator-(const smat&); // unary smat operator+(const smat& m1, const smat& m2); smat operator-(const smat& m1, const smat& m2); smat operator*(scalar scal, const smat& m); smat operator/(const smat& m, scalar scal); int operator!=(const smat& m1, const smat& m2); smat sidmat(scalar); // identity matrix inline void display_population(const smat& A) { cout << " number of non-zero entries: " << get_population(A) << endl; } eclib-2013-01-01/libsrc/eclib/cperiods.h0000644000175200017520000001226411774563612014436 00000000000000// cperiods.h: declarations of class Cperiods & period lattice functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _CPERIODS_H_ #define _CPERIODS_H_ #include "compproc.h" #include "curve.h" #define TWOPI 2*Pi() #define TWOPIEYE bigcomplex(to_bigfloat(0), TWOPI) inline bigcomplex q(const bigcomplex& z) // q(z) = exp(2*pi*i * z) { bigfloat twopix = TWOPI * real(z); return exp(-TWOPI * imag(z)) * bigcomplex( cos(twopix), sin(twopix) ); } // // the Cperiods class: // // w1, w2 are a lattice basis with tau=w1/w2 in fundamental region // wR = least (positive) real period // wI = least imaginary period // wRI = either wI (iff lattice_type==2) // or (wR+wI)/2 (iff lattice_type==1) class Cperiods { bigcomplex w1, w2, tau; bigcomplex wR, wI, wRI; bigcomplex e1, e2, e3; // 2-division values int lattice_type; // 2 for rectangular, 1 for triangular bigcomplex qtau, w1squared, w1cubed, sum3; void store_sums(); // sets quantities on previous line public: Cperiods() : w1(to_bigfloat(0)), w2(to_bigfloat(0)), tau(to_bigfloat(0)), wR(to_bigfloat(0)), wI(to_bigfloat(0)), wRI(to_bigfloat(0)), lattice_type(0) {;} Cperiods(bigfloat x, bigfloat y, int type) : lattice_type(type) { if (type==1) { wR=2*x; wI=bigcomplex(to_bigfloat(0),2*y); wRI=bigcomplex(x,y); } else { wR=x; wI=wRI=bigcomplex(to_bigfloat(0),y); } w1=wR; w2=wRI; tau = normalize(w2,w1); // NB reverse params; from compproc.h store_sums(); } Cperiods(const Curvedata& E); // copying: Cperiods(const Cperiods& cp) : w1(cp.w1), w2(cp.w2), tau(cp.tau), wR(cp.wR), wI(cp.wI), wRI(cp.wRI), e1(cp.e1), e2(cp.e2), e3(cp.e3), lattice_type(cp.lattice_type), qtau(cp.qtau), w1squared(cp.w1squared), w1cubed(cp.w1cubed), sum3(cp.sum3) {;} void operator=(const Cperiods& cp) { w1=cp.w1; w2=cp.w2; tau=cp.tau; wR=cp.wR; wI=cp.wI; wRI=cp.wRI; e1=cp.e1; e2=cp.e2; e3=cp.e3; lattice_type=cp.lattice_type; qtau=cp.qtau; w1squared=cp.w1squared; w1cubed=cp.w1cubed; sum3=cp.sum3; } // member access functions friend inline bigcomplex gettau(const Cperiods& cp) {return cp.tau; } friend inline int get_lattice_type(const Cperiods& cp) {return cp.lattice_type; } bigcomplex get_real_period() const {return wR;} int getwi(bigcomplex& ww1, bigcomplex& ww2) const { ww1=w1; ww2=w2; return lattice_type; } int getwRI(bigcomplex& wr, bigcomplex& wri) const { wr=wR; wri=wRI; return lattice_type; } friend inline ostream& operator<<(ostream& os, const Cperiods& cp) { os<<"[w_1,w_2] = ["<& factorbase, bigint& x, bigint& y, bigint& z, int use_lll=0); // Solve Legendre's equation ax^2+by^2+cz^2=0 using Rusin's reduction, // given "certificate" (n,p,q) satisfying a|n^2+bc, b|p^2+ac, c|q^2+ab. // assumes a,b,c pairwise coprime void legendre_solve_cert(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z); //Ensure that input is valid int checkin(const bigint& a,const bigint& b,const bigint& c, const bigint& n,const bigint& p,const bigint& q); // Check that purported solution is OK int check_leg(const bigint& a, const bigint& b, const bigint& c, bigint& x, bigint& y, bigint& z); // Check that purported solution is OK & in correct lattice int check_leg(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z); //Peel off a known square factor u from coefficient a void lem2a(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, const bigint& u, bigint& x, bigint& y, bigint& z); //Peel off a known square factor u from coefficient b void lem2b(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, const bigint& u, bigint& x, bigint& y, bigint& z); //Peel off a known square factor u from coefficient c void lem2c(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, const bigint& u, bigint& x, bigint& y, bigint& z); void lem4(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z); // Finds a certificate or returns 0 if none exists: int make_certificate(const bigint& a, const bigint& b, const bigint& c, bigint& n, bigint& p, bigint& q); int make_certificate(const bigint& a, const vector& apdivs, const bigint& b, const vector& bpdivs, const bigint& c, const vector& cpdivs, bigint& n, bigint& p, bigint& q); // Check to see if b is congruent to +- c mod a (assumed positive!) // if not, how much to divide a by to ensure that congruence holds? bigint should(const bigint& a, const bigint& b, const bigint& c); void legendre_reduce(const bigint& a, const bigint& b, const bigint& c, bigint& x0, bigint& y0, bigint& z0, int verb=0); // Given a, b, c, ax^2+by^2+cz^2=0 // reduces x, y, z in place using Mordell's method (page 48) // to achieve Holzer's bounds |z|<=sqrt(ab) etc. // (just permutes & passes to conic_mordell_reduce()) void new_legendre_reduce(const bigint& a, const bigint& b, const bigint& c, bigint& x0, bigint& y0, bigint& z0, int verb=0); // Given a, b, c, ax^2+by^2+cz^2=0 // reduces x, y, z in place using quadratics void legendre_via_lll(const bigint& a, const bigint& b, const bigint& c, const bigint& k1, const bigint& k2, const bigint& k3, bigint& x, bigint& y, bigint& z); // // Given one solution, returns quadratics parametrizing all solutions, // with discriminants -4bc, -4ac, -4ab. Here a, b, c are assumed // pairwise coprime but not square-free, and a>0, b>0, c<0. void legendre_param(const bigint& a, const bigint& b, const bigint& c, const bigint& x0, const bigint& y0, const bigint& z0, quadratic& qx, quadratic& qy, quadratic& qz); //These versions EITHER return 0 with a solution in x,y,z in the lattice // OR return 1, 2, 3 and a square factor u of a, b, c (resp) // OR return -1 if something fails (should not happen) int legendre_solve_cert_1(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z, bigint& u); int lem4_1(const bigint& a, const bigint& b, const bigint& c, const bigint& n, const bigint& p, const bigint& q, bigint& x, bigint& y, bigint& z, bigint& u); bigfloat holzer_measure(const bigint& a, const bigint& b, const bigint& c, const bigint& x, const bigint& y, const bigint& z); // max{|a|x^2,|b|y^2,|c|z^2}/|abc| ( < 1 for a Holzer-reduced solution) #endif eclib-2013-01-01/libsrc/eclib/gpslave.h0000644000175200017520000000312611774563612014264 00000000000000// parislave.h: class for starting up a "slave" background gp process ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include "interface.h" // The slave can be sent input via a fifo file and the output // recovered. Intended for integer factorization only at present. class parislave { char gpinfilename[18]; char gpoutput[1000]; FILE* gp; // pointer to file from which gp takes its input ofstream gpin; // ofstream attached to latter int dummy; // =1 iff we have no gp to use public: parislave(); ~parislave(); vector factor(const bigint& n, int proof=1); int is_prime(const bigint& n); int is_running() {return !dummy;} }; extern parislave the_pari_slave; // The one and only instance eclib-2013-01-01/libsrc/eclib/unimod.h0000644000175200017520000001156311774563612014122 00000000000000// unimod.h: declarations of classes unimod and scaled_unimod ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _UNIMOD_H #define _UNIMOD_H 1 //flags that this file has been included #include "interface.h" class unimod { friend class quadratic; friend class cubic; friend class scaled_unimod; protected: bigint m11, m12, m21, m22; public: unimod() {m11=1;m12=0;m21=0;m22=1;} unimod(const bigint& a11, const bigint& a12, const bigint& a21, const bigint& a22) :m11(a11), m12(a12), m21(a21), m22(a22) {;} unimod(const unimod& m) :m11(m.m11), m12(m.m12), m21(m.m21), m22(m.m22) {;} void reset() {m11=1; m12=0; m21=0; m22=1;} void set(const bigint& a11, const bigint& a12, const bigint& a21, const bigint& a22) {m11=a11; m12=a12; m21=a21; m22=a22;} void operator=(const unimod& m) {m11=m.m11; m12=m.m12; m21=m.m21; m22=m.m22;} bigint operator()(int i, int j) const { if(i==1) {if(j==1) return m11; else return m12;} else {if(j==1) return m21; else return m22;} } void operator*=(const unimod& a) { set(m11*a.m11 + m12*a.m21, m11*a.m12 + m12*a.m22, m21*a.m11 + m22*a.m21, m21*a.m12 + m22*a.m22); } friend unimod operator*(const unimod& a, const unimod& b); bigint scale_factor() const {bigint ans; ans=1; return ans;} bigint det() const {return (m11*m22-m12*m21);} void x_shift(const bigint& a) {m12 += (a*m11); m22 += (a*m21);} void y_shift(const bigint& a) {m11 += (a*m12); m21 += (a*m22);} unimod inverse() // return inverse matrix assuming det=1 { unimod ans(m22,-m12,-m21,m11); return ans; } void invert() // multiples by [0,1; -1,0] { bigint temp = -m11; m11 = m12; m12 = temp; temp = -m21; m21 = m22; m22 = temp; } void output(ostream& os=cout) const { os<<"["< badprimes, supp0, supp1; vector elsgens0, elsgens1, els2gens0, els2gens1, glsgens0, glsgens1; long selmer_rank_phi_Eprime, selmer_rank_phiprime_E, selmer_rank_Eprime; long best_rank_bound, best_isogeny, index2; long nt2gens0, nt2gens1, mask0, mask1; long els0, els1, gls0, gls1; // after first descent long els20, els21, gls20, gls21; // after second descent int d_is_sq, ddash_is_sq; bigint e2, e3, e2dash, e3dash, s2, s4, s6; Curvedata ee, eedash, Eprime; vector pointlist, fullpointlist, two_torsion; int npoints, npoints1, fullnpoints, ntwo_torsion; public: rank2(Curvedata* ec, int verb,int sel=0, long l1=20, long l2=5,int second=1); // lim1 is (bigint) bound on |x|+|z| in naive search // lim2 is (double) bound on log max {|x|,|z| }, i.e. logarithmic // sel is selmer_only switch // second is do-second-descent switch Curvedata getEprime() const {return Eprime;} long getselmerprime() const {return selmer_rank_Eprime;} long getselmerphi() const {return selmer_rank_phi_Eprime;} long getselmerphiprime() const {return selmer_rank_phiprime_E;} void listgens(); void listgens(Curvedata* CD_orig, const bigint& u, const bigint& r, const bigint& s, const bigint& t); void listpoints(); void listpoints(Curvedata* CD_orig, const bigint& u, const bigint& r, const bigint& s, const bigint& t); void makepoints(); vector getpoints() { if(fullnpoints==0) makepoints(); return fullpointlist; } vector getgens() const {return pointlist;} private: int testquartic(const bigint& c, const bigint& d1, const bigint& d2, int which); int second_descent(const bigint& c, const bigint& d1, const bigint& d2, int which); void makepoint(const bigint& c, const bigint& d1, const bigint& d2, const bigint& x, const bigint& y, const bigint& z, int which); void local_descent(const bigint& x0); void find_elsgens(int which, const bigint& c, const bigint& d); void find_els2gens(int which, const bigint& c, const bigint& d); void find_glsgens(int which, const bigint& c, const bigint& d); void makegens(); }; eclib-2013-01-01/libsrc/eclib/symb.h0000644000175200017520000000660511774563612013602 00000000000000// FILE SYMB.H: Declarations for M-symbols, modular symbols ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class symb { private: long c,d; const moddata * N; // needs to be creatable from a const thing public: symb() {c=d=0; N=0;} symb(long ic, long id, const moddata * iN) { c=ic; d=id; N=iN;} long cee() const {return c;} long dee() const {return d;} long ceered() const {return N->reduce(c);} long deered() const {return N->reduce(d);} long modulus() const {return N->modulus;} int operator==(const symb& s) const {return 0==((xmodmul(c,s.d,N->modulus)-xmodmul(s.c,d,N->modulus))%(N->modulus));} int eq(const symb& s) const {return ((c==s.c)&&(d==s.d))||((c==-s.c)&&(d==-s.d));} symb normalize() const; friend ostream& operator<< (ostream&s, const symb&); long orbitlength() const {long n=N->modulus, cr=N->reduce(c); cr=cr*cr; return n/N->gcd(cr);} }; class modsym { private: rational a,b; public: modsym() {a=rational(0); b=rational(0);} modsym(const rational& ra, const rational& rb) {a=ra; b=rb;} modsym(const symb&); //conversion rational alpha() const {return a;} rational beta() const {return b;} friend ostream& operator<< (ostream& s, const modsym& m); }; #include class symblist { private: symb *list; map,long> hashtable; long num,maxnum; public: symblist(long n=0); ~symblist(); void add(const symb& s, long start=0); long index(const symb& s, long start=0) const; symb operator[](long n) const {return list[n];} symb item(long n) const; void display() const {for(long i=0; i // for memset gcc >= 4.3 #include "xmod.h" // supercedes the macros here // #define USE_DMOD // #ifdef USE_DMOD // #define BIGPRIME 134217689 // = 2^27-39 // #define xmod(a,p) dmod((a),(p)) // #define xmodmul(a,b,p) dmodmul((a),(b),(p)) // #else // #define BIGPRIME 92681 //This is the largest p such that (p/2)^2 < 2^31. // #define xmod(a,p) mod((a),(p)) // #define xmodmul(a,b,p) mod((a)*(b),(p)) // #endif // // The following achieve modular reduction and multiplication using doubles, // // which allows a prime modulus of just under 2^27 to be used; without, the // // largest is under 2^16.5 // long dmod(long a, long m); // long dmodmul(long a, long b, long m); // longlist replaced by vector // longvar replaced by iterators /* Prime number class; adapted from Pari */ typedef unsigned char *byteptr; class primeclass { friend class primevar; byteptr pdiffptr; long NPRIMES, BIGGESTPRIME; void reset(void); int at_end(void); int advance(void); byteptr p_aptr; // points to "current" prime long p_ind; // index of "current" prime long p_val; // value of "current" prime public: primeclass(); // will use 10^6 as default or read from file primeclass(long maxnum); ~primeclass(); void init(long maxnum); // called in constructor, or to make more primes long number(long n) ; // returns n'th prime (n=1 gives p=2) vector getfirst(long n); // return primes 2..p_n as vector friend long nprimes(void); friend long maxprime(void); }; extern primeclass the_primes; // The one and only instance inline long prime_number (long n) /* returns n'th prime from global list */ {return the_primes.number(n);} inline vector primes (long n) /* returns list of first n primes */ {return the_primes.getfirst(n);} inline long nprimes(void) {return the_primes.NPRIMES;} inline long maxprime(void) {return the_primes.BIGGESTPRIME;} class primevar { public: long val; /* current value */ long ind; /* current index */ private: byteptr ndiff; /* pointer to next diff*/ long maxindex; /* max index */ public: primevar(long max=the_primes.NPRIMES, long i=1) {maxindex=max; ind=i; val=the_primes.number(i); ndiff=the_primes.pdiffptr+i;} void init(long max=the_primes.NPRIMES, long i=1) {maxindex=max; ind=i; val=the_primes.number(i); ndiff=the_primes.pdiffptr+i;} void operator++() {if ((ind++)<=maxindex) { val+=*ndiff++;}} void operator++(int) {if ((ind++)<=maxindex) { val+=*ndiff++;}} int ok() const {return ind<=maxindex;} int more() const {return ind pdivs(long); /* list of prime divisors */ vector posdivs(long, const vector& plist); // all positive divisors inline vector posdivs(long n) { const vector& plist = pdivs(n); return posdivs(n,plist); } vector alldivs(long, const vector& plist); // absolutely all divisors inline vector alldivs(long n) { const vector& plist = pdivs(n); return alldivs(n,plist); } vector sqdivs(long, const vector& plist); // divisors whose square divides inline vector sqdivs(long n) { const vector& plist = pdivs(n); return sqdivs(n,plist); } vector sqfreedivs(long, const vector& plist); // square-free divisors inline vector sqfreedivs(long n) { const vector& plist = pdivs(n); return sqfreedivs(n,plist); } long mod(long a, long modb); /* modulus in range plus or minus half mod */ long posmod(long a, long modb); /* ordinary modulus, but definitely positive */ #ifndef NTL_INTS inline int abs(int a) {return (a<0) ? (-a) : a;} #endif long gcd(long, long); int gcd(int, int); long lcm(long, long); long bezout(long, long, long&, long&); int intbezout(int aa, int bb, int& xx, int& yy); long invmod(long, long); int modrat(long, long, float, long&, long&); int modrat(int, int, float, int&, int&); inline int is_zero(long n) {return n==0;} long val(long factor, long number); // order of factor in number inline int divides(long factor,long number) { return (factor==0) ? (number==0) : (number%factor==0); } inline int ndivides(long factor,long number) { return (factor==0) ? (number!=0) : (number%factor!=0); // return !::divides(factor,number); } inline long m1pow(long a) {return (a%2 ? -1 : +1);} inline int sign(long a) {return (a==0? 0: (a>0? 1: -1));} inline int sign(double a) {return (a==0? 0: (a>0? 1: -1));} long chi2(long a); long chi4(long a); long hilbert2(long a, long b); long legendre(long a, long b); long kronecker(long d, long n); int intlog2(long& n, long& e, int roundup); int is_squarefree(long n); int is_valid_conductor(long n); #endif eclib-2013-01-01/libsrc/eclib/oldforms.h0000644000175200017520000000270511774563612014452 00000000000000// FILE OLDFORMS.H: declaration of class oldforms ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class oldforms { public: long noldclasses, nap, ntp; long totalolddim; private: const level* N; int plusflag; vector< vector > oldformap; vector oldclassdims, oldlevels; void getoldclasses(long d, int verbose); public: oldforms(long intp, const level* iN, int verbose=0, int plus=1); //intp = input value of ntp = max. number of Tp to use ~oldforms(){;} long dimoldpart(vector aplist) const; void display(void) const; }; eclib-2013-01-01/libsrc/eclib/homspace.h0000644000175200017520000001764411774563612014434 00000000000000// FILE HOMSPACE.H: Declaration of class homspace ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class mat22; // fully defined below class matop; // fully defined below #include "svector.h" class homspace :public symbdata { //private: public: int *coordindex,*needed,*freegens; long rk,denom1,denom2; ssubspace kern; // kernel(delta) basis smat tkernbas; // transpose of kernel(delta) basis modsym *freemods; public: vector coord_vecs; mat projcoord; // # cols = # newforms after they are found long dimension, denom3, ncusps, ncusps2; int cuspidal; // if 1 then compute cuspidal homology public: // Constructor (does all the work): homspace(long n, // the level int hp, // plus-space flag (0 or 1 or -1) int hcusp, // cuspidal flag (0 or 1) int verbose // verbosity (0 : no output // 1 : basic short output // 2 : lots of detail) ); ~homspace(); long h1cuspdim() const {return dim(kern);} long h1dim() const {return dimension;} // No confusion with subspace::dim long h1denom() const {return denom1;} long h1cdenom() const {return denom3;} long h1ncusps() const {return ncusps;} vector eigrange(long i); long op_prime(int i); // the i'th operator prime for Tp or Wq mat opmat(int i, int dual, int verb=0); mat opmat_restricted(int i,const subspace& s, int dual, int verb=0); // versions returning an smat: smat s_opmat(int i,int dual,int verb=0); smat s_opmat_restricted(int i,const ssubspace& s, int dual,int verb=0); // Extend a dual vector of length rk to one of length nsymb: vec extend_coords(const vec& v); // Contract a dual vector of length nsymb to one of length rk: vec contract_coords(const vec& v); public: // The next functions express M- & modular symbols in terms of the // basis for H_1(X_0(N);cusps;Z) of dimension rk svec chain(const symb& s) const; void add_chain(svec& v, const symb& s) const; svec chaincd(long c, long d) const; void add_chaincd(svec& v, long c, long d) const; svec chain(long nn, long dd) const; svec chain(const rational& r) const {return chain(num(r),den(r));} void add_chain(svec& v, long nn, long dd) const; void add_chain(svec& v, const rational& r) const {add_chain(v,num(r),den(r));} // The next functions express M- & modular symbols in terms of the // basis of a (dual) subspace of the whole space // The "projcoord" default (which requires the initialization of the // projcoord matrix as done in newforms::createfromscratch()) which // has one column for each newform // NB these operate on vecs and not svecs // The "nf" versions give scalars and instead of a matrix take a // vector = unique column of a matrix, such as a newform's coordplus // vector. vec projchaincd(long c, long d, const mat& m) const; vec projchaincd(long c, long d) const {return projchaincd(c,d,projcoord);} long nfprojchaincd(long c, long d, const vec& bas) const; void add_projchaincd(vec& v, long c, long d, const mat& m) const; void add_projchaincd(vec& v, long c, long d) const {add_projchaincd(v,c,d,projcoord);} void add_nfprojchaincd(long& a, long c, long d, const vec& bas) const; vec projchain(long n, long d, const mat& m) const; vec projchain(long n, long d) const {return projchain(n,d,projcoord);} long nfprojchain(long n, long d, const vec& bas) const; void add_projchain(vec& v, long n, long d, const mat& m) const; void add_projchain(vec& v, long n, long d) const {add_projchain(v,n,d,projcoord);} void add_nfprojchain(long& aa, long n, long d, const vec& bas) const; vec cuspidalpart(const vec& v) const {return v[pivots(kern)];} #if(0) //no longer used vec cycle(long n, long d) const { vec v = chain(n,d).as_vec(); if (cuspidal) return cuspidalpart(v); else return v; } vec cycle(const rational& r) const { vec v = chain(num(r),den(r)).as_vec(); if (cuspidal) return cuspidalpart(v); else return v; } vec cycle(const modsym& m) const { vec v = (chain(m.beta())-chain(m.alpha())).as_vec(); if (cuspidal) return cuspidalpart(v); else return v; } #endif // no longer used svec applyop(const matop& mlist, const rational& q) const; svec applyop(const matop& mlist, const modsym& m) const {return applyop(mlist,m.beta())-applyop(mlist,m.alpha());} mat calcop(string opname, long p, const matop& mlist, int dual, int display=0) const; mat calcop_restricted(string opname, long p, const matop& mlist, const subspace& s, int dual, int display=0) const; smat s_calcop(string opname, long p, const matop& mlist, int dual, int display=0) const; smat s_calcop_restricted(string opname, long p, const matop& mlist, const ssubspace& s, int dual, int display=0) const; public: mat heckeop(long p, int dual, int display=0) const; mat heckeop_restricted(long p, const subspace& s, int dual, int display=0) const; smat s_heckeop(long p, int dual, int display=0) const; smat s_heckeop_restricted(long p, const ssubspace& s, int dual, int display=0) const; mat newheckeop(long p, int dual, int display=0) const; mat wop(long q, int dual, int display=0) const; smat s_wop(long q, int dual, int display=0) const; mat fricke(int dual, int display=0) const; mat conj(int dual,int display=0) const; mat conj_restricted(const subspace& s, int dual,int display=0) const; smat s_conj(int dual, int display=0) const; smat s_conj_restricted(const ssubspace& s, int dual, int display=0) const; vec maninvector(long p) const; vec projmaninvector(long p) const; vec projmaninvector(long p, const mat& m) const; vec manintwist(long p) const; vec newhecke(long p, long n, long d) const; // friend class jumps; friend class newforms; }; class mat22 { //2x2 matrix for linear fractional transformations friend class homspace; private: long a,b,c,d; public: mat22(long ia=0, long ib=0, long ic=0, long id=0) :a(ia),b(ib),c(ic),d(id){;} mat22(const mat22& m) :a(m.a),b(m.b),c(m.c),d(m.d) {;} void operator=(const mat22& m) {a=m.a; b=m.b; c=m.c; d=m.d;} void show(ostream& s) const {s << "[" << a << "," << b << ";"<< c << "," << d << "]";} rational operator()(const rational& q)const { long n=num(q),de=den(q); return rational(a*n+b*de,c*n+d*de); } svec operator()(const symb& s, const homspace* h)const { long u=s.ceered(),v=s.deered(); return h->chaincd(a*u+c*v,b*u+d*v); } vec operator()(const symb& s, const homspace* h, const mat& m)const { long u=s.cee(),v=s.dee(); return h->projchaincd(a*u+c*v,b*u+d*v,m); } }; class matop { // formal sum of 2x2 matrices private: vector mats; public: matop(long p, long n); // constructor for hecke ops matop(long p); // constructor for heilbronn matrices matop(long a, long b, long c, long d); // constructor for a single matrix long size() const {return mats.size();} mat22 operator[](long i) const {return mats[i];} friend matop degen_mat(long d); }; inline matop degen_mat(long d) { return matop(d,0,0,1); } inline ostream& operator<< (ostream& s, const mat22& m) { m.show(s); return s; } eclib-2013-01-01/libsrc/eclib/quadratic.h0000644000175200017520000000654111774563612014604 00000000000000// quadratic.h: declaration of class for handling integer quadratics ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Stored as bigint* arrays q of size 3 representing q[0]*x^2+q[1]*x+q[2] #ifndef _QUADRATIC_H #define _QUADRATIC_H 1 //flags that this file has been included #include "unimod.h" class quadratic { friend class unimod; private: bigint * coeffs; // will always have length 3 // init just allocates memory void init(); public: void set(long a, long b, long c) {coeffs[0]=a; coeffs[1]=b; coeffs[2]=c;} void set(const bigint& a, const bigint& b, const bigint& c) {coeffs[0]=a; coeffs[1]=b; coeffs[2]=c;} void set(const bigint* q) {coeffs[0]=q[0]; coeffs[1]=q[1]; coeffs[2]=q[2];} void set(const quadratic& q) {coeffs[0]=q.coeffs[0]; coeffs[1]=q.coeffs[1]; coeffs[2]=q.coeffs[2];} quadratic() {init(); set(0,0,0);} ~quadratic(); quadratic(const bigint& a, const bigint& b, const bigint& c) {init(); set(a,b,c);} quadratic(long a, long b, long c) {init(); set(a,b,c);} quadratic(const bigint* q) {init(); set(q);} quadratic(const quadratic& q) {init(); set(q);} void operator=(const quadratic& q) {set(q);} bigint eval(const bigint& x, const bigint& z) const {return coeffs[0]*sqr(x) + coeffs[1]*x*z + coeffs[2]*sqr(z);} bigint operator()(const bigint& x, const bigint& z) const {return coeffs[0]*sqr(x) + coeffs[1]*x*z + coeffs[2]*sqr(z);} bigint eval(const bigint& x) const {return coeffs[0]*sqr(x) + coeffs[1]*x + coeffs[2];} bigint operator()(const bigint& x) const {return coeffs[0]*sqr(x) + coeffs[1]*x + coeffs[2];} bigint coeff(int i); bigint operator[](int i) const; void set_coeff(int i, const bigint& a) {if((i>=0)&&(i<=2)) coeffs[i]=a;} friend bigint resultant(const quadratic& q1, const quadratic& q2); bigint disc() const {return sqr(coeffs[1])-4*coeffs[0]*coeffs[2];} void output(ostream& os=cout) const { os<<"["< get_pbasis(int p); vector get_pbasis_from_roots(int p, const vector& xi); vector get_pbasis_via_divpol(int p); vector get_pbasis_via_divpol(int p, const vector& pdivpol); friend class TLSS; }; bigint my_bg_algorithm(const pointmodq& PP, const pointmodq& QQ, const bigint& lower, const bigint& upper, bool info=false); void set_hasse_bounds(const bigint& q, bigint& l, bigint& u); bigint my_order_point(const pointmodq& PP); bigint my_order_point(const pointmodq& PP, const bigint& lower, const bigint& upper); bigint my_order_point(const pointmodq& PP, const bigint& mult); // returns minimal m>0 s.t. m*Q is in

with m*Q=a*P. Special case: // if and

are disjoint, then m=order(Q) and a=0. bigint linear_relation( pointmodq& P, pointmodq& Q, bigint& a); // Replace P (of order ordP) with a point whose order is lcm(ordP,order(Q)) void merge_points_1(pointmodq& PP, bigint& ordP, pointmodq& Q); // Given independent generators P1,P2 with orders n1, n2 and n2|n1, // and a new point Q: // // (1) If ord(Q)|ord(P1) -- the normal case -- replace P2 with a point // whose order mod is lcm of ord(P2) and ord(Q) mod // // (2) Else replace P1 as with merge_points_1 and reset P2 void merge_points_2(pointmodq& P1, bigint& n1, pointmodq& P2, bigint& n2, const bigint& n2target, pointmodq& Q); inline bool less(const gf_element& a, const gf_element& b) { return LiftGF(a) coeff, int verb=0); qsieve(point_processor* acurve, int deg, vector coeff, bigfloat h_limx, int verb=0); //qsieve(point_processor* acurve, int deg, vector coeff, double h_lim, // double up, double low, int verb=1); ~qsieve(); void set_intervals(vector interv,int nb_bnd,int start_low,int pos_x_only=0); //the search will be made on the intervals thus defined: //nb_bnd bounds are given in interv, the first one being a lower bound //for the first interval if start_low=1, and the upper bound for the first // interval (the lower bound being -height) otherwise. //we must have interv[i]0"<0"<0"<0) b_low=b;}; //upper bound for the denominator (default:height) void set_b_high(long b) {if (b>0) b_high=b;}; //all perform sieve-assisted fast search according to the info provided: //h_lim(logarithmic, default:5), b_low,b_high(bounds z, optional) //intervals for x/z, optional, must be set AFTER height //the sieve uses height, so it is set every time search is called long search(); long search(double h_lim); }; /* This is a comparison function needed for sorting in order to determine the `best' primes for sieving. */ int compare_entries(const void *a, const void *b); #endif eclib-2013-01-01/libsrc/eclib/smatrix_elim.h0000644000175200017520000000514011774563612015316 00000000000000// smatrix_elim.h: manages declarations of sparse integer matrix classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Original version by Luiz Figueiredo #ifndef _SMATRIX_ELIM_H #define _SMATRIX_ELIM_H 1 //flags that this file has been included #include "smatrix.h" #include "subspace.h" inline int find( int X, int* ptr, int ub, int lb = 0 ) { int i; if( ptr[ub] < X ) return ub; while( ptr[lb] < X ) { i = (ub + lb)/2; ptr[i] < X ? (lb = i+1) : (ub = i); } return lb; } #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #undef ssubspace #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #define ssubspace ssubspace_i #include "smat_elim.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #undef ssubspace #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #define ssubspace ssubspace_l #include "smat_elim.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #undef ssubspace // SCALAR_OPTION may be set to 1 or 2 by user #if (SCALAR_OPTION==1) #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #define ssubspace ssubspace_i #else #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #define ssubspace ssubspace_l #endif // else user must use the unabbreviated names #endif eclib-2013-01-01/libsrc/eclib/kbessel.h0000644000175200017520000000251311774563612014252 00000000000000// kbessel.h: implementation of K-Bessel function for arbitrary real // parameter nu. Adapted from the PARI function kbessel. ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _KBESSEL_H #define _KBESSEL_H 1 //flags that this file has been included double kbessel(double nu, double gx, int debug=0); inline double K0(double x) {return kbessel(0,x);} inline double K1(double x) {return kbessel(1,x);} #endif eclib-2013-01-01/libsrc/eclib/mvector.h0000644000175200017520000001235711774563612014310 00000000000000// mvector.h: declarations of multiprecision integer vector class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_MVECTOR_H) #define _MVECTOR_H 1 //flags that this file has been included #include "vector.h" class vec_m { friend class mat_m; friend class msubspace; public: // constructors vec_m(long n=0); vec_m(long n, bigint* array); vec_m(const vec_m&); // copy constructor vec_m(const vec_i&); // copy constructor vec_m(const vec_l&); // copy constructor ~vec_m(); // destructor // member functions & operators void init(long n=0); // (re)-initializes vec_m& operator=(const vec_m&); // assignment bigint& operator[](long i) const; // the i'th component vec_m& operator+=(const vec_m&); void addmodp(const vec_m&, const bigint&); vec_m& operator-=(const vec_m&); vec_m& operator*=(const bigint&); vec_m& operator/=(const bigint&); vec_m slice(long,long=-1) const; // returns subvec_m vec_m operator[](const vec_i&) const; // subscript composition vec_m operator[](const vec_l&) const; // subscript composition void set(long i, const bigint& x); // sets v[i]=x void add(long i, const bigint& x); // v[i]+=x bigint sub(long i) const; // same as v[i] (no ref) //converts to a vector of ints or longs if possible. //the parameter here is a dummy just to distinguish these vec_i shorten(int) const; vec_l shorten(long) const; // non-member (friend) functions and operators friend long dim(const vec_m&); // the dimension friend bigint operator*(const vec_m&, const vec_m&); // dot product friend vec_m operator*(const mat_m& m, const vec_m& v); friend int operator==(const vec_m&, const vec_m&); friend int operator!=(const vec_m&, const vec_m&); friend int trivial(const vec_m&); // v==zerovec_m? friend ostream& operator<< (ostream&s, const vec_m&); friend istream& operator>> (istream&s, vec_m&); friend bigint mvecgcd(const vec_m&); friend void swapvec(vec_m& v, vec_m& w); friend int member(const bigint& a, const vec_m& v);//tests if a=v[i] for some i friend mat_m restrict_mat(const mat_m& m, const msubspace& s); friend mat_m prestrict(const mat_m& m, const msubspace& s, const bigint& pr); // Implementation private: long d; bigint * entries; }; // Declaration of non-member, non-friend functions vec_m operator+(const vec_m&); // unary vec_m operator-(const vec_m&); // unary vec_m operator+(const vec_m&, const vec_m&); vec_m addmodp(const vec_m&, const vec_m&, const bigint&); vec_m operator-(const vec_m&, const vec_m&); vec_m operator*(const bigint&, const vec_m&); // componentwise vec_m operator*(long, const vec_m&); // componentwise vec_m operator/(const vec_m&, const bigint&); // componentwise void makeprimitive(vec_m& v); void elim(const vec_m& a, vec_m& b, long pos); void elim1(const vec_m& a, vec_m& b, long pos); void elim2(const vec_m& a, vec_m& b, long pos, const bigint& lastpivot); vec_m express(const vec_m& v, const vec_m& v1, const vec_m& v2); vec_m lift(const vec_m& v, const bigint& pr); //lifts a mod-p vec_m to a rational and scales to a primitive vec in Z. int liftok(vec_m& v, const bigint& pr); //same, in place; returns success bigint dotmodp(const vec_m& v1, const vec_m& v2, const bigint& pr); // extra function definitions long dim(const vec_m& v); int operator!=(const vec_m& v, const vec_m& w); vec_m operator+(const vec_m& v); vec_m operator-(const vec_m& v); vec_m operator+(const vec_m& v1, const vec_m& v2); vec_m addmodp(const vec_m& v1, const vec_m& v2, const bigint& pr); vec_m operator-(const vec_m& v1, const vec_m& v2); vec_m operator*(const bigint& scal, const vec_m& v); vec_m operator*(long scal, const vec_m& v); vec_m operator/(const vec_m& v, const bigint& scal); void makeprimitive(vec_m& v); void elim(const vec_m& a, vec_m& b, long pos); void elim1(const vec_m& a, vec_m& b, long pos); void elim2(const vec_m& a, vec_m& b, long pos, const bigint& lastpivot); #endif eclib-2013-01-01/libsrc/eclib/vector.h0000644000175200017520000000451611774563612014131 00000000000000// vector.h: ,anage declarations of integer vector classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_JC_VECTOR_H) #define _JC_VECTOR_H 1 //flags that this file has been included #include "interface.h" class vec_i; class vec_l; class vec_m; class mat_i; class mat_l; class mat_m; class svec_i; class svec_l; class smat_i; class smat_l; class smat_i_elim; class smat_l_elim; class subspace_i; class subspace_l; class msubspace; #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #include "vec.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #include "vec.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim // SCALAR_OPTION may be set to 1 or 2 by user #if (SCALAR_OPTION==1) #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #else #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #endif #endif eclib-2013-01-01/libsrc/eclib/isogs.h0000644000175200017520000000523111774563612013746 00000000000000// isogs.h: declaration of class IsogenyClass and related functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _ISOGS_H_ #define _ISOGS_H_ #include "cperiods.h" // which itself includes everything relevant // isogeny functions: vector twoisog(const CurveRed& CR, int verbose); vector threeisog(const CurveRed& CR, int verbose); vector lisog(const CurveRed& CR, Cperiods& cp, long ell, int verbose=0); // cp must be normalized for lattice at call time // returned array is of length up to 3 // of curves ell-isogenous to CR int semistable(const CurveRed& CR); vector getelllist(const CurveRed& CR); // returns list of possible primes l ("ell") for which CR might have an l-isogeny. #define MAXNCURVES 26 // max number of curves in an isogeny class. class IsogenyClass { private: vector curves; vector llist; long nell, ncurves, ndone; int ss, verb; Cperiods cp; vector fromlist; // fromlist[i]=j if curve i first constructed from vector isoglist; // curve j via an isoglist[i]-isogeny vector matij; void matset(long i, long j, long ell) { matij[i*MAXNCURVES+j]=ell;} void process(long i); // process i'th curve public: IsogenyClass(const CurveRed& C, int verbose); void grow(void); // does the work void display_llist(ostream& os)const {os< getmat() const; mat getmatrix() const; long mat_entry(long i, long j)const {return matij[i*MAXNCURVES+j];} vector getcurves() const {return curves;} }; #endif eclib-2013-01-01/libsrc/eclib/periods.h0000644000175200017520000001250411774563612014270 00000000000000// periods.h : class for integrating newforms ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #ifndef _PERIODS_H #define _PERIODS_H 1 #define PI Pi() //#ifndef TWOPI //#define TWOPI ((2*PI)) //#endif //#ifndef LOG10 #define LOG10 log(10) //#endif const bigfloat eps = to_bigfloat(1.0e-16); // ?? mindouble; #define EULERGAMMA Euler() bigfloat myg0(bigfloat x); bigfloat myg1(bigfloat x); bigfloat myg2(bigfloat x); bigfloat myg3(bigfloat x); class character { private: long modul; int *chartable; void init(); public: character(long m=1); ~character(); void reset(long m); long modulus(void) {return modul;} int operator()(long n) {return chartable[n%modul];} }; class summer { protected: bigfloat sum1, sum2; // sum2 not necessarily used long limit, limit1, limit2; bigfloat rootlimit, rootmod, factor, factor1, factor2, rp, ip; long type; long N, nap; vector aplist; vector primelist; vector an_cache; // holds a_n for n up to rootlimit vector a2p_cache; // holds a_n for n=2^e up to rootlimit vector a3p_cache; // holds a_n for n=3^e up to rootlimit vector a5p_cache; // holds a_n for n=5^e up to rootlimit vector a7p_cache; // holds a_n for n=7^e up to rootlimit long n2p,n3p,n5p,n7p; void initaplist(const level* iN, const vector& apl); virtual bigfloat func1(long n) {return to_bigfloat(0);} virtual bigfloat func2(long n) {return to_bigfloat(0);} virtual void use(long n, long an)=0; void use1(long n, long an); void use2(long n, long an); void use2357(long n, long an); void add(long n, long pindex, long y, long z); void add2357(long n, long pindex, long y, long z); void sumit(void); // do the sum public: virtual ~summer() {;} virtual void compute(void)=0; // ditto with pre and post-processing bigfloat rper(void) {return rp;} bigfloat iper(void) {return ip;} Cperiods getperiods() {Cperiods per(rp,ip,type); return per;} }; class periods_via_lfchi :public summer { private: character chi1, chi2; long mplus, mminus, dp0; void use(long n, long an) {use2(n,an);} bigfloat func1(long n) { return to_bigfloat(chi1(n)) * pow(factor1,to_bigfloat(n)); } bigfloat func2(long n) { return to_bigfloat(chi2(n)) * pow(factor2,to_bigfloat(n)); } public: periods_via_lfchi (const level* iN, const newform* f); void compute(void); }; class periods_direct :public summer { private: long eps_N, a, b, c, d; bigfloat theta1,theta2; vector ctab, stab; // array of cos(j*2*pi/d), sin(j*2*pi/d), for j mod d void use(long n, long an); public: periods_direct (const level* iN, const newform* f); void compute(void); void compute(long ta, long tb, long tc, long td); // period of (a,b;Nc,d) in Gamma_0(N) }; class part_period :public summer { private: bigfloat efactor,x0,y0,xn; bigfloat func1(long n) { xn=to_bigfloat(n); efactor = exp(-xn*y0); return efactor*cos(xn*x0); } bigfloat func2(long n) { return efactor*sin(xn*x0); } void use(long n, long an) {use2(n,an);} public: part_period (const level* iN, const newform* f); ~part_period () {;} void compute(const bigcomplex& z0); void compute(); bigcomplex getperiod() {return bigcomplex(rp,ip);} }; bigfloat G(int r, bigfloat x); // G_r(x) class ldash1 : public summer { private: long r; int computed; bigfloat ld1; bigfloat G(bigfloat x); // G_r(x) void init(const level* N, const vector& f_aplist, long f_sfe, const rational& f_loverp); void use(long n, long an) {use1(n,an);} bigfloat func1(long n) { return -G(factor1*to_bigfloat(n)); } public: ldash1 (const level* iN, const newform* f); ldash1 (const newforms* nf, long i); // the i'th newform void compute(void); long rank() {compute(); return r;} bigfloat value() {compute(); return ld1;} // // NB this value is equal to r!*L^{(r)}(f,1) -- note the r! factor! // }; class lfchi : public summer { private: long limit0; bigfloat val; character chi; bigfloat func1(long n) { return chi(n)*pow(factor1,to_bigfloat(n));} void use(long n, long an) {use1(n,an);} public: lfchi (const level* iN, const newform* f); void compute(long ell); void compute(void) {;} // not called but has to exist; bigfloat value(void) {return val;} bigfloat scaled_value(void) {return sqrt(to_bigfloat(chi.modulus()))*val;} }; vector resort_aplist(const level* iN, const vector& primelist, const vector& apl); #endif eclib-2013-01-01/libsrc/eclib/sifter.h0000644000175200017520000000422711774563612014122 00000000000000// sifter.h: declaration of class for sifting E(Q)/2E(Q) ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // NB This is used for proving that points are independent; now // largely obsolete, being superceded by general saturation algorithms // allow for multiple includes #ifndef _SIFTER_ #define _SIFTER_ class sifter { private: Curvedata *E; bigint I, J, disc; bigint r,s,t; // tranforms E to E_{I,J} (u=6) int rank; int verbose; int num_aux, max_dim_im; int ** eps_mat; int * pivcols; long * auxs; long * all_p; int * nroots; long ** thetamod; int**squares; void init(); // define auxiliary moduli and squares void clear(); // free memory public: sifter(Curvedata* EE, int na, int verb=0) :E(EE), rank(0), verbose(verb), num_aux(na) { I = getc4(*E); J = 2*getc6(*E); disc = getdiscr(*E); E->getai(s,r,t,r,r); // r is just a dummy here r = 3*getb2(*E); // this is its real value s = 3*s; t = 108*t; init(); } ~sifter() { clear(); } int code(const bigint& x, const bigint& z2, int i); int * eps(const bigint& x, const bigint& z2); void process(const Point& P); void process(const vector& Plist); int getrank() {return rank;} void vecout(int* v); }; #endif eclib-2013-01-01/libsrc/eclib/htconst.h0000644000175200017520000001446411774563612014314 00000000000000// htconst.h: declarations of functions for height bounds ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // allow for multiple includes #ifndef _HTCONST_H_ #define _HTCONST_H_ double silverman_bound(const Curvedata& CD); double cps_bound(const Curvedata& CD); inline double height_constant(const Curvedata& CD) { // return silverman_bound(CD); double b1 = silverman_bound(CD), b2 = cps_bound(CD); return min(b1,b2); } double egr_height_constant(const Curvedata& CD); bigfloat lower_height_bound_alt(const Curvedata& CD); bigfloat lower_height_bound_search(const Curvedata& CD, const bigfloat& reg); bigfloat lattice_const(int r); // returns lower bound for height of non-torsion points of good // reduction, following Cremona & Siksek in ANTS7 bigfloat egr_lower_height_bound(const Curvedata& CD); // Class to find point of minimal height by searching. // If egr_flag is set it ignores points which do not have everywhere // good reduction (at all finite primes) class point_min_height_finder : public point_processor { Curvedata *E; ComponentGroups CG; // used if egr_flag to test for egr bigint a1,a2,a3,a4,a6; vector c; int iso, egr_flag, verbose; bigfloat min_ht; Point Pmin; vector all_points; //store points found public: point_min_height_finder(Curvedata* EE, int egr=0, int verb=0); ~point_min_height_finder() {}; int process(const bigint& x, const bigint& y, const bigint& z); void search(bigfloat h_lim); bigfloat get_min_ht() const {return min_ht;} Point get_min_ht_point() const {return Pmin;} vector points() const {return all_points;} }; // class Interval represents a closed interval [lh,rh] where either // empty=1; or empty=0 and lh <= rh; flags rhinf, lhinf denote // rh=infty and lh=-infty resp. class Interval { bigfloat lh, rh; bool empty, lhinf, rhinf; public: Interval() : empty(0), lhinf(1), rhinf(1) {show(1);} Interval(const bigfloat& a, const bigfloat& b) :lh(a), rh(b), empty(a>b), lhinf(0), rhinf(0) {show(2);} Interval(const bigfloat& a) :lh(a), empty(0), lhinf(0), rhinf(1) {show(3);} Interval(const Interval& I) :lh(I.lh), rh(I.rh), empty(I.empty), lhinf(I.lhinf), rhinf(I.rhinf) {show(4);} void operator=(const Interval& I) {lh=I.lh; rh=I.rh; empty=I.empty; lhinf=I.lhinf; rhinf=I.rhinf;show(5);} friend ostream& operator<< (ostream&s, const Interval&); // void show(int i) {cout< intersect(const vector& L1, const vector& L2); //void output(const vector& L); // class Interval01 represents a closed subinterval [lh,rh] of // [0,1], where either empty=1; or empty=0 and lh <= rh. class Interval01 { bigfloat lh, rh; bool empty; public: Interval01() : lh(to_bigfloat(0)), rh(to_bigfloat(1)), empty(0) {;} Interval01(const bigfloat& a, const bigfloat& b) :lh(a), rh(b), empty(a>b) {;} friend ostream& operator<< (ostream&s, const Interval01&); // void show(int i) {cout< intersect(const vector& L1, const vector& L2); vector annihilators(const Curvedata& CD, long n); // Class to compute lower bound for height of non-torsion points of good // reduction, following Cremona & Siksek in ANTS7 class CurveHeightConst : public Curvedata, Cperiods { bigfloat c; // archimidean constribution bigfloat e3; // largest (or only) real root bigfloat lower, upper; int n_max; int n_ann; vector ann; // indices of E0/E1 for first few primes bigfloat D(const long n) const; // "denomContrib" bigfloat Bnmu(const long n, const bigfloat& mu) const // = B_n(mu) { return exp(n*n*mu+c-D(n)); } int test_target(const bigfloat& target, long k); vector canonicalHeightInterval(const bigfloat& target, long k); vector canonicalHeightInterval01(const bigfloat& target, long k); void compute_phase1(); void compute_phase2(); vector solveLEQ(long n, const bigfloat& B); vector solveGEQ(long n, const bigfloat& B); vector solveLEQ01(long n, const bigfloat& B); vector solveGEQ01(long n, const bigfloat& B); vector solveEllNPower(long n, const bigfloat& x1); vector solveEllNPower01(long n, const bigfloat& x1); bigfloat psi(const bigfloat& x); vector ordinates(const bigfloat& x); vector ztopoint(const bigcomplex& z) {return ellztopoint(z,I2bigfloat(a1),I2bigfloat(a2),I2bigfloat(a3));} bigcomplex pointtoz(const bigfloat& x, const bigfloat& y) {return ellpointtoz(*this,*this,x,y);} public: CurveHeightConst(const Curvedata& CD); void compute() {compute_phase1(); compute_phase2(); } bigfloat get_value() const {return lower;} }; #endif eclib-2013-01-01/libsrc/eclib/mrank1.h0000644000175200017520000000645311774563612014022 00000000000000// mrank1.h -- declaration of class rank1 for general 2-descent ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class rank1 : public rank12 { private: long nquarticsa, nquarticsb, nfirstlota, nfirstlotb; long sha_rank, sha2; int traceequiv, posdisc, disc_is_square, npairs, extra2, threediv, type; quartic *qlista, *qlistb; int * qlistbflag; bigcomplex* croots; bigcomplex* cphi; vector pointlist1, pointlist2; long npoints1, npoints2; int have_eggpoint, have_large_quartics; long twoadic_index, global_index; long bsd_npairs; // only for testing // 1, 2 or 4: local/global index of "small" quartics bigint c4, c6, d1728, ii, jj, disc; long Imod2, Jmod2; bigfloat xii, xjj; vector plist, dlist; vector eqplist; // primes used for equiv-sieving long n0, n1, n2, rank_B; // // // Sieving stuff: int ipivot, pivflag; long * auxs; long ** phimod; int * aux_flags; int * aux_types; int**squares; int ***flags; int **flaga; int *flagah; long *amod, *astepmod, *ascalemod, *hmod, *hstepmod, *hscalemod; long ah_count, ah_sieve_0, ah_sieve_1, ah_sieve_2; long ah_rfail, ah_dfail, ah_efail, ah_extra2fail, ah_pass; void aux_init(); // define auxiliary moduli and squares void flag_init(); // set up flag array void clear_sieve(); // free memory related to sieve; long* qeps(const quartic&, int x2); //computes eps of quartic void show_eps_vec(long * vec); // process latest quartic found void addquartic(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e); void getquartics(); void getquartics1(); void gettype(int t); public: rank1(Curvedata* ec, int verb=0, int sel=0, long lim1=20, long lim2=5, long n_aux=-1); // lim1 is bound on |x|+|z| in naive search // lim2 is bound on log max {|x|,|z| }, i.e. logarithmic // sel is selmer_only switch // n_aux is # sieving primes in quartic search // n_aux=-1 causes default to be used (depends on method) // void sortpoints(); void listpoints(); void listpoints(Curvedata* CD_orig, const bigint& u, const bigint& r, const bigint& s, const bigint& t); vector getgens() const; vector getpoints(); long getselmerprime() const {return selmer_rank;} long getselmerphi() const {return selmer_rank;} long getselmerphiprime() const {return selmer_rank;} Curvedata getEprime() const {return *the_curve;} }; eclib-2013-01-01/libsrc/eclib/svec.h0000644000175200017520000001367111774563612013571 00000000000000// svec.h: declarations for sparse integer vector class svec ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// class svec { friend class smat; friend class smat_elim; protected: int d; // dimension map entries; // (i,x) in the table means v[i]=x public: // constructors svec (int dim=0) :d(dim) {;} svec (const svec& v) // copy constructor :d(v.d), entries(v.entries) {; } svec (const vec &); // conversion constructor svec (int dim, scalar* a); // conversion constructor // member functions & operators void clear() {entries.clear();} vec as_vec( ) const; scalar elem(int i) const; // returns value of i'th entry void set(int i, scalar a); // sets i'th entry to a void add(int i, scalar a); // adds a to i'th entry void sub(int i, scalar a); // subtracts a from i'th entry void add_mod_p(int i, scalar a, const scalar& p=BIGPRIME); // adds a to i'th entry, mod p void sub_mod_p(int i, scalar a, const scalar& p=BIGPRIME); // subtracts a from i'th entry, mod p svec& add_scalar_times(const svec&, scalar); svec& operator+= (const svec& w); svec& operator-= (const svec& w); svec& operator*= (scalar); svec& operator/= (scalar); void reduce_mod_p(const scalar& p=BIGPRIME); svec& mult_by_scalar_mod_p(scalar, const scalar& p=BIGPRIME); svec& add_scalar_times_mod_p(const svec&, scalar, const scalar& p=BIGPRIME); // Same as previous except returns two sets of indices: "ons" are // indices for which an entry is created, and "offs" are indices for // which an entry is deleted svec& add_scalar_times_mod_p(const svec&, scalar, std::set& ons, std::set& offs, const scalar& p=BIGPRIME); // two hand-coded special cases: svec& add_mod_p(const svec& w, const scalar& p); svec& sub_mod_p(const svec& w, const scalar& p); int size() const {return entries.size();} // functions to enable iteration over the entries without direct // access to the entries map: map::const_iterator begin() const {return entries.begin();} map::const_iterator end() const {return entries.end();} map::iterator begin() {return entries.begin();} map::iterator end() {return entries.end();} void erase(int i); // erases v[i]; error if not set int first_index() const {return entries.upper_bound(0)->first;} std::set support() const; // non-member (friend) functions and operators friend inline int dim(const svec& v) {return v.d;} // Equality mod p: friend int eqmodp(const svec&, const svec&, const scalar& p=BIGPRIME); friend ostream& operator<< (ostream&s, const svec&); friend scalar operator*(const svec&, const svec&); //dot product friend scalar operator*(const svec&, const vec&); friend scalar dotmodp(const svec&, const svec&, scalar pr); friend scalar dotmodp(const svec&, const vec&, scalar pr); friend inline svec operator+(const svec& v1, const svec& v2); friend inline svec operator-(const svec& v1, const svec& v2); friend inline int operator==(const svec& v1, const svec& v2); friend inline int operator!=(const svec& v1, const svec& v2); friend int operator==(const svec& v1, const vec& v2); friend inline int operator!=(const svec& v1, const vec& v2) {return !(v1==v2);} friend inline int operator==(const vec& v1, const svec& v2) {return v2==v1;} friend inline int operator!=(const vec& v1, const svec& v2) {return v2!=v1;} friend smat transpose(const smat&); friend smat operator* ( const smat&, const smat&); friend smat sidmat(scalar); friend scalar content(const svec& v); friend scalar make_primitive(svec& v); // divides by & returns content friend svec operator* ( const smat& A, const svec& v ); friend svec operator* ( const svec& v, const smat& A ); friend svec mult_mod_p( const smat& A, const svec& v, const scalar& p ); friend svec mult_mod_p( const svec& v, const smat& A, const scalar& p ); friend smat mult_mod_p ( const smat&, const smat&, const scalar&); }; // Declaration of non-friend functions inline svec operator+(const svec& v) {return v;} // unary + inline svec operator-(const svec& v) // unary - {svec ans(v); ans*=-1; return ans;} inline svec operator+(const svec& v1, const svec& v2) { if(v1.entries.size()>1; // = 536870894; const int TWO_BIGPRIME = 2147483578; // 2*BIGPRIME const int64_t INV_BIGPRIME = 4294967436LL; // = 2^32+140 = [2^62/p] inline int xmod(int a, int m) {return a%m;} inline long xmod(long a, long m) {return a%m;} inline int xmod(long a, int m) { return (int)(a%(long)m);} inline long xmod(int a, long m) { return (long)((long)(a)%m);} inline int xmod0(int a) {return a%BIGPRIME;} inline int mod0(int a) {a%=BIGPRIME; if(a>0) while(a>HALF_BIGPRIME) a-=BIGPRIME; else while(-a>HALF_BIGPRIME) a+=BIGPRIME; return a; } inline long xmod0(long a) {return (a%(long)BIGPRIME);} inline long mod0(long a) {return mod0((int)(a%BIGPRIME));} inline int xmodmul(int a, int b, int m) { return ((int)( ( (int64_t)(a)*(int64_t)(b) ) % (int64_t)(m) ))%m; } inline int xmodmul(int a, int b, long m) { return (int)(((long)( ( (int64_t)(a)*(int64_t)(b) ) % (int64_t)(m) ))%m); } inline int xmodmul(long a, long b, int m) { return ((int)( ( (int64_t)(a)*(int64_t)(b) ) % (int64_t)(m) ))%m; } inline long xmodmul(long a, long b, long m) { return ((long)( ( (int64_t)(a)*(int64_t)(b) ) % (int64_t)(m) ))%m; } inline int xmodmul0(int a, int b) { return ((int)( ( (int64_t)(a)*(int64_t)(b) ) % (int64_t)(BIGPRIME) ))%BIGPRIME; } inline long xmodmul0(long a, long b) { return (long)(((int)( ( (int64_t)(a)*(int64_t)(b) ) % (int64_t)(BIGPRIME) ))%BIGPRIME); } #endif // ifdef USE_DMOD static int table_invs[20] = {0,1, 536870895, 357913930, 805306342, 214748358, 178956965, 920350105, 402653171, 477218573, 107374179, 97612890, 626349377, 330382089, 997045947, 71582786, 738197480, 442128972, 775480181, 226050903}; inline long invmod0(long aa) { long a=aa; // if |a| is small, use look-up table: if ((a>0)&&(a<20)) return table_invs[a]; long ma=-a; if ((ma>0)&&(ma<20)) return -table_invs[ma]; // if a = BIGPRIME-ma with ma small, use look-up table: ma+=BIGPRIME; // = BIGPRIME-a if ((ma>0)&&(ma<20)) return -table_invs[ma]; // if a = -BIGPRIME+ma with ma small, use look-up table: ma=a-BIGPRIME; if ((ma>0)&&(ma<20)) return table_invs[ma]; // General code, use Euclidean Algorithm: long x=0,oldx=1,newx,b=BIGPRIME,c,q; while (b!=0) { q = a/b; c = a - q*b; a = b; b = c; newx = oldx - q*x; oldx = x; x = newx; } if (a==1) {return oldx;} if (a==-1) {return -oldx;} cout << "invmod0 called with " << a << " -- not invertible!\n"; abort(); return 0; } inline int invmod0(int aa) { int a=aa; // if |a| is small, use look-up table: if ((a>0)&&(a<20)) return table_invs[a]; int ma=-a; if ((ma>0)&&(ma<20)) return -table_invs[ma]; // if a = BIGPRIME-ma with ma small, use look-up table: ma+=BIGPRIME; // = BIGPRIME-a if ((ma>0)&&(ma<20)) return -table_invs[ma]; // if a = -BIGPRIME+ma with ma small, use look-up table: ma=a-BIGPRIME; if ((ma>0)&&(ma<20)) return table_invs[ma]; // General code, use Euclidean Algorithm: int x=0,oldx=1,newx,b=BIGPRIME,c,q; while (b!=0) { q = a/b; c = a - q*b; a = b; b = c; newx = oldx - q*x; oldx = x; x = newx; } if (a==1) {return oldx;} if (a==-1) {return -oldx;} cout << "invmod0 called with " << a << " -- not invertible!\n"; abort(); return 0; } #endif // ifndef _XMOD_H eclib-2013-01-01/libsrc/eclib/smatrix.h0000644000175200017520000000433611774563612014316 00000000000000// smatrix.h: manage declarations for sparse integer matrix classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Original version by Luiz Figueiredo #if !defined(_SMATRIX_H) #define _SMATRIX_H 1 //flags that this file has been included #include "matrix.h" #include "svector.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #include "smat.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #include "smat.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim // SCALAR_OPTION may be set to 1 or 2 by user #if (SCALAR_OPTION==1) #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #else #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #endif // else user must use the unabbreviated names #endif eclib-2013-01-01/libsrc/eclib/subspace.h0000644000175200017520000000422111774563612014425 00000000000000// subspace.h: manage declarations of subspace classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_SUBSPACE_H) #define _SUBSPACE_H 1 //flags that this file has been included #include "matrix.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #include "sub.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #include "sub.h" #undef scalar #undef vec #undef mat #undef subspace #undef svec #undef smat #undef smat_elim // SCALAR_OPTION may be set to 1 or 2 by user #if (SCALAR_OPTION==1) #define scalar int #define vec vec_i #define mat mat_i #define subspace subspace_i #define svec svec_i #define smat smat_i #define smat_elim smat_i_elim #else #define scalar long #define vec vec_l #define mat mat_l #define subspace subspace_l #define svec svec_l #define smat smat_l #define smat_elim smat_l_elim #endif // else user must use the unabbreviated names #endif eclib-2013-01-01/libsrc/eclib/method.h0000644000175200017520000000634011774563612014104 00000000000000// method.h: preprocessor definitions for linear algebra options ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_METHOD_H) #define _METHOD_H 1 //flags that this file has been included // Linear algebra options: #ifndef METHOD // So you can override the setting at compile time #define METHOD 2 #endif //=0 for standard int arithmetic //=1 for long-long arithmetic (obsolete) //=2 for ints with modular method (usually best in practice) //=3 for multi-length method (slower) //=4 for multi-length modular (not really used) //=5 for standard long arithmetic //=6 for longs with modular method #if (METHOD==2)||(METHOD==4)||(METHOD==6) #define MODULAR // Causes linear algebra to be done modulo global MODULUS #endif #if (METHOD==3)||(METHOD==4) #define MULTI #endif //The next two cause scalar, vector, matrix to be defined properly: #if (METHOD==0)||(METHOD==2) #define SCALAR_OPTION 1 #endif #if (METHOD==5)||(METHOD==6) #define SCALAR_OPTION 2 #endif #include "arith.h" // defines BIGPRIME #include "vector.h" #include "matrix.h" #include "subspace.h" #include "smatrix_elim.h" #ifdef MULTI #define SCALAR bigint #define VEC vec_m #define MAT mat_m #define SUBSP msubspace #include "marith.h" #include "mvector.h" #include "mmatrix.h" #include "msubspace.h" #define MODULUS atoI(string("6074000003").c_str()) // will convert // this string to // a bigint #else #define MODULUS BIGPRIME // used for modular linear algebra #define SCALAR scalar #define VEC vec #define MAT mat #define SUBSP subspace #endif #ifdef MODULAR #define EIGENSPACE(a,b) peigenspace(a,b,MODULUS) #define SUBEIGENSPACE(a,b,c) psubeigenspace(a,b,c,MODULUS) #define COMBINE(a,b) pcombine(a,b,MODULUS) #define RESTRICT(a,b) prestrict(a,b,MODULUS) #else #define EIGENSPACE(a,b) eigenspace(a,b) #define SUBEIGENSPACE(a,b,c) subeigenspace(a,b,c) #define COMBINE(a,b) combine(a,b) #define RESTRICT(a,b) restrict_mat(a,b) #endif #if (METHOD==0) #define form_finder form_finder0 #else #if (METHOD==1) #define form_finder form_finder1 #else #if (METHOD==2) #define form_finder form_finder2 #else #if (METHOD==3) #define form_finder form_finder3 #else #if (METHOD==4) #define form_finder form_finder4 #else #if (METHOD==5) #define form_finder form_finder5 #else #if (METHOD==6) #define form_finder form_finder6 #endif #endif #endif #endif #endif #endif #endif #endif eclib-2013-01-01/libsrc/eclib/newforms.h0000644000175200017520000002212311774563612014461 00000000000000// File NEWFORMS.H ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include "xsplit.h" // which includes method.h class newforms; class jumps; /* Data stored in a newform (and in data files newforms/x$N): (Numbers refer to lines of data file) Items 1-18 are "int" while the ap and aq are "short" 3. sfe : sign of functional equation (=-product of aq) 4. ap0 : p0'th Hecke eigenvalue, p0=smallest good prime 5. np0 : np0=1+p0-ap0 6. dp0 : dp0/np0=L/P=L(f,1)/2x 7. lplus : prime =1 (mod 4) with L(f,lplus,1) nonzero 8. mplus : L(f,lplus,1)*sqrt(l)=mplus*x 9. lminus : prime =3 (mod 4) with L(f,lminus,1) nonzero 10. mminus : L(f,lminus,1)*sqrt(-l)=mminus*yi 11-14. a, b, c, d : entries of a matrix M=[a,b;N*c,d] in Gamma_0(N) s.t. 15. dotplus : the integral of f over {0,M(0)} is 16. dotminus : dotplus*x+dotminus*yi 17. type : type 1 if period lattice = [2x,x+yi], type 2 if [x,yi] 18. degphi : degree of modular parametrization aq : list of Wq-eigenvalues at bad primes ap : list of Tp- & Wq-eigenvalues at all primes */ class newform { friend class newforms; public: newforms *nf; // the "parent" int sign; // 1/-1 for old-style newform, 0 for old-style h1newform vec bplus,bminus; // DUAL eigenvectors scalar type; // 2 for rectangular, 1 for triangular // period lattice long index; // splitting index, -1 if not known vector aplist, aqlist; long ap0; // Eigenvalue of first "good" p long sfe; // sign of functional equation long cuspidalfactorplus, cuspidalfactorminus; // pdot =cuspidalfactor*np0 long pdot,np0,dp0; // np0=1+p0-ap0, pdot = maninvector(p0).bplus, // = cuspidalfactor*dp0 rational loverp; // L(f,1)/x where x = least real part of a period // =np0/dp0 long lplus, lminus; // primes = +1, -1 mod 4 long mplus, mminus; // mplus*x=sqrt(lplus)*L(fxlplus,1) // mminus*yi=sqrt(-lminus)*L(fxlminus,1) long a,b,c,d,dotplus,dotminus; // matrix for period integration // Either type=1, lattice=[2x,x+yi] // Or type=2, lattice=[x,yi] // & integral over [a,b;Nc,d] is dotplus*x+dotminus*yi long degphi; // degree of Weil parametrization vec coordsplus, coordsminus; // vector components of each freegen long denomplus, denomminus; int j0; long fac; newform(void) {;} // newform(const vec& v, const vector& ap, newforms* nfs,long ind=-1); newform(const vector& data, const vector& aq, const vector& ap, newforms* nfs); newform(const vec& vplus, const vec& vminus, const vector& ap, newforms* nfs,long ind=-1); void add_more_ap(int nap); void display(void) const; // Testing function int check_expand_contract(); // To fix eigenvalues lists after finding a newform void fixup_eigs(); // To fix eigenvalues lists before/after recovering bases void unfix_eigs(); void refix_eigs(); // To find BSD ratio: void find_bsd_ratio(); // To find projected coords: void find_coords_plus_minus(); // To find cuspidal factors: void find_cuspidal_factors(); // To find twisting primes: void find_twisting_primes(); // To find deg(phi): void find_degphi(); // To get matrix and scale factors when sign==0 ... void find_matrix(); }; class newforms :public level, splitter_base { friend class newform; private: int verbose; long maxdepth, cuspidal, sign; int basisflag; // is set, then use() only sets bases for newforms // already defined. mat opmat(int i, int d, int v=0) {return h1->opmat(i,d,v);} mat opmat_restricted(int i, const subspace& s, int d, int v=0) {return h1->opmat_restricted(i,s,d,v);} smat s_opmat(int i, int d, int v=0) {return h1->s_opmat(i,d,v);} smat s_opmat_restricted(int i, const ssubspace& s, int d, int v=0) {return h1->s_opmat_restricted(i,s,d,v);} long matdim(void) {return h1->dimension;} long matden(void) {return h1->denom3;} vector eigrange(int i) {return h1->eigrange(i);} long dimoldpart(const vector l); protected: vec mvp; map mvlplusvecs, mvlminusvecs; oldforms* of; homspace *h1, *h1plus, *h1minus, *h1full; int j0; // data used for ap computation std::set jlist; public: long n1ds, j1ds; vector nflist; newforms(long n, int disp) :level(n), verbose(disp), of(0), h1(0), h1plus(0), h1minus(0), h1full(0) {;} ~newforms(void); void display(void) const; void display_modular_symbol_map(void) const; void output_to_file(int binflag=1) const; void set_sign(int s) {sign=s;} int get_sign() {return sign;} void makeh1(int s); // add newform with basis b1, eiglist l to current list (b2 not used): void use(const vec& b1, const vec& b2, const vector l); // find newforms using homology; ntp is number of eigenvalues to use // for oldforms, *not* the number computed via homology (use addap() // for that): void createfromscratch(int s, long ntp); // read newforms from file, if it exists, otherwise (perhaps) revert // to createfromscratch: void createfromdata(int s, long ntp, int create_from_scratch_if_absent=1); // Compute homspace::projcoord, so projchain can be used // Replaces coord_vecs of homspace with projections onto eigenspaces // NB if #newforms>1 this MUST be re-called after any sorting of newforms void make_projcoord(); // Look for a j0 such that nflist[i].bplus/bminus[j0]!=0 for all i, or a set of such j void find_jlist(); // Create from one or a list of elliptic curves of the right conductor: void createfromcurve(int s, CurveRed C, int nap=25); void createfromcurves(int s, vector Clist, int nap=25); // read newforms from old-style data files (eigs/x$N and intdata/e$N): void createfromolddata(); // Construct bases (homology eigenvectors) from eigenvalue lists: // flag controls what ::use() does with the nfs when found void makebases(int flag); // Construct H1 newforms, given H1+ and H1- newforms void merge(); vector apvec(long p); // computes a[p] for each newform void addap(long last); // adds ap for primes up to the last'th prime // Sort newforms void sort(int oldorder=0); // To fix eigenvalues lists before/after recovering bases void unfix_eigs(); void refix_eigs(); // for the i'th newform return the value of the modular symbol {0,r} rational plus_modular_symbol(const rational& r, long i=0) const; rational minus_modular_symbol(const rational& r, long i=0) const; pair full_modular_symbol(const rational& r, long i=0) const; // next three implemented in periods.cc // Given newform with no intdata, compute least real (part of) // period -- unless sfe=-1 and n=square, in which case return 0 int get_real_period(long i, bigfloat& x, int verbose=0) const; // Given newform with no intdata, compute least imag (part of) period int get_imag_period(long i, bigfloat& y, int verbose=0) const; // Given all data, compute the periods as a Cperiods Cperiods getperiods(long i, int method=-1, int verbose=0); // Given all data & Cperiods, compute the curve (using fixc6 etc) Curve getcurve(long i, int method, bigfloat& rperiod, int verbose=0); // Attempt to compute and display the elliptic curve for each // newform in forms; return a (sub)list of newform indices where this failed. vector showcurves(vector forms, int verbose); // next three implemented in pcprocs.cc // Computes x0, y0 (real & imag parts of periods) & a matrix which // gives these scaled by dotplus & dotminus. rp_known is set if we // know x0 to be the least real part of a period (usually true). int find_matrix(long i, long dmax, int&rp_known, bigfloat&x0, bigfloat&y0); // Compute both periods from the (known) matrix [a,b;Nc,d] and // scaling factors dotplus, dotminus. Return success flag. int get_both_periods(long i, bigfloat&x0, bigfloat&y0); // Given an imaginary period y1, finds a prime lminus =3(mod 4) and // <=lmax for which L(f,lminus,1) is nonzero and hence a multiple // mminus of y1. // if lmax==0 it carries on until a suitable lminus is found int find_lminus(long i, long lmax, const bigfloat& y1); }; void output_to_file_no_newforms(long n, int binflag=1); vector eiglist(const newform& f, int oldorder=0); eclib-2013-01-01/libsrc/eclib/splitbase.h0000644000175200017520000000524011774563612014610 00000000000000// splitbase.h: Declaration of class splitter_base ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_SPLITBASE_H) #define _SPLITBASE_H 1 //flags that this file has been included // The following class must be a base class of any class wishing to // use the form_finder class; the using class must implement some or // all of these virtual functions before creating a form_finder with // "this" as first parameter in the constructor: // // In all cases implement opmat, matdim, matden, use; implement eigrange // iff you are going to use the recursive search function find() // // opmat(i) returns the i'th operator for i>=0; opmat(-1) should return // the conjugation matrix in the case where target dimension is 2 (i.e. // plusflag=0) and basis vectors bplus, bminus are required. // // matdim() returns the size of the matrices, i.e. dimension of ambient space // // matden() returns the implicit denominator of all matrices, needed to scale // eigenvalues // // eigrange(i) returns a list of possible eigenvalues for opmat(i) // // use(basis1, basis2, eiglist) provides whatever processing is done with the // 1-dimensional eigenspaces as found. // (basis2 will not be used when plusflag=1) class splitter_base { public: virtual mat opmat(int,int,int=0) = 0; virtual mat opmat_restricted(int,const subspace& s, int,int=0) = 0; virtual smat s_opmat(int,int,int=0) = 0; virtual smat s_opmat_restricted(int,const ssubspace& s, int, int=0) = 0; virtual long matdim(void) = 0; virtual long matden(void) = 0; virtual vector eigrange(int) = 0; virtual long dimoldpart(const vector) = 0; virtual void use(const vec&, const vec&, const vector) = 0; virtual ~splitter_base() {;} }; #endif eclib-2013-01-01/libsrc/eclib/xsplit.h0000644000175200017520000000532111774563612014145 00000000000000// xsplit.h: Declaration of class form_finder ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #if !defined(_XSPLIT_H) #define _XSPLIT_H 1 //flags that this file has been included #include "method.h" // #defines form_finder=form_finder0/1/2/3/4 #include "splitbase.h" // flags set on construction: // dual: use dual bases throughout (the usual case) // plusflag: if 1 then targetdim=1 and conjmat not used // if 0 then targetdim=2 and conjmat is used // bigmats: if 1 then uses opmat() to get operators on ambient space, // does its own restriction to the current subspace; if 0 then uses // opmat_restricted() to get operators restricted to current space // directly -- ONLY possible when dual=1 class form_finder { protected: splitter_base* h; int plusflag, dual, bigmats, verbose, targetdim; long maxdepth, mindepth, depth, subdim, dimen; SCALAR denom1; ssubspace** nest; // array of pointers to subspaces // "Current" subspace is *nest[depth] of dimension subdim vector eiglist; vec bplus, bminus; int *havemat; vector opfilenames; // temp filenames smat conjmat; // only used if plus==0 and bigmats==1 smat the_opmat; smat *submats; // holds current restriction for i>0 void make_opmat(long i); // puts it in the_opmat void make_submat(); void go_down(long eig, int last=0); void go_up(); void make_basis(); vec getbasis1(const ssubspace* s); //assuming dim(s)=1, get basis vector public: form_finder(splitter_base* hh, int plus, int maxd, int mind=0, int dualflag=1, int bigmatsflag=0, int v=0); ~form_finder(void); void find(); void recover(vector< vector > eigs); void splitoff(const vector& eigs); vec getbasis() const {return bplus;} vec getbasisplus() const {return bplus;} vec getbasisminus() const {return bminus;} }; #endif eclib-2013-01-01/libsrc/eclib/realroots.h0000644000175200017520000000257611774563612014645 00000000000000// realroots.h: declarations of funtions for real roots of polynomials ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// bigfloat safe_sqrt(const bigfloat& x); bigfloat cube_root(const bigfloat& x); // coeff contains deg+1 reals starting with the leading coefficient // which must be nonzero // // we assume the roots are distinct vector realroots( const vector& coeff ); // As above but only root in the interval [-1,1] vector realroots11( const vector& coeff ); eclib-2013-01-01/libsrc/eclib/mglobsol.h0000644000175200017520000000436411774563612014446 00000000000000// mglobsol.h: declaration of class quartic_sieve and functions for quartic solubility testing ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include "mquartic.h" #include "sieve_search.h" // Function for naive search, no sieving: int ratpoint(const quartic& g, const bigint& min, const bigint& max, bigint& xx, bigint&yy, bigint& zz); // class for fancier sieve-assisted search class quartic_sieve : public point_processor { private: quartic *g; bigint a,b,c,d,e,roota,roote; bigint pu,pv,pw; // coords of point found int verbose, easy, use_stoll; long ulim; int num_aux; long* auxs; int** xgood_mod_aux; int** squares; long* umod; long nwprimes; long* wprimes; long* uprimes; long npoints, maxnpoints; int process(const bigint& x, const bigint& y, const bigint& z) {pu=x; pv=y; pw=z; npoints++; //cout<<"[x,y,z]=["<=maxnpoints); } // (x,y,z) as returned by ms's sieve; the point is (x/z,y/z^2) public: quartic_sieve(void) {;} quartic_sieve(quartic * gg, int moduli_option=2, int verb=0); ~quartic_sieve(); long search(double h_lim, long maxnpts=1, int posxonly=0); long stoll_search(double h_lim, int posxonly=0); long search_range(int lower, bigfloat lower_bound, int upper, bigfloat upper_bound, int posxonly=0); void getpoint(bigint& x, bigint& y, bigint& z) {x=pu;y=pv;z=pw;} }; eclib-2013-01-01/libsrc/eclib/desc2.h0000644000175200017520000000317011774563612013622 00000000000000// desc2.h: declaration of second descent (via 2-isogeny) procedure ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// int desc2(const bigint& c, const bigint& d1, const bigint& d2, const vector& plist, const vector& supp, const vector& bgens, long mask, double hlim, bigint& x, bigint& y, bigint& z, int verb, int selmer_only=0, int alldesc=0); // Works on homogeneous space (d1,0,c,0,d2) // Returns // -1 if it certainly has no points (if no ELS descendents) // +1 if it has a point (coordinates returned in x, y, z) // 0 if undecided (ELS descendents exist but no rational points were found) // if alldesc==1 it does not stop when it finds one descendent with a point on it, // but goes on to look at all the others. eclib-2013-01-01/libsrc/eclib/options.h0000644000175200017520000002104311774563612014314 00000000000000// options.h: declaration & implementation of class to handle mwrank options ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include "GetOpt.h" #define DEFAULT_QUIET 0 #define DEFAULT_VERBOSE 1 #define DEFAULT_PRECISION 15 #define DEFAULT_HLIMQ 10 #define DEFAULT_NAUX 8 #define DEFAULT_HLIMC 0 #define DEFAULT_TRACEEQUIV 0 #define DEFAULT_PTL -99 // if not set manually will be set to same as verbose #define DEFAULT_OUTPUT_PARI 0 #define DEFAULT_SELMER 0 // if set will do only local tests to get Selmer rank #define DEFAULT_2ND_DESCENT 1 // if set will do 2nd descent (2-torsion curves) #define DEFAULT_SAT_BOUND 1000 // bound on saturation primes class mrank_options { private: int quiet; // 0/1, controls header output int verbose; // 0-3, controls output verbosity long precision; // 1-\infty, controls decimal precision long hlimq; // 1-20, height limit for quartic search long naux; // number of primes used in syzygy sieve long hlimc; // 1-15, height limit for curve search int ptl; // 0/1, controls whether points are output int traceequiv; // 0/1, controls equivalence tracing (debugging only) int output_pari; // 0/1, controls pari-abbreviated output int selmer_only; // 0/1, if set only computes Selmer rank int second_descent; // 0/1, if set does 2nd descent int saturation_bound; // 0-infty, controls saturation public: mrank_options(void) //set default values :quiet(DEFAULT_QUIET), verbose(DEFAULT_VERBOSE), precision(DEFAULT_PRECISION), hlimq(DEFAULT_HLIMQ), naux(DEFAULT_NAUX), hlimc(DEFAULT_HLIMC), ptl(DEFAULT_PTL), traceequiv(DEFAULT_TRACEEQUIV), output_pari(DEFAULT_OUTPUT_PARI), selmer_only(DEFAULT_SELMER), second_descent(DEFAULT_2ND_DESCENT), saturation_bound(DEFAULT_SAT_BOUND) { ; } mrank_options(int q, int v, long p, long hq, long nx, long hc, int pl, int teq, int o, int sel, int d2, long sat) :quiet(q), verbose(v), precision(p), hlimq(hq), naux(nx), hlimc(hc), ptl(pl), traceequiv(teq), output_pari(o), selmer_only(sel), second_descent(d2), saturation_bound(sat) {;} void set(GetOpt& getopt) { int option_char; while ((option_char = getopt ()) != EOF) switch (option_char) { case 'h': help(); abort(); break; case 'q': quiet = 1; break; case 'p': precision = atoi (getopt.optarg); break; case 'v': verbose = atoi (getopt.optarg); break; case 'b': hlimq = atoi (getopt.optarg); break; case 'x': naux = atoi (getopt.optarg); break; case 'l': ptl = 1; break; case 't': traceequiv = 1; break; case 'o': output_pari = 1; break; case 's': selmer_only = 1; break; case 'd': second_descent = 0; break; case 'c': hlimc = atoi (getopt.optarg); if(hlimc>15) { cout << "NB: reducing hlimc to 15\n"; } break; case 'S': saturation_bound = atoi (getopt.optarg); break; case '?': cerr<< "usage: mwrank"<< " [q p v b x c l t o s d>]\n"; } if(ptl==-99) ptl=(verbose>0); if(naux<1) naux=1; // syzygy sieving MUST have p=3 in it. } void set(int argc, char **argv) { GetOpt getopt (argc, argv, "hqp:v:b:x:ltosdc:S:"); set(getopt); } void help(void) { cerr << "mrank/mwrank command line options (can be in any order):\n\n"; cerr << "-h\t""help""\t\tprints this info and quits\n"; cerr << "-q\t""quiet""\t\tturns OFF banner display\n"; cerr << "-v n\t""verbosity""\tsets verbosity to n (default="<0) naux=n; else naux=1;} void set_hlimc(long h) {hlimc=h;} void set_ptl(int p) {ptl=p;} void set_traceequiv(int t) {traceequiv=t;} void set_selmer_only(int s) {selmer_only=s;} void set_second_descent(int d) {second_descent=d;} void set_saturation_bound(long sat) {saturation_bound=sat;} }; eclib-2013-01-01/libsrc/eclib/qc.h0000644000175200017520000000271511774563612013231 00000000000000// qc.h: declaration of function for mapping quartic point to curve ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // Given a quartic g with a point (x0:y0:z0) on it, // constructs a point P on the corresponding minimal elliptic curve. // This is supposed to be on the given curve E: error printed if not. // The point is returned indirectly. void qc(quartic& g, const bigint& x0, const bigint& y0, const bigint& z0, Curvedata * E, Curvedata* IJ_curve, const bigint& tr_u, const bigint& tr_r, const bigint& tr_s, const bigint& tr_t, Point& P, int verbose=0); eclib-2013-01-01/libsrc/eclib/curvemod.h0000644000175200017520000000626711774563612014460 00000000000000// curvemod.h: declaration of class curvemodq for elliptic curve mod (prime) q ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // allow for multiple includes #ifndef _CURVEMOD_ #define _CURVEMOD_ // Class for an elliptic curve mod q // // The q is fixed -- must be set before use! // class pointmodq; class curvemodq { protected: galois_field* Fq; // pointer to ground field bigint q; // the modulus gf_element a1,a2,a3,a4,a6; // the coefficients mod q bigint order; // number of points (0 if not set) public: // constructors curvemodq(void); curvemodq(const Curve& E, const bigint& qq); ~curvemodq(); curvemodq(const curvemodq& C); // copy constructor void operator=(const curvemodq& C); // assignment // access void get_ai(gf_element& aa1, gf_element& aa2, gf_element& aa3, gf_element& aa4, gf_element& aa6) const { aa1=a1; aa2=a2; aa3=a3; aa4=a4; aa6=a6; } // output void output(ostream& os) const {os<<"["< getgens() const =0; virtual vector getpoints() =0; }; class two_descent { private: rank12 * r12; // does all the work int verbose, two_torsion_exists, selmer_only; int success, certain, fullmw; long rank, rank_bound, selmer_rank, sat_bound; mw* mwbasis; vector qai; // Coefficients of initial curve Curvedata e_orig, e_min; bigint u,r,s,t; // transform between e_orig and e_min bigint v; // scaling factor needed to make input curve integral void do_the_descent(long firstlim, long secondlim, long n_aux, int second_descent); // (called by constructors) public: // Constructor: // // sel is selmer_only switch // firstlim is bound on |x|+|z| // secondlim is bound on log max {|x|,|z| }, i.e. logarithmic // n_aux only relevant for general 2-descent when 2-torsion trivial // n_aux=-1 causes default to be used (depends on method) // second_descent only relevant for descent via 2-isogeny two_descent(Curvedata* ec, int verb=0, int sel=0, long firstlim=20, long secondlim=5, long n_aux=-1, int second_descent=1); // Version which takes a vector [a1,a2,a3,a4,a6] of *rationals* two_descent(vector ai, int verb=0, int sel=0, long firstlim=20, long secondlim=5, long n_aux=-1, int second_descent=1); ~two_descent() {delete r12; delete mwbasis;} long getrank() const {return rank;} long getrankbound() const {return rank_bound;} long getselmer() const {return selmer_rank;} long getselmerprime() const {return r12->getselmerprime();} Curvedata getEprime() const {return r12->getEprime();} long getselmerphi() const {return r12->getselmerphi();} long getselmerphiprime() const {return r12->getselmerphiprime();} long getcertain() const {return certain;} int ok() const {return success;} int get2t() const {return two_torsion_exists;} int getfullmw() const {return fullmw;} bigfloat regulator() {return mwbasis->regulator();} vector getbasis(); // returns points on original model vector getpbasis(); // returns points on integral model void report_rank() const; void saturate(long sat_bd); // =0 for none void show_gens(); // display points on original model void show_result_status(); void pari_output(); }; eclib-2013-01-01/libsrc/egr.cc0000644000175200017520000005641311774563612012467 00000000000000// egr.cc: implementation of functions for reduction of points & component groups ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include //#define DEBUG_EGR //#define DEBUG_EGR_EXTRA // return 1 if P mod p is nonsingular: int ComponentGroups::HasGoodReduction(const Point& P, const bigint& p) { #ifdef DEBUG_EGR cout<<"Testing whether point " <

0 { #ifdef DEBUG_EGR cout<<"no (real f\" condition)"<& plist, bigint& p0) { for(unsigned int i=0; i ComponentGroups::ComponentGroup(const bigint& p) { vector ans(1); if(p==0) ans[0]=conncomp; // 1 or 2 else { ans[0]=1; map::const_iterator ri = reduct_array.find(p); if(ri==reduct_array.end()) return ans; // p has good reduction ans[0] = (ri->second).c_p; // usual case: cyclic of order cp int code=(ri->second).Kcode.code; if((code%10==1)&&even((code-1)/10)) // Type I*m, m even: [2,2] {ans[0]=2; ans.push_back(2);} } return ans; } // Returns 1 iff P and Q have same image in the component group at p: // int ComponentGroups::InSameComponent(const Point& P, const Point& Q, const bigint& p) { if(P==Q) return 1; return HasGoodReduction(P-Q,p); } // For reduction type Im, multiplicative reduction where component // group is cyclic of order m, using Tate curve formula from Silverman // Returns a such that P mod pr maps to +a or -a mod m in the // component group long ComponentGroups::ImageInComponentGroup_Im_pm(const Point&P, const bigint& p, int m) { #ifdef DEBUG_EGR cout<<"In ImageInComponentGroup_Im_pm() with point " <

0 such that j*P has good reduction at p; the // component group order is given so we only test j dividing this // // Since ComponentGroups are small we use nothing fancy here... int ComponentGroups::OrderInComponentGroup(const Point& P, const bigint& p, vector grp) { #ifdef DEBUG_EGR cout<<"In OrderInComponentGroup() with point " <

& Plist, const bigint& p) { int j,k,m,n,n0,n1,npts=Plist.size(); #ifdef DEBUG_EGR cout<<"in gr1prime with p="< CG = ComponentGroup(p); long CGexpo=CG[0]; long CGOrder=CGexpo; if(CG.size()>1) CGOrder*=CG[1]; // =4 #ifdef DEBUG_EGR cout<<"Component group structure = "<1) { #ifdef DEBUG_EGR cout<<"Non-cyclic component group "<0) // Make this the first point in list { Plist[k]=Plist[0]; Plist[0]=Pk; Pk=Plist[k]; } logm+=1; m*=2; break; } // end of case 0 case 1: // one generator so far: do we have a second generator? { if (InSameComponent(Pk,Plist[0],p)) // no { Plist[k]=Pk-Plist[0]; } else // yes { if(k>1) // Make this the second point in list { Plist[k]=Plist[1]; Plist[1]=Pk; Pk=Plist[k]; } Third = Plist[0]+Plist[1]; logm+=1; m*=2; } break; } // end of case 1 case 2: // we already have 2 generators { if (InSameComponent(Pk,Plist[0],p)) { Plist[k]=Pk-Plist[0]; } else if (InSameComponent(Pk,Plist[1],p)) { Plist[k]=Pk-Plist[1]; } else { if (InSameComponent(Pk,Third,p)) { Plist[k]=Pk-Third; } else { cout<<"Problem in non-cyclic component group case!"<0) Plist[0]=2*Plist[0]; if(logm>1) Plist[1]=2*Plist[1]; return m; } // end of cyclic switch #ifdef DEBUG_EGR cout<<"Cyclic component group of order "<=n1 for convenience if(n1>n0) { #ifdef DEBUG_EGR cout<<" swapping "<n0: we gain something { long a,b,g=gcd(n0,n1); // Now find u (coprime to g) s.t. (n1/g)P1 == u* (n0/g)P0 Point Q0=(n0/g)*P0; Point Q=Q0; // (P0.getcurve()); Point Q1=(n1/g)*P1; long u=1; //0; #ifdef DEBUG_EGR cout<<"Looking for u"<1 || (!InSameComponent(Q,Q1,p))) {u++; Q=Q+Q0;} #ifdef DEBUG_EGR cout<<" u="<& Plist, int real_too) { if(Plist.size()==0) return 1; vector plist = the_bad_primes; if(real_too && (conncomp==2)) plist.push_back(BIGINT(0)); #ifdef DEBUG_EGR cout<<"Using primes "< moduli, const mat& image); bigint egr_index(const vector& Plist, int real_too) { if(Plist.size()==0) return BIGINT(1); ComponentGroups CGS(Plist[0].getcurve()); vector plist = getbad_primes(CGS); if(real_too && (getconncomp(CGS)==2)) plist.push_back(BIGINT(0)); #ifdef DEBUG_EGR cout<<"Using primes "< > > imagematrix; vector moduli; int n=0; for(vector::const_iterator pi=plist.begin(); pi!=plist.end(); pi++) { #ifdef DEBUG_EGR cout<<"p = "<<(*pi)< > im=MapPointsToComponentGroup(CGS,Plist,*pi); #ifdef DEBUG_EGR cout<<"image = "; for(unsigned int j=0; j CG=CGS.ComponentGroup(*pi); for(unsigned int ni=0; ni PointReps; // the three nonzero images: vector > ims(3); ims[0]=vector(2); ims[0][0]=1; ims[0][1]=0; ims[1]=vector(2); ims[1][0]=0; ims[1][1]=1; ims[2]=vector(2); ims[2][0]=1; ims[2][1]=1; for (k=0; k 10*m // I*m -> 10*m+1 // I, II, III, IV -> 1, 2, 3, 4 // I*, II*. III*, IV* -> 5, 6, 7, 8 // //#define DEBUG_INDEX bigint comp_map_image(const vector moduli, const mat& image) { bigint ans; ans=1; mat m=image; #ifdef DEBUG_INDEX cout<<"In comp_map_image, m="< #include #include #include #include #include galois_field ffmodq::Fq; curvemodq ffmodq::E; FqPoly ffmodq::f1; FqPoly ffmodq::f2; // special constructor to initialize the curve and field only: ffmodq::ffmodq(const curvemodq& EE) { E=EE; Fq=get_field(EE); // cout<<"In ffmodq constructor"<= 0; i--) result = result*value + PolyCoeff(f,i); return result; } gf_element ffmodq::evaluate(const pointmodq& P) const { if(P.is_zero()) {cout<<"ffmodq error: attempt to evaluate at "<=3 ffmodq fT = weil_pol(T, m); // cout<<"T = "< "< "< #include #include #include #include #include #include //#define DEBUG_MINIM bigint root_p(const bigint& a, const bigint& b, const bigint& c, const bigint& d, const bigint& e, const bigint& p) // assuming p|I, p|J, returns the unique alpha mod p // modulo which quartic has a root of multiplicity at least 3 // returns -1 if multiple root is at infinity (if a=b=0 mod p) // (program does not actaully use this dubious feature) { if(div(p,a)&&div(p,b)) return BIGINT(-1); if(div(p,e)&&div(p,d)) return BIGINT(0); // Now we have to find the multiple root, using invariant theory: if(p==2) { return BIGINT(1); // the only other possibility } if(p==3) { if(div(p,a)) return mod(-b*e,p); else return mod(-a*d,p); } bigint b2=sqr(b); bigint ac=a*c; bigint p_seminv = mod(3*b2-8*ac,p); if(is_zero(p_seminv)) // quadruple root { return mod(-b*invmod(4*a,p),p); } else // triple root only { if(div(p,a)) // fourth root is at infinity { return mod(c*invmod(3*b,p),p); } bigint t=invmod(4*a*p_seminv,p); bigint r_seminv = b*b2+8*sqr(a)*d-4*ac*b; bigint alpha = mod((3*r_seminv-b*p_seminv)*t,p); return alpha; } } int minim_p(bigint& a, bigint& b, bigint& c, bigint& d, bigint& e, const bigint& p, scaled_unimod& m) // assuming p^4|I, p^6|J, (or stronger conditions when p=2 or p=3) // returns an equivalent quartic with invariants divided by p^4, p^6; // m holds the transformation matrix, must be initialized (say with identity) // returns success, can be 0 only for p=2 { bigint a0,b0,c0,d0,e0,r; bigint p2=sqr(p), temp; int two = (p==2); int three = (p==3); // First test for trivial case where p^2 divides all coeffs: int p2divall=::divides(a,p2,a0,r); if(p2divall) {p2divall=::divides(b,p2,b0,r);} if(p2divall) {p2divall=::divides(c,p2,c0,r);} if(p2divall) {p2divall=::divides(d,p2,d0,r);} if(p2divall) {p2divall=::divides(e,p2,e0,r);} if(p2divall) // trivial case, all coeffs divisible by p^2 { #ifdef DEBUG_MINIM cout<<"All coeffs divisible by p\n"; #endif a=a0; b=b0; c=c0; d=d0; e=e0; m.u_scale(p); return 1; } // Next test for case where p divides all coeffs: int pdivall=::divides(a,p,a0,r); if(pdivall) { pdivall=::divides(b,p,b0,r);} if(pdivall) { pdivall=::divides(c,p,c0,r);} if(pdivall) { pdivall=::divides(d,p,d0,r);} if(pdivall) { pdivall=::divides(e,p,e0,r);} if(pdivall) // Case where all coeffs are divisible by p // a0 etc hold coeffs/p { #ifdef DEBUG_MINIM cout<<"All coeffs divisible by "<7)&&(vpj>11); // if(smallp==2) return ((vpi>5)&&(vpj>8)&&(vpd>9)); if(smallp==3) return (((vpi>4)&&(vpj>8)) || ((vpi==4)&&(vpj==6)&&(vpd>14))); return (vpi>3)&&(vpj>5); } void minim_all(bigint& ga, bigint& gb, bigint& gc, bigint& gd, bigint& ge, bigint& I, bigint& J, const vector& plist, scaled_unimod& m, int assume_locsol, int verb) { unsigned long i; long j; for(i=0; i ans; int i, d = coeffs.size()-1; // degree if(d<1) return ans; for(i=0; i<=d; i++) SetCoeff(f,d-i,coeffs[i]); #ifdef TRACE_ROOTS cout<<"f = "< coeffs; coeffs.push_back(d); coeffs.push_back(c); coeffs.push_back(b); coeffs.push_back(BIGINT(1)); return rootsmod(coeffs,p).size(); } eclib-2013-01-01/libsrc/random.cc0000644000175200017520000000322011774563612013156 00000000000000// random.cc: implementation of random functions used in smat testing ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// /* codes were copied from the book * Numerical recipes in C, * under "immediate license" agreement, * ( see page xvi of the second edition ). */ #define IA 16807 #define IM 2147483647 #define AM (1.0/IM) #define IQ 127773 #define IR 2836 #define MASK 123459876 float ran0( long& idum ) { long k; float ans; idum ^= MASK; k = (idum)/IQ; idum = IA*(idum - k*IQ) - IR*k; if( idum < 0 ) idum += IM; ans = AM*(idum); idum ^= MASK; return ans; } float ran0( int& idum ) { int k; float ans; idum ^= MASK; k = (idum)/IQ; idum = IA*(idum - k*IQ) - IR*k; if( idum < 0 ) idum += IM; ans = AM*(idum); idum ^= MASK; return ans; } eclib-2013-01-01/libsrc/hilbert.cc0000644000175200017520000000661611774563612013343 00000000000000// hilbert.cc: implementation of Hilbert symbol functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include //#define DEBUG_HILBERT // In all the functions below, the value of the Hilbert symbol is 0 or // 1 (as an int) rather than +1 or -1, for efficiency; int local_hilbert(const bigint& a, const bigint& b, const bigint& p) { static const bigint zero = BIGINT(0); static const bigint two = BIGINT(2); long alpha, beta; bigint u,v; int ans; if(is_zero(a)) {cout<<"Error in local_hilbert(): a==0\n"; return -1;} if(is_zero(b)) {cout<<"Error in local_hilbert(): b==0\n"; return -1;} if(is_zero(p)||is_negative(p)) // p=0 or p=-1 mean the infinite prime { if(is_positive(a)) return 0; if(is_positive(b)) return 0; return 1; } u=a; alpha = divide_out(u,p)%2; // so a=u*p^alpha *square v=b; beta = divide_out(v,p)%2; // so b=v*p^beta *square if(p==two) { // ans = eps4(u)&eps4(v); ans = ((u+1)%4==0); if(ans) ans = ((v+1)%4==0); if(alpha) if(omega8(v)) ans=!ans; if(beta) if(omega8(u)) ans=!ans; return ans; } // now p is odd ans = alphaβ if(ans) ans = ((p+1)%4==0); if(alpha) if(legendre(v,p)==-1) ans=!ans; if(beta) if(legendre(u,p)==-1) ans=!ans; return ans; } int global_hilbert(const bigint& a, const bigint& b, const vector& plist, bigint& badp) { #ifdef DEBUG_HILBERT cout<<"In global_hilbert("<::const_iterator pr = plist.begin(); while(pr!=plist.end()) { badp=*pr++; #ifdef DEBUG_HILBERT cout<<"Testing local condition at "< plist=vector_union(pdivs(a),pdivs(b)); return global_hilbert(a,b,plist,badp); } int global_hilbert(const quadratic& q, const bigint& d, bigint& badp) { bigint D = q.disc(); vector plist = vector_union(pdivs(D),pdivs(d)); return global_hilbert(q[0]*d,D,plist,badp); } int global_hilbert(const quadratic& q, const bigint& d, const vector& plist, bigint& badp) { return global_hilbert(q[0]*d,q.disc(),plist,badp); } eclib-2013-01-01/config.sub0000744000175200017520000010242511737577452012107 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # 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*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: eclib-2013-01-01/doc/0000755000175200017520000000000012071070657010732 500000000000000eclib-2013-01-01/doc/progs.txt0000644000175200017520000001314511761427305012552 00000000000000User programs and documentation ================================================================================ A: Two programs for solving conics over Q, using methods described in Cremona & Rusin, "Efficient solution of rational conics", Mathematics of Computation, 72 (2003), no. 243, pages 1417-1441. -------------------------------------------------------------------------------- 1 solve_conic Solves "semi-diagonal" conics, with equations of the form ax^2+bxz+cz^2=dy^2. Input: 4 integers a b c d, repeat until d=0 is input. Requires d(b^2-4ac) nonzero. Output: both a single solution and a parametric solution. Options (set via compiler flags, not at run-time): 1. TEST_PARAM (default set): if set, outputs parametric solution. 2. VERBOSITY (default=0): if positive, outputs details during solution. 3. CONIC_METHOD (default 4): control which algorithm to use: 0: simple recursion, no reduction 1: recursion with algebraic reduction (Denis Simon) 2: recursion with lattice reduction (best non-factn-free) 3: obsolete 4: Uses factorization-free reduction (best) 5: Uses LLL method -------------------------------------------------------------------------------- 2 solve_legendre Solves diagonal conics, or Legendre equations, of the form ax^2+by^2+cz^2=0. Input: 3 integers a b c, repeat until a=0 is input. Requires abc non-zero. Output: both a single solution and a parametric solution. Options (set via compiler flags, not at run-time): same as solve_conic ================================================================================ B: Two programs for binary cubic forms over Q, using methods described in "Reduction of binary cubic and quartic forms", LMS JCM 2 (1999), 62--92. -------------------------------------------------------------------------------- 1 reduce_cubics Reduces binary cubic forms with integral coefficients (a,b,c,d) Input: 4 integers a b c d, repeat until all are 0 Output: an equivalent reduced cubic with the SL(2,Z) reducing transform. -------------------------------------------------------------------------------- 2 list_cubics Lists binary cubic forms with integral coefficients and given discriminant bound Input: 1 integers maxd Output: if maxd>0: a list of reduced cubics with 0disc>maxd ================================================================================ C: Two programs for elliptic curves over Q (NB Only a small part of the library functionality is represented here) -------------------------------------------------------------------------------- 1 point_search Program to process and/or search for points on an elliptic curve (using an interface to Stoll's ratpoints together with saturation and independence checking of points found) Input: (real) bound on naive height (int) verbosity flag (int) option (1) process points found (2) just list them (list of ints or rationals) [a1,a2,a3,a4,a6] (or a1 a2 a3 a4 a6) curve coefficients, all 0 or EOF to stop (int) Number of points on the curve to be input (usually 0) (int) Rank bound (serach stops when this is reached) (list of triples of ints) known points as [x:y:z] with x,y,z ints. Output: (1) details of any points input, rank and regulator (2) some details of point search, relations between points found, saturation processing, ending with a list of independent points generating the saturation of the points input&found, rank and regulator. -------------------------------------------------------------------------------- 2 indep_test Program to test points on an elliptic curve for independence, using the method described in "On the computation of Mordell-Weil and 2-Selmer Groups of Elliptic Curves", Rocky Mountain Journal 32 no.3 (2002), pp. 953--967. Input: (int) verbosity flag (list of ints or rationals) [a1,a2,a3,a4,a6] (or a1 a2 a3 a4 a6) curve coefficients, all 0 or EOF to stop (int) Number of points on the curve to be input (int) Number of auxiliary primes to use (use rank + a few) Output: (1) Details of test (using reduction of E(Q)/2E(Q)) modulo auxiliary primes (2) Conclusion: certainly independent, or possibly dependent ================================================================================ D: Two-descent and two-coverings of elliptic curves over Q -------------------------------------------------------------------------------- 1 mwrank Documented separately -------------------------------------------------------------------------------- 2 reduce_quartics Program to minimise and reduce (integral binary) quartics Input: Quartic coefficients (a,b,c,d,e), integers, repeated: all 0 to finish Output: Details of minimisation and reduction, ending with a minimal reduced quartic and the associated transform. -------------------------------------------------------------------------------- 3 quartic_points Program to check local solubility and (if locally soluble) search for rational points on a quartic (2-covering of an elliptic curve). Points found are mapped to the Jacobian curve via the 2-covering map. Input: (int) verbosity flag (list of ints) (a,b,c,d,e) quartic coefficients, all 0 to stop (real) naive height bound Output: (1) information about local solubility (2) information about point search, points found on the quartic and their images on the Jacobian elliptic curve. eclib-2013-01-01/doc/Makefile.in0000644000175200017520000003061512071070363012716 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(nobase_dist_doc_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(nobase_dist_doc_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLINT_CFLAGS = @FLINT_CFLAGS@ FLINT_LDFLAGS = @FLINT_LDFLAGS@ FLINT_LIBS = @FLINT_LIBS@ GMP_CFLAGS = @GMP_CFLAGS@ GMP_LDFLAGS = @GMP_LDFLAGS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NTL_CFLAGS = @NTL_CFLAGS@ NTL_LDFLAGS = @NTL_LDFLAGS@ NTL_LIBS = @NTL_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARI_CFLAGS = @PARI_CFLAGS@ PARI_LDFLAGS = @PARI_LDFLAGS@ PARI_LIBS = @PARI_LIBS@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = $(datadir)/doc/@PACKAGE@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nobase_dist_doc_DATA = g0n.txt howto.txt progs.txt mwrank/mwrank.changes mwrank/mwrank.info mwrank/mwrank.options mwrank/mwrank.readme all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nobase_dist_docDATA: $(nobase_dist_doc_DATA) @$(NORMAL_INSTALL) test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" @list='$(nobase_dist_doc_DATA)'; test -n "$(docdir)" || list=; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(docdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(docdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(docdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_dist_doc_DATA)'; test -n "$(docdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_dist_docDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_dist_docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nobase_dist_docDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-nobase_dist_docDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: eclib-2013-01-01/doc/g0n.txt0000644000175200017520000006401111761427271012104 00000000000000Documentation for the modular symbol programs in the eclib library (guide to source code) % created 20070125 % Time-stamp: <2012-05-07 17:30:02 jec> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Note that until March/April 2012 my source code was split into four subdirectories (procs, qcurves, qrank and g0n) only the last of which contained modular symbol code for computing elliptic curves. The notes here are mostly about the latter. In the current distribution, there are library headers and implementation files in libsrc/eclib and libsrc/ respectively, test programs in tests/ and user programs in progs/. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Level 0: functionality provided from other libraries Basic arithmetic, including polynomials and PARI/NTL interfacing (PARI is only used for integer factorization), linear algebra (including sparse LA), various utilities some of which are independently useful (reduction of cubics and quartics, solving conics, ...). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Level 1: low-level classes probably not useful for users to use directly. NB The efficiency of the implementations here is of crucial importance! ---------------------------------------------------------------------- file: moddata class: level Holds the current level N ("modulus"), its prime factors and divisors, some "global" flags and a reduce() function for reduction modulo N. ---------------------------------------------------------------------- file: moddata class: moddata (derived from level) Holds precomputed arithmetic data for the level, including lookup tables of gcds with N and inverse modulo N Test program: modtest (also tests symb class) ---------------------------------------------------------------------- file: symb class: symb Class for (c:d) or M-symbols. Also holds a pointer to a moddata. Functions for equality testing, normalization. ---------------------------------------------------------------------- file: symb class: modsym Class for {a,b} or modular symbols, where a,b are rational. Includes constructor from a symb. ---------------------------------------------------------------------- file: symb class: symblist Class for an array of symbs with hash function for fast index lookup. ---------------------------------------------------------------------- file: symb class: symbdata (derived from moddata) Class for full M-symbol data. Includes a symblist of "specials" (M-symbols not of the form (c:1) or (1:d)), bijections from the set of M-symbols to/from indices in the range 0..nsymb-1, and implementation of matrix operations (rof, rsof, sof, tof) applied to symb indices. ---------------------------------------------------------------------- file: oldforms class: oldforms Class for retrieving oldforms from stored data files for all levels properly dividing the current level. Computes multiplicities of these. Used for one purpose: in searching for newforms recursively, at any point we will have restricted to some subspace cut out by eigenvalues [a2, a3, a5, ...] and the oldforms member function dimoldpart() will tell us how much of the current dimension is accounted for by oldforms. This enables us to abandon the current recursive branch if it is all old, and for the same reason results in oldforms being discarded and only newforms kept. [NB for this to work it is crucial that before running the newforms search, date for the dividing levels is available. This is handled automatically by the newforms class functions.] ---------------------------------------------------------------------- file: cusp class: cusplist Class to hold an array of inequivalent cusps (=rationals), insert and locate cusps in the list, and test for cusp equivalence (using a moddata pointer to know the level and also whether or not plusflag is set, in which case the equivalence test is affected). ---------------------------------------------------------------------- file: homspace class: mat22 Class to hold a 2x2 matrix, with functions to allow them to act on rationals and symbs ---------------------------------------------------------------------- file: homspace class: matop Class to hold a formal sum of mat22s. Constructors include: Hecke operators T_p, W_q, Heilbronn matrices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Level 3: high-level classes useful for users to use directly. I would expect these to be wrapped for Sage (eventually) ---------------------------------------------------------------------- file: homspace class: homspace (derived from symbdata) The main class for holding a "modular symbols space". The constructor does a lot of work: homspace(long n, // the level int hp, // plus-space flag (0 or 1 or -1) int hcusp, // cuspidal flag (0 or 1) int verbose // verbosity (0 : no output // 1 : basic short output // 2 : lots of detail) ); The plus-space flag switches between working on H_1^+ (by quotienting out extra relations (c:d)=(-c:d)), H_1^-, or the full H_1. If the cupsidal flag is 1 then the space computed is the kernel of the boundary map to the cusps, and all operators are restricted to that subspace. However the "restricted" operators which compute directly the action of Tp etc on a subspace only work properly (1) for subspaces of the dual and (2) for the full (including non-cuspidal) homology. Functionality (most useful class functions only): long h1cuspdim() // returns dim of cuspidal subspace long h1dim() // returns dim of whole space long h1ncusps() // returns number of cusp classes svec schain(const symb& s) // returns coordinates of symb s svec schaincd(long c, long d) // returns coords of symb (c:d) svec schain(long nn, long dd) // returns coords of modsym {0,nn/dd} svec schain(const rational& r) // returns coords of modsym {0,r} vec cycle(long n, long d) // as schain(n,d) but cuspidal only, result is a coordinate vector w.r.t. the basis for cuspidal homology vec cycle(const rational& r) // as schain(r) but cuspidal vec cycle(const modsym& m) // as schain(b)-schain(a) but cuspidal, m={a,b} mat heckeop(long p, int dual, int display=0) // p'th Hecke operator (Tp or W_p according as p does not / does divide level) NB (1) if cuspidal==1, restricts to cuspidal subspace (2) if dual==1, transposes mat heckeop_restricted(long p, const subspace& s, int dual, int display=0) // as previous but restricted to *dual* subspace s, so dual==1 is // mandatory else results are not guaranteed to be meaningful smat s_heckeop(long p, int dual, int display=0) smat s_heckeop_restricted(long p, const ssubspace& s, int dual, int display=0) // Exactly as previous two but returns a sparse matrix mat newheckeop(long p, int dual, int display=0) // Tp computation using Heilbronn matrices. Faster than heckeop(), but not currently implemented in a "restricted" version, hence not used in the main newform-finding programs. *But* for a one-off calculation of a Hecke op on the whole space you should use this one! mat wop(long q, int dual, int display=0) // returns W_q matrix smat s_wop(long q, int dual, int display=0) // returns W_q sparse matrix mat fricke(int dual, int display=0) // returns Fricke involution matrix mat conj(int dual,int display=0) // returns conjugation matrix (=identity if plusflag==1!) mat conj_restricted(const subspace& s, int dual,int display=0) // ditto, restricted to subspace s smat s_conj(int dual, int display=0) // as above, returning sparse mat smat s_conj_restricted(const ssubspace& s, int dual, int display=0) // as above, returning sparse mat vec maninvector(long p) // for good p, returns sum_{a mod p}{0,a/p} vec manintwist(long p) // for good p, returns sum_{a mod p}chi(a){0,a/p} ---------------------------------------------------------------------- file: newforms classes: newform and newforms Overview: newform holds an individual newform, with a pointer to the parent newforms for "global" data; newforms (which is derived from level) contains a vast anout of stuff, explained below, including an array of individual newform-s. ---------------------------------------------------------------------- class: newform For more details see newforms.h Main data fields: newforms *nf; // the "parent" int plusflag; // 1 for old-style newform, 0 for old-style h1newform vec bplus,bminus; // DUAL eigenvectors (bminus only used if plusfalg==0) scalar type; // 2 for rectangular, 1 for triangular // period lattice vector aplist, aqlist; // aplist is a vector of Fourier coefficients, indexed by all primes // aqlist is a vector of the Wq eigenvalues // Bother are needed since (a) the q'th Fourier coefficient is 0 when // q^2|N so does not determine the eigenvalue; (b) the range of the // aplist may not go ar enough to include all bad primes, but we really // want to have all aq (to get the sign of the functional equation, // analytic rank parity etc.) long ap0; // Eigenvalue of first "good" p long sfe; // sign of functional equation rational loverp; // L(f,1)/x where x = least real part of a period // =np0/dp0 // The bext few are technical, needed for computing periods. long cuspidalfactor; // pdot =cuspidalfactor*np0 long pdot,np0,dp0,qdot; // np0=1+p0-ap0, pdot = maninvector(p0).bplus, // = cuspidalfactor*dp0 // qdot={q,infinity}.bplus long lplus, lminus; // primes = +1, -1 mod 4 long mplus, mminus; // mplus*x=sqrt(lplus)*L(fxlplus,1) // mminus*yi=sqrt(-lminus)*L(fxlminus,1) long a,b,c,d,dotplus,dotminus; // matrix for period integration // Either type=1, lattice=[2x,x+yi] // Or type=2, lattice=[x,yi] // & integral over [a,b;Nc,d] is dotplus*x+dotminus*yi long degphi; // degree of Weil parametrization // Not currently being set or used, since our algorithm was too slow // for large levels and we just use MW's programs instead (externally). vec coords; // vector components of each freegen (will // become one column of homspace::projcoord) // Used in mass-production of ap after newforms have been found Member function for newform class: Constructors: newform(const vector& data, const vector& aq, const vector& ap, newforms* nfs); // To be used when constructing from stored data, so no basis vector // -- since we do not compute the H1 space unless we have to newform(const vec& vplus, const vec& vminus, const vector& ap, newforms* nfs,long ind=-1); // To be used when constructing from the recursive search, including basis vector(s) (vminus only relevant when plusflag==0); all the technical data fields will be computed in this constructor, using the parent newforms's homspace. // New constructor(s) needed, from an elliptic curve and/or the data [level, aplist, aqlist] which will need to find the basis vector(s) from splitting off a 1D eigenspace from the appropriate homspace and then use the first constructor above. void add_more_ap(int nap); // Extends the aplist (if necessary) until it contains atleast nap terms. Only used in the second constructor after all the newforms for a given level have been found, so that they all have apslists of the same length. Format of stored data: newforms are stored in files in a directory whose name is set via the environment variable NF_DIR which defaults to "newforms". Filenames within that dir are the level (in decimal) preceded by 'x', e.g. newforms/x11 holds the data for level 11. The filename is constructed by the fiunction nf_filename(), in moddata.h/cc. The filename is constructed by the function char* nf_filename(long n, char c) // use c='x' where it is the callers responsibility to delete[] the result after use. The data files are written by newforms::output_to_file(). The file format is binary (for speed of input/output and compact size -- my definitive newforms dirsctory is 8GB for levels to 130000). The following description is taken from newforms.h: /* Data stored in a newform (and in data files newforms/x$N): (Numbers refer to lines of data file) Items 1-18 are "int" while the ap and aq are "short" 3. sfe : sign of functional equation (=-product of aq) 4. ap0 : p0'th Hecke eigenvalue, p0=smallest good prime 5. np0 : np0=1+p0-ap0 6. dp0 : dp0/np0=L/P=L(f,1)/2x 7. lplus : prime =1 (mod 4) with L(f,lplus,1) nonzero 8. mplus : L(f,lplus,1)*sqrt(l)=mplus*x 9. lminus : prime =3 (mod 4) with L(f,lminus,1) nonzero 10. mminus : L(f,lminus,1)*sqrt(-l)=mminus*yi 11-14. a, b, c, d : entries of a matrix M=[a,b;N*c,d] in Gamma_0(N) s.t. 15. dotplus : the integral of f over {0,M(0)} is 16. dotminus : dotplus*x+dotminus*yi 17. type : type 1 if period lattice = [2x,x+yi], type 2 if [x,yi] 18. degphi : degree of modular parametrization aq : list of Wq-eigenvalues at bad primes ap : list of Tp- & Wq-eigenvalues at all primes */ There are some shell scripts for viewing the stored data: nnf N : returns number of newforms at level N (on file -- no computation!) nap N : returns number of ap stored at level N (on file -- no computation!) showdata N : shows just the technical data, not all the ap showeigs N : shows all the aq and ap shownf N : shows all data for level N (pipe through more or less!) NB At present these scripts assume NF_DIR="newforms" ---------------------------------------------------------------------- class: newforms (derived from level and splitter_base) For more details see newforms.h Parent classes: level provides... the level, bad primes. splitter_base provides facilities for (a) recursive searching for Hecke eigenspaces from scratch using only the ability to compute a sequence of operators (optionally, restricted to the current space), with a known finite set of possible eigenvalues for each; and (b) splitting of the eigenspace for any given (valid) sequence of eigenvalues. The reason this is done in a virtual base class way over in ../procs is that I use the *exact* same functionality of the code for modular symbols over imaginary quadratic fields. Constructor: newforms(long n, int plus, int cuspidalflag, int disp) // just sets the flags, and the of and h1 pointers to 0 // the real work is done by calling either createfromscratch() or // createfromdata(), see below. Main data fields: int verbose; // controls output verbosity level (*none* if 0) long maxdepth, // bound on recursion depth in search cuspidal, // flags whether or not to use cuspidal homology plusflag; // flags whether or not to work in + space int basisflag; // flag to determine how much work ::use() does. // use() is what the base class does with eigenspaces when found. // flag==0 for a recursive search, where use() will call the newform // constructor; // flag==1 for recovering newforms in a plusspace from existing data, // where all use() has to do is set the newforms's basis vector, as the // newform will already have been constructed with all the other data // needed. vec mvp; // the "manin vector" sum_{a mod p} {0,a/p} for p=p0, the // smallest good prime map mvlplusvecs, mvlminusvecs; // arrays of quadratic-twisted manin vectors, indexed by // good primes l where l=1(4) for plusvecs and l=3(4) for // minusvecs. Each newform has one of each (determined by // its own lplus and lminus primes); but we store these // vectors in the newforms class for efficiency when more than // one newform shares the same lplus or lminus! oldforms* of; // pointer to oldforms whcih provde the dimoldpart() // facility to enable old spaces to be discarded // during the recursive search homspace* h1; // pointer to homspace for the level. We make this a // member rather than deriving the newforms class from // homspace, which would be more natural, as for some // functionality (e.g. reading the newforms data from // files and recomputing the elliptic curves) we do // not need the homology information, so don't want to // compute it. Basically, createfromscratch() make // the homspace (by calling ::makeh1()) and // createfromdata() does not. int j0; long nq, dq; // data used for ap computation std::set jlist; long n1ds, // the number of newforms j1ds; // index used when recreating newforms vector nflist; // the actual newform-s. // These just call the similar function in the associated homspace // Here i is the index of the prime to use mat opmat(int i, int d, int v=0) mat opmat_restricted(int i, const subspace& s, int d, int v=0) smat s_opmat(int i, int d, int v=0) smat s_opmat_restricted(int i, const ssubspace& s, int d, int v=0) // The next 3 functions are to provide functionality needed by the // base splitter class // the dimension of the underlying homspace long matdim(void) {return h1->dimension;} // The list of possible eigenvalues for the i'th operator vector eigrange(int i) // Given an initial sequence of eigenvalues [a2,a3,...], uses the // oldforms member to return the corresponding dimension of oldforms long dimoldpart(const vector l); void display(void) // Output to stdout void output_to_file(int binflag=1) // output to data file in NF_DIR // add newform with basis b1, eiglist l to current list (b2 not used): void use(const vec& b1, const vec& b2, const vector l); // find newforms using homology; ntp is number of eigenvalues to use // for oldforms, *not* the number computed via homology (use addap() // for that): void createfromscratch(long ntp); // read newforms from file, if it exists, otherwise (perhaps) revert // to createfromscratch: void createfromdata(long ntp, int create_from_scratch_if_absent=1); // Construct bases (homology eigenvectors) from eigenvalue lists: void makebases(); // computes vector of ap, one for for each newform vector apvec(long p); // compute ap for all primes up to the last'th, insert them into each // newforms own aplist: void addap(long last); // adds ap for primes up to the last'th prime // Sort newforms void sort(int oldorder=0); // next three functions() implemented in periods.cc // Given newform with no intdata, compute least real (part of) // period -- unless sfe=-1 and n=square, in which case return 0 int get_real_period(long i, bigfloat& x, int verbose=0) const; // Given all data, compute the periods as a Cperiods Cperiods getperiods(long i, int method=-1, int verbose=0); // Given all data & Cperiods, compute the curve Curve getcurve(long i, int method, bigfloat& rperiod, int verbose=0); // next two implemented in pcprocs.cc // Computes x0, y0 (real & imag parts of periods) & a matrix which // gives these scaled by dotplus & dotminus. rp_known is set if we // know x0 to be the least real part of a period (usually true) int find_matrix(long i, long dmax, int&rp_known, bigfloat&x0, bigfloat&y0); // Given an imaginary period y1, finds a prime lminus =3(mod 4) and // <=lmax for which L(f,lminus,1) is nonzero and hence a multiple // mminus of y1. // if lmax==0 it carries on until a suitable lminus is found int find_lminus(long i, long lmax, const bigfloat& y1); ---------------------------------------------------------------------- file: periods class: character Precomputes values of a quadratic character modulo a prime (or trivial) ---------------------------------------------------------------------- file: periods class summer Base class for several others all of which compute sums of the form sum_{n=1}^{\infty} a_n f(n) for various real or complex-values f(n), where the a_n are the coefficients of a newform. Using the usual Buhler-Gross-Zagier recursion. Data fields: see periods.h ---------------------------------------------------------------------- file: periods class periods_via_lfchi (derinved from summer) Class to compute the periods of a newform using the values of L(f,chi,1) for suitable quadratic characters chi. Constructor: periods_via_lfchi (const level* iN, const newform* f); Member functions: void compute(void); // does the work bigfloat rper(void) // return the real period bigfloat iper(void) // return the imaginary period Cperiods getperiods() // return the period lattice ---------------------------------------------------------------------- file: periods class: periods_direct (derived from summer) Class to compute the periods of a newform by integrating over {0,g(0)} for a matrix g in Gamma_0(N); from the real and imaginary parts of the result and the integer scaling factors stored in the newform class (and the lattice type) we can recover the full period lattice. Constructor: periods_direct (const level* iN, const newform* f); Member functions: void compute(void); // Computes integral over {0,g(0)} where g is // the matrix in Gamma_0(N) stored in the newform void compute(long a, long b, long c, long d); // Computes integral over {0,g(0)} where g is [a,b;N*c,d] bigfloat rper(void) // return the real period bigfloat iper(void) // return the imaginary period Cperiods getperiods() // return the period lattice ---------------------------------------------------------------------- file: periods class: part_period (derived from summer) Class to compute the integral of a newform over {z,\infty} for any z in the upper half plane -- for example, to compute Heegner points. Constructor: part_period (const level* iN, const newform* f); Member functions: void compute(const bigcomplex& z0); // do the work bigcomplex getperiod() // get the answer ---------------------------------------------------------------------- file: periods class: ldash1 (derived from summer) Class to compute the analytic rank r and value L^(r)(f,1) for a newform f. The parity of r comes from the newform's s.f.e., and whether or not r=0 is also determined from the newform's data. This gives an initial guess of r\in{0,1,2}. If the value is very small then r is increased by 2 and the value recomputed. (Tested ok for lots of rank 3 curves and the rank 4 curve at N=234446.) Constructors: ldash1 (const level* iN, const newform* f); ldash1 (const newforms* nf, long i); // the i'th newform Member functions: void compute(void); // does the work long rank() // returns the rank bigfloat value() // returns the value ---------------------------------------------------------------------- file: periods class: lfchi (derived from summer) Class to compute L(f,chi,1) for a newform f and quadratic character chi (modulo an odd prime l not dividing the level) Constructor: lfchi (const level* iN, const newform* f); (Does nothing specific to the prime l) Member functions: void compute(long ell); // does the work for the prime l bigfloat value(void) // gives the value bigfloat scaled_value(void) // gives the value * sqrt(l) ---------------------------------------------------------------------- file: pcprocs Contains two new functions plus implementations of newforms class functions newforms::find_matrix() and newforms::find_lminus() described above // returns a rational approximation a/b to real x void ratapprox(bigfloat x, long& a, long& b); int get_curve(long n, long fac, long maxnx, long maxny, const bigfloat& x0, const bigfloat& y0, long& nx, long& ny, int& type, int detail=0); Input n: target conductor of E fac: known factor of c6(E) x0, y0: reals known to be multiples of least real/imag periods of E maxnx, maxny: bounds on these multiples detail: verbose flag Output: nx, ny, type If type==1 then [2*x,x+y*i] or if type==2 then [x,y*i], where x=x0/nx, y=y0/ny, is the period lattice of an elliptic curve of conductor n (whose c6 is divisible by fac). ---------------------------------------------------------------------- files: nfd.h, nfd.cc, tnfd.cc class: nfd Class which implements d-dimensional newforms (i.e. with Hecke eigenvalues of degree d over Q). Program tnfd is a test program for this. Experimental, not currently working. ---------------------------------------------------------------------- files: fixc6.h, fixc6.cc, fixc4.data, fixc6.data class: fixc6 These can be completely ignored, since I gave up using them after N=130000 and just use multiprecision floating point always, even though it is slower, with some cleverness to automatically increase precision as needed. Future plans include re-introducing the standard double precision code (which is all still there) and using that where possible and sensible, for speed and flexibility. // Background: for curves with large c6 (or c4), the value cannot be computed // with sufficient precision without using multiprecision floating // point arithmetic, which slows down all the other cases // unnecessarily. To avoid this, after first computing the "correct" // c6 value once in multiprecision, we add that value to a table // indexed by (level, form#), and look up in the table when we need // the value. // The fixc6 class has two static data members, of type map< // pair, bigint> such that an entry ((N,i),c6) or ((N,i),c4) // says that the c6 or c4 value for form i at level N is c6 or c4. Of // course, for most (N,i) pairs this is blank -- and we must avoid // inserting wrong dummy entries of the form ((N,i),0). // April 2005: added facility for fixing c4 as well as c6, but the // class name is unchanged NB For levels up to 130000 these files are quite big: 443 1329 10319 fixc4.data 25808 77424 679655 fixc6.data 26251 78753 689974 total That is, out of 570226 (optimal) curves, 25808 require this "fixing" of c6 and 443 also for c4. NB This is *not used* when the programs are comiled with multiprecision floating point (i.e. NTL not NTL_INTS) so can be ignored for Sage. But the programs which produce tables of curves from stored data *do* recompute the periods of the newforms and hence get the curves from their periods, and this is *much* faster using standard C doubles! eclib-2013-01-01/doc/Makefile.am0000644000175200017520000000025511762136465012716 00000000000000docdir = $(datadir)/doc/@PACKAGE@ nobase_dist_doc_DATA = g0n.txt howto.txt progs.txt mwrank/mwrank.changes mwrank/mwrank.info mwrank/mwrank.options mwrank/mwrank.readme eclib-2013-01-01/doc/mwrank/0000755000175200017520000000000012071070657012231 500000000000000eclib-2013-01-01/doc/mwrank/mwrank.changes0000644000175200017520000001616211761427322015010 00000000000000 MWRANK MAJOR CHANGES MADE (other than minor bug fixes) NB This file is incomplete, as I sometimes forget to update it, but should log the major changes. Oct 2006 ======== 28. [mwrank-2006-10-03] Minor: the lower bound code (#27 below) now works ok in normal precision. Aug 2006 ======== 27. [mwrank-2006-08-23] Saturation more efficient using new lower height bounds (cf ANTS7 paper by JEC & SS). Sept 2005 ========= 24. Changed all exit() calls to abort() to enable better error catching in SAGE. 25. Better error message and abort() if attempting to round a floating point which does not fit into a long (on calculation of a and c n=bounds in mrank1.cc). 26. Curve input now catches syntax errors (and then aborts). May 2005 ======== 22. Fourth arithmetic option NTL_ALL uses NTL library with multiprecision floating point arithmetic. 23. Released under GPL for the first time! January 2005 ============== 21. Points are now saturated after the 2-descent, using the method described in Siksek's and Prickett's theses. September 2000 ============== 20. Major improvement in handling of "large" quartics, after joint work with Stoll. April 2000 ========== 19. Bug fixes in mrank1.cc, caused wrong computation of selmer rank (when > rank). May 1998 ========= 18. Fixed various memory leaks. April 1998 ========== 17. Bug fixes to mrank1.cc: (a) added braces {...} to correct compiler parsing resulting in "wrong type" messages, (b) correct computation of Selmer rank when rank>0. (Latter caused wrong Selmer rank of 2 for curve 0,0,1,0,929]; thanks again to Fermigier. Feb/March 1998 ============== 15. Added autoconfigure to source distribution, thanks to Thomas Papanikolaiou. [Redesigned in 2005 mainly by WIlliam Stein] 16. Bug fix in flag initialization in mrank1.cc, to correctly handle C2xC2 primes when one value of z is negative (failed on [0,0,0,0,-50800]). Thanks to Fermigier. Nov 1997 ======== 8. Descent via 2-isogeny made much more efficient by better book-keeping. File(s) affected: mrank2.h/cc 9. Added second descent on to descent via 2-isogeny. For hard cases the multiprecision version is better here, but is also slower in general so the released version is NOT multi. File(s) affected: mrank2.h/cc 10. Improved bounds in quartic search. This speeds things up well when disc<0 (only relevant when no 2-torsion) File(s) affected: mrank1.h/cc 11. Added version.h/cc so that program always displays its date of compilation. File(s) affected: version.h/cc 12. Added options.h to give command-line option support. See file mwrank.options for details, or try "mwrank -h" for a summary. File(s) affected: options.h, mwrank.options 13. Added so-called p-adic filtration to descent without isogeny, making fuller use of sieving primes to use the explicit image of a quartic in E(Qp)/2E(Qp) when this is C2 or C2xC2. File(s) affected: mrank1.h/cc 14. Added PARI/GP output option "-o". Also made mrank redundant as "-c 0" (= default) turns off the infinte descent step, while "-c -1" as before gives automatic computation of bound. File(s) affected: options.h, mwrank.cc, mrank.cc 13 May 1996 =========== Important changes to mwrank since summer 1995 See preprint "Classical Invariant Theory and 2-descent on elliptic curves" [Journal of Symbolic Computation (Proceedings of the Second Magma Conference, Milwaukee, May 1996), Jan/Feb 2001, pages 71-87] for details of the theory behind these changes. 1. Transferring points from quartics to the curve: Now uses one fixed model for the curve E: y^2=x^3-27Ix-27J, and any rational point on a quartic (yz)^2=g(x,z) with invariants I,J maps directly to a point on E. One can compute once and for all the isomorphism between E and the original/minimal model to transfer these points back. Result: simpler code and no wasting time minimising many different models for E File(s) affected: qc.h/cc 2. Sieving for quartics: now uses a 2-D sieve on (a,h) where h=8ac-b^2 instead of a 3-D sieve on (a,b,c), based on the seminvariant syzygy. Given an (a,b,c) triple which passes the sieve, now compute the seminvariant r and hence solve for d,e algebraically. Result: simpler code, less dependent on precision as no floating point arithmetic used to solve for d,e. File(s) affected: mrank1.h/cc 3. Testing equivalence of quartics: (a) store with each quartic a hash value coding the number of roots mod p for several primes p; equivalent quartics must have same hash value, giving a quick necessary condition for equivalence. (b) quartic equivalence testing now done algebraically, testing whether a third quartic has a root. Vastly simpler code and much more robust, not dependent on floating point precision. File(s) affected: mequiv.h/cc 4. Using group structure to avoid/curtail searching for type 1 quartics. When \Delta>0 the number of type 1 quartics is either 0 or equal to the number of type 2s, according as there are no / are rational points on the "egg" component of the real locus. So one can avoid searching for type 1s altogether if one knows in advance the existence of such points, and in any case once a single type 1 quartic is found one does not need to complete the search as one then knows exactly how many tere are (assuming one has searched for type 2 quartics first). File(s) affected: mrank1.h/cc 5. Searching for point on quartics: (a)add infinity to mod-p sieve, so do not try denominators divisible by a prime p such that a is a non-square mod p. This eliminates many denominators very quickly. (Suggested by J. Gebel, Saarbruecken). (b) For quartics of type ax^4+cx^2+e, only search for x>0. This saves half the time when there are no points found, but does not necessarily save anything if a point is found. File(s) affected: msoluble.h/cc 7. (Theory still under construction! [See #20 above]) Avoid / curtail search for quartics with "large" invariants (16I,64J), by careful study of E(Q_2)/2E(Q_2). 7/8/95 ====== 1. Testing of equivalence of quartics (a) Uses a sieving idea of Samir Siksek's: each quartic is given a code based on how many roots it has modulo 5 small (good) primes; since equivalent quartics must have the same code this eliminates a lot of equivalence tests. For example, the 7 non-trivial quartics for the famous curve [0,0,1,-7,6] all have different codes as can be seen by running this curve with verbose=1. (b) Uses an entirely algebraic equivalence test instead of using floating point approximations to the roots, which regularly caused problems with precision. Now each pair of quartics determines a third quartic with integer coefficients, which has an integer root iff the original pair was equivalent. This third quartic is NOT the "product" of the first two in the Selmer group (it does not have the same invariants), but is related to it. 2. From quartics to curves This now uses a much simpler formula arising from the work used in 1(a) to give a point on the "IJ-curve" y^2=x^3-27Ix-J from a quartic with invariants I,J and a rational point. Previously each quartic gave a new (isomorphic) curve with a point on it, and time was spent reducing this to the standard model. -------------------------------------------------------------------- eclib-2013-01-01/doc/mwrank/mwrank.options0000644000175200017520000000652711761427322015077 00000000000000 COMMAND LINE OPTIONS FOR MWRANK Since December 1997, mwrank supports command-line options instead of prompting the user. All options have reasonable defaults. List of command line options, their meaning and default values [q, l, t take no parameters; the others take an integer parameter "n"] -h help Displays a summary of this info and quits -q quiet mode flag Suppresses the header information (including the date of compilation) which is otherwise output and should be included in any problem/bug reports). Default is off (i.e. not quiet). Also suppresses prompting for curves. -v n verbosity level Controls amount of output. Range 0..3. Default=1. Level 0 only outputs the rank. Use "-q -v 0" for minimal output, but note that if you also have "-c n" with nonzero n then you will cause a point search to be carried out, but you will not see its results! (Unless -o is used). Details of point search only shown if verbosity is > 1. -o output pari Outputs a very terse summary of the results for use by PARI/GP with suitable interface. Format: Either [[r],[P1,P2,...,Pr]] where r is the rank and P1,...,Pr are r independent points; or [[r,r'],[P1,P2,...,Pr]] where r and r' are lower and upper bounds on the rank and P1,...,Pr are r independent points; Can be used in addition to other output options (controlled by -v); for minimal useful output use "-q -v 0 -o" -p n precision (#dp) Only relevant for the multiprecision floating point version. Range 1..large, default 15. -b n height bound for quartic point search. Range 1..15, default 10. 5 is large enough for many curves. -x n number of auxiliary primes used for syzygy sieving. Range 0..,default 6. Only relevant for curves with no 2-torsion. Only worth increasing either for curves with large discriminant, or for curves with suspected large rank r, for which r+1 is a good value. -l points output flag. Controls whether generating points are output. Defaults to value of "verbosity", so the only function is to turn this part of the output on when verbosity is 0 (i.e. -v 0 -l). -t quartic equivalence test flag. For debugging only. Default off. -s selmer_only If set, does local tests on homogeneous spaces only, which can be much quicker for curves with 2-torsion. NB for curves with no 2-torsion this computes the 2-Selmer rank exactly; for curves with 2-torsion it computes an upper bound for the rank based on various Selmer groups, possibly less than that from the 2-Selmer group itself. If unset (the default) then rational points are sought, to give a lower bound for the rank also. -d skip_2nd_descent Only relevant for curves with 2-torsion; unset by default. If set, does no second descent either locally or globally, which in general gives a larger upper bound for the rank and a smaller lower bound. I recommend setting this if using mwrank with no multiprecision floating point arithmetic. -S saturation_bound (non-negative integer or -1) controls saturation 0: do no saturation at all n: use n as upper bound for saturation primes -1: allow progam to determine upper bound autimatically (but that will be reduced to a default maximum of 100 if it is greater) Last update: 31/12/2011 eclib-2013-01-01/doc/mwrank/mwrank.info0000644000175200017520000003136211761427322014332 00000000000000Program mwrank: uses 2-descent (via 2-isogeny if possible) to determine the rank of an elliptic curve E over Q, obtain a set of points which generate E(Q) modulo 2E(Q), and finally "saturate" to a full Z-basis for E(Q). For details of (some) algorithms see the author's book. Please acknowledge use of this program in published work, and send problems (and preprints!) to John.Cremona@nottingham.ac.uk. For changes since first distribution the file mwrank.changes. For command line options, see the file mwrank.options. MWRANK vs. MRANK There used to be two separate programs called mwrank and mrank; they both did the same 2-descent, but mwrank also went on to enlarge the subgroup of rank r found to give the full Mordell-Weil group by searching for rational points on E up to a certain naive height. This latter procedure was not very efficient, and to avoid reports of known problems at this stage I put a ceiling on this search at 15 (=logarithmic naive height). This means that in many cases the points finally output were NOT guaranteed to be a basis for E(Q) (but the output should say this). As of Jan 2005, the saturation stage is done much more efficiently using the "saturation sieve" method. Now there is only one program, mwrank. Saturation is done unless the generating points are not going to be output (e.g. with command-line flags -v 0 and neither -l nor -o). A HOW TO USE MWRANK 1. Options All options and parameter adjustments are now made via command line options: see the file mwrank.options for details, or run mwrank -h which displays the options briefly and exit. 2. Curve input The input consists of one or more curves, in the format a1 a2 a3 a4 a6 (separated by whitespace), or [a1,a2,a3,a4,a6] These can of course be from a file, as in mwrank < curves.in To end the input either use a "null curve" [0,0,0,0,0] or EOF (e.g. Control-d at the terminal). The input coefficients must be integers or rationals. If they are not integral, the program will convert to an integral model for the descent and point-finding, but will list the generators at the end on the original model. The curves are prompted for, unless verbosity is set to 0. For example, given the input file r5.in containing 0 0 1 -79 342 0 0 1 -169 930 0 1 1 -30 390 0 0 1 -301 2052 0 0 1 -457 3786 the command mwrank -q -v 0 < r5.in produces the output (the first line and time format may be different) === Curve [0,0,1,-79,342] : Rank = 5 Curve [0,0,1,-169,930] : Rank = 5 Curve [0,1,1,-30,390] : Rank = 5 Curve [0,0,1,-301,2052] : Rank = 5 Curve [0,0,1,-457,3786] : Rank = 5 === adding "-l" to the parameters will cause the generators and regulator to be output; adding "-o" results in an abbreviated form of output to be output also for post-processing by Pari; for the first curve above it gives [[5],[[3,11],[43,276],[45,296],[62,483],[92,878]]] 3. There are two types of point search carried out by mwrank. (a) On the homogeneous spaces which represent elements of the appropriate Selmer group, called "quartics" in the program (they have equations y^2=g(x) where g is quartic). Here existence of rational points is necessary for the homogeneous space to come from a point on the curve rather than an element of the Tate-Shafarevitch group. The bound used is a bound on the logarithmic height. If (x,y)=(u/w,v/w^2) it is a bound on max(log|u|,log|w|). The default value is 10; to change the default to (say) 12 use command-line option "-b 12". Warning: increasing this bound even by 1 can increase the running time considerably when there really are homogeneous spaces with no rational point (but with points everywhere locally, of course). I would not recommend setting this to more than 15: even if you are "sure" that the quartic has a rational point, other methods such as higher descents are probably better to find such large points. For entirely logical reasons it can also happen that reducing the value of this parameter can increase the running time -- and vice versa. So while 10 is the default it is sometimes worth running with a smaller value. (In the above examples, -b 1 works just as well, in the same time). If the curve has rational 2-torsion, then the search on the first descent curves has a bound of at most 6 (less if you set it using -b), and then a second descent is used if necessary, where the full bound is used. NB During the second descent, part of the quartic reduction process works much better using multi-precision floating point arithmetic, but the distributed (executable) version of the program does not have this. The reason: my programs currently either use multi-fp for ALL fp arithmetic, or for NONE; and turning it on (which is a simple compiler switch) slows down other parts of the program a lot, so for most curves it is better to have it off. B. WHAT IT DOES There are two main sub-cases depending on whether the curve has a point of order 2 or not. If so, it uses the 2-isogeny in the well-known way, and can list the quartics to be considered with little trouble. Then the only difficulty is finding rational points on them. I have successfully run curves of rank 13, such as Fermigier's [0,36861504658225,0,1807580157674409809510400,0] and also his rank 14 curve [0,2429469980725060,0,275130703388172136833647756388,0] and more recently (2001) Dujella's rank 15 curve [1,0,1,34318214642441646362435632562579908747,3184376895814127197244886284686214848599453811643486936756] all of which take less than 30 seconds with default parameters on an 800MHz Athlon. If there is no 2-torsion it goes back to the original Birch-Swinnerton-Dyer method, which involves searching for the quartics, and eliminating equivalent ones. The search region can be very large if the curve coefficients are large. Also the search is divided into between 1 and 4 sub-searches. Recent developments make this rather more efficient, (a) by improving the bounds, (b) by using a quadratic sieve in the search for quartics, and (c) by using maps to E(Qp)/2E(Qp) for certain auxiliary primes p. NB One effect of the last-named feature is that the program usually finds generators for E(Q)/2E(Q) rather than a complete set of coset representatives. In general, it will express E(Q)/2E(Q) as a direct sum A+B, and will give all nonzero elements of A and generators for B (the output will explain this when it occurs). The points in A are those which lie in 2E(Qp) for all the auxiliary primes used. For curves of higher rank one can increase the number of primes used from the default of 6 to something a little higher than the suspected rank, using the option "-x 8" say. This does carry a little overhead. Example: The curve [0,0,0,-9217,300985] has rank 7 and runs very quickly. With the default ("-x 6") we find three nonzero points in A, so rank(A)=2, and 5 generators of B, so rank(B)=5 and the total rank is 2+5=7. With "-x 9" this becomes 1+6=7, and with "-x 10" we have A=0. (These runs all took approx 3.8 seconds on my P90). After this stage we know the rank (either certainly, if all the everywhere-locally-soluble homogeneous spaces have rational points, or conditionally, if we have decided that some of them do not but have not proved that). Next, from each homogeneous space with a point we compute a point on the original curve. This gives a set of between r and 2^r-1 points (depending on how the rank is divided between the groups A and B defined above) covering the non-trivial cosets of 2E in E (when there is no 2-torsion), and a more complicated set of points when there is 2-torsion, also covering these cosets. [If nothing else, this gives one way of finding points on curves. For example the curve [0,0,0,0,-618] has rank 2, generated (up to finite odd index) by [19 : -79 : 1] of height 3.21143 and [550688955674 : 2182722347909 : 31136956136] of height 19.2662. A simple point search would take a very long time to find that second generator!] The third stage is to "saturate", i.e. enlarge the group of points found to a basis for the full Mordell-Weil group (so far we have a subgroup of finite ODD index). This stage (the "infinite descent") is now much more efficient than it used to be, but might still take a little time especially for curves of larger rank. It is possible that saturation might fail at some primes (i.e. at some prime p which could divide the index) in which case a warning will be output. The command-line flag -S may be used to change the default saturation behaviour: see file mwrank.options. Note that if the 2-descent has not been entirely conclusive (e.g. non-trivial III[2]) then the subgroup of points found will be saturated within the MW group, but saturation will never increase the rank. There are two ingredients in the saturation process: (1) determine an upper bound for the "saturation index", i.e. the index of (subgroup generated by) the known points in its saturation, and (2) for each prime p up to this bound, either prove that the points are already p-saturated, or enlarge by index p (repeatedly if necessary) until p-saturated. For some curves (notably those of high rank, such as the rank 15 curve in the test data) the index bound computed by the program is much too large for stage (2) to be practical (in that example the bound is nearly 10^50, for example). In this case the program will by default issue a warning (containing the index bound computed) and only saturate at primes up to 100. That bound can be increased using the command-line option -S. Alternatively, saturation can be turned off entirely using "-S 0". Also, if no points are to be output (i.e. with option -v 0 and neither -l nor -o) then no saturation is done as there is obviously no point. For stage (2) there is usually no problem, but if the program determines that the points are not p-saturated then it constructs a rational point P which is (probably) p times another rational point Q, and tries to divide P by p using the elliptic logarithm and exponential functions. This may fail if the precision is not high enough (for example with the rank 15 curve, the points found are not 3-saturated and require 2 steps of 3-saturation to gain index 9; but this only works with the LiDIA multi-precision version and at least 100 decimals (-p 100)). Saturation was implemented during 2004 and added to mwrank in January 2005; bug reports are of course welcome. ARITHMETIC mwrank and friends need to use a multi-precision integer package. The only one now supported is NTL. When you compile the source code, the configuration program will need to know where NTL is installed. The binaries will tell you when they start up which arithmetic they are using (unless you use the quiet flag "-q"). I no longer distribute binaries. It is recommended that you use the multi-precision version for curves with large coefficients; otherwise results may be wrong. You can aid the factorization of large integers in several ways: (a) If you have the PARI/GP installed (it checks for the existence of $PATH_TO_GP, or /usr/local/bin/gp if the environment variable PATH_TO_GP is not set; i.e. the default value is /usr/local/bin/ (with the trailing /)) then factorization will be done by GP using its factor() function. This will cause (small) temporary files to be created in /tmp which will be deleted after use (though not if the program is aborted by the user). (b) By default the programs initialise an array of primes < 10^6, so will fail to factor some numbers > 10^12 by trial division. This default can be increased as follows: create a file called MAXPRIME containing a single integer, such as 2000000 or 10000000. Then this will be used instead of the default. (c) If a file called PRIMES exists in the current directory, containing zero or more prime numbers (separated by whitespace, e.g. one per line), then the programs read this in at the start and use these for trial division as well as the main prime array. No check is made that these numbers are prime. This is an advantage if you make several runs with the same curve which has a discriminant which is hard to factor, since you can avoid doing the hard work more than once. Any other primes found during the run are added to the list, and the updated list is output to PRIMES at the end. NB This will cause problems if you do not have write permission in the current directory! DISCLAIMER You are welcome to use the program as is. There have been bugs and certainly there still are some. The program can and will be improved. Please report strange behaviour to me in a reasonable way (you must say when you got your copy of the program and include an input file which gives the problem); I do not guarantee to do anything about it -- I am busy and this is not a commercial package! -- but I will do my best. John Cremona (john.cremona@gmail.com) 3 February 1995, updated 12 January 1998, 25 September 2000, 5 July 2001, 12 November 2003, 5 January 2005, 10 May 2005, 31 December 2011. eclib-2013-01-01/doc/mwrank/mwrank.readme0000644000175200017520000001010011761427322014617 00000000000000README file for programs mwrank, findinf, ratpoint There are three main programs in this distribution, called mwrank, findinf and ratpoint. The first two work on elliptic curves over Q given by Weierstrass equations with standard coefficients [a1,a2,a3,a4,a6]. If the input curve is non-minimal or non-standard (where standard means a1,a3 in {0,1} and a2 in {-1,0,1}) the input curve is replaced by a standard minimal model, and points found are transferred back to the original input model. The programs tell you when the model is changed. In all cases there are 2 possible input formats for curves: [a1,a2,a3,a4,a6] a1 a2 a3 a4 a6 So if the first character read is '[' it expects a single non-space delimiter between coefficients and one at the end; otherwise it expects 5 integers separated by space. If the input is invalid the programs stop, so you can use 0 0 0 0 0 to end the input stream. findinf searches for points on the curves up to a given bound on the logarithmic height, using sieving. One can opt for either seeing all points as they are found (verbose=1) or nothing until a final report (verbose=0); also, if verbose=1 then one can opt for a simple list of the points found, with no post-processing, or a full processing of the points to find linear dependencies between them using the height pairing. The "regulator" output is just the regulator of the subgroup of points found. Currently the sieve is based on Michael Stoll's programme (which originated with a program of Elkies, with developments by Stoll and Colin Stahlke). Added in Jan 2005: the subgroup of points found is (by default) automatically saturated at the end. mwrank is described more fully in the file mwrank.info. Briefly, mwrank does a 2-descent to determine the rank and gives points covering the cosets of 2E(Q) in E(Q); it then goes on to complete to a Mordell-Weil basis via a sieve-based saturation process after determining an upper bound for the index. ratpoint works with quartics g(x) with integer coefficients, g(x)=a*x^4+b*x^3+c*x^2+d*x+e. It finds the Jacobian E of the curve C:y^2=g(x), searches C for rational points and maps any point found to E using the 2-covering map. Current version quits as soon as one point on C is found. Other programs: tmrank is a version of mwrank designed for testing with the input file tmrank.in. Each line of tmrank.in contains a curve and its correct rank, and tmrank uses mwrank to compute the rank and checks the result. tate: Runs Tate's algorithm, outputs detail of reduction types etc. conductor: just output conductor torsion: outputs number (and optionally structure) of torsion points allisog: find the complete isogeny class of the input curve by computing a succession of isogenies of prime degree. WARNING: this is unreliable and causes lots of warning messages if run in standard precision. With higher precision (under LiDIA) it is reliable, though a lot slower. I also have a Pari/GP program to do the same thing, available on request. These four can be run interactively (by entering "tty" for the input filename at the prompt) or in batch mode by entering the filename. The file should contain a list of curves in the standard format, with [0,0,0,0,0] to terminate cleanly. twist: computes quadratic twists of a given curve, giving their minimal models etc. Interactive. indep: tests whether given points on a curve are independent, using 2-descent NOT heights. Test with "indep < e23". Systems supported: no binaries are now provided, only source. Sources: mwrank.tar.gz is a gzipped tar file of the distribution. It requires pre-installation of NTL. This NTL version may be used with or without multiprecision floating point (see mwrank.info for more details). John Cremona john.cremona@gmail.com original: 6/2/95 updated: 7/8/95, 12/1/98, 20/4/00, 16/8/00, 5/7/01, 7/1/05, 10/5/05, 31/12/11 eclib-2013-01-01/doc/howto.txt0000644000175200017520000001571411761427301012560 00000000000000Documentation for the eclib library (building and running) % Time-stamp: <2012-05-07 17:30:46 jec> 1. Download, build and install: (a) Get the latest version of eclib from http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/, say wget http://homepages.warwick.ac.uk/staff/J.E.Cremona/ftp/progs/eclib-2012-04-17.tar.gz (b) Unpack it using tar zxf eclib-2012-04-17.tar.gz (c) Change into that directory: cd eclib-2012-04-17 (d) Configure using ./configure after reading the README file to see if you will need non-default options. (e) make; make check; [make install] For the make install step, do it as superuser if you did not specify something non-default as --prefix in the ./configure step, otherwise make sure that the bin subdirectory of the install directory (say INSTALL_DIR) is in your PATH. 2. Run! (a) Make your own working directory, say mkdir ~/g0n cd ~/g0n (b) Make a subdirectory which will hold newform data (as binary files). The default is mkdir newforms and if you use any other name you will need to set the environment variable NF_DIR to this directory. (c) Modular elliptic curve programs are in $INSTALL_DIR/bin. Several expect to read & write files in the newforms directory $NF_DIR. Beware: if you change the source code and run the resulting programs, this may well overwrite the data files in $NF_DIR with garbage. So when testing it is a good idea to create a new testing copy of $NF_DIR, leaving your master one untouched. My master newforms directory (containing all data to 235000) is 7.8G! Question: why would you want or need to copy or use old newforms data? Answer: to find the newforms at level N, the program will need to knw about newforms at all levels M eclib-2013-01-01/tests/0000755000175200017520000000000012071070656011326 500000000000000eclib-2013-01-01/tests/tsat2.cc0000644000175200017520000000671511774563612012633 00000000000000// tsat2.cc -- test for saturate.h/cc reading from gens files directly ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include #include #include #include #include #include #include #include #include #include #include #include #include #define PMIN 2 #define PMAX 100 int main() { set_precision(100); initprimes("PRIMES",0); int verbose = 1; // cout<<"verbose (0/1)? "; cin >>verbose; int i, j, npts; long N, nclass, ncurve; Curve E; long curvecount=0; long okcount=0; long upcount=0; vector > keeplist; // list of curves which were not saturated, for report at end while(1) { cin >> N; if(N==0) break; cin >> nclass >> ncurve; cin >> E; curvecount++; Curvedata C(E); saturator sieve(&C,verbose); cout<1) { cout<<", index gain = "< newpoints = sieve.getgens(); cout<<"New generators:\n"< keep; keep.push_back(N); keep.push_back(nclass); keep.push_back(ncurve); keep.push_back(index); keeplist.push_back(keep); } else { cout<<", points were saturated"<0) { cout<<"Curves which needed saturation: "< keep = keeplist[i]; cout<>n; vec_m* b = new vec_m[n+1]; b[0]=vec_m(n); for(i=1; i<=n; i++) { b[0][i]=1; // these are the weights b[i]=vec_m(n); cout<<"Enter vector number "<<(i)<<": "; cin>>b[i]; } cout<<"Before reduction, vectors are:\n"; for(i=1; i<=n; i++) cout<-2); i--) for(j=1; ok&&(j>-2); j--) for(k=1; ok&&(k>-2); k--) { if((i==0)&&(j==0)&&(k==0)) {ok=0;break;} vec_m v=i*b[1]+j*b[2]+k*b[3]; bigint norm = sqr(v[1])+sqr(v[2])+sqr(v[3]); cout<<"("< #include #include #include #include #include #include #include #include #include #include #include int randint(int top) { int ans=1+(int) (double(top)*rand()/(RAND_MAX+1.0)); ans-=(top/2); return ans; } int main() { // set_precision("Enter number of decimal places"); set_precision(200); initprimes("PRIMES",0); int verbose = 1; cout<<"verbose (0/1)? "; cin >>verbose; int j, npts; /* test curve Curve E(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); Curvedata C(E); cout << "Curve " << E << endl; vector PP; Point P1(C,2,0,1); Point P2(C,-1,3,1); Point P3(C,4,6,1); PP.push_back(P1); PP.push_back(3*P2+P1); PP.push_back(P3); cout << "Points " << PP << endl; */ Curve E; cout<<"\nInput a curve: "; cin >> E; Curvedata C(E); cout << "Curve " << E << endl; saturator sieve(&C,verbose); Point P(C); cout<<"enter number of points: "; cin >> npts; vector points; points.reserve(npts); j=0; while(j> P; if ( P.isvalid() ) {points.push_back(P); j++;} else {cout<<"point "<>pmax; pmax = NextPrime(pmax); cout<<"\nSaturating at prime "<1) { int a=randint(10),b=randint(10),c=randint(10),d=randint(10); cout<<"a,b,c,d="< #include #include #include bigint a1,a2,a3,a4,a6; Curve C; Curvedata CD; int verbose=0; long hlimq=5; long naux=-1; //#define SELMER_ONLY //#define TIMINGS int getcurve(void) { if (verbose) cout << "Enter curve coefficients a1,a2,a3,a4,a6 ?" << "\n"; cin >> a1 >> a2 >> a3 >> a4 >> a6; C = Curve(a1,a2,a3,a4,a6); CD = Curvedata(C,1); // "1" means minimise return (a1!=0||a2!=0||a3!=0||a4!=0||a6!=0); } int main() { show_version(); set_precision(20); #ifdef TIMINGS init_time(); #endif int second_descent=1; int selmer_only=0; #ifdef SELMER_ONLY selmer_only=1; #endif // cout << "Verbose mode? (0/1)\n"; cin >> verbose; initprimes("PRIMES",verbose); // cout << "Number of sieving primes?\n"; cin >> naux; cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) while (getcurve()) { int filerank; // for testing cin >> filerank; if(verbose) cout<<"\n\n"; cout << "Curve "<< C << " :\t"; if (verbose) cout << endl; else cout< #include #include #include #include #include #include #include #include #include #include #include #include bigcomplex roots[4]; int getquartic(quartic& g); // special version for a*x^4+c*x^2+e quartics int main() { set_precision("Enter number of decimal places"); cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) bigint zero; zero=0; int alldesc=0, verb=0, selmer_only=0; cout << "Verbose? "; cin >> verb; initprimes("PRIMES",0); double hlim=8; cout << "Limit on height? "; cin >> hlim; cout << "Stop after first point found? "; cin >> alldesc; alldesc=1-alldesc; cout << "Selmer only (0/1: if 1, just tests whether second descent possible)? "; cin >> selmer_only; quartic g; while (getquartic(g)) { bigint I = g.getI(), J=g.getJ(); Curvedata IJ_curve(zero,zero,zero,-27*I,-27*J,0); bigint tr_u,tr_r,tr_s,tr_t; Curvedata E = IJ_curve.minimalize(tr_u,tr_r,tr_s,tr_t); bigint d1=g.geta(), c=g.getcc(), d2=g.gete(); bigint d = d1*d2, cdash = -2*c, ddash = sqr(c)-4*d; vector plist = pdivs(6*d*ddash); vector supp = support(ddash); long mask=0; Curvedata E_cd(zero,c,zero,d,zero); cout << "cd-curve (nearer):\t" << (Curve)E_cd << endl; Curvedata E_cd_dash(zero,cdash,zero,ddash,zero); cout << "cd-dash-curve (further):\t" << (Curve)E_cd_dash << endl; Point P(&E_cd); Point Q(&E_cd_dash); cout << "I = " << I << ", J = " << J << "\n"; cout << "Minimal model for Jacobian: " << (Curve)E << endl; cout << "Checking local solublity at primes " << plist << ":\n"; int i, els, els1; bigint two; two=2; els = els1 = qpsoluble(g,two); if(!els1) cout << "Not locally soluble at p = 2\n"; for (i=1; i>ch; if(ch=='(') cin>>a>>ch>>b>>ch>>c>>ch>>d>>ch>>e>>ch; else { cin.putback(ch); cin >> a >> c >> e; b=0; d=0; } if (sign(a)==0) return 0; g=quartic(a,b,c,d,e); return 1; } eclib-2013-01-01/tests/thtconst.cc0000644000175200017520000001166511774563612013444 00000000000000// THTCONST.CC: Test program for Silverman & CPS height bounds ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include // from qcurves library #include #include #include #include #include bigint a1,a2,a3,a4,a6; Curve C; Curvedata CD; vector plist; const double margin = 0.01; int getcurve(void) { // cout << "Enter curve coefficients a1,a2,a3,a4,a6: " << endl; cin >> C; // cout<> a1 >> a2 >> a3 >> a4 >> a6; // C = Curve(a1,a2,a3,a4,a6); CD = Curvedata(C,0); // "1" means minimise // cout< Qlist = torsion_points(CD, per, m); cout<<"m-torsion points: "<0: Curve c(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); Curvedata cd(c,1); cout << "Testing some points:\n"; Point P0(cd, BIGINT(0),BIGINT(2)) ; Point P1(cd, BIGINT(1),BIGINT(0)) ; Point P2(cd, BIGINT(2),BIGINT(0)) ; cout << "The points are P0 = " << P0 << ", P1 = " << P1 << ", and P2 = " << P2 << endl ; if (!P0.isvalid()) cout << "P0 is not on the curve!\n"; if (!P1.isvalid()) cout << "P1 is not on the curve!\n"; if (!P2.isvalid()) cout << "P2 is not on the curve!\n"; /* // a curve with rank 3 and D<0: Curve c(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-1),BIGINT(6)); Curvedata cd(c,1); cout << "Testing some points:\n"; Point P0(cd, BIGINT(0),BIGINT(2)) ; Point P1(cd, BIGINT(1),BIGINT(2)) ; Point P2(cd, BIGINT(12),BIGINT(41)) ; cout << "The points are P0 = " << P0 << ", P1 = " << P1 << ", and P2 = " << P2 << endl ; if (!P0.isvalid()) cout << "P0 is not on the curve!\n"; if (!P1.isvalid()) cout << "P1 is not on the curve!\n"; if (!P2.isvalid()) cout << "P2 is not on the curve!\n"; */ /* // a curve (7998K1) with rank 1 and 5-torsion: Curve c(BIGINT(1),BIGINT(0),BIGINT(0),BIGINT(5355560),BIGINT(7740216896)); Curvedata cd(c,1); Point P0(cd, BIGINT(-248),BIGINT(80104)) ; cout << "The point is P0 = " << P0 << endl ; if (!P0.isvalid()) cout << "P0 is not on the curve!\n"; */ cout<<"Curve "< #include void line(int w) {int wid=w; while(wid--)cout << "-";cout< ai(5); while (getcurve(ai,verb)) { Curvedata D(ai,v); cout<<"Integral model: "<<(Curve)D< #include int main(){ cerr<<"Program to find and/or count torsion on a curve.\n\n"; set_precision("Enter number of decimal places"); cerr<<"Enter 0 for short output (#torsion only)\n"; cerr<<" or 1 for long output (list of the torsion points): "; int showpoints; cin >> showpoints; initprimes("PRIMES",0); vector ai(5); vector tor; int ntor, n2; bigint u, r, s, t, v; int verb=1; while (getcurve(ai,verb)) { Curvedata E0(ai,v); Curvedata E1 = E0.minimalize(u,r,s,t); cout<<"Curve ["<2) cout<<"Non-cyclic: C2 x C"<<(ntor/2)<<"\n"; else cout << "Cyclic: C"< $${prog}.testout 2>/dev/null && diff $${prog}.testout $(test_output_dir)/$${prog}.out || exit $$? test_input_dir = $(srcdir)/in test_output_dir = $(srcdir)/out ################ PROCS ############################################# PROCS_TESTS = smattest comptest rattest bigrattest ptest mptest tbessel mvectest mmattest mspace thilbert tp2points tilll vectest1 vectest2 mattest1 mattest2 space1 space2 svectest1 svectest2 tcon2 tlegcert PROCS_TESTS_SUFFIXED = $(PROCS_TESTS:=$(EXEEXT)) ptest_SOURCES = ptest.cc mptest_SOURCES = mptest.cc smattest_SOURCES = smattest.cc comptest_SOURCES = comptest.cc rattest_SOURCES = rattest.cc bigrattest_SOURCES = bigrattest.cc mvectest_SOURCES = mvectest.cc mmattest_SOURCES = mmattest.cc mspace_SOURCES = mspace.cc tbessel_SOURCES = tbessel.cc thilbert_SOURCES = thilbert.cc tp2points_SOURCES = tp2points.cc tilll_SOURCES = tilll.cc vectest1_SOURCES = vectest.cc vectest1_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=1 vectest2_SOURCES = vectest.cc vectest2_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=2 mattest1_SOURCES = mattest.cc mattest1_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=1 mattest2_SOURCES = mattest.cc mattest2_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=2 space1_SOURCES = space.cc space1_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=1 space2_SOURCES = space.cc space2_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=2 svectest1_SOURCES = svectest.cc svectest1_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=1 svectest2_SOURCES = svectest.cc svectest2_CPPFLAGS = ${AM_CPPFLAGS} -DSCALAR_OPTION=2 tcon2_SOURCES = tcon2.cc tlegcert_SOURCES = tlegcert.cc ################ QCURVES ############################################# QCURVES_TESTS = tcurve tpoints theight thtconst tegr telog tdivpol tperiods tsat tsat2 tsat3 conductor tate torsion twist allisog checkgens QCURVES_TESTS_SUFFIXED = $(QCURVES_TESTS:=$(EXEEXT)) tcurve_SOURCES = tcurve.cc tpoints_SOURCES = tpoints.cc theight_SOURCES = theight.cc thtconst_SOURCES = thtconst.cc tegr_SOURCES = tegr.cc telog_SOURCES = telog.cc tdivpol_SOURCES = tdivpol.cc tperiods_SOURCES = tperiods.cc tsat_SOURCES = tsat.cc tsat2_SOURCES = tsat2.cc tsat3_SOURCES = tsat3.cc conductor_SOURCES = conductor.cc tate_SOURCES = tate.cc torsion_SOURCES = torsion.cc twist_SOURCES = twist.cc allisog_SOURCES = allisog.cc checkgens_SOURCES = checkgens.cc ################ QRANK ############################################# QRANK_TESTS = tmrank tequiv d2 QRANK_TESTS_SUFFIXED = $(QRANK_TESTS:=$(EXEEXT)) tmrank_SOURCES = tmrank.cc tequiv_SOURCES = tequiv.cc d2_SOURCES = d2.cc ################ G0N ############################################# G0N_TESTS = modtest homtest hecketest mhcount tmanin nftest oftest tnfd G0N_TESTS_SUFFIXED = $(G0N_TESTS:=$(EXEEXT)) # NB The order of the above does matter: tmanin must be run before # nftest and oftest modtest_SOURCES = modtest.cc homtest_SOURCES = homtest.cc hecketest_SOURCES = hecketest.cc nftest_SOURCES = nftest.cc mhcount_SOURCES = mhcount.cc oftest_SOURCES = oftest.cc tmanin_SOURCES = tmanin.cc tnfd_SOURCES = tnfd.cc # We list here the directories in and out which contain the test input # and expected output files for the tests run by "make check". EXTRA_DIST = in out ACLOCAL_AMFLAGS = -I m4 all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list allisog$(EXEEXT): $(allisog_OBJECTS) $(allisog_DEPENDENCIES) $(EXTRA_allisog_DEPENDENCIES) @rm -f allisog$(EXEEXT) $(CXXLINK) $(allisog_OBJECTS) $(allisog_LDADD) $(LIBS) bigrattest$(EXEEXT): $(bigrattest_OBJECTS) $(bigrattest_DEPENDENCIES) $(EXTRA_bigrattest_DEPENDENCIES) @rm -f bigrattest$(EXEEXT) $(CXXLINK) $(bigrattest_OBJECTS) $(bigrattest_LDADD) $(LIBS) checkgens$(EXEEXT): $(checkgens_OBJECTS) $(checkgens_DEPENDENCIES) $(EXTRA_checkgens_DEPENDENCIES) @rm -f checkgens$(EXEEXT) $(CXXLINK) $(checkgens_OBJECTS) $(checkgens_LDADD) $(LIBS) comptest$(EXEEXT): $(comptest_OBJECTS) $(comptest_DEPENDENCIES) $(EXTRA_comptest_DEPENDENCIES) @rm -f comptest$(EXEEXT) $(CXXLINK) $(comptest_OBJECTS) $(comptest_LDADD) $(LIBS) conductor$(EXEEXT): $(conductor_OBJECTS) $(conductor_DEPENDENCIES) $(EXTRA_conductor_DEPENDENCIES) @rm -f conductor$(EXEEXT) $(CXXLINK) $(conductor_OBJECTS) $(conductor_LDADD) $(LIBS) d2$(EXEEXT): $(d2_OBJECTS) $(d2_DEPENDENCIES) $(EXTRA_d2_DEPENDENCIES) @rm -f d2$(EXEEXT) $(CXXLINK) $(d2_OBJECTS) $(d2_LDADD) $(LIBS) hecketest$(EXEEXT): $(hecketest_OBJECTS) $(hecketest_DEPENDENCIES) $(EXTRA_hecketest_DEPENDENCIES) @rm -f hecketest$(EXEEXT) $(CXXLINK) $(hecketest_OBJECTS) $(hecketest_LDADD) $(LIBS) homtest$(EXEEXT): $(homtest_OBJECTS) $(homtest_DEPENDENCIES) $(EXTRA_homtest_DEPENDENCIES) @rm -f homtest$(EXEEXT) $(CXXLINK) $(homtest_OBJECTS) $(homtest_LDADD) $(LIBS) mattest1$(EXEEXT): $(mattest1_OBJECTS) $(mattest1_DEPENDENCIES) $(EXTRA_mattest1_DEPENDENCIES) @rm -f mattest1$(EXEEXT) $(CXXLINK) $(mattest1_OBJECTS) $(mattest1_LDADD) $(LIBS) mattest2$(EXEEXT): $(mattest2_OBJECTS) $(mattest2_DEPENDENCIES) $(EXTRA_mattest2_DEPENDENCIES) @rm -f mattest2$(EXEEXT) $(CXXLINK) $(mattest2_OBJECTS) $(mattest2_LDADD) $(LIBS) mhcount$(EXEEXT): $(mhcount_OBJECTS) $(mhcount_DEPENDENCIES) $(EXTRA_mhcount_DEPENDENCIES) @rm -f mhcount$(EXEEXT) $(CXXLINK) $(mhcount_OBJECTS) $(mhcount_LDADD) $(LIBS) mmattest$(EXEEXT): $(mmattest_OBJECTS) $(mmattest_DEPENDENCIES) $(EXTRA_mmattest_DEPENDENCIES) @rm -f mmattest$(EXEEXT) $(CXXLINK) $(mmattest_OBJECTS) $(mmattest_LDADD) $(LIBS) modtest$(EXEEXT): $(modtest_OBJECTS) $(modtest_DEPENDENCIES) $(EXTRA_modtest_DEPENDENCIES) @rm -f modtest$(EXEEXT) $(CXXLINK) $(modtest_OBJECTS) $(modtest_LDADD) $(LIBS) mptest$(EXEEXT): $(mptest_OBJECTS) $(mptest_DEPENDENCIES) $(EXTRA_mptest_DEPENDENCIES) @rm -f mptest$(EXEEXT) $(CXXLINK) $(mptest_OBJECTS) $(mptest_LDADD) $(LIBS) mspace$(EXEEXT): $(mspace_OBJECTS) $(mspace_DEPENDENCIES) $(EXTRA_mspace_DEPENDENCIES) @rm -f mspace$(EXEEXT) $(CXXLINK) $(mspace_OBJECTS) $(mspace_LDADD) $(LIBS) mvectest$(EXEEXT): $(mvectest_OBJECTS) $(mvectest_DEPENDENCIES) $(EXTRA_mvectest_DEPENDENCIES) @rm -f mvectest$(EXEEXT) $(CXXLINK) $(mvectest_OBJECTS) $(mvectest_LDADD) $(LIBS) nftest$(EXEEXT): $(nftest_OBJECTS) $(nftest_DEPENDENCIES) $(EXTRA_nftest_DEPENDENCIES) @rm -f nftest$(EXEEXT) $(CXXLINK) $(nftest_OBJECTS) $(nftest_LDADD) $(LIBS) oftest$(EXEEXT): $(oftest_OBJECTS) $(oftest_DEPENDENCIES) $(EXTRA_oftest_DEPENDENCIES) @rm -f oftest$(EXEEXT) $(CXXLINK) $(oftest_OBJECTS) $(oftest_LDADD) $(LIBS) ptest$(EXEEXT): $(ptest_OBJECTS) $(ptest_DEPENDENCIES) $(EXTRA_ptest_DEPENDENCIES) @rm -f ptest$(EXEEXT) $(CXXLINK) $(ptest_OBJECTS) $(ptest_LDADD) $(LIBS) rattest$(EXEEXT): $(rattest_OBJECTS) $(rattest_DEPENDENCIES) $(EXTRA_rattest_DEPENDENCIES) @rm -f rattest$(EXEEXT) $(CXXLINK) $(rattest_OBJECTS) $(rattest_LDADD) $(LIBS) smattest$(EXEEXT): $(smattest_OBJECTS) $(smattest_DEPENDENCIES) $(EXTRA_smattest_DEPENDENCIES) @rm -f smattest$(EXEEXT) $(CXXLINK) $(smattest_OBJECTS) $(smattest_LDADD) $(LIBS) space1$(EXEEXT): $(space1_OBJECTS) $(space1_DEPENDENCIES) $(EXTRA_space1_DEPENDENCIES) @rm -f space1$(EXEEXT) $(CXXLINK) $(space1_OBJECTS) $(space1_LDADD) $(LIBS) space2$(EXEEXT): $(space2_OBJECTS) $(space2_DEPENDENCIES) $(EXTRA_space2_DEPENDENCIES) @rm -f space2$(EXEEXT) $(CXXLINK) $(space2_OBJECTS) $(space2_LDADD) $(LIBS) svectest1$(EXEEXT): $(svectest1_OBJECTS) $(svectest1_DEPENDENCIES) $(EXTRA_svectest1_DEPENDENCIES) @rm -f svectest1$(EXEEXT) $(CXXLINK) $(svectest1_OBJECTS) $(svectest1_LDADD) $(LIBS) svectest2$(EXEEXT): $(svectest2_OBJECTS) $(svectest2_DEPENDENCIES) $(EXTRA_svectest2_DEPENDENCIES) @rm -f svectest2$(EXEEXT) $(CXXLINK) $(svectest2_OBJECTS) $(svectest2_LDADD) $(LIBS) tate$(EXEEXT): $(tate_OBJECTS) $(tate_DEPENDENCIES) $(EXTRA_tate_DEPENDENCIES) @rm -f tate$(EXEEXT) $(CXXLINK) $(tate_OBJECTS) $(tate_LDADD) $(LIBS) tbessel$(EXEEXT): $(tbessel_OBJECTS) $(tbessel_DEPENDENCIES) $(EXTRA_tbessel_DEPENDENCIES) @rm -f tbessel$(EXEEXT) $(CXXLINK) $(tbessel_OBJECTS) $(tbessel_LDADD) $(LIBS) tcon2$(EXEEXT): $(tcon2_OBJECTS) $(tcon2_DEPENDENCIES) $(EXTRA_tcon2_DEPENDENCIES) @rm -f tcon2$(EXEEXT) $(CXXLINK) $(tcon2_OBJECTS) $(tcon2_LDADD) $(LIBS) tcurve$(EXEEXT): $(tcurve_OBJECTS) $(tcurve_DEPENDENCIES) $(EXTRA_tcurve_DEPENDENCIES) @rm -f tcurve$(EXEEXT) $(CXXLINK) $(tcurve_OBJECTS) $(tcurve_LDADD) $(LIBS) tdivpol$(EXEEXT): $(tdivpol_OBJECTS) $(tdivpol_DEPENDENCIES) $(EXTRA_tdivpol_DEPENDENCIES) @rm -f tdivpol$(EXEEXT) $(CXXLINK) $(tdivpol_OBJECTS) $(tdivpol_LDADD) $(LIBS) tegr$(EXEEXT): $(tegr_OBJECTS) $(tegr_DEPENDENCIES) $(EXTRA_tegr_DEPENDENCIES) @rm -f tegr$(EXEEXT) $(CXXLINK) $(tegr_OBJECTS) $(tegr_LDADD) $(LIBS) telog$(EXEEXT): $(telog_OBJECTS) $(telog_DEPENDENCIES) $(EXTRA_telog_DEPENDENCIES) @rm -f telog$(EXEEXT) $(CXXLINK) $(telog_OBJECTS) $(telog_LDADD) $(LIBS) tequiv$(EXEEXT): $(tequiv_OBJECTS) $(tequiv_DEPENDENCIES) $(EXTRA_tequiv_DEPENDENCIES) @rm -f tequiv$(EXEEXT) $(CXXLINK) $(tequiv_OBJECTS) $(tequiv_LDADD) $(LIBS) theight$(EXEEXT): $(theight_OBJECTS) $(theight_DEPENDENCIES) $(EXTRA_theight_DEPENDENCIES) @rm -f theight$(EXEEXT) $(CXXLINK) $(theight_OBJECTS) $(theight_LDADD) $(LIBS) thilbert$(EXEEXT): $(thilbert_OBJECTS) $(thilbert_DEPENDENCIES) $(EXTRA_thilbert_DEPENDENCIES) @rm -f thilbert$(EXEEXT) $(CXXLINK) $(thilbert_OBJECTS) $(thilbert_LDADD) $(LIBS) thtconst$(EXEEXT): $(thtconst_OBJECTS) $(thtconst_DEPENDENCIES) $(EXTRA_thtconst_DEPENDENCIES) @rm -f thtconst$(EXEEXT) $(CXXLINK) $(thtconst_OBJECTS) $(thtconst_LDADD) $(LIBS) tilll$(EXEEXT): $(tilll_OBJECTS) $(tilll_DEPENDENCIES) $(EXTRA_tilll_DEPENDENCIES) @rm -f tilll$(EXEEXT) $(CXXLINK) $(tilll_OBJECTS) $(tilll_LDADD) $(LIBS) tlegcert$(EXEEXT): $(tlegcert_OBJECTS) $(tlegcert_DEPENDENCIES) $(EXTRA_tlegcert_DEPENDENCIES) @rm -f tlegcert$(EXEEXT) $(CXXLINK) $(tlegcert_OBJECTS) $(tlegcert_LDADD) $(LIBS) tmanin$(EXEEXT): $(tmanin_OBJECTS) $(tmanin_DEPENDENCIES) $(EXTRA_tmanin_DEPENDENCIES) @rm -f tmanin$(EXEEXT) $(CXXLINK) $(tmanin_OBJECTS) $(tmanin_LDADD) $(LIBS) tmrank$(EXEEXT): $(tmrank_OBJECTS) $(tmrank_DEPENDENCIES) $(EXTRA_tmrank_DEPENDENCIES) @rm -f tmrank$(EXEEXT) $(CXXLINK) $(tmrank_OBJECTS) $(tmrank_LDADD) $(LIBS) tnfd$(EXEEXT): $(tnfd_OBJECTS) $(tnfd_DEPENDENCIES) $(EXTRA_tnfd_DEPENDENCIES) @rm -f tnfd$(EXEEXT) $(CXXLINK) $(tnfd_OBJECTS) $(tnfd_LDADD) $(LIBS) torsion$(EXEEXT): $(torsion_OBJECTS) $(torsion_DEPENDENCIES) $(EXTRA_torsion_DEPENDENCIES) @rm -f torsion$(EXEEXT) $(CXXLINK) $(torsion_OBJECTS) $(torsion_LDADD) $(LIBS) tp2points$(EXEEXT): $(tp2points_OBJECTS) $(tp2points_DEPENDENCIES) $(EXTRA_tp2points_DEPENDENCIES) @rm -f tp2points$(EXEEXT) $(CXXLINK) $(tp2points_OBJECTS) $(tp2points_LDADD) $(LIBS) tperiods$(EXEEXT): $(tperiods_OBJECTS) $(tperiods_DEPENDENCIES) $(EXTRA_tperiods_DEPENDENCIES) @rm -f tperiods$(EXEEXT) $(CXXLINK) $(tperiods_OBJECTS) $(tperiods_LDADD) $(LIBS) tpoints$(EXEEXT): $(tpoints_OBJECTS) $(tpoints_DEPENDENCIES) $(EXTRA_tpoints_DEPENDENCIES) @rm -f tpoints$(EXEEXT) $(CXXLINK) $(tpoints_OBJECTS) $(tpoints_LDADD) $(LIBS) tsat$(EXEEXT): $(tsat_OBJECTS) $(tsat_DEPENDENCIES) $(EXTRA_tsat_DEPENDENCIES) @rm -f tsat$(EXEEXT) $(CXXLINK) $(tsat_OBJECTS) $(tsat_LDADD) $(LIBS) tsat2$(EXEEXT): $(tsat2_OBJECTS) $(tsat2_DEPENDENCIES) $(EXTRA_tsat2_DEPENDENCIES) @rm -f tsat2$(EXEEXT) $(CXXLINK) $(tsat2_OBJECTS) $(tsat2_LDADD) $(LIBS) tsat3$(EXEEXT): $(tsat3_OBJECTS) $(tsat3_DEPENDENCIES) $(EXTRA_tsat3_DEPENDENCIES) @rm -f tsat3$(EXEEXT) $(CXXLINK) $(tsat3_OBJECTS) $(tsat3_LDADD) $(LIBS) twist$(EXEEXT): $(twist_OBJECTS) $(twist_DEPENDENCIES) $(EXTRA_twist_DEPENDENCIES) @rm -f twist$(EXEEXT) $(CXXLINK) $(twist_OBJECTS) $(twist_LDADD) $(LIBS) vectest1$(EXEEXT): $(vectest1_OBJECTS) $(vectest1_DEPENDENCIES) $(EXTRA_vectest1_DEPENDENCIES) @rm -f vectest1$(EXEEXT) $(CXXLINK) $(vectest1_OBJECTS) $(vectest1_LDADD) $(LIBS) vectest2$(EXEEXT): $(vectest2_OBJECTS) $(vectest2_DEPENDENCIES) $(EXTRA_vectest2_DEPENDENCIES) @rm -f vectest2$(EXEEXT) $(CXXLINK) $(vectest2_OBJECTS) $(vectest2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allisog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigrattest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkgens.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comptest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conductor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hecketest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/homtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mattest1-mattest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mattest2-mattest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mhcount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmattest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mptest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mspace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvectest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nftest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oftest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rattest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smattest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/space1-space.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/space2-space.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svectest1-svectest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svectest2-svectest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tbessel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcon2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcurve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdivpol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tegr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/telog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tequiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theight.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thilbert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thtconst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlegcert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmanin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmrank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/torsion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tp2points.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tperiods.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpoints.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsat2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsat3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vectest1-vectest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vectest2-vectest.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mattest1-mattest.o: mattest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mattest1-mattest.o -MD -MP -MF $(DEPDIR)/mattest1-mattest.Tpo -c -o mattest1-mattest.o `test -f 'mattest.cc' || echo '$(srcdir)/'`mattest.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/mattest1-mattest.Tpo $(DEPDIR)/mattest1-mattest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mattest.cc' object='mattest1-mattest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mattest1-mattest.o `test -f 'mattest.cc' || echo '$(srcdir)/'`mattest.cc mattest1-mattest.obj: mattest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mattest1-mattest.obj -MD -MP -MF $(DEPDIR)/mattest1-mattest.Tpo -c -o mattest1-mattest.obj `if test -f 'mattest.cc'; then $(CYGPATH_W) 'mattest.cc'; else $(CYGPATH_W) '$(srcdir)/mattest.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/mattest1-mattest.Tpo $(DEPDIR)/mattest1-mattest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mattest.cc' object='mattest1-mattest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mattest1-mattest.obj `if test -f 'mattest.cc'; then $(CYGPATH_W) 'mattest.cc'; else $(CYGPATH_W) '$(srcdir)/mattest.cc'; fi` mattest2-mattest.o: mattest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mattest2-mattest.o -MD -MP -MF $(DEPDIR)/mattest2-mattest.Tpo -c -o mattest2-mattest.o `test -f 'mattest.cc' || echo '$(srcdir)/'`mattest.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/mattest2-mattest.Tpo $(DEPDIR)/mattest2-mattest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mattest.cc' object='mattest2-mattest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mattest2-mattest.o `test -f 'mattest.cc' || echo '$(srcdir)/'`mattest.cc mattest2-mattest.obj: mattest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mattest2-mattest.obj -MD -MP -MF $(DEPDIR)/mattest2-mattest.Tpo -c -o mattest2-mattest.obj `if test -f 'mattest.cc'; then $(CYGPATH_W) 'mattest.cc'; else $(CYGPATH_W) '$(srcdir)/mattest.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/mattest2-mattest.Tpo $(DEPDIR)/mattest2-mattest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mattest.cc' object='mattest2-mattest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mattest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mattest2-mattest.obj `if test -f 'mattest.cc'; then $(CYGPATH_W) 'mattest.cc'; else $(CYGPATH_W) '$(srcdir)/mattest.cc'; fi` space1-space.o: space.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT space1-space.o -MD -MP -MF $(DEPDIR)/space1-space.Tpo -c -o space1-space.o `test -f 'space.cc' || echo '$(srcdir)/'`space.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/space1-space.Tpo $(DEPDIR)/space1-space.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='space.cc' object='space1-space.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o space1-space.o `test -f 'space.cc' || echo '$(srcdir)/'`space.cc space1-space.obj: space.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT space1-space.obj -MD -MP -MF $(DEPDIR)/space1-space.Tpo -c -o space1-space.obj `if test -f 'space.cc'; then $(CYGPATH_W) 'space.cc'; else $(CYGPATH_W) '$(srcdir)/space.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/space1-space.Tpo $(DEPDIR)/space1-space.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='space.cc' object='space1-space.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o space1-space.obj `if test -f 'space.cc'; then $(CYGPATH_W) 'space.cc'; else $(CYGPATH_W) '$(srcdir)/space.cc'; fi` space2-space.o: space.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT space2-space.o -MD -MP -MF $(DEPDIR)/space2-space.Tpo -c -o space2-space.o `test -f 'space.cc' || echo '$(srcdir)/'`space.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/space2-space.Tpo $(DEPDIR)/space2-space.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='space.cc' object='space2-space.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o space2-space.o `test -f 'space.cc' || echo '$(srcdir)/'`space.cc space2-space.obj: space.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT space2-space.obj -MD -MP -MF $(DEPDIR)/space2-space.Tpo -c -o space2-space.obj `if test -f 'space.cc'; then $(CYGPATH_W) 'space.cc'; else $(CYGPATH_W) '$(srcdir)/space.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/space2-space.Tpo $(DEPDIR)/space2-space.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='space.cc' object='space2-space.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(space2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o space2-space.obj `if test -f 'space.cc'; then $(CYGPATH_W) 'space.cc'; else $(CYGPATH_W) '$(srcdir)/space.cc'; fi` svectest1-svectest.o: svectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT svectest1-svectest.o -MD -MP -MF $(DEPDIR)/svectest1-svectest.Tpo -c -o svectest1-svectest.o `test -f 'svectest.cc' || echo '$(srcdir)/'`svectest.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/svectest1-svectest.Tpo $(DEPDIR)/svectest1-svectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='svectest.cc' object='svectest1-svectest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o svectest1-svectest.o `test -f 'svectest.cc' || echo '$(srcdir)/'`svectest.cc svectest1-svectest.obj: svectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT svectest1-svectest.obj -MD -MP -MF $(DEPDIR)/svectest1-svectest.Tpo -c -o svectest1-svectest.obj `if test -f 'svectest.cc'; then $(CYGPATH_W) 'svectest.cc'; else $(CYGPATH_W) '$(srcdir)/svectest.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/svectest1-svectest.Tpo $(DEPDIR)/svectest1-svectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='svectest.cc' object='svectest1-svectest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o svectest1-svectest.obj `if test -f 'svectest.cc'; then $(CYGPATH_W) 'svectest.cc'; else $(CYGPATH_W) '$(srcdir)/svectest.cc'; fi` svectest2-svectest.o: svectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT svectest2-svectest.o -MD -MP -MF $(DEPDIR)/svectest2-svectest.Tpo -c -o svectest2-svectest.o `test -f 'svectest.cc' || echo '$(srcdir)/'`svectest.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/svectest2-svectest.Tpo $(DEPDIR)/svectest2-svectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='svectest.cc' object='svectest2-svectest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o svectest2-svectest.o `test -f 'svectest.cc' || echo '$(srcdir)/'`svectest.cc svectest2-svectest.obj: svectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT svectest2-svectest.obj -MD -MP -MF $(DEPDIR)/svectest2-svectest.Tpo -c -o svectest2-svectest.obj `if test -f 'svectest.cc'; then $(CYGPATH_W) 'svectest.cc'; else $(CYGPATH_W) '$(srcdir)/svectest.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/svectest2-svectest.Tpo $(DEPDIR)/svectest2-svectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='svectest.cc' object='svectest2-svectest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(svectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o svectest2-svectest.obj `if test -f 'svectest.cc'; then $(CYGPATH_W) 'svectest.cc'; else $(CYGPATH_W) '$(srcdir)/svectest.cc'; fi` vectest1-vectest.o: vectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vectest1-vectest.o -MD -MP -MF $(DEPDIR)/vectest1-vectest.Tpo -c -o vectest1-vectest.o `test -f 'vectest.cc' || echo '$(srcdir)/'`vectest.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/vectest1-vectest.Tpo $(DEPDIR)/vectest1-vectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='vectest.cc' object='vectest1-vectest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vectest1-vectest.o `test -f 'vectest.cc' || echo '$(srcdir)/'`vectest.cc vectest1-vectest.obj: vectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vectest1-vectest.obj -MD -MP -MF $(DEPDIR)/vectest1-vectest.Tpo -c -o vectest1-vectest.obj `if test -f 'vectest.cc'; then $(CYGPATH_W) 'vectest.cc'; else $(CYGPATH_W) '$(srcdir)/vectest.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/vectest1-vectest.Tpo $(DEPDIR)/vectest1-vectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='vectest.cc' object='vectest1-vectest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest1_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vectest1-vectest.obj `if test -f 'vectest.cc'; then $(CYGPATH_W) 'vectest.cc'; else $(CYGPATH_W) '$(srcdir)/vectest.cc'; fi` vectest2-vectest.o: vectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vectest2-vectest.o -MD -MP -MF $(DEPDIR)/vectest2-vectest.Tpo -c -o vectest2-vectest.o `test -f 'vectest.cc' || echo '$(srcdir)/'`vectest.cc @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/vectest2-vectest.Tpo $(DEPDIR)/vectest2-vectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='vectest.cc' object='vectest2-vectest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vectest2-vectest.o `test -f 'vectest.cc' || echo '$(srcdir)/'`vectest.cc vectest2-vectest.obj: vectest.cc @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vectest2-vectest.obj -MD -MP -MF $(DEPDIR)/vectest2-vectest.Tpo -c -o vectest2-vectest.obj `if test -f 'vectest.cc'; then $(CYGPATH_W) 'vectest.cc'; else $(CYGPATH_W) '$(srcdir)/vectest.cc'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/vectest2-vectest.Tpo $(DEPDIR)/vectest2-vectest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='vectest.cc' object='vectest2-vectest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vectest2_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vectest2-vectest.obj `if test -f 'vectest.cc'; then $(CYGPATH_W) 'vectest.cc'; else $(CYGPATH_W) '$(srcdir)/vectest.cc'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am procs_tests: $(PROCS_TESTS_SUFFIXED) check_procs: procs_tests @echo Running procs checks... for prog in $(PROCS_TESTS); do $(check_run); done qcurves_tests: $(QCURVES_TESTS_SUFFIXED) check_qcurves: qcurves_tests @echo Running qcurves checks... cp $(test_input_dir)/allgens.268605 . for prog in $(QCURVES_TESTS); do $(check_run); done rm -f ./allgens.268605 qrank_tests: $(QRANK_TESTS_SUFFIXED) check_qrank: qrank_tests @echo Running qrank checks... for prog in $(QRANK_TESTS); do $(check_run); done rm -f PRIMES 1 g0n_tests: $(G0N_TESTS_SUFFIXED) # This is the name of a directory which will be used for newform # input/output in the "make check" tests and removed afterwards. export NF_DIR:=nftmp check_g0n: g0n_tests @echo Running g0n checks... rm -rf $(NF_DIR) mkdir $(NF_DIR) for prog in $(G0N_TESTS); do $(check_run); done rm -rf $(NF_DIR) check: check_procs check_qcurves check_qrank check_g0n rm -f *.testout PRIMES 1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: eclib-2013-01-01/tests/tnfd.cc0000644000175200017520000000622212015453607012511 00000000000000// FILE TNFD.CC: test program for nfd (d-dimensional newform) class ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // #include #include #include #include #include #include #include #include #include #define OUTPUT_PARI_STYLE //#define DEBUG //#define COMPARE_OLD int main() { // init_time(); cout << "Program tnfd." << endl; #ifdef MODULAR cout << "MODULUS for linear algebra = " << MODULUS << endl; #endif long n=1; int plus=1; int verbose=1; int w_split=0; int mult_one=0; int one_p=0; cout << "Verbose output? (0/1) "; cin >> verbose; // cout << "Plus space (0/1)? "; cin >> plus; while (cout<<"Enter level: ", cin>>n, n>0) { cout << ">>>Level " << n << "\t"; homspace hplus(n,plus,0,0); int dimh = hplus.h1dim(); cout << "dimension = " << dimh << endl; cout << "Split into W-eigenspaces (0/1)? "; cin >> w_split; cout << "Multiplicity 1 eigenspaces only? (0/1)? "; cin >> mult_one; cout << "Use just one T_p (1) or a linear combination (0)? "; cin >> one_p; nfd form = nfd(&hplus, one_p, w_split, mult_one, verbose); long dims = dim(form.S); if(dims==0) continue; bigint den=form.dHS; int i, ip, nap=5, bad; cout<<"Number of ap? "; cin>>nap; primevar pr; long p; // start_time(); for(ip=0; ip1) cout<> r, r>0 ) { mat_m m(r,r); cout << "Enter entries of M: "; cin >> m; cout << " M = " << m; cout << "Trace(M) = " << trace(m) << endl; // mat_m mpower=m; for (i=2; i<=r; i++) {mpower=mpower*m; cout << "m^" << i << " = " << mpower; cout << "Trace(m^" << i << ") = " << trace(mpower) << endl; } // { vector cp = charpoly(m); cout << "char. poly. of m has coefficients " << cp << endl; } cout << "det(M) = " << determinant(m) << endl; cout << "rank(M) = " << rank(m) << endl; cout << "nullity(M) = " << nullity(m) << endl; { msubspace ker = kernel(m); mat_m kerbasis = basis(ker); cout << "kernel(m) has basis\n" << kerbasis; vec_i kerpivs = pivots(ker); cout << "pivots: " << kerpivs << "\n"; bigint kerdenom = denom(ker); cout << "denom: " << kerdenom << "\n"; } { msubspace im = image(m); cout << "image(m) has basis\n" << basis(im); cout << "pivots: " << pivots(im) << "\n"; cout << "denom: " << denom(im) << "\n"; } { bigint lambda; cout << "Enter lambda: "; cin >> lambda; msubspace elambda = eigenspace(m,lambda); cout << "eigenspace for lambda = " << lambda << " has basis\n" << basis(elambda); cout << "with dimension " << dim(elambda) << endl; cout << "\nNow repeating eigenspace calculation modulo " << MBIGPRIME << endl; msubspace elp = lift(peigenspace(m,lambda,MBIGPRIME),MBIGPRIME); cout << "eigenspace for lambda has basis\n" << basis(elp); cout << "with dimension " << dim(elp) << endl; } } cout< #include #include #define VERBOSITY 0 #ifndef CONIC_METHOD #define CONIC_METHOD 4 #endif //#define TEST_PARAM int main() { initprimes("PRIMES",VERBOSITY); bigint a,b,c,d,x0,y0,z0,disc; bigint q[3]; cin >> a >> b >> c >> d; q[0]=a; q[1]=b; q[2]=c; int res = solve_conic(q,d,x0,y0,z0,CONIC_METHOD); if(!res) {x0=y0=z0=0;} cout< #include int main(void) { set_precision("Enter number of decimal places"); bigfloat x=to_bigfloat(3.125), y=to_bigfloat(4.25); bigcomplex z = bigcomplex(x,y); bigcomplex a = bigcomplex(to_bigfloat(1),to_bigfloat(1)); bigcomplex b = bigcomplex(to_bigfloat(2),to_bigfloat(1)); bigcomplex c; cout << "z = " << z << "\n"; cout << " has real part = " << real(z) << "\n"; cout << " and imaginary part = " << imag(z) << "i\n"; cout << "z has complex conjugate = " << conj(z) << "\n"; c = cagm(z,to_bigfloat(1)); cout << "AGM(" << z << "," << bigcomplex(to_bigfloat(1)) << ") = "; cout << c << "\n\n"; cout << "AGM(" << a << "," << b << ") = "< roots; cout << "Enter Integer coefficients of a (monic) cubic:"; cin>>ia>>ib>>ic; roots = Introotscubic(ia,ib,ic); nr=roots.size(); if (nr==0) cout << "No integer roots"<> z; rootz=exp(log(z)/three); cout << "Main cube root = " << rootz << endl; cout << "whose cube is " << pow(rootz,3) << endl; rootz*=w; cout << "Next cube root = " << rootz << endl; cout << "whose cube is " << pow(rootz,3) << endl; rootz*=w; cout << "Next cube root = " << rootz << endl; cout << "whose cube is " << pow(rootz,3) << endl; // Test for quartic root-finding: bigfloat xa,xb,xc,xd,xe; cout << "Enter real coefficients a b c d e of a quartic:"; cin>>xa>>xb>>xc>>xd>>xe; int iroot; vector croots = solverealquartic((xa), (xb),(xc),(xd),(xe)); cout<<"Quartic [" < #include #include #include #ifndef CONIC_METHOD #define CONIC_METHOD 4 #endif //#define TEST_PARAM //#define HOLZER_MEASURES int main() { initprimes("PRIMES"); cout<<"Solving ax^2 + by^2 + cz^2 = 0\n"; cout<<"Using method "<> a >> b >> c; cout<> k1 >> k2 >> k3; int use_lll=(CONIC_METHOD==5); int res=!use_lll; if(use_lll) legendre_via_lll(a,b,c,k1,k2,k3,x,y,z); else res = legendre_solve_cert_1(a,b,c,k1,k2,k3,x,y,z,u); if(res) // if(!solve_conic(a,0,c,-b,x,y,z,CONIC_METHOD)) { cout<<"No solution!\n"; } else { #ifdef HOLZER_MEASURES cout<<"Before reduction of solution "; show_xyz(x,y,z); cout< int main(){ // set_precision("Enter number of decimal places"); set_precision(30); initprimes("PRIMES",1); Curve c(BIGINT(0),BIGINT(0),BIGINT(1),BIGINT(-7),BIGINT(6)); Curvedata cd(c,1); cout << "Testing some points:\n"; Point P0(cd, BIGINT(0),BIGINT(2)) ; Point P1(cd, BIGINT(1),BIGINT(0)) ; Point P2(cd, BIGINT(2),BIGINT(0)) ; cout << "The points are P0 = " << P0 << ", P1 = " << P1 << ", and P2 = " << P2 << endl ; cout << "Now in Pari format:\n"; cout << "The points are P0 = "; output_pari(cout,P0); cout << ", P1 = "; output_pari(cout,P1); cout << ", and P2 = "; output_pari(cout,P2); cout << endl ; if (!P0.isvalid()) cout << "P0 is not on the curve!\n"; if (!P1.isvalid()) cout << "P1 is not on the curve!\n"; if (!P2.isvalid()) cout << "P2 is not on the curve!\n"; cout << "Their negatives are -P0 = " << -P0 << ", -P1 = " << -P1 << ", and -P2 = " << -P2 << endl ; cout << "Computing their heights:\n"; bigfloat ht0 = height(P0) ; bigfloat ht1 = height(P1) ; bigfloat ht2 = height(P2) ; cout << "Heights are " << ht0 << ", " << ht1 << ", and " << ht2 << endl ; Point origin(cd); cout << "The origin is " << origin << endl; cout << "Now some additions etc,:\n"; Point sum = P0 + P1 ; cout << "P0 + P1 = " << sum << endl ; sum = P0 - P1 ; cout << "P0 - P1 = " << sum << endl ; sum -= P2 ; cout << "P0 - P1 - P2 = " << sum << endl ; sum = P0.twice(); cout << "P0.twice() = " << sum << endl; sum = P0 + P0; cout << "P0 + P0 = " << sum << endl; sum = 3*P0; cout << "3*P0 = " << sum << endl; sum = P0 - P0; cout << "P0 - P0 = " << sum << endl; sum = P0 + 3 * P1 - P2 ; cout << "P0 +3 P1 - P2 = " << sum << endl ; sum = 2*P0 + 2* P1 + P2 ; cout << "2P0 +2 P1 + P2 = " << sum << endl ; cout << "Now we try a systematic exploration" << endl ; int loop=1; // cout << "input 0 to skip: "; cin >> loop; if (loop) { Point Q0,Q1,Q2; int i0,i1,i2; for(i0 = -3, Q0=-3*(P0+P1+P2) ; i0 < 4 ; i0++, Q0+=P0){ for(i1 = -3, Q1=Q0 ; i1 < 4 ; i1++, Q1+=P1){ for(i2 = -3, Q2=Q1 ; i2 < 4 ; i2++, Q2+=P2){ cout << i0 << ", " << i1 <<", " << i2<< ": " << Q2 << endl ; } } } } sum = P0 -P1 -P2 ; cout << "P0 -P1 -P2 = " << sum << endl ; cout << "Height of P0-P1-P2 = " << flush; bigfloat htsum = height(sum) ; cout << htsum << endl ; cout <<"3 (P0 -P1 -P2) = " << flush; Point triplesum = 3 * sum ; cout << triplesum << endl ; cout << "Height of 3*(P0-P1-P2) = " << flush; bigfloat ht3sum = height(triplesum) ; cout << ht3sum << endl ; cout << "The quotient is " << ht3sum/htsum << endl ; /* vector pointlist(3); // won't initialize pointlist[0] = P0; pointlist[1] = P1; pointlist[2] = P2 ; bigfloat reg = regulator(pointlist) ; cout << "The regulator of P0, P1, P2 is " << reg << endl ; */ return 0; } //ends main //ends file tpoints.cc eclib-2013-01-01/tests/tmanin.cc0000644000175200017520000000517511774563612013063 00000000000000// TMANIN.CC: Program for finding newforms & computing ap ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // #include #include #include #include #include #include #include #include #include #define AUTOLOOP #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output int main(void) { init_time(); start_time(); long n=110, stopp; int output, verbose, sign=1, cuspidal=0; cout << "Program tmanin. Using METHOD = " << METHOD << " to find newforms" << endl; #ifdef MODULAR cout << "MODULUS for linear algebra = " << MODULUS << endl; #endif cout << "Verbose output? "; cin>>verbose; cout << "How many primes for Hecke eigenvalues? "; cin >> stopp; cout << endl; output=1; cout << "Output Hecke eigenvalues to file? (0/1) "; cin >> output; cout << "Sign? (-1/0/1) "; cin >> sign; #ifdef AUTOLOOP long limit; cout<<"Enter first and last N: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { cout << "\n>>>Level " << n; if(verbose)cout<1) nf.display(); else cout << nf.n1ds << " newform(s) found."<0) cout<<"Computing ap for primes up to "< #include #include #include #include #include #include #include #include #include #include #include #include #define USE_EGR #define SAT_BND 100000 // saturation bound: use -1 for global default #ifdef USE_EGR const int use_egr=1; #else const int use_egr=0; #endif #define INPUT_CLASS_IS_LETTER // we only use letters now! // Utility function for parsing input of lists of integers such as [], [2], [2,2] vector input_list(istream & is); int main() { // set_precision("Enter number of decimal places"); set_precision(100); initprimes("PRIMES",0); int verbose = 0; // cout<<"verbose (0/1)? "; cin >>verbose; int j, npts; long N, ncurve, nclass; string code; Curve E; while(!(feof(stdin))) { // Input the curve's ID and the curve: cin >> N; if(N==0) break; #ifdef INPUT_CLASS_IS_LETTER cin >> code; #else cin >> nclass; code = codeletter(nclass-1); #endif cin >> ncurve; cin >> E; Curvedata C(E); cout< points; points.reserve(npts); j=0; while(j> P; if ( !P.isvalid() ) { cout<<"point "< tpoints; points.reserve(trank); j=0; while(j> P; if ( !P.isvalid() ) { cout<<"point "< unsatprimes; int success = saturate_points(C, points, index, unsatprimes, SAT_BND, use_egr, (verbose)); if(success) { cout<<"Saturation complete --"; if(index==1) cout<<"input points were saturated"< input_list(istream & is) { char c; int a; vector ai; is>>c; // swallow first [ is>>ws>>c; if (c==']') return ai; is.unget(); while (c!=']') { is >> a >> c; // c is a comma or ] ai.push_back(a); } return ai; } //end of file tsat3.cc eclib-2013-01-01/tests/nftest.cc0000644000175200017520000000426111774563612013073 00000000000000// FILE NFTEST.CC: test program for newform constructor ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // // #include #include #include #include #include #include #include #include //#define AUTOLOOP #define LMFDB_ORDER // if defined, sorts newforms into LMFDB order before output int main(void) { int limit,firstn,n=1,count=0; int verbose=1; #ifdef AUTOLOOP cerr<<"Enter first and last N: ";cin>>firstn>>limit; n=firstn-1; cout<0) { cerr<<"Enter level: "; cin>>n; #endif if (n>0) { cout << ">>> Level " << n << " <<<\t"; newforms nf(n,verbose); cout << "\nAfter constructor, about to createfromdata() \n"; nf.createfromdata(1,25); int num = nf.n1ds; count+=num; cout << num << " newform(s), "< int main(void) { cout << "Test run of vector package.\n\n"; int i,j,k; scalar n; cout << "Enter n : "; cin >> n; vec_m v; cout << "Uninitialized new vector v = " << v << endl; vec_m v2(v); cout << "Copy of v = " << v2 << endl; v.init(n); cout << "Initialized new vector v = " << v << endl; vec_m v3(v); cout << "Copy of v = " << v3 << endl; cout << "Enter new entries of v: "; cin >> v; cout << "Now v = " << v << endl; vec_m w(3); cout << "w = " << w << endl; w = v; cout << "After w=v, " << endl; cout << "Now v = " << v << endl; cout << "Now w = " << w << endl; cout << "w==v: " << (w==v) << endl; cout << "w!=v: " << (w!=v) << endl; cout << "Enter i : "; cin >> i; bigint two; two=2; w*=two; cout << "After w*=2, w = " << w << endl; cout << "3*v = " << (3*v) << endl; cout << "Now v = " << v << endl; cout << "v+w = " << v+w << endl; cout << "Now v = " << v << endl; cout << "v-w = " << v-w << endl; cout << "Now v = " << v << endl; cout << "v*w = " << v*w << endl; cout << "Now v = " << v << endl; cout << "w/2 = " << w/two << endl; cout << "Now w = " << w << endl; cout << "-v = " << -v << endl; cout << "+v = " << +v << endl; cout << "+w = " << +w << endl; cout << "v = " << v << "; w = " << w << endl; cout << "Elements of v: \n"; for (i=1; i<=n; i++) cout << "v[" << i << "] = " << v[i] << endl; cout << "Member test: Enter a test number: " ; bigint vi; cin >> vi; cout << vi; if (member(vi,v)) cout << " IS "; else cout << " IS NOT "; cout << "a member of v." << endl; cout << "Subscript test\n"; cout << "Enter length of subscript vector:"; int m; cin >> m; vec index(m); cout << "Enter subscript vector:"; cin >> index; vec_m vv = v[index]; cout << "The sub-vector is " << vv << endl; cout << "Change one entry of v. Index?"; cin >> i; cout << "New entry?"; bigint x; cin >> x; v[i]=x; cout << "New entry: v[" << i << "] = " << v[i] << endl; cout << "Now v = " << v << endl; cout << "Initial slice; length? "; cin >> j; cout << "Slice = " << v.slice(j) << endl; cout << "Now v = " << v << endl; cout << "General slice; beginning, end? "; cin >> j >> k; cout << "Slice = " << v.slice(j,k) << endl; cout << "Now v = " << v << endl; cout << "w = " << w << "; mvecgcd(w) = " << mvecgcd(w) << endl; makeprimitive(w); cout << "After makeprimitive(w), w = " << w << endl; vec_l sv = v.shorten(n); cout << "v shortened to a vector of longs: " << sv << endl; vec_m u(n); cout << "u = "<< u << endl; swapvec(u,v); cout << "After swapvec(u,v):\nu = " << u << "\nv = " << v << endl; } eclib-2013-01-01/tests/mhcount.cc0000644000175200017520000000411411774563612013242 00000000000000// FILE MHCOUNT.CC: Program to list/count Manin-Heilbronn matrices ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include void outmat(int n, long a, long b, long c, long d) { cout<<"mats["<>seemats; cout << "How many primes? "; cin >> np; for(primevar pr(np); pr.ok(); pr++) { long p = (long)pr; if(p==2) continue; long p2 = (p-1)/2; int nmats=0; cout << "p = " << p << ";\t"; if(seemats) cout << "\n"; if(seemats) outmat(nmats,1,0,0,p); nmats++; if(seemats) outmat(nmats,p,0,0,1); nmats++; for(int s=1; s>-2; s-=2) for(long r=1; r<=p2; r++) { // cout<<"r = " << s*r << ":" << endl; long x1=p, x2=-s*r, y1=0, y2=1, a=-p, b=s*r, c, q, x3, y3; if(seemats) outmat(nmats,x1,x2,y1,y2); nmats++; while(b!=0) { c=mod(a,b); q=(a-c)/b; x3=q*x2-x1; y3=q*y2-y1; a=-b; b=c; x1=x2; x2=x3; y1=y2; y2=y3; if(seemats) outmat(nmats,x1,x2,y1,y2); nmats++; } } if(seemats)cout<<"\n"; cout << "nmats = " << nmats << ";" << endl; } } eclib-2013-01-01/tests/tcurve.cc0000644000175200017520000000617611774563612013107 00000000000000// TCURVE.CC, test program for curve classes ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include int main(void) { set_precision(30); initprimes("PRIMES",0); Curve E; cout << "\nEnter a curve: " << endl ; cin>>ws; if(cin.eof()) {cout<> E ; cout << "The curve is " << E << endl ; /* cout << "\nEnter a curve: " << endl ; E.input(cin); cout << "The curve is " << E << endl ; cout << "To test out different constructors: Using all specified:\n" ; E = Curve(0,0,1,-7,6) ; cout << "the curve is " << E << "\n" ; cout << "Using just a4 and a6 specified:\n" ; E = Curve(78, 89) ; cout << "the curve is " << E << "\n" ; E = Curve(0, 0, 1, -7, 6); cout << "the curve is " << E << "\n" ; */ cout << "A test of invariants:\n" ; Curvedata cd(E,0) ; // the 0 means no minimalization cout << "The curve is " << cd << endl ; cd = Curvedata(E,1) ; // the 1 forces minimalization cout << "The minimal curve is "; cout << cd; cout << endl ; /* cout << "A test of extended invariants:\n" ; CurvedataExtra cdx(cd) ; cout << "The extra curve data is "; cout << cdx; cout << endl ; */ cout <<"A test of Tate's algorithm:\n"; CurveRed cdr(cd); cout << cdr << endl; cout <<"Full display:\n"; cdr.display(cout); cout <<"Traces of Frobenius:\n"; for(primevar pr(25); pr.ok(); pr++) { long p=pr; cout<<"p="< qai; qai.push_back(qa1); qai.push_back(qa2); qai.push_back(qa3); qai.push_back(qa4); qai.push_back(qa6); Curvedata Es(qai,scale); cout<<"Constructed curve is "<<(Curve)Es<<" with scale = "< #include #define NEQPLIST 0 // Number of primes for equiv-test sieving vector eqplist; int getquartic(quartic& g, int verbose) { bigint a, b, c, d, e; if(verbose) cout << "Enter quartic coefficients a,b,c,d,e ?" << endl; char ch; cin>>ch; if(ch=='(') cin>>a>>ch>>b>>ch>>c>>ch>>d>>ch>>e>>ch; else { cin.putback(ch); cin >> a >> b >> c >> d >> e; } if (is_zero(a)&&is_zero(b)&&is_zero(c)&&is_zero(d)&&is_zero(e)) return 0; g=quartic(a,b,c,d,e); // will set its own invariants, roots and type g.set_equiv_code(eqplist); return 1; } int main() { initprimes("PRIMES",0); cout.precision(15); cin.flags( cin.flags() | ios::dec ); //force decimal input (bug fix) int verb; cout << "Verbose? "; cin >> verb; long nq; cout << "How many quartics to check? "; cin >> nq; cout< dlist; int i,j; for(i=0; i #include using namespace std; int main() { cout.precision(15); double x; int debug=0; // cout << "Debug? "; cin>>debug; while(cout<<"Enter x: ", cin>>x, x!=0.0) { cout << "x = " << x; cout << "\tK0(x) = " << kbessel(0,x,debug) << flush; cout << "\tK1(x) = " << kbessel(1,x,debug) << endl; } } eclib-2013-01-01/tests/Makefile.am0000644000175200017520000001075112071067052013302 00000000000000## Process this file with automake to produce Makefile.in AM_CPPFLAGS = -I$(top_srcdir)/libsrc $(FLINT_CFLAGS) $(NTL_CFLAGS) $(PARI_CFLAGS) $(GMP_CFLAGS) -DNTL_ALL AM_LDFLAGS = $(FLINT_LDFLAGS) $(NTL_LDFLAGS) $(PARI_LDFLAGS) $(GMP_LDFLAGS) LIBS = $(top_builddir)/libsrc/libec.la $(FLINT_LIBS) $(PARI_LIBS) $(NTL_LIBS) $(GMP_LIBS) check_run = echo "Testing $${prog}..."; ./$${prog}$(EXEEXT) < $(test_input_dir)/$${prog}.in > $${prog}.testout 2>/dev/null && diff $${prog}.testout $(test_output_dir)/$${prog}.out || exit $$? test_input_dir = $(srcdir)/in test_output_dir = $(srcdir)/out ################ PROCS ############################################# PROCS_TESTS = smattest comptest rattest bigrattest ptest mptest tbessel mvectest mmattest mspace thilbert tp2points tilll vectest1 vectest2 mattest1 mattest2 space1 space2 svectest1 svectest2 tcon2 tlegcert PROCS_TESTS_SUFFIXED = $(PROCS_TESTS:=$(EXEEXT)) procs_tests: $(PROCS_TESTS_SUFFIXED) ptest_SOURCES=ptest.cc mptest_SOURCES=mptest.cc smattest_SOURCES=smattest.cc comptest_SOURCES=comptest.cc rattest_SOURCES=rattest.cc bigrattest_SOURCES=bigrattest.cc mvectest_SOURCES=mvectest.cc mmattest_SOURCES=mmattest.cc mspace_SOURCES=mspace.cc tbessel_SOURCES=tbessel.cc thilbert_SOURCES=thilbert.cc tp2points_SOURCES=tp2points.cc tilll_SOURCES=tilll.cc vectest1_SOURCES=vectest.cc vectest1_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=1 vectest2_SOURCES=vectest.cc vectest2_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=2 mattest1_SOURCES=mattest.cc mattest1_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=1 mattest2_SOURCES=mattest.cc mattest2_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=2 space1_SOURCES=space.cc space1_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=1 space2_SOURCES=space.cc space2_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=2 svectest1_SOURCES=svectest.cc svectest1_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=1 svectest2_SOURCES=svectest.cc svectest2_CPPFLAGS=${AM_CPPFLAGS} -DSCALAR_OPTION=2 tcon2_SOURCES=tcon2.cc tlegcert_SOURCES=tlegcert.cc check_procs: procs_tests @echo Running procs checks... for prog in $(PROCS_TESTS); do $(check_run); done ################ QCURVES ############################################# QCURVES_TESTS = tcurve tpoints theight thtconst tegr telog tdivpol tperiods tsat tsat2 tsat3 conductor tate torsion twist allisog checkgens QCURVES_TESTS_SUFFIXED = $(QCURVES_TESTS:=$(EXEEXT)) qcurves_tests: $(QCURVES_TESTS_SUFFIXED) tcurve_SOURCES=tcurve.cc tpoints_SOURCES=tpoints.cc theight_SOURCES=theight.cc thtconst_SOURCES=thtconst.cc tegr_SOURCES=tegr.cc telog_SOURCES=telog.cc tdivpol_SOURCES=tdivpol.cc tperiods_SOURCES=tperiods.cc tsat_SOURCES=tsat.cc tsat2_SOURCES=tsat2.cc tsat3_SOURCES=tsat3.cc conductor_SOURCES=conductor.cc tate_SOURCES=tate.cc torsion_SOURCES=torsion.cc twist_SOURCES=twist.cc allisog_SOURCES=allisog.cc checkgens_SOURCES=checkgens.cc check_qcurves: qcurves_tests @echo Running qcurves checks... cp $(test_input_dir)/allgens.268605 . for prog in $(QCURVES_TESTS); do $(check_run); done rm -f ./allgens.268605 ################ QRANK ############################################# QRANK_TESTS = tmrank tequiv d2 QRANK_TESTS_SUFFIXED = $(QRANK_TESTS:=$(EXEEXT)) qrank_tests: $(QRANK_TESTS_SUFFIXED) tmrank_SOURCES=tmrank.cc tequiv_SOURCES=tequiv.cc d2_SOURCES=d2.cc check_qrank: qrank_tests @echo Running qrank checks... for prog in $(QRANK_TESTS); do $(check_run); done rm -f PRIMES 1 ################ G0N ############################################# G0N_TESTS = modtest homtest hecketest mhcount tmanin nftest oftest tnfd G0N_TESTS_SUFFIXED = $(G0N_TESTS:=$(EXEEXT)) g0n_tests: $(G0N_TESTS_SUFFIXED) # NB The order of the above does matter: tmanin must be run before # nftest and oftest modtest_SOURCES=modtest.cc homtest_SOURCES=homtest.cc hecketest_SOURCES=hecketest.cc nftest_SOURCES=nftest.cc mhcount_SOURCES=mhcount.cc oftest_SOURCES=oftest.cc tmanin_SOURCES=tmanin.cc tnfd_SOURCES=tnfd.cc # This is the name of a directory which will be used for newform # input/output in the "make check" tests and removed afterwards. export NF_DIR:=nftmp check_g0n: g0n_tests @echo Running g0n checks... rm -rf $(NF_DIR) mkdir $(NF_DIR) for prog in $(G0N_TESTS); do $(check_run); done rm -rf $(NF_DIR) check: check_procs check_qcurves check_qrank check_g0n rm -f *.testout PRIMES 1 check_PROGRAMS=$(PROCS_TESTS) $(QCURVES_TESTS) $(QRANK_TESTS) $(G0N_TESTS) # We list here the directories in and out which contain the test input # and expected output files for the tests run by "make check". EXTRA_DIST = in out ACLOCAL_AMFLAGS = -I m4 eclib-2013-01-01/tests/mmattest.cc0000644000175200017520000001043211774563612013423 00000000000000// mmattest.cc: Multiprecision matrix package test program ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include int main(void) { time_t starttime,stoptime; time(&starttime); cout << "\nMultiprecision matrix package test program.\n\n"; { long i,j; scalar r; mat_m a,aug,ref; vec_l pc(1),npc(1); vec_m poly(1); { cout << "Enter size of a square matrix A: "; cin >> r; a.init(r,r); cout << "Enter entries of A: "; cin >> a; cout << "A = " << a; } // The following should work, doesn't in TURBO C++, but DOES with GCC!! { cout << "Creating an array of 3 matrices\n"; mat_m* matlist = new mat_m[3]; matlist[0] = a; matlist[1] = BIGINT(2)*a; matlist[2] = BIGINT(3)*a; cout << " A=" << matlist[0]; cout << "2A=" << matlist[1]; cout << "3A=" << matlist[2]; delete[] matlist; } { for (i=1; i<=r; i++) cout << "row(A,"<> i; } { mat sa = a.shorten(r); cout << "After shortening to a matrix of longs, A = " << sa; } mat_m b = a; { cout << "B = A = " << b; cout << "Enter any number "; cin >> i; cout << "B==A?" << (b==a) << endl; cout << "B!=A?" << (b!=a) << endl; b+=a; cout << "after B+:=A, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; } { b-=a; cout << "after B-:=A, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; bigint two; two=2; b*=two; cout << "after B*:=2, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; b/=two; cout << "after B/:=2, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; } { cout << "A+B=" << (a+b); cout << "Now A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; cout << "A-B=" << (a-b); cout << "Now A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; cout << "A*B=" << (a*b); cout << "Now A = " << a << "and B = " << b; } { cout << "Enter any number "; cin >> i; cout << "-A=" << (-a); cout << "Now A = " << a; cout << "-A=" << (-a); cout << "Now A = " << a; cout << "Enter any number "; cin >> i; } { vector cp = charpoly(a); cout << "char. poly. of A has coefficients " << cp << endl; cout << "det(A) = " << determinant(a) << endl; } { aug = colcat(a,midmat(r)); cout << "Augmented matrix = " << aug << endl; } long rk, ny; bigint denom; { int method; cout << "Which echelon method? (0=standard,1=longlong,2=modular) "; cin>>method; ref = echelon(aug, pc, npc, rk, ny, denom, method); cout << "Echelon matrix = " << ref; cout << "pivotal columns: " << pc << endl; cout << "nonpivotal columns: " << npc << endl; cout << "Denom = " << denom << endl; } for (i=1,rk=0; (i<=r)&&(pc[i]<=r); i++,rk++) ; ny = r-rk; cout << "Rank = " << rk << endl; cout << "Nullity = " << ny << endl; if (rk #include #include int main(){ set_precision("Enter number of decimal places"); int verbose=0; cout << "Verbose? (0/1) " << flush; cin >> verbose; initprimes("PRIMES",0); bigint v; vector ai(5); while (getcurve(ai,verbose)) { Curvedata D(Curvedata(ai,v),1); CurveRed C(D); IsogenyClass cl(C ,verbose); cl.grow(); // cl.display(cout); vector crs=cl.getcurves(); vector cs; for(unsigned int i=0; i curves = cl.getcurves(); cout << "Curve list via getcurves(): " << curves << endl; vector m = cl.getmat(); long ncurves = curves.size(); long i,j; cout << "Isogeny matrix via getmat():\n"; cout << "\t"; for(j=0; j #include #include #define AUTOLOOP int main(void) { int n=11, limit; int verbose; cout << "Verbose details of oldform constructor? "; cin >> verbose; #ifdef AUTOLOOP cout<<"Enter first and last N: ";cin>>n>>limit; n--; while (n>n, n>0) { #endif cout << ">>>Level " << n << "\t"; moddata symbols(n); // (not really needed except //that the level data gets initialized properly //which IS needed for oldforms) oldforms of(10,&symbols,verbose); // default args ntp=5, verbose=0 of.display(); } // end of while() } // end of main() eclib-2013-01-01/tests/modtest.cc0000644000175200017520000000327211774563612013250 00000000000000// MODTEST.CC -- Test for modular symbols ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #include #define AUTOLOOP int main(void) { init_time(); start_time(); int n=1; int plus=1; int verbose=0; cout << "Display symbol details (0/1)? " << flush; cin >> verbose; int limit; #ifdef AUTOLOOP cout<<"Enter first and last levels: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { cout << ">>>Level " << n << "\t"; symbdata symbols(n); cout<<"("< int main(void) { cout << "Test run of vector package.\n\n"; int i,j,k,n; cout << "iota(10) = " << iota(10) << endl; cout << "Enter n : "; cin >> n; vec v; cout << "Uninitialized new vec v = " << v << endl; vec v2(v); cout << "Copy of v = " << v2 << endl; v.init(n); cout << "Initialized new vec v = " << v << endl; vec v3(v); cout << "Copy of v = " << v3 << endl; cout << "Enter new entries of v: "; cin >> v; cout << "Now v = " << v << endl; vec w(3); cout << "w = " << w << endl; w = v; cout << "After w=v, " << endl; cout << "Now v = " << v << endl; cout << "Now w = " << w << endl; cout << "w==v: " << (w==v) << endl; cout << "w!=v: " << (w!=v) << endl; cout << "Enter i : "; cin >> i; w*=2; cout << "After w*=2, w = " << w << endl; cout << "3*v = " << (3*v) << endl; cout << "Now v = " << v << endl; cout << "v+w = " << v+w << endl; cout << "Now v = " << v << endl; cout << "v-w = " << v-w << endl; cout << "Now v = " << v << endl; cout << "v*w = " << v*w << endl; cout << "Now v = " << v << endl; cout << "w/2 = " << w/2 << endl; cout << "Now w = " << w << endl; cout << "-v = " << -v << endl; cout << "+v = " << +v << endl; cout << "+w = " << +w << endl; cout << "v = " << v << "; w = " << w << endl; cout << "Elements of v: \n"; for (i=1; i<=n; i++) cout << "v[" << i << "] = " << v[i] << endl; cout << "Member test: Enter a test number: " ; cin >> i; cout << i; if (member(i,v)) cout << " IS "; else cout << " IS NOT "; cout << "a member of v." << endl; cout << "Subscript test\n"; cout << "Enter length of subscript vec:"; int m; cin >> m; vec index=vec(m); cout << "Enter subscript vector:"; cin >> index; vec vv = v[index]; cout << "The sub-vector is " << vv << endl; cout << "Change one entry of v. Index?"; cin >> i; cout << "New entry?"; scalar x; cin >> x; v[i]=x; cout << "New entry: v[" << i << "] = " << v[i] << endl; cout << "Now v = " << v << endl; cout << "Initial slice; length? "; cin >> j; cout << "Slice = " << v.slice(j) << endl; cout << "Now v = " << v << endl; cout << "General slice; beginning, end? "; cin >> j >> k; cout << "Slice = " << v.slice(j,k) << endl; cout << "Now v = " << v << endl; cout << "w = " << w << "; vecgcd(w) = " << vecgcd(w) << endl; makeprimitive(w); cout << "After makeprimitive(w), w = " << w << endl; vec u(n); cout << "u = "<< u << endl; swapvec(u,v); cout << "After swapvec(u,v):\nu = " << u << "\nv = " << v << endl; } eclib-2013-01-01/tests/twist.cc0000644000175200017520000000402511774563612012740 00000000000000// twist.cc: program to compute & display quadratic twists ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include int main(){ initprimes("PRIMES",0); Curvedata D, E; CurveRed CR; bigint c4,c6,twist2; bigint v; int verbose=0; vector ai(5); while (getcurve(ai,verbose)) { Curvedata D(Curvedata(ai,v),1); E = D; CR = CurveRed(E); cout << "\nCurve is: " << endl; CR.display(cout); long twist=1; while(1) { cout << "\nEnter a twist value: "; cout << "\n(0 to set a new `original' curve, 1 to twist original,\n"; cout << "or any other integer to twist immediately preceding output)\n "; cin>>ws; if(cin.eof()) {cout<> twist; if(twist==0) break; if(twist==1) { E=D;} else { E.getci(c4, c6); twist *= 4; //corrects for twist not congruent -1 mod 4 twist2 = twist*twist; c4 *= twist2; c6 *= twist*twist2; E = Curvedata(Curve(c4, c6), 1); //minimal form CR=CurveRed(E); cout << "\n\nE * " << twist/4 << " is: \n"; CR.display(cout); cout << endl; } } } } //ends main eclib-2013-01-01/tests/space.cc0000644000175200017520000000623511774563612012666 00000000000000// space.cc: Test of subspace package ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include int main() { cout << "\nSubspace package test program\n\n"; int times,ntimes,r=0; while (cout << "Enter size of square matrix M: ", cin >> r, r>0 ) { mat m(r,r); cout << "Enter entries of M: "; cin >> m; cout << " M = " << m; cout << "Trace(M) = " << trace(m) << endl; /* int i; mat mpower=m; for (i=2; i<=r; i++) {mpower=mpower*m; cout << "m^" << i << " = " << mpower; cout << "Trace(m^" << i << ") = " << trace(mpower) << endl; } { vector cp = charpoly(m); cout << "char. poly. of m has coefficients " << cp << endl; } cout << "det(M) = " << determinant(m) << endl; cout << "rank(M) = " << rank(m) << endl; cout << "nullity(M) = " << nullity(m) << endl; */ cout << endl << "Enter number of times to repeat kernel tests: "; cin >> ntimes; { times=ntimes; subspace ker; while(times--) ker = kernel(m); mat kerbasis = basis(ker); cout << "kernel(m) has basis\n" << kerbasis; vec kerpivs = pivots(ker); cout << "pivots: " << kerpivs << "\n"; int kerdenom = denom(ker); cout << "denom: " << kerdenom << "\n"; } cout << "Now compute kernel mod p, p = " << BIGPRIME << endl; { times=ntimes; subspace ker; while(times--) ker = pkernel(m,BIGPRIME); mat kerbasis = basis(ker); cout << "kernel(m) has basis\n" << kerbasis; vec kerpivs = pivots(ker); cout << "pivots: " << kerpivs << "\n"; times=ntimes; subspace oldker; while(times--) oldker = oldpkernel(m,BIGPRIME); if((kerbasis!=basis(oldker))||(kerpivs!=pivots(oldker))) { cout << "!!! Differs from old version !!!" << endl; cout << "Old basis = \n"<> lambda; subspace elambda = eigenspace(m,lambda); cout << "eigenspace for lambda has basis\n" << basis(elambda); cout << "with dimension " << dim(elambda) << endl; } */ } cout< #include #include #include #include #define AUTOLOOP //#define SHOW_TIMES int main(void) { init_time(); int n=1; int plus=1; int verbose=0; int cuspidal=0; long *dims = new long[3]; long *cdims = new long[3]; // cout << "Verbose? "; cin >> verbose; // cout << "Plus space, minus space or full space (+1,-1,0)? "; cin >> plus; int s,limit; #ifdef AUTOLOOP cout<<"Enter first and last levels: ";cin>>n>>limit; n--; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { { cout << "\n>>>Level " << n << "\n"; for (s=0; s<3; s++) { plus=(s==0? 1 : (s==1? -1: 0)); if(verbose) { cout<<"Computing sign="< #include #include #include #include int main(void) { init_time(); start_time(); cout << "\nMatrix package test program.\n\n"; { long i,j; scalar r; mat a,aug,ref; vec pc(1),npc(1),poly(1); { cout << "Enter size of a square matrix A: "; cin >> r; a.init(r,r); cout << "Enter entries of A: "; cin >> a; cout << "A = " << a; cout << "Using A.output(cout): "; a.output(cout); cout << "Using A.output_pari(cout): "; a.output_pari(cout); cout << "Using A.output_pretty(cout): \n"; a.output_pretty(cout); } string filename; cout<< "Enter a filename for matrix binary output: "; cin>>filename; a.dump_to_file(filename); cout<< "Matrix dumped to file " << filename << endl; mat ax; ax.read_from_file(filename); cout<< "Matrix reread from file " << filename << endl; cout << "B = " << ax; if(a==ax) cout<<"agree"; else cout << "WRONG!"; cout<> i; // The following should work, doesn't in TURBO C++, but DOES with GCC!! { cout << "Creating an array of 3 matrices\n"; mat* matlist = new mat[3]; matlist[0] = a; matlist[1] = 2*a; matlist[2] = 3*a; cout << " A=" << matlist[0]; cout << "2A=" << matlist[1]; cout << "3A=" << matlist[2]; delete[] matlist; } { for (i=1; i<=r; i++) cout << "row(A,"<> i; } mat b = a; { cout << "B = A = " << b; cout << "Enter any number "; cin >> i; cout << "B==A?" << (b==a) << endl; cout << "B!=A?" << (b!=a) << endl; b+=a; cout << "after B+:=A, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; } { b-=a; cout << "after B-:=A, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; b*=2; cout << "after B*:=2, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; b/=2; cout << "after B/:=2, A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; } { cout << "A+B=" << (a+b); cout << "Now A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; cout << "A-B=" << (a-b); cout << "Now A = " << a << "and B = " << b; cout << "Enter any number "; cin >> i; cout << "A*B=" << (a*b); cout << "Now A = " << a << "and B = " << b; } { cout << "Enter any number "; cin >> i; cout << "-A=" << (-a); cout << "Now A = " << a; cout << "-A=" << (-a); cout << "Now A = " << a; cout << "Enter any number "; cin >> i; } { vector cp = charpoly(a); cout << "char. poly. of A has coefficients " << cp << endl; cout << "det(A) = " << determinant(a) << endl; } { aug = colcat(a,idmat(r)); cout << "Augmented matrix = " << aug << endl; } long rk, ny; scalar denom; { int method=0; cout << "Which echelon method? (0=standard,1=longlong,2=modular) "; cin>>method; cout << "\nUsing method " << method; if(method==2) cout << " (modulus = " << BIGPRIME << ")"; cout << endl; ref = echelon(aug, pc, npc, rk, ny, denom, method); cout << "Echelon matrix = " << ref; cout << "pivotal columns: " << pc << endl; cout << "nonpivotal columns: " << npc << endl; cout << "Denom = " << denom << endl; } for (i=1,rk=0; (i<=r)&&(pc[i]<=r); i++,rk++) ; ny = r-rk; cout << "Rank = " << rk << endl; cout << "Nullity = " << ny << endl; if (rk1) cout << "(1/" << denom << ")*"; cout << ainv; cout << "Check: A.A^(-1) = I ?"; if (a*ainv == denom*idmat(r)) cout << " True!"; else cout << " False!"; cout << endl; } // Clear up: ref.init(); pc.init(); npc.init(); aug.init(); a.init(); } stop_time(); //cout << "cpu time = "; show_time(); cout << endl; } eclib-2013-01-01/tests/checkgens.cc0000644000175200017520000001366212071067052013513 00000000000000// FILE CHECKGENS.CC -- Program to check input gens are Mordell-Weil basis ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank/g0n package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include #define INPUT_CLASS_IS_LETTER // we only use letters now! Curve C; Curvedata CD; vector plist; int verbose; string genfile; string ccode; #include // for codeletter() function int main() { // cout<<"precision = "<>verbose; verbose=0; // cerr<<"\nLimit on height of search (-1 to just check points are on curve)? "; // cin >> hmax; hmax=-1; cerr <<"\n"; cerr << "input filename for curves and generators? "; cin >> genfile; ifstream genin; genin.open(genfile.c_str()); if(!genin.is_open()) {cerr<<"Unable to open file " << genfile << "\n"; abort();} cerr<> cond; // cout<<"input conductor="<> ccode; #else genin >> nclass; ccode = codeletter(nclass-1); // cout<<"After input, nclass="<> ncurve; // cout<<"After input, ncurve="<>C; // cout<<"After input, C="<> rank; cout << "r = "<> P; cout << P; if(P.isvalid()) { plist.push_back(P); cout << " OK "; } else { cout << " not on curve! "; abort(); } } // A test of our division-by-2 code: for(vector::const_iterator Pi=plist.begin(); Pi!=plist.end(); Pi++) { Point P = *Pi; Point Q = 2*P; vector Qhalves = division_points(CD,Q,2); if(Qhalves.size()==0) { cout<<"ERROR: Q="<maxht) maxht=ht; } mw mwbasis(&CD,verbose,1); mwbasis.process(plist); rank2 = mwbasis.getrank(); int rank_under = (rank2hmax)) { if(!verbose) cout<<"\n"; cout<<"Bound on naive height of extra generators = "<hmax) { cout<<"Only searching up to height "<1) { if(!verbose) cout<<"\n"; cout << "Points found contain original with index " << index <<"\n"; vector b = mwbasis.getbasis(); for (i=0; i)? [ 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ] Enter a number to see if it is that list: NOT in the list iota(10): [ 1 2 3 4 5 6 7 8 9 10 ] n = 527788800 exps = [ 8 2 2 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ] Comparing previous prime list with [ 2 3 5 7 11 13 17 19 23 29 ] First starts with second, 10 items from 0: 1 First starts with second, 5 items from 5: 1 Second starts with first, 10 items from 0: 1 Second starts with first, 5 items from 5: 1 How many primes do you want to see (one by one)? Prime number 1 = 2 Prime number 2 = 3 Prime number 3 = 5 Prime number 4 = 7 Prime number 5 = 11 Prime number 6 = 13 Prime number 7 = 17 Prime number 8 = 19 Prime number 9 = 23 Prime number 10 = 29 Enter an integer m (0 to stop): Smallest prime factor of 123 is 3 m has 2 prime divisors: [ 3 41 ] with exponents: 3:1 41:1 m has 8 divisors: [ 1 -1 3 -3 41 -41 123 -123 ] m has 4 positive divisors: [ 1 3 41 123 ] m has 1 positive divisors whose square divides m: [ 1 ] m has 4 positive square-free divisors: [ 1 3 41 123 ] Enter an integer m (0 to stop): Enter integers a b (0 0 to stop): gcd = 3 lcm = 18696 Enter integers a b (0 0 to stop): eclib-2013-01-01/tests/out/tbessel.out0000644000175200017520000000011712071066423014243 00000000000000Enter x: x = 1.23 K0(x) = 0.305770989597634 K1(x) = 0.414744832850106 Enter x: eclib-2013-01-01/tests/out/mptest.out0000644000175200017520000001242211737577017014136 00000000000000Computed 78519 primes, largest is 1000253 Extra primes in list: long prime factors of 420: [ 2 3 5 7 ] with posdivs (long version) [ 1 2 4 3 6 12 5 10 20 15 30 60 7 14 28 21 42 84 35 70 140 105 210 420 ] Elements of a are: 10 20 30 Elements of b are: 10 20 30 a = [ 10 20 30 ] end of output of a b = [ 10 20 30 ] end of output of b After b=a, b = [ 10 20 30 ] bigint versions of divisor functions: bigint prime factors of 420: [ 2 3 5 7 ] with posdivs (bigint version) [ 1 2 4 3 6 12 5 10 20 15 30 60 7 14 28 21 42 84 35 70 140 105 210 420 ] and alldivs (bigint version) [ 1 -1 2 -2 4 -4 3 -3 6 -6 12 -12 5 -5 10 -10 20 -20 15 -15 30 -30 60 -60 7 -7 14 -14 28 -28 21 -21 42 -42 84 -84 35 -35 70 -70 140 -140 105 -105 210 -210 420 -420 ] making a copy of iqlist reuse iqlist for sqdivs iqlist (should be sqdivs) [ 1 2 ] iplist (should be alldivs) [ 1 -1 2 -2 4 -4 3 -3 6 -6 12 -12 5 -5 10 -10 20 -20 15 -15 30 -30 60 -60 7 -7 14 -14 28 -28 21 -21 42 -42 84 -84 35 -35 70 -70 140 -140 105 -105 210 -210 420 -420 ] making an vector of iplist (alldivs) stream output: [ 1 -1 2 -2 4 -4 3 -3 6 -6 12 -12 5 -5 10 -10 20 -20 15 -15 30 -30 60 -60 7 -7 14 -14 28 -28 21 -21 42 -42 84 -84 35 -35 70 -70 140 -140 105 -105 210 -210 420 -420 ] irary(7) is -3 irary[3] is -2 testing find function 35 is there: 35 is item number 36 13 is not there Test of sqrt and isqrt Enter a positive bigint a (999 to stop): a = 123, sign(a) = 1 a = 123, sqrt(a) = 11 (rounded down) a is not a square Enter a positive bigint a (999 to stop): a = 121, sign(a) = 1 a = 121, sqrt(a) = 11 (rounded down) a is a square with exact square root 11 Enter a positive bigint a (999 to stop): Test of sqrt mod p Enter a prime p: 23 sqrt(1 mod p) = 1 ---OK sqrt(2 mod p) = 5 ---OK sqrt(3 mod p) = 7 ---OK sqrt(4 mod p) = 2 ---OK 5 is not a quadratic residue mod p! sqrt(6 mod p) = 11 ---OK 7 is not a quadratic residue mod p! sqrt(8 mod p) = 10 ---OK sqrt(9 mod p) = 3 ---OK 10 is not a quadratic residue mod p! 11 is not a quadratic residue mod p! sqrt(12 mod p) = 9 ---OK sqrt(13 mod p) = 6 ---OK 14 is not a quadratic residue mod p! 15 is not a quadratic residue mod p! sqrt(16 mod p) = 4 ---OK 17 is not a quadratic residue mod p! sqrt(18 mod p) = 8 ---OK 19 is not a quadratic residue mod p! 20 is not a quadratic residue mod p! 21 is not a quadratic residue mod p! 22 is not a quadratic residue mod p! 23 is not a quadratic residue mod p! sqrt(24 mod p) = 1 ---OK sqrt(25 mod p) = 5 ---OK sqrt(26 mod p) = 7 ---OK sqrt(27 mod p) = 2 ---OK 28 is not a quadratic residue mod p! sqrt(29 mod p) = 11 ---OK 30 is not a quadratic residue mod p! sqrt(31 mod p) = 10 ---OK sqrt(32 mod p) = 3 ---OK 33 is not a quadratic residue mod p! 34 is not a quadratic residue mod p! sqrt(35 mod p) = 9 ---OK sqrt(36 mod p) = 6 ---OK 37 is not a quadratic residue mod p! 38 is not a quadratic residue mod p! sqrt(39 mod p) = 4 ---OK 40 is not a quadratic residue mod p! sqrt(41 mod p) = 8 ---OK 42 is not a quadratic residue mod p! 43 is not a quadratic residue mod p! 44 is not a quadratic residue mod p! 45 is not a quadratic residue mod p! 46 is not a quadratic residue mod p! sqrt(47 mod p) = 1 ---OK sqrt(48 mod p) = 5 ---OK sqrt(49 mod p) = 7 ---OK sqrt(50 mod p) = 2 ---OK 51 is not a quadratic residue mod p! sqrt(52 mod p) = 11 ---OK 53 is not a quadratic residue mod p! sqrt(54 mod p) = 10 ---OK sqrt(55 mod p) = 3 ---OK 56 is not a quadratic residue mod p! 57 is not a quadratic residue mod p! sqrt(58 mod p) = 9 ---OK sqrt(59 mod p) = 6 ---OK 60 is not a quadratic residue mod p! 61 is not a quadratic residue mod p! sqrt(62 mod p) = 4 ---OK 63 is not a quadratic residue mod p! sqrt(64 mod p) = 8 ---OK 65 is not a quadratic residue mod p! 66 is not a quadratic residue mod p! 67 is not a quadratic residue mod p! 68 is not a quadratic residue mod p! 69 is not a quadratic residue mod p! sqrt(70 mod p) = 1 ---OK sqrt(71 mod p) = 5 ---OK sqrt(72 mod p) = 7 ---OK sqrt(73 mod p) = 2 ---OK 74 is not a quadratic residue mod p! sqrt(75 mod p) = 11 ---OK 76 is not a quadratic residue mod p! sqrt(77 mod p) = 10 ---OK sqrt(78 mod p) = 3 ---OK 79 is not a quadratic residue mod p! 80 is not a quadratic residue mod p! sqrt(81 mod p) = 9 ---OK sqrt(82 mod p) = 6 ---OK 83 is not a quadratic residue mod p! 84 is not a quadratic residue mod p! sqrt(85 mod p) = 4 ---OK 86 is not a quadratic residue mod p! sqrt(87 mod p) = 8 ---OK 88 is not a quadratic residue mod p! 89 is not a quadratic residue mod p! 90 is not a quadratic residue mod p! 91 is not a quadratic residue mod p! 92 is not a quadratic residue mod p! sqrt(93 mod p) = 1 ---OK sqrt(94 mod p) = 5 ---OK sqrt(95 mod p) = 7 ---OK sqrt(96 mod p) = 2 ---OK 97 is not a quadratic residue mod p! sqrt(98 mod p) = 11 ---OK 99 is not a quadratic residue mod p! First 100 OK Enter a prime p: 0 Enter a bigint m (0 to stop): m = 420 m has 4 prime divisors: [ 2 3 5 7 ] with exponents: 2:2 3:1 5:1 7:1 m has 48 divisors: [ 1 -1 2 -2 4 -4 3 -3 6 -6 12 -12 5 -5 10 -10 20 -20 15 -15 30 -30 60 -60 7 -7 14 -14 28 -28 21 -21 42 -42 84 -84 35 -35 70 -70 140 -140 105 -105 210 -210 420 -420 ] m has 24 positive divisors: [ 1 2 4 3 6 12 5 10 20 15 30 60 7 14 28 21 42 84 35 70 140 105 210 420 ] m has 2 positive divisors whose square divides m: [ 1 2 ] m has 16 positive square-free divisors: [ 1 2 3 6 5 10 15 30 7 14 21 42 35 70 105 210 ] Enter a bigint m (0 to stop): eclib-2013-01-01/tests/out/tsat2.out0000644000175200017520000000471611744000011013633 00000000000000 =============================================================== 24129r1 = [0,0,1,-68799,-1969790] 2 points entered:[ [-1870:9257:8] [-197:1984:1] ] Checking 2-saturation Points have successfully been 2-saturated (max q used = 17) Checking 3-saturation Points have successfully been 3-saturated (max q used = 37) Checking 5-saturation Points have successfully been 5-saturated (max q used = 73) Checking 7-saturation Points have successfully been 7-saturated (max q used = 37) Checking 11-saturation Points have successfully been 11-saturated (max q used = 311) Checking 13-saturation Points have successfully been 13-saturated (max q used = 23) Checking 17-saturation Points have successfully been 17-saturated (max q used = 29) Checking 19-saturation Points have successfully been 19-saturated (max q used = 163) Checking 23-saturation Points have successfully been 23-saturated (max q used = 461) Checking 29-saturation Points have successfully been 29-saturated (max q used = 883) Checking 31-saturation Points have successfully been 31-saturated (max q used = 137) Checking 37-saturation Points have successfully been 37-saturated (max q used = 211) Checking 41-saturation Points have successfully been 41-saturated (max q used = 263) Checking 43-saturation Points have successfully been 43-saturated (max q used = 727) Checking 47-saturation Points have successfully been 47-saturated (max q used = 109) Checking 53-saturation Points have successfully been 53-saturated (max q used = 307) Checking 59-saturation Points have successfully been 59-saturated (max q used = 601) Checking 61-saturation Points have successfully been 61-saturated (max q used = 127) Checking 67-saturation Points have successfully been 67-saturated (max q used = 443) Checking 71-saturation Points have successfully been 71-saturated (max q used = 151) Checking 73-saturation Points have successfully been 73-saturated (max q used = 1181) Checking 79-saturation Points have successfully been 79-saturated (max q used = 809) Checking 83-saturation Points have successfully been 83-saturated (max q used = 1249) Checking 89-saturation Points have successfully been 89-saturated (max q used = 2017) Checking 97-saturation Points have successfully been 97-saturated (max q used = 2351) Finished p-saturation for p up to 100, points were saturated =============================================================== Number of curves entered: 1 Number saturated already: 1 Number which were saturated: 0 eclib-2013-01-01/tests/out/checkgens.out0000644000175200017520000000147612070124774014550 00000000000000268605a1 [0,0,1,1032,2673]: r = 1 [41:337:1] OK 268605b1 [0,0,1,14802,-4767741]: r = 1 [52199:344443:343] OK 268605c1 [1,-1,0,-450,2781]: r = 2 [-154:585:8] OK [76:597:1] OK 268605d1 [1,-1,0,-1194,15983]: r = 1 [-314:437:8] OK 268605d2 [1,-1,0,-2319,-17992]: r = 1 [-117782:149171:2744] OK 268605d3 [1,-1,0,8256,-142777]: r = 1 [2451471778:11277201335:138991832] OK 268605d4 [1,-1,0,-30894,-2081107]: r = 1 [-64232978894:39611125679:622835864] OK 268605e1 [1,-1,0,8256,753083]: r = 1 [395144:10859243:512] OK 268605e2 [1,-1,0,-91149,9441080]: r = 1 [317636:-1639318:1331] OK 268605e3 [1,-1,0,-1413024,646849205]: r = 1 [7372618:-6306479:10648] OK 268605e4 [1,-1,0,-359754,-73128097]: r = 1 [265770428:14415192911:85184] OK 268605f1 [0,0,1,-110937,14226165]: r = 1 [1554:631:8] OK 268605g1 [0,0,1,-747,8255]: r = 0 OK eclib-2013-01-01/tests/out/tegr.out0000644000175200017520000000174511743777523013572 00000000000000 =============================================================== 1a1 = [0,2429469980725060,0,275130703388172136833647756388,0] 14 points entered:[ [172656371022254:11183605599461162465976:1] [59018983696173167486925:9046770248558568185070809755805:2803221] [-127897562256303:-1568465432141985518043:1] [179104002703038:11530632350958995292984:1] [20351620436417161937099238:15630342741658265676253387896555759:34645976] [6310504541502:1353961721252033023032:1] [-61804347285637731061518:-1206451034261670590274867000456:32461759] [3183756031646993484900:-1445688913020859355673024573444:15625] [109129972974418179597312:-23118208949065563006261517438272:2571353] [7266977526271761:-716978870073714829212603:1] [140613088567692:33055815750694859233124:27] [679895213412287772:-58522059114298646792700636:12167] [11456459729211596549772:983394088087157723809198920329:203297472] [122207436525982205089872:8219252385969460300109469047112:62570773] ] Tamagawa exponent = 8 Index of egr subgroup = 16 eclib-2013-01-01/tests/out/vectest2.out0000644000175200017520000000157212015437610014345 00000000000000Test run of vector package. iota(10) = [1,2,3,4,5,6,7,8,9,10] Enter n : Uninitialized new vec v = [] Copy of v = [] Initialized new vec v = [0] Copy of v = [0] Enter new entries of v: Now v = [1] w = [0,0,0] After w=v, Now v = [1] Now w = [1] w==v: 1 w!=v: 0 Enter i : After w*=2, w = [2] 3*v = [3] Now v = [1] v+w = [3] Now v = [1] v-w = [-1] Now v = [1] v*w = 2 Now v = [1] w/2 = [1] Now w = [2] -v = [-1] +v = [1] +w = [2] v = [1]; w = [2] Elements of v: v[1] = 1 Member test: Enter a test number: 1 IS a member of v. Subscript test Enter length of subscript vec:Enter subscript vector:The sub-vector is [1] Change one entry of v. Index?New entry?New entry: v[1] = 1 Now v = [1] Initial slice; length? Slice = [1] Now v = [1] General slice; beginning, end? Slice = [1] Now v = [1] w = [2]; vecgcd(w) = 2 After makeprimitive(w), w = [1] u = [0] After swapvec(u,v): u = [1] v = [0] eclib-2013-01-01/tests/out/comptest.out0000644000175200017520000000167212015435637014454 00000000000000z = (3.125,4.25) has real part = 3.125 and imaginary part = 4.25i z has complex conjugate = (3.125,-4.25) AGM((3.125,4.25),(1,0)) = (2.07831617217326684,1.56336158990659582) AGM((1,1),(2,1)) = (1.4713493628646535661,1.0200541263376600197) Enter Integer coefficients of a (monic) cubic:The 1 root(s) are: [ -1 ] Enter a real or complex: Main cube root = (1.6289371459221758752,0.52017450230454583957) whose cube is (2.9999999999999999999,4) Next cube root = (-1.2649529063577516597,1.1506136983844504996) whose cube is (2.9999999999999999999,4) Next cube root = (-0.36398423956442421547,-1.6707882006889963391) whose cube is (2.9999999999999999996,3.9999999999999999998) Enter real coefficients a b c d e of a quartic:Quartic [1,2,3,4,5] has roots: (-1.2878154795576479889,-0.85789675832849028643) (-1.2878154795576479889,0.85789675832849028643) (0.28781547955764798888,1.4160930801719079387) (0.28781547955764798888,-1.4160930801719079387) eclib-2013-01-01/tests/out/svectest1.out0000644000175200017520000000152012015437677014535 00000000000000Test run of sparse vector package. Enter n : Uninitialized new vec v = [] Copy of v = [] Enter new entries of v: Dimension = Number of entries = Position: Entry: Position: Entry: Position: Entry: Now v = [(1:2),(3:4),(5:6)] w = [] After w=v, Now v = [(1:2),(3:4),(5:6)] Now w = [(1:2),(3:4),(5:6)] w==v: 1 w!=v: 0 v+w = [(1:4),(3:8),(5:12)] v-w = [] Enter i : After w*=2, w = [(1:4),(3:8),(5:12)] 3*v = [(1:6),(3:12),(5:18)] Now v = [(1:2),(3:4),(5:6)] v+w = [(1:6),(3:12),(5:18)] Now v = [(1:2),(3:4),(5:6)] v-w = [(1:-2),(3:-4),(5:-6)] Now v = [(1:2),(3:4),(5:6)] w/2 = [(1:2),(3:4),(5:6)] Now w = [(1:4),(3:8),(5:12)] -v = [(1:-2),(3:-4),(5:-6)] +v = [(1:2),(3:4),(5:6)] +w = [(1:4),(3:8),(5:12)] 2*v-w = [] Resetting w[1] to 99: w = [(1:99),(3:8),(5:12)] After w-=2*v, w = [(1:95)] v as an ordinary vector = [2,0,4,0,6,0,0,0,0,0] eclib-2013-01-01/tests/out/space1.out0000644000175200017520000000061212015437677013771 00000000000000 Subspace package test program Enter size of square matrix M: Enter entries of M: M = [[1,2,3], [4,5,6], [7,8,9]] Trace(M) = 15 Enter number of times to repeat kernel tests: kernel(m) has basis [[1], [-2], [1]] pivots: [3] denom: 1 Now compute kernel mod p, p = 1073741789 kernel(m) has basis [[1], [-2], [1]] pivots: [3] !!! Agrees with old version !!! Enter size of square matrix M: eclib-2013-01-01/tests/out/mspace.out0000644000175200017520000000255011737577017014073 00000000000000 M-Subspace package test program Enter size of square matrix M: Enter entries of M: M = [[1,2,3], [4,5,6], [7,8,9]] Trace(M) = 15 m^2 = [[30,36,42], [66,81,96], [102,126,150]] Trace(m^2) = 261 m^3 = [[468,576,684], [1062,1305,1548], [1656,2034,2412]] Trace(m^3) = 4185 char. poly. of m has coefficients [ 0 -18 -15 1 ] det(M) = 0 rank(M) = 2 nullity(M) = 1 kernel(m) has basis [[1], [-2], [1]] pivots: [3] denom: 1 image(m) has basis [[1,0], [0,1], [-1,2]] pivots: [1,2] denom: 1 Enter lambda: eigenspace for lambda = 1 has basis [[], [], []] with dimension 0 Now repeating eigenspace calculation modulo 6074000003 eigenspace for lambda has basis [[], [], []] with dimension 0 Enter size of square matrix M: Enter entries of M: M = [[1,2,3], [4,5,6], [7,8,9]] Trace(M) = 15 m^2 = [[30,36,42], [66,81,96], [102,126,150]] Trace(m^2) = 261 m^3 = [[468,576,684], [1062,1305,1548], [1656,2034,2412]] Trace(m^3) = 4185 char. poly. of m has coefficients [ 0 -18 -15 1 ] det(M) = 0 rank(M) = 2 nullity(M) = 1 kernel(m) has basis [[1], [-2], [1]] pivots: [3] denom: 1 image(m) has basis [[1,0], [0,1], [-1,2]] pivots: [1,2] denom: 1 Enter lambda: eigenspace for lambda = 0 has basis [[1], [-2], [1]] with dimension 1 Now repeating eigenspace calculation modulo 6074000003 eigenspace for lambda has basis [[1], [-2], [1]] with dimension 1 Enter size of square matrix M: eclib-2013-01-01/tests/out/theight.out0000644000175200017520000000513211737577017014256 00000000000000Computed 78519 primes, largest is 1000253 Extra primes in list: Input a curve: Curve [1,0,0,-9632000,11505156432] b2 = 1 b4 = -19264000 b6 = 46020625728 b8 = -92763918843568 c4 = 462336001 c6 = -9941148661249 disc = 1806000 (# real components = 2) #torsion not yet computed Input a point on curve, [0] to finish: Point [1794:-732:1] has infinite order Local heights: Sum so far = 0 log(den(x(P))) = 0 2: -0.5198603854199589820629240910936324260566251007701914405905100071200452164772710367043974952473140157 3: 0 5: -1.07295860828940024973383955548412509301706756951234514794176526098278599180510517642008925206211974 7: 0 43: 0 Sum so far = -1.592818993709359231796763646577757519073692670282536588532275268102831208282376213124486747309433756 R: 2.659177737235169710637917177734199697292076189313708599084960419327322781956766458009480750648562175 Sum of local heights: 1.066358743525810478841153531156442178218383519031172010552685151224491573674390244884994003339128419 global height of [1794:-732:1] is 1.066358743525810478841153531156442178218383519031172010552685151224491573674390244884994003339128419 Input a point on curve, [0] to finish: Input a curve: Testing points on the curve [0,0,1,-7,6] The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] Their negatives are -P0 = [0:-3:1], -P1 = [1:-1:1], and -P2 = [2:-1:1] Computing their heights: Heights are 0.9909063331530879738825985528871942281843259824931108393150833774164020082875685776039341823636713394, 0.6682051656519279350331420508878230470812918323595349529056109385150431526967321858665008647330999237, and 0.7670433553315462057954506465522171545624246191884909038215957193741174220566628974553182327789193967 The origin is [0:1:0] Now some additions etc,: P0 + P1 = [3:3:1] P0 - P1 = [8:21:1] P0 - P1 - P2 = [93:-143:27] P0.twice() = [245:-32:125] P0 + P0 = [245:-32:125] 3*P0 = [-74725:-438957:117649] P0 - P0 = [0:1:0] P0 +3 P1 - P2 = [816:-23310:1] 2P0 +2 P1 + P2 = [93:896:1] P0 -P1 -P2 = [93:-143:27] with height 3.518883255539141483787954523042654948159390980311398873751347396089691868453592684761314771284371825 2 (P0 -P1 -P2) = [936156018:-10370368:469097433] with height 14.0755330221565659351518180921706197926375639212455954950053895843587674738143707390452590851374873 The quotient is 4 3 (P0 -P1 -P2) = [141154686087724689336:364929251737439849995:18067866971533021791] with height 31.66994929985227335409159070738389453343451882280258986376212656480722681608233416285183294155934642 The quotient is 9 The regulator of P0, P1, P2 is 0.4171435587583839698171195446180933967498101060984983867247368197561777025341638136666749988193139797 eclib-2013-01-01/tests/out/bigrattest.out0000644000175200017520000000067711737577017015003 00000000000000Test run of bigrational number procs. gcd(4,6) = 2 q = 2/3 has denominator 3 and numerator 2 Enter a rational (either n or n/d): q = 123456789/234567890 has denominator 234567890 and numerator 123456789 floor(q) = 0 ceil(q) = 1 Enter three rationals separated by whitespace: q1 = 111111111111/2222222222222 q2 = 33333333333/4444444444444 q3 = 185185185185185/22222222222 Enter three rationals in the format [q1:q2:q3]: [q1:q2:q3] = [1/2:3/4:5/6] eclib-2013-01-01/tests/out/tpoints.out0000644000175200017520000003102611737577017014323 00000000000000Computed 78519 primes, largest is 1000253 Extra primes in list: Testing some points: The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] Now in Pari format: The points are P0 = [0,2], P1 = [1,0], and P2 = [2,0] Their negatives are -P0 = [0:-3:1], -P1 = [1:-1:1], and -P2 = [2:-1:1] Computing their heights: Heights are 0.990906333153087973882598552884, 0.66820516565192793503314205089, and 0.76704335533154620579545064655 The origin is [0:1:0] Now some additions etc,: P0 + P1 = [3:3:1] P0 - P1 = [8:21:1] P0 - P1 - P2 = [93:-143:27] P0.twice() = [245:-32:125] P0 + P0 = [245:-32:125] 3*P0 = [-74725:-438957:117649] P0 - P0 = [0:1:0] P0 +3 P1 - P2 = [816:-23310:1] 2P0 +2 P1 + P2 = [93:896:1] Now we try a systematic exploration -3, -3, -3: [173402493:-312412055:41781923] -3, -3, -2: [4189408:8960581:704969] -3, -3, -1: [1786410:-1787743:729000] -3, -3, 0: [1735612:8628750:68921] -3, -3, 1: [160962987:-73608612:81182737] -3, -3, 2: [1356164797:-71126160883:493039] -3, -3, 3: [125658707472212:6072729019689:62179146498113] -3, -2, -3: [2212614:-10179939:4574296] -3, -2, -2: [-34216:251158:103823] -3, -2, -1: [-17639:-109980:29791] -3, -2, 0: [92379:143623:148877] -3, -2, 1: [-4163000:-7596119:1953125] -3, -2, 2: [1838781714:-135929375:1806932232] -3, -2, 3: [-4773144746116:-976602707934:1584834464179] -3, -1, -3: [1178299:-4850852:68921] -3, -1, -2: [94875:71299:35937] -3, -1, -1: [24412:-50127:4913] -3, -1, 0: [85098:154071:17576] -3, -1, 1: [3858272:-4442750:1442897] -3, -1, 2: [587381677:2315829684:36264691] -3, -1, 3: [5308466179635:-3022905914377:2608126472125] -3, 0, -3: [4430992:-3892417:4330747] -3, 0, -2: [-119434:155991:54872] -3, 0, -1: [32412:-97546:50653] -3, 0, 0: [-74725:321308:117649] -3, 0, 1: [-1453671:-16871239:5000211] -3, 0, 2: [1175800444:3238879023:2554497863] -3, 0, 3: [-8489731927494:-19600265861445:4763680807976] -3, 1, -3: [5081640:197180774:3375] -3, 1, -2: [5310773:-336300:2685619] -3, 1, -1: [657459:-3409809:24389] -3, 1, 0: [8348488:4750403:3442951] -3, 1, 1: [228191806:-536379633:37259704] -3, 1, 2: [114813702300:174977582986:28288984823] -3, 1, 3: [556368785287493:-733074121389148:187375095748567] -3, 2, -3: [8704995703:942557295:8960030533] -3, 2, -2: [-363511764:-185058623:122763473] -3, 2, -1: [216346510:-146306363:205379000] -3, 2, 0: [-724812816:692674750:291434247] -3, 2, 1: [28678925057:-61748215932:37360194607] -3, 2, 2: [-8685736238109:26728697273751:8963913629917] -3, 2, 3: [-1258675911627328:-170609866818516791:56286247430493053] -3, 3, -3: [6411102385354:21118267149921:548548738856] -3, 3, -2: [734465224452:-495548440926:348765000319] -3, 3, -1: [46328051291:614238485020:263374721] -3, 3, 0: [2041384645877:-367524023451:1045987472951] -3, 3, 1: [22947655893900:-160349260775081:470003609375] -3, 3, 2: [49052364371736622:19768548114717625:21681696304639736] -3, 3, 3: [141154686087724689336:-382997118708972871786:18067866971533021791] -2, -3, -3: [9718082:-5196113:9129329] -2, -3, -2: [-88288:60819:32768] -2, -3, -1: [10350:-17696:12167] -2, -3, 0: [-8569:21344:6859] -2, -3, 1: [22083:-365579:132651] -2, -3, 2: [1467346:29518545:15813251] -2, -3, 3: [-14840686668:-53202497391:13077534016] -2, -2, -3: [55278:480700:729] -2, -2, -2: [4277:-1152:2197] -2, -2, -1: [93:-897:1] -2, -2, 0: [742:209:343] -2, -2, 1: [5000:-15351:512] -2, -2, 2: [1124214:1218856:357911] -2, -2, 3: [1399931107:-2331158336:371694959] -2, -1, -3: [20213:12411:24389] -2, -1, -2: [-330:-377:125] -2, -1, -1: [68:-25:64] -2, -1, 0: [-78:28:27] -2, -1, 1: [1243:-1632:1331] -2, -1, 2: [-128097:250701:79507] -2, -1, 3: [83553550:-541263919:223648543] -2, 0, -3: [28688:68991:4096] -2, 0, -2: [798:-720:343] -2, 0, -1: [37:224:1] -2, 0, 0: [245:-93:125] -2, 0, 1: [342:-6325:1] -2, 0, 2: [650692:91633:314432] -2, 0, 3: [448295118:-1637295092:33076161] -2, 1, -3: [-19875:324544:148877] -2, 1, -2: [-1807:-8533:2197] -2, 1, -1: [522:559:729] -2, 1, 0: [-1208:-1845:512] -2, 1, 1: [31062:-6216:29791] -2, 1, 2: [-4555265:134912:1520875] -2, 1, 3: [9633434827:-9849844875:9677214091] -2, 2, -3: [22319442:19888197:7880599] -2, 2, -2: [371756:-695903:85184] -2, 2, -1: [67850:138204:12167] -2, 2, 0: [199563:-208288:79507] -2, 2, 1: [1507693:6967591:68921] -2, 2, 2: [936156018:-458727065:469097433] -2, 2, 3: [13269197888:-2985362435769:262144] -2, 3, -3: [-4964538862:7806531200:2565726409] -2, 3, -2: [67004241:-268411616:125751501] -2, 3, -1: [-8104163:48961227:19465109] -2, 3, 0: [-21256194:-153135513:42508549] -2, 3, 1: [836123500:1525038911:1450571968] -2, 3, 2: [-290048080358:-567945909132:142809632083] -2, 3, 3: [924932335876083:-16318887357184:920911723813171] -1, -3, -3: [11454454:20427225:2406104] -1, -3, -2: [80352:-93666:29791] -1, -3, -1: [1955:7564:125] -1, -3, 0: [2717:-1575:1331] -1, -3, 1: [816:23309:1] -1, -3, 2: [798682:-68303:405224] -1, -3, 3: [119498676:-651053998:4019679] -1, -2, -3: [-33633:139628:50653] -1, -2, -2: [-91:-1147:343] -1, -2, -1: [12:35:27] -1, -2, 0: [-14:-33:8] -1, -2, 1: [120:18:125] -1, -2, 2: [-6461:-3700:2197] -1, -2, 3: [4922993:-3160443:4657463] -1, -1, -3: [11832:6549:4913] -1, -1, -2: [50:-119:8] -1, -1, -1: [4:6:1] -1, -1, 0: [3:-4:1] -1, -1, 1: [11:35:1] -1, -1, 2: [1548:-1079:729] -1, -1, 3: [139610:1648791:1000] -1, 0, -3: [-3344:3094:1331] -1, 0, -2: [21:-44:27] -1, 0, -1: [-1:3:1] -1, 0, 0: [0:-3:1] -1, 0, 1: [2:13:8] -1, 0, 2: [-476:-1422:343] -1, 0, 3: [506217:208180:571787] -1, 1, -3: [30475:-5797:15625] -1, 1, -2: [52:-375:1] -1, 1, -1: [18:7:8] -1, 1, 0: [8:-22:1] -1, 1, 1: [93:116:27] -1, 1, 2: [7475:-11361:2197] -1, 1, 3: [4040376:10769499:493039] -1, 2, -3: [-440586:-390925:157464] -1, 2, -2: [5236:-2538:4913] -1, 2, -1: [-345:204:125] -1, 2, 0: [301:-475:343] -1, 2, 1: [-1804:4179:1331] -1, 2, 2: [45066:-518089:195112] -1, 2, 3: [3497024:311754698:158340421] -1, 3, -3: [193462973:-156569868:86938307] -1, 3, -2: [409317:3155489:6859] -1, 3, -1: [202288:-61085:103823] -1, 3, 0: [27222:-305641:216] -1, 3, 1: [1828180:436722:857375] -1, 3, 2: [84254013:-271587900:7880599] -1, 3, 3: [144166484837:146955288613:47555965367] 0, -3, -3: [-198562138:65431412:68417929] 0, -3, -2: [499689:-641312:531441] 0, -3, -1: [-8075:15471:4913] 0, -3, 0: [858:-5253:2197] 0, -3, 1: [-752:9191:4096] 0, -3, 2: [-60458:-305040:79507] 0, -3, 3: [22469403:26544416:32461759] 0, -2, -3: [2021717:-787325:1030301] 0, -2, -2: [406:-8181:1] 0, -2, -1: [132:17:64] 0, -2, 0: [14:-52:1] 0, -2, 1: [75:64:27] 0, -2, 2: [1547:-2967:343] 0, -2, 3: [369738:730191:68921] 0, -1, -3: [-32232:-50399:13824] 0, -1, -2: [130:-24:125] 0, -1, -1: [-3:0:1] 0, -1, 0: [1:-1:1] 0, -1, 1: [-2:3:1] 0, -1, 2: [36:-133:64] 0, -1, 3: [-5750:31324:12167] 0, 0, -3: [17347:-18336:6859] 0, 0, -2: [21:95:1] 0, 0, -1: [2:-1:1] 0, 0, 0: [0:1:0] 0, 0, 1: [2:0:1] 0, 0, 2: [21:-96:1] 0, 0, 3: [17347:11477:6859] 0, 1, -3: [-5750:-43491:12167] 0, 1, -2: [36:69:64] 0, 1, -1: [-2:-4:1] 0, 1, 0: [1:0:1] 0, 1, 1: [-3:-1:1] 0, 1, 2: [130:-101:125] 0, 1, 3: [-32232:36575:13824] 0, 2, -3: [369738:-799112:68921] 0, 2, -2: [1547:2624:343] 0, 2, -1: [75:-91:27] 0, 2, 0: [14:51:1] 0, 2, 1: [132:-81:64] 0, 2, 2: [406:8180:1] 0, 2, 3: [2021717:-242976:1030301] 0, 3, -3: [22469403:-59006175:32461759] 0, 3, -2: [-60458:225533:79507] 0, 3, -1: [-752:-13287:4096] 0, 3, 0: [858:3056:2197] 0, 3, 1: [-8075:-20384:4913] 0, 3, 2: [499689:109871:531441] 0, 3, 3: [-198562138:-133849341:68417929] 1, -3, -3: [144166484837:-194511253980:47555965367] 1, -3, -2: [84254013:263707301:7880599] 1, -3, -1: [1828180:-1294097:857375] 1, -3, 0: [27222:305425:216] 1, -3, 1: [202288:-42738:103823] 1, -3, 2: [409317:-3162348:6859] 1, -3, 3: [193462973:69631561:86938307] 1, -2, -3: [3497024:-470095119:158340421] 1, -2, -2: [45066:322977:195112] 1, -2, -1: [-1804:-5510:1331] 1, -2, 0: [301:132:343] 1, -2, 1: [-345:-329:125] 1, -2, 2: [5236:-2375:4913] 1, -2, 3: [-440586:233461:157464] 1, -1, -3: [4040376:-11262538:493039] 1, -1, -2: [7475:9164:2197] 1, -1, -1: [93:-143:27] 1, -1, 0: [8:21:1] 1, -1, 1: [18:-15:8] 1, -1, 2: [52:374:1] 1, -1, 3: [30475:-9828:15625] 1, 0, -3: [506217:-779967:571787] 1, 0, -2: [-476:1079:343] 1, 0, -1: [2:-21:8] 1, 0, 0: [0:2:1] 1, 0, 1: [-1:-4:1] 1, 0, 2: [21:17:27] 1, 0, 3: [-3344:-4425:1331] 1, 1, -3: [139610:-1649791:1000] 1, 1, -2: [1548:350:729] 1, 1, -1: [11:-36:1] 1, 1, 0: [3:3:1] 1, 1, 1: [4:-7:1] 1, 1, 2: [50:111:8] 1, 1, 3: [11832:-11462:4913] 1, 2, -3: [4922993:-1497020:4657463] 1, 2, -2: [-6461:1503:2197] 1, 2, -1: [120:-143:125] 1, 2, 0: [-14:25:8] 1, 2, 1: [12:-62:27] 1, 2, 2: [-91:804:343] 1, 2, 3: [-33633:-190281:50653] 1, 3, -3: [119498676:647034319:4019679] 1, 3, -2: [798682:-336921:405224] 1, 3, -1: [816:-23310:1] 1, 3, 0: [2717:244:1331] 1, 3, 1: [1955:-7689:125] 1, 3, 2: [80352:63875:29791] 1, 3, 3: [11454454:-22833329:2406104] 2, -3, -3: [924932335876083:-904592836455987:920911723813171] 2, -3, -2: [-290048080358:425136277049:142809632083] 2, -3, -1: [836123500:-2975610879:1450571968] 2, -3, 0: [-21256194:110626964:42508549] 2, -3, 1: [-8104163:-68426336:19465109] 2, -3, 2: [67004241:142660115:125751501] 2, -3, 3: [-4964538862:-10372257609:2565726409] 2, -2, -3: [13269197888:2985362173625:262144] 2, -2, -2: [936156018:-10370368:469097433] 2, -2, -1: [1507693:-7036512:68921] 2, -2, 0: [199563:128781:79507] 2, -2, 1: [67850:-150371:12167] 2, -2, 2: [371756:610719:85184] 2, -2, 3: [22319442:-27768796:7880599] 2, -1, -3: [9633434827:172630784:9677214091] 2, -1, -2: [-4555265:-1655787:1520875] 2, -1, -1: [31062:-23575:29791] 2, -1, 0: [-1208:1333:512] 2, -1, 1: [522:-1288:729] 2, -1, 2: [-1807:6336:2197] 2, -1, 3: [-19875:-473421:148877] 2, 0, -3: [448295118:1604218931:33076161] 2, 0, -2: [650692:-406065:314432] 2, 0, -1: [342:6324:1] 2, 0, 0: [245:-32:125] 2, 0, 1: [37:-225:1] 2, 0, 2: [798:377:343] 2, 0, 3: [28688:-73087:4096] 2, 1, -3: [83553550:317615376:223648543] 2, 1, -2: [-128097:-330208:79507] 2, 1, -1: [1243:301:1331] 2, 1, 0: [-78:-55:27] 2, 1, 1: [68:-39:64] 2, 1, 2: [-330:252:125] 2, 1, 3: [20213:-36800:24389] 2, 2, -3: [1399931107:1959463377:371694959] 2, 2, -2: [1124214:-1576767:357911] 2, 2, -1: [5000:14839:512] 2, 2, 0: [742:-552:343] 2, 2, 1: [93:896:1] 2, 2, 2: [4277:-1045:2197] 2, 2, 3: [55278:-481429:729] 2, 3, -3: [-14840686668:40124963375:13077534016] 2, 3, -2: [1467346:-45331796:15813251] 2, 3, -1: [22083:232928:132651] 2, 3, 0: [-8569:-28203:6859] 2, 3, 1: [10350:5529:12167] 2, 3, 2: [-88288:-93587:32768] 2, 3, 3: [9718082:-3933216:9129329] 3, -3, -3: [141154686087724689336:364929251737439849995:18067866971533021791] 3, -3, -2: [49052364371736622:-41450244419357361:21681696304639736] 3, -3, -1: [22947655893900:159879257165706:470003609375] 3, -3, 0: [2041384645877:-678463449500:1045987472951] 3, -3, 1: [46328051291:-614501859741:263374721] 3, -3, 2: [734465224452:146783440607:348765000319] 3, -3, 3: [6411102385354:-21666815888777:548548738856] 3, -2, -3: [-1258675911627328:114323619388023738:56286247430493053] 3, -2, -2: [-8685736238109:-35692610903668:8963913629917] 3, -2, -1: [28678925057:24388021325:37360194607] 3, -2, 0: [-724812816:-984108997:291434247] 3, -2, 1: [216346510:-59072637:205379000] 3, -2, 2: [-363511764:62295150:122763473] 3, -2, 3: [8704995703:-9902587828:8960030533] 3, -1, -3: [556368785287493:545699025640581:187375095748567] 3, -1, -2: [114813702300:-203266567809:28288984823] 3, -1, -1: [228191806:499119929:37259704] 3, -1, 0: [8348488:-8193354:3442951] 3, -1, 1: [657459:3385420:24389] 3, -1, 2: [5310773:-2349319:2685619] 3, -1, 3: [5081640:-197184149:3375] 3, 0, -3: [-8489731927494:14836585053469:4763680807976] 3, 0, -2: [1175800444:-5793376886:2554497863] 3, 0, -1: [-1453671:11871028:5000211] 3, 0, 0: [-74725:-438957:117649] 3, 0, 1: [32412:46893:50653] 3, 0, 2: [-119434:-210863:54872] 3, 0, 3: [4430992:-438330:4330747] 3, 1, -3: [5308466179635:414779442252:2608126472125] 3, 1, -2: [587381677:-2352094375:36264691] 3, 1, -1: [3858272:2999853:1442897] 3, 1, 0: [85098:-171647:17576] 3, 1, 1: [24412:45214:4913] 3, 1, 2: [94875:-107236:35937] 3, 1, 3: [1178299:4781931:68921] 3, 2, -3: [-4773144746116:-608231756245:1584834464179] 3, 2, -2: [1838781714:-1671002857:1806932232] 3, 2, -1: [-4163000:5642994:1953125] 3, 2, 0: [92379:-292500:148877] 3, 2, 1: [-17639:80189:29791] 3, 2, 2: [-34216:-354981:103823] 3, 2, 3: [2212614:5605643:4574296] 3, 3, -3: [125658707472212:-68251875517802:62179146498113] 3, 3, -2: [1356164797:71125667844:493039] 3, 3, -1: [160962987:-7574125:81182737] 3, 3, 0: [1735612:-8697671:68921] 3, 3, 1: [1786410:1058743:729000] 3, 3, 2: [4189408:-9665550:704969] 3, 3, 3: [173402493:270630132:41781923] P0 -P1 -P2 = [93:-143:27] Height of P0-P1-P2 = 3.51888325553914148378795452304 3 (P0 -P1 -P2) = [141154686087724689336:364929251737439849995:18067866971533021791] Height of 3*(P0-P1-P2) = 31.6699492998522733540915907074 The quotient is 9 eclib-2013-01-01/tests/out/tperiods.out0000644000175200017520000000404711754740634014453 00000000000000Input curve = [0,0,1,-7,6]: Minimal model = [0,0,1,-7,6] Periods: [w_1,w_2] = [(0,-1.4805482682414149933073311106409602506642033146287),(2.0758439915434665249420878417536431498858141282849,0)] tau = (0,1.4020778897057774955179040745500506975747935056134) (abs(tau)=1.4020778897057774955179040745500506975747935056134) w_R = (2.0758439915434665249420878417536431498858141282849,0) w_I = (0,1.4805482682414149933073311106409602506642033146287) Curve from periods: [0,0,1,-7,6] Input curve = [0,0,0,0,1024]: Minimal model = [0,0,1,0,0] Periods: [w_1,w_2] = [(-2.6499581254281749359705342494726580538578028073038,-1.529954037057192874913194172308824358572828947161),(2.6499581254281749359705342494726580538578028073038,-1.529954037057192874913194172308824358572828947161)] tau = (-0.49999999999999999999999999999999999999999999999997,0.86602540378443864676372317075293618347140262690521) (abs(tau)=0.99999999999999999999999999999999999999999999999999) w_R = (5.2999162508563498719410684989453161077156056146076,0) w_IR = (2.6499581254281749359705342494726580538578028073038,1.529954037057192874913194172308824358572828947161) Curve from periods: [0,0,1,0,0] Input curve = [0,0,0,-16/9,0]: Minimal model = [0,0,0,-9,0] Periods: [w_1,w_2] = [(1.5138456348012471454717362566781957801974612083004,0),(0,1.5138456348012471454717362566781957801974612083004)] tau = (0,1) (abs(tau)=1) w_R = (1.5138456348012471454717362566781957801974612083004,0) w_I = (0,1.5138456348012471454717362566781957801974612083004) Curve from periods: [0,0,0,-9,0] Input curve = [0,0,0,16/9,0]: Minimal model = [0,0,0,9,0] Periods: [w_1,w_2] = [(-1.0704505140376155993171555258476451509529488959056,-1.0704505140376155993171555258476451509529488959056),(1.0704505140376155993171555258476451509529488959056,-1.0704505140376155993171555258476451509529488959056)] tau = (0,1) (abs(tau)=1) w_R = (2.1409010280752311986343110516952903019058977918112,0) w_IR = (1.0704505140376155993171555258476451509529488959056,1.0704505140376155993171555258476451509529488959056) Curve from periods: [0,0,0,9,0] eclib-2013-01-01/tests/out/nftest.out0000644000175200017520000000132311737577017014123 00000000000000>>> Level 90 <<< After constructor, about to createfromdata() Retrieving newform data for N = 90 Finished reading newform data for N = 90 3 newform(s), 25 eigs on file. 3 newform(s) at level 90: p0=7 #ap= 25 1: aplist = [ -1 0 1 2 6 -4 -6 -4 0 -6 -4 8 0 8 0 -6 6 2 -4 -12 ...] aq = [ 1 1 -1 ] ap0 = 2, dp0 = 4, np0 = 6 SFE = 1, L/P = 2/3 lplus = 1, mplus = 1 [(-77,2;-3,7),1,0;?] 2: aplist = [ 1 0 -1 2 -6 -4 6 -4 0 6 -4 8 0 8 0 6 -6 2 -4 12 ...] aq = [ -1 1 1 ] ap0 = 2, dp0 = 4, np0 = 6 SFE = 1, L/P = 2/3 lplus = 1, mplus = 1 [(-77,2;-3,7),1,0;?] 3: aplist = [ 1 0 1 -4 0 2 -6 -4 0 6 8 2 6 -4 0 6 0 -10 -4 0 ...] aq = [ -1 -1 -1 ] ap0 = -4, dp0 = 24, np0 = 12 SFE = 1, L/P = 2 lplus = 1, mplus = 1 [(13,1;1,7),2,0;?] eclib-2013-01-01/tests/out/tp2points.out0000644000175200017520000000100211737577017014554 00000000000000Test program for P2Point class Point input formats are [x:y:z], [x,y], [x/z,y/z] with any type of brackets Enter a point P: P=[78:1292:221] output_pari(P) = [6/17,1292/221] P==P? 1 After P=P2Point(2,4,-6), P=[-1:-2:3] After Q=P, Q=[-1:-2:3] After Q=transform(P,3,4,5,6,0), Q=[-13:15:27] After R=transform(Q,3,4,5,6,1), R=[-1:-2:3] R==P? 1 Projective coordinates of P are X=-1, Y=-2, Z=3 Affine coordinates of P are X=-1/3, Y=-2/3 Real affine coordinates of P are X=-0.3333333333, Y=-0.6666666667 P.isintegral()? 0 eclib-2013-01-01/tests/out/oftest.out0000644000175200017520000000110011737577017014115 00000000000000Verbose details of oldform constructor? Enter first and last N: >>>Level 90 Old classes ~~~~~~~~~~~ Level Dimension [ 2 3 5 7 11 13 17 19 23 29 ] 15 1 [ -1 -1 -1 0 -4 -2 2 4 0 -2 ] 15 1 [ 1 -1 -1 0 -4 -2 2 4 0 -2 ] 15 1 [ -1 1 -1 0 -4 -2 2 4 0 -2 ] 15 1 [ 1 1 -1 0 -4 -2 2 4 0 -2 ] 30 1 [ 1 -1 1 -4 0 2 6 -4 0 -6 ] 30 1 [ 1 1 1 -4 0 2 6 -4 0 -6 ] 45 1 [ -1 -1 1 0 4 -2 -2 4 0 2 ] 45 1 [ 1 -1 1 0 4 -2 -2 4 0 2 ] Total number of oldclasses = 8 Total dimension of oldclasses = 8 eclib-2013-01-01/tests/out/thtconst.out0000644000175200017520000000107111737577017014466 00000000000000 Curve [0,0,1,-7,6]: Silverman bound = 6.28483 CPS bound = 0 egr bound = 0 Shift by 1: [0,3,1,-4,0]: CPS bound 2 = 0 Shift by 2 (up by 1): [0,6,1,5,0]: CPS bound = 0.343561 Shift by 0 (down by 1): [0,0,1,-7,6]: CPS bound = 0 No significant improvement (margin of 0.01)! Best shift by 1: Best CPS bound = 0 Overall, CPS is better for 1 curves out of 1 For 100% of curves the new bound is better. Average difference (silverman-cps) = 6.28483 Average difference (silverman-cps2) = 6.28483 Silverman average = 6.28483 CPS 1 average = 0 CPS 2 average = 0 Average offset = 0 eclib-2013-01-01/tests/out/tcon2.out0000644000175200017520000000004412015436532013626 0000000000000030740 11344956855892619 32088063161 eclib-2013-01-01/tests/out/rattest.out0000644000175200017520000000053511737577017014312 00000000000000Test run of rational number procs. gcd(4,6) = 2 q = 2/3 has denominator 3 and numerator 2 Enter a rational (either n or n/d): q = 41/152 has denominator 152 and numerator 41 floor(q) = 0 ceil(q) = 1 Enter three rationals separated by whitespace: q1 = 1/3 q2 = 1/2 q3 = 2/3 Enter three rationals in the format [q1:q2:q3]: [q1:q2:q3] = [1/6:1/3:1/2] eclib-2013-01-01/tests/out/thilbert.out0000644000175200017520000000031311737577017014433 00000000000000Enter nonzero a and b: (1234,5678)_p 0 0 2 0 17 1 167 0 617 1 Global symbol = 1 Check (should be 0) = 0 --agrees with single call to global_hilbert() --agrees with solve_conic() Enter nonzero a and b: eclib-2013-01-01/tests/out/tnfd.out0000644000175200017520000001030612015453624013537 00000000000000Program tnfd. MODULUS for linear algebra = 1073741789 Verbose output? (0/1) Enter level: >>>Level 97 dimension = 8 Split into W-eigenspaces (0/1)? Multiplicity 1 eigenspaces only? (0/1)? Use just one T_p (1) or a linear combination (0)? Computing T_p for p = 2...done. char poly = [-3 28 -54 -54 47 22 -13 -2 1] NTL char poly square-free factors = [[[-3 28 -54 -54 47 22 -13 -2 1] 1]] Factors of multiplicity 1 are: 1: [-3 1] (degree 1) 2: [-1 3 4 1] (degree 3) 3: [-1 6 -1 -3 1] (degree 4) Enter factor number: Degree = 4 (unscaled) min poly = [1 -3 -1 6 -1 ] (rescaled) min poly = [-1 6 -1 -3 1] finished constructing S, now restricting T_p to S done. now combining S and SW 4*Matrix of T(2) restricted to S is [-4,8,4,0;0,4,0,8;-4,4,8,-4;-4,8,4,4] The former poly is the min poly of alpha_1 = 4*alpha The latter is the min poly of alpha, which is the eigenvalue of T(2) Finished computing (dual) subspace S S has denom 4, cumulative denom = 4 W = [1,-4,0,-256;0,8,16,512;0,4,16,320;0,0,48,256] W^(-1)= (1/128)*[128,-64,256,-64;0,176,-320,48;0,16,-32,8;0,-3,6,-1] Basis for Hecke eigenvalues, in terms of powers of alpha: (1/8)*[2,0,0,0] (1/8)*[-1,11,4,-3] (1/8)*[4,-20,-8,6] (1/8)*[-1,3,2,-1] Number of ap? 4*Matrix of T(2) = [-4,8,4,0;0,4,0,8;-4,4,8,-4;-4,8,4,4] char poly = [ -1 6 -1 -3 1 ] a_2 = [0,4,0,8] 4*Matrix of T(3) = [4,4,0,-12;8,-8,-8,-8;-4,8,8,0;0,-4,-4,-4] char poly = [ 4 -1 -5 0 1 ] a_3 = [8,-8,-8,-8] 4*Matrix of T(5) = [8,-8,-4,0;0,0,0,-8;4,-4,-4,4;4,-8,-4,0] char poly = [ 2 1 -4 -1 1 ] a_5 = [0,0,0,-8] 4*Matrix of T(7) = [8,-4,0,4;-8,16,16,0;12,-16,-20,0;0,0,4,8] char poly = [ -16 23 -6 -3 1 ] a_7 = [-8,16,16,0] 4*Matrix of T(11) = [8,-24,-12,16;0,-8,-16,-8;-4,4,20,12;12,-16,-12,0] char poly = [ 92 47 -14 -5 1 ] a_11 = [0,-8,-16,-8] 4*Matrix of T(13) = [-4,-16,-12,0;16,-40,-40,-16;-20,28,40,12;12,-20,-20,-20] char poly = [ -122 -167 -29 6 1 ] a_13 = [16,-40,-40,-16] 4*Matrix of T(17) = [-4,20,12,-4;-8,24,24,16;8,-12,-20,-12;-12,20,16,12] char poly = [ 74 15 -20 -3 1 ] a_17 = [-8,24,24,16] 4*Matrix of T(19) = [-12,0,0,8;0,-8,-8,8;-8,8,12,0;0,4,0,-4] char poly = [ 4 -11 -5 3 1 ] a_19 = [0,-8,-8,8] 4*Matrix of T(23) = [12,-16,-4,32;-16,32,8,16;4,-12,16,4;4,4,4,28] char poly = [ -368 -265 151 -22 1 ] a_23 = [-16,32,8,16] 4*Matrix of T(29) = [-12,32,16,-8;0,16,8,24;-8,8,12,-16;-16,28,16,12] char poly = [ -254 199 -27 -7 1 ] a_29 = [0,16,8,24] 4*Matrix of T(31) = [-8,44,20,-36;8,8,16,8;0,4,-16,-20;-20,24,16,0] char poly = [ 592 -79 -67 4 1 ] a_31 = [8,8,16,8] 4*Matrix of T(37) = [-12,-24,-12,24;0,-24,-24,0;-12,12,24,12;12,-12,-12,-12] char poly = [ 162 -81 -27 6 1 ] a_37 = [0,-24,-24,0] 4*Matrix of T(41) = [48,-12,-8,-36;8,8,16,-48;28,-24,-44,8;8,-32,-12,0] char poly = [ 5506 131 -158 -3 1 ] a_41 = [8,8,16,-48] 4*Matrix of T(43) = [20,-4,-4,-12;8,0,-8,-16;0,4,12,4;4,-12,-8,4] char poly = [ -44 9 20 -9 1 ] a_43 = [8,0,-8,-16] 4*Matrix of T(47) = [36,8,0,-32;16,8,-8,-24;0,8,20,0;0,-12,-8,12] char poly = [ 16 -161 99 -19 1 ] a_47 = [16,8,-8,-24] 4*Matrix of T(53) = [-4,24,4,-40;32,-40,-40,-16;-28,44,48,-4;-4,-4,-12,-20] char poly = [ 1262 -123 -75 4 1 ] a_53 = [32,-40,-40,-16] 4*Matrix of T(59) = [-8,24,4,-32;32,-40,-48,-8;-36,52,68,-4;-4,0,-12,-16] char poly = [ 772 3 -98 -1 1 ] a_59 = [32,-40,-48,-8] 4*Matrix of T(61) = [12,28,12,-44;8,8,24,-16;16,-12,-44,-12;-12,4,8,-4] char poly = [ -1046 -627 -74 7 1 ] a_61 = [8,8,24,-16] 4*Matrix of T(67) = [-32,12,16,36;-40,48,64,48;28,-48,-76,-16;-16,40,36,16] char poly = [ -1604 -1069 -86 11 1 ] a_67 = [-40,48,64,48] 4*Matrix of T(71) = [0,28,8,-28;24,-16,-32,0;-28,40,60,-8;-8,8,-4,0] char poly = [ -656 413 -24 -11 1 ] a_71 = [24,-16,-32,0] 4*Matrix of T(73) = [-40,12,16,36;-40,40,64,48;28,-48,-84,-16;-16,40,36,8] char poly = [ -3982 -1249 4 19 1 ] a_73 = [-40,40,64,48] 4*Matrix of T(79) = [-12,16,-4,-48;48,-80,-72,-32;-44,68,72,4;4,-20,-28,-44] char poly = [ 1952 -1303 -73 16 1 ] a_79 = [48,-80,-72,-32] 4*Matrix of T(83) = [-24,64,32,-16;0,32,16,48;-16,16,24,-32;-32,56,32,24] char poly = [ -4064 1592 -108 -14 1 ] a_83 = [0,32,16,48] 4*Matrix of T(89) = [-16,-44,-12,52;-40,16,48,8;40,-60,-96,12;12,-8,8,-8] char poly = [ -5762 -1449 91 26 1 ] a_89 = [-40,16,48,8] 4*Matrix of W(97) = [-4,0,0,0;0,-4,0,0;0,0,-4,0;0,0,0,-4] char poly = [ 1 4 6 4 1 ] w_97 = [0,0,0,0] Enter level: eclib-2013-01-01/tests/out/tdivpol.out0000644000175200017520000000517411737577017014311 00000000000000Curve [0,0,1,-7,6] Division Poly (2) = [ 25 -28 0 4 ] Division Poly (3) = [ -49 75 -42 0 3 ] Division Poly (5) = [ 155774 -406875 380975 -219125 224875 -213150 93525 -10500 -5145 2375 -434 0 5 ] Division Poly (7) = [ -18468518451 129897313175 -445857037878 932404235875 -1243400007052 1026876435550 -437452731142 -17749822300 107968849198 -15732678675 -41963963776 32734719500 -10597551734 1215763500 204773548 -134374100 71781619 -28348950 5133611 4900 -144746 24650 -2156 0 7 ] Division Poly (9) = [ 184160099143680751 -1745915691101562000 7553596765573730970 -20009912719373528175 37942026581120864697 -60375121456041861525 93410183300843035368 -141970066026214424625 190405429869508518294 -205725048911535979875 170148544422339746088 -101903285497398603750 37479654863464097844 -301195540341584325 -10122360365346701220 7022704801725188100 -2024994639983255253 -378932954398234425 638476088702667243 -278350695029482875 46649147045567535 8235437040258750 -4808056523794875 -19863562351500 413123504333085 -21629335715325 -61645404898854 25482225972000 -4079567512557 -51564996000 145726971768 -34704720000 6686917839 -1118177550 97716879 3647700 -1573194 142650 -7308 0 9 ] Division Poly (11) = [ -54041658613892771450681999 880907080312611332584912000 -7219594509378023629107644470 38958100184313046991444736425 -152640690458238768754008318817 454785460748010763365906132375 -1056137061172539849022036113531 1936054859688651591523350738175 -2810594691494082952472648616520 3208473937931657698860198494875 -2822039231599463382188559156202 1848423918012109590080578699875 -912617258569632579061077286483 560913385968977938523311946800 -817656871503167956435977465356 1249509868334450532408690045625 -1414165966153163021643340433938 1199336430865617781090316458650 -784676191760539643225675692205 396756309706661409373382542875 -144956275362751028758501833067 23355448732213310557101714875 17220044440091899138064455473 -20247521386823417986151910750 11805434554239601412412797599 -4040005394287265921365582350 234083284571165543297755125 642823838857235347992405825 -419159192063093806076371388 127589838582618892736949000 -6470559713355987866471481 -12226425861215930742609000 5613930837990861266425006 -822808169809586975048075 -285218373979309991270589 186775240363627878171825 -38115245033833256003913 -4184634313923610398775 4784966662201425769762 -1316603611701382184125 126856023732928120092 24162795683139180375 -9281076375640161037 1097831192157003150 -100276466219262732 63186211155991825 -25032991453137052 4693816276634100 -310935739698815 -50338154356875 15290737879263 -2102529532125 227429915559 -21041940150 1025882033 51025100 -10176859 580525 -19558 0 11 ] eclib-2013-01-01/tests/out/mhcount.out0000644000175200017520000000101611737577017014274 00000000000000See the matrices? How many primes? p = 3; nmats = 6; p = 5; nmats = 12; p = 7; nmats = 18; p = 11; nmats = 30; p = 13; nmats = 38; p = 17; nmats = 52; p = 19; nmats = 58; p = 23; nmats = 74; p = 29; nmats = 96; p = 31; nmats = 106; p = 37; nmats = 128; p = 41; nmats = 146; p = 43; nmats = 154; p = 47; nmats = 170; p = 53; nmats = 196; p = 59; nmats = 222; p = 61; nmats = 230; p = 67; nmats = 258; p = 71; nmats = 274; p = 73; nmats = 284; p = 79; nmats = 310; p = 83; nmats = 330; p = 89; nmats = 358; p = 97; nmats = 392; eclib-2013-01-01/tests/out/tsat3.out0000644000175200017520000000300411737577017013654 00000000000000 24129181 = [0,0,1,-68799,-1969790] rank = 2 torsion group structure = [ ] (torsion rank 0) Input non-torsion points: [ [-1870:9257:8] [-197:1984:1] ] Input torsion points: [ ] Saturation complete --input points were saturated Generator 1 is [-1870:9257:8]; height 2.008387115126900729103485439709136753676710547977412853989835325093209212911797653507811667285834924 Generator 2 is [-197:1984:1]; height 0.1824047873853615261914345567373697515225258314488927760080825886155412255056081106767442707065534151 Regulator = 0.2889190749974031511717279373817398511855450827910204495028842971619894194895945979459417394247120525 24129 18 1 [0,0,1,-68799,-1969790] 2 [-1870:9257:8] [-197:1984:1] ============================================================== 133507b2 = [1,-1,0,-898,-7905] rank = 2 torsion group structure = [ 2 2 ] (torsion rank 2) Input non-torsion points: [ [-178:299:8] [-23748:-59351:1728] ] Input torsion points: [ [34:-17:1] [-10:5:1] ] Saturation complete --input points were saturated Generator 1 is [-178:299:8]; height 4.692925879781232754357709689772257265110950392030567132031104408050003742075279592044944091525617177 Generator 2 is [-23748:-59351:1728]; height 6.994855314243790199794084925529654274011790403394180222178312526437009546427866888621853186553416563 Regulator = 32.79330968457201443891254803103500298133180731829589812378504456291583055922703713650068931945477071 133507 b 2 [1,-1,0,-898,-7905] 2 [-178:299:8] [-23748:-59351:1728] ============================================================== eclib-2013-01-01/tests/out/torsion.out0000644000175200017520000000703511737577017014323 00000000000000Curve [0,0,0,1,1] has 1 torsion point(s) [0:1:0] (order 1) Cyclic: C1 Curve [0,1,1,101470,57781877] has 1 torsion point(s) [0:1:0] (order 1) Cyclic: C1 Curve [0,0,0,1,0] has 2 torsion point(s) [0:1:0] (order 1) [0:0:1] (order 2) Cyclic: C2 Curve [0,0,0,0,100] has 3 torsion point(s) [0:1:0] (order 1) [0:10:1] (order 3) [0:-10:1] (order 3) Cyclic: C3 Curve [0,0,0,1,2] has 4 torsion point(s) [0:1:0] (order 1) [1:-2:1] (order 4) [-1:0:1] (order 2) [1:2:1] (order 4) Cyclic: C4 Curve [0,0,0,-1,0] has 4 torsion point(s) [0:1:0] (order 1) [-1:0:1] (order 2) [0:0:1] (order 2) [1:0:1] (order 2) Non-cyclic: C2 x C2 Curve [0,-1,1,0,0] has 5 torsion point(s) [0:1:0] (order 1) [1:-1:1] (order 5) [0:-1:1] (order 5) [0:0:1] (order 5) [1:0:1] (order 5) Cyclic: C5 Curve [0,0,0,0,1] has 6 torsion point(s) [0:1:0] (order 1) [2:-3:1] (order 6) [0:-1:1] (order 3) [-1:0:1] (order 2) [0:1:1] (order 3) [2:3:1] (order 6) Cyclic: C6 Curve [1,-1,1,-3,3] has 7 torsion point(s) [0:1:0] (order 1) [3:-6:1] (order 7) [1:-2:1] (order 7) [-1:-2:1] (order 7) [-1:2:1] (order 7) [1:0:1] (order 7) [3:2:1] (order 7) Cyclic: C7 Curve [0,1,0,-14624,669300] has 8 torsion point(s) [0:1:0] (order 1) [418:-8232:1] (order 8) [124:-882:1] (order 4) [82:-168:1] (order 8) [75:0:1] (order 2) [82:168:1] (order 8) [124:882:1] (order 4) [418:8232:1] (order 8) Cyclic: C8 Curve [0,1,0,-160,308] has 8 torsion point(s) [0:1:0] (order 1) [26:-120:1] (order 4) [11:0:1] (order 2) [26:120:1] (order 4) [-14:0:1] (order 2) [-4:30:1] (order 4) [2:0:1] (order 2) [-4:-30:1] (order 4) Non-cyclic: C2 x C4 Curve [1,-1,1,-14,29] has 9 torsion point(s) [0:1:0] (order 1) [9:-29:1] (order 9) [3:-5:1] (order 9) [1:-5:1] (order 3) [-3:-5:1] (order 9) [-3:7:1] (order 9) [1:3:1] (order 3) [3:1:1] (order 9) [9:19:1] (order 9) Cyclic: C9 Curve [1,0,0,115,561] has 10 torsion point(s) [0:1:0] (order 1) [70:-629:1] (order 10) [16:-89:1] (order 5) [4:-35:1] (order 10) [-2:-17:1] (order 5) [-34:17:8] (order 2) [-2:19:1] (order 5) [4:31:1] (order 10) [16:73:1] (order 5) [70:559:1] (order 10) Cyclic: C10 Curve [1,0,1,-19,26] has 12 torsion point(s) [0:1:0] (order 1) [13:-52:1] (order 6) [4:-7:1] (order 3) [3:-2:1] (order 2) [4:2:1] (order 3) [13:38:1] (order 6) [-5:2:1] (order 2) [-2:8:1] (order 6) [1:2:1] (order 6) [14:-11:8] (order 2) [1:-4:1] (order 6) [-2:-7:1] (order 6) Non-cyclic: C2 x C6 Curve [1,0,0,-1070,7812] has 16 torsion point(s) [0:1:0] (order 1) [244:-3902:1] (order 8) [64:-482:1] (order 4) [34:-122:1] (order 8) [28:-14:1] (order 2) [34:88:1] (order 8) [64:418:1] (order 4) [244:3658:1] (order 8) [-36:18:1] (order 2) [-26:148:1] (order 8) [-8:130:1] (order 4) [4:58:1] (order 8) [62:-31:8] (order 2) [4:-62:1] (order 8) [-8:-122:1] (order 4) [-26:-122:1] (order 8) Non-cyclic: C2 x C8 Curve [1,0,0,-372368141774940800,87459461608665181808640000] has 16 torsion point(s) [0:1:0] (order 1) [654296320:-11132578294400:1] (order 8) [369088000:-549923580800:1] (order 4) [353359600:-34032060800:1] (order 8) [352441600:-176220800:1] (order 2) [353359600:33678701200:1] (order 8) [369088000:549554492800:1] (order 4) [654296320:11131923998080:1] (order 8) [-5636968450:2818484225:8] (order 2) [117433600:6734213027200:1] (order 8) [335795200:532525225600:1] (order 4) [351262480:33612641920:1] (order 8) [352179456:-176089728:1] (order 2) [351262480:-33963904400:1] (order 8) [335795200:-532861020800:1] (order 4) [117433600:-6734330460800:1] (order 8) Non-cyclic: C2 x C8 Curve [0,0,0,-4/9,0] has 4 torsion point(s) [0:1:0] (order 1) [-2:0:3] (order 2) [0:0:1] (order 2) [2:0:3] (order 2) Non-cyclic: C2 x C2 eclib-2013-01-01/tests/out/tilll.out0000644000175200017520000000146212015436163013726 00000000000000Enter size n: Enter vector number 1: Enter vector number 2: Enter vector number 3: Before reduction, vectors are: [1,2,3] [4,5,6] [7,8,8] FIRST METHOD: JC'S implementation of integer LLL from HC's book After reduction, vectors are: [0,0,-1] [-1,1,0] [1,2,0] Square length of vector 1 is 1 Square length of vector 2 is 2 Square length of vector 3 is 5 Candidates for shortest vectors: (1,1,1): [0,3,-1], norm = 10 (1,1,0): [-1,1,-1], norm = 3 (1,1,-1): [-2,-1,-1], norm = 6 (1,0,1): [1,2,-1], norm = 6 (1,0,0): [0,0,-1], norm = 1 (1,0,-1): [-1,-2,-1], norm = 6 (1,-1,1): [2,1,-1], norm = 6 (1,-1,0): [1,-1,-1], norm = 3 (1,-1,-1): [0,-3,-1], norm = 10 (0,1,1): [0,3,0], norm = 9 (0,1,0): [-1,1,0], norm = 2 (0,1,-1): [-2,-1,0], norm = 5 (0,0,1): [1,2,0], norm = 5 The shortest vector is [0,0,-1] with square length 1 eclib-2013-01-01/tests/out/tate.out0000644000175200017520000012112711737577017013562 00000000000000-------------------------------------------------------------------------------- Integral model: [0,-1,1,-10,-20] Curve [0,-1,1,-10,-20] (reduced minimal model) b2 = -4 b4 = -20 b6 = -79 b8 = -21 c4 = 496 c6 = 20008 disc = -161051 (bad primes: [ 11 ]; # real components = 1) #torsion not yet computed Conductor = 11 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 11 5 1 5 I5 5 -1 -------------------------------------------------------------------------------- Integral model: [1,0,1,4,-6] Curve [1,0,1,4,-6] (reduced minimal model) b2 = 1 b4 = 9 b6 = -23 b8 = -26 c4 = -215 c6 = 5291 disc = -21952 (bad primes: [ 2 7 ]; # real components = 1) #torsion not yet computed Conductor = 14 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 6 1 6 I6 2 1 7 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [1,1,1,-10,-10] Curve [1,1,1,-10,-10] (reduced minimal model) b2 = 5 b4 = -19 b6 = -39 b8 = -139 c4 = 481 c6 = 4879 disc = 50625 (bad primes: [ 3 5 ]; # real components = 2) #torsion not yet computed Conductor = 15 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 4 1 4 I4 2 1 5 4 1 4 I4 4 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,-1,-14] Curve [1,-1,1,-1,-14] (reduced minimal model) b2 = -3 b4 = -1 b6 = -55 b8 = 41 c4 = 33 c6 = 12015 disc = -83521 (bad primes: [ 17 ]; # real components = 1) #torsion not yet computed Conductor = 17 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 17 4 1 4 I4 4 -1 -------------------------------------------------------------------------------- Integral model: [0,1,1,-9,-15] Curve [0,1,1,-9,-15] (reduced minimal model) b2 = 4 b4 = -18 b6 = -59 b8 = -140 c4 = 448 c6 = 10088 disc = -6859 (bad primes: [ 19 ]; # real components = 1) #torsion not yet computed Conductor = 19 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 19 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [0,1,0,4,4] Curve [0,1,0,4,4] (reduced minimal model) b2 = 4 b4 = 8 b6 = 16 b8 = 0 c4 = -176 c6 = -2368 disc = -6400 (bad primes: [ 2 5 ]; # real components = 1) #torsion not yet computed Conductor = 20 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 2 0 IV* 3 -1 5 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [1,0,0,-4,-1] Curve [1,0,0,-4,-1] (reduced minimal model) b2 = 1 b4 = -8 b6 = -4 b8 = -17 c4 = 193 c6 = 575 disc = 3969 (bad primes: [ 3 7 ]; # real components = 2) #torsion not yet computed Conductor = 21 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 4 1 4 I4 4 -1 7 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,-4,4] Curve [0,-1,0,-4,4] (reduced minimal model) b2 = -4 b4 = -8 b6 = 16 b8 = -32 c4 = 208 c6 = -2240 disc = 2304 (bad primes: [ 2 3 ]; # real components = 2) #torsion not yet computed Conductor = 24 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 3 0 I*1 4 -1 3 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-5,-8] Curve [1,0,1,-5,-8] (reduced minimal model) b2 = 1 b4 = -9 b6 = -31 b8 = -28 c4 = 217 c6 = 6371 disc = -17576 (bad primes: [ 2 13 ]; # real components = 1) #torsion not yet computed Conductor = 26 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 3 1 3 I3 1 1 13 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,-3,3] Curve [1,-1,1,-3,3] (reduced minimal model) b2 = -3 b4 = -5 b6 = 13 b8 = -16 c4 = 129 c6 = -2241 disc = -1664 (bad primes: [ 2 13 ]; # real components = 1) #torsion not yet computed Conductor = 26 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 7 1 7 I7 7 -1 13 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,1,0,-7] Curve [0,0,1,0,-7] (reduced minimal model) b2 = 0 b4 = 0 b6 = -27 b8 = 0 c4 = 0 c6 = 5832 disc = -19683 (bad primes: [ 3 ]; # real components = 1) #torsion not yet computed Conductor = 27 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 9 3 0 IV* 3 -1 -------------------------------------------------------------------------------- Integral model: [1,0,1,1,2] Curve [1,0,1,1,2] (reduced minimal model) b2 = 1 b4 = 3 b6 = 9 b8 = 0 c4 = -71 c6 = -1837 disc = -2160 (bad primes: [ 2 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 30 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 1 4 I4 2 1 3 3 1 3 I3 3 -1 5 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,4,0] Curve [0,0,0,4,0] (reduced minimal model) b2 = 0 b4 = 8 b6 = 0 b8 = -16 c4 = -192 c6 = 0 disc = -4096 (bad primes: [ 2 ]; # real components = 1) #torsion not yet computed Conductor = 32 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 12 5 0 I*3 4 -1 -------------------------------------------------------------------------------- Integral model: [1,1,0,-11,0] Curve [1,1,0,-11,0] (reduced minimal model) b2 = 5 b4 = -22 b6 = 0 b8 = -121 c4 = 553 c6 = -4085 disc = 88209 (bad primes: [ 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 33 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 6 1 6 I6 2 1 11 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [1,0,0,-3,1] Curve [1,0,0,-3,1] (reduced minimal model) b2 = 1 b4 = -6 b6 = 4 b8 = -8 c4 = 145 c6 = -1081 disc = 1088 (bad primes: [ 2 17 ]; # real components = 2) #torsion not yet computed Conductor = 34 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 6 1 6 I6 6 -1 17 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,9,1] Curve [0,1,1,9,1] (reduced minimal model) b2 = 4 b4 = 18 b6 = 5 b8 = -76 c4 = -416 c6 = 1448 disc = -42875 (bad primes: [ 5 7 ]; # real components = 1) #torsion not yet computed Conductor = 35 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 5 3 1 3 I3 1 1 7 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [0,0,0,0,1] Curve [0,0,0,0,1] (reduced minimal model) b2 = 0 b4 = 0 b6 = 4 b8 = 0 c4 = 0 c6 = -864 disc = -432 (bad primes: [ 2 3 ]; # real components = 1) #torsion not yet computed Conductor = 36 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 2 0 IV 3 -1 3 3 2 0 III 2 1 -------------------------------------------------------------------------------- Integral model: [0,0,1,-1,0] Curve [0,0,1,-1,0] (reduced minimal model) b2 = 0 b4 = -2 b6 = 1 b8 = -1 c4 = 48 c6 = -216 disc = 37 (bad primes: [ 37 ]; # real components = 2) #torsion not yet computed Conductor = 37 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 37 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,-23,-50] Curve [0,1,1,-23,-50] (reduced minimal model) b2 = 4 b4 = -46 b6 = -199 b8 = -728 c4 = 1120 c6 = 36296 disc = 50653 (bad primes: [ 37 ]; # real components = 2) #torsion not yet computed Conductor = 37 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 37 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [1,0,1,9,90] Curve [1,0,1,9,90] (reduced minimal model) b2 = 1 b4 = 19 b6 = 361 b8 = 0 c4 = -455 c6 = -77293 disc = -3511808 (bad primes: [ 2 19 ]; # real components = 1) #torsion not yet computed Conductor = 38 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 9 1 9 I9 1 1 19 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [1,1,1,0,1] Curve [1,1,1,0,1] (reduced minimal model) b2 = 5 b4 = 1 b6 = 5 b8 = 6 c4 = 1 c6 = -1025 disc = -608 (bad primes: [ 2 19 ]; # real components = 1) #torsion not yet computed Conductor = 38 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 5 1 5 I5 5 -1 19 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,0,-4,-5] Curve [1,1,0,-4,-5] (reduced minimal model) b2 = 5 b4 = -8 b6 = -20 b8 = -41 c4 = 217 c6 = 2755 disc = 1521 (bad primes: [ 3 13 ]; # real components = 2) #torsion not yet computed Conductor = 39 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 2 1 2 I2 2 1 13 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [0,0,0,-7,-6] Curve [0,0,0,-7,-6] (reduced minimal model) b2 = 0 b4 = -14 b6 = -24 b8 = -49 c4 = 336 c6 = 5184 disc = 6400 (bad primes: [ 2 5 ]; # real components = 2) #torsion not yet computed Conductor = 40 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 3 0 I*1 2 1 5 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [1,1,1,-4,5] Curve [1,1,1,-4,5] (reduced minimal model) b2 = 5 b4 = -7 b6 = 21 b8 = 14 c4 = 193 c6 = -5921 disc = -16128 (bad primes: [ 2 3 7 ]; # real components = 1) #torsion not yet computed Conductor = 42 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 1 8 I8 8 -1 3 2 1 2 I2 2 1 7 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,0,0] Curve [0,1,1,0,0] (reduced minimal model) b2 = 4 b4 = 0 b6 = 1 b8 = 1 c4 = 16 c6 = -280 disc = -43 (bad primes: [ 43 ]; # real components = 1) #torsion not yet computed Conductor = 43 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 43 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,0,3,-1] Curve [0,1,0,3,-1] (reduced minimal model) b2 = 4 b4 = 6 b6 = -4 b8 = -13 c4 = -128 c6 = 1664 disc = -2816 (bad primes: [ 2 11 ]; # real components = 1) #torsion not yet computed Conductor = 44 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 2 0 IV* 3 -1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,0,-5] Curve [1,-1,0,0,-5] (reduced minimal model) b2 = -3 b4 = 0 b6 = -20 b8 = 15 c4 = 9 c6 = 4347 disc = -10935 (bad primes: [ 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 45 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 7 2 1 I*1 2 -1 5 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,-10,-12] Curve [1,-1,0,-10,-12] (reduced minimal model) b2 = -3 b4 = -20 b6 = -48 b8 = -64 c4 = 489 c6 = 12555 disc = -23552 (bad primes: [ 2 23 ]; # real components = 1) #torsion not yet computed Conductor = 46 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 10 1 10 I10 2 1 23 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [0,1,0,-4,-4] Curve [0,1,0,-4,-4] (reduced minimal model) b2 = 4 b4 = -8 b6 = -16 b8 = -32 c4 = 208 c6 = 2240 disc = 2304 (bad primes: [ 2 3 ]; # real components = 2) #torsion not yet computed Conductor = 48 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 4 0 I*0 2 1 3 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,-2,-1] Curve [1,-1,0,-2,-1] (reduced minimal model) b2 = -3 b4 = -4 b6 = -4 b8 = -1 c4 = 105 c6 = 1323 disc = -343 (bad primes: [ 7 ]; # real components = 1) #torsion not yet computed Conductor = 49 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 7 3 2 0 III 2 -1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-1,-2] Curve [1,0,1,-1,-2] (reduced minimal model) b2 = 1 b4 = -1 b6 = -7 b8 = -2 c4 = 25 c6 = 1475 disc = -1250 (bad primes: [ 2 5 ]; # real components = 1) #torsion not yet computed Conductor = 50 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 1 1 1 I1 1 1 5 4 2 0 IV 3 -1 -------------------------------------------------------------------------------- Integral model: [1,1,1,-3,1] Curve [1,1,1,-3,1] (reduced minimal model) b2 = 5 b4 = -5 b6 = 5 b8 = 0 c4 = 145 c6 = -2105 disc = -800 (bad primes: [ 2 5 ]; # real components = 1) #torsion not yet computed Conductor = 50 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 5 1 5 I5 5 -1 5 2 2 0 II 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,1,-1] Curve [0,1,1,1,-1] (reduced minimal model) b2 = 4 b4 = 2 b6 = -3 b8 = -4 c4 = -32 c6 = 872 disc = -459 (bad primes: [ 3 17 ]; # real components = 1) #torsion not yet computed Conductor = 51 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 3 1 3 I3 3 -1 17 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,1,-10] Curve [0,0,0,1,-10] (reduced minimal model) b2 = 0 b4 = 2 b6 = -40 b8 = -1 c4 = -48 c6 = 8640 disc = -43264 (bad primes: [ 2 13 ]; # real components = 1) #torsion not yet computed Conductor = 52 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 2 0 IV* 1 -1 13 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,0,0] Curve [1,-1,1,0,0] (reduced minimal model) b2 = -3 b4 = 1 b6 = 1 b8 = -1 c4 = -15 c6 = -297 disc = -53 (bad primes: [ 53 ]; # real components = 1) #torsion not yet computed Conductor = 53 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 53 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,12,8] Curve [1,-1,0,12,8] (reduced minimal model) b2 = -3 b4 = 24 b6 = 32 b8 = -168 c4 = -567 c6 = -9477 disc = -157464 (bad primes: [ 2 3 ]; # real components = 1) #torsion not yet computed Conductor = 54 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 3 1 3 I3 1 1 3 9 3 0 IV* 3 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,1,-1] Curve [1,-1,1,1,-1] (reduced minimal model) b2 = -3 b4 = 3 b6 = -3 b8 = 0 c4 = -63 c6 = 351 disc = -216 (bad primes: [ 2 3 ]; # real components = 1) #torsion not yet computed Conductor = 54 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 3 1 3 I3 3 -1 3 3 3 0 II 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,-4,3] Curve [1,-1,0,-4,3] (reduced minimal model) b2 = -3 b4 = -8 b6 = 12 b8 = -25 c4 = 201 c6 = -1701 disc = 3025 (bad primes: [ 5 11 ]; # real components = 2) #torsion not yet computed Conductor = 55 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 5 2 1 2 I2 2 -1 11 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,0,-4] Curve [0,-1,0,0,-4] (reduced minimal model) b2 = -4 b4 = 0 b6 = -16 b8 = 16 c4 = 16 c6 = 3520 disc = -7168 (bad primes: [ 2 7 ]; # real components = 1) #torsion not yet computed Conductor = 56 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 10 3 0 III* 2 1 7 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [0,0,0,1,2] Curve [0,0,0,1,2] (reduced minimal model) b2 = 0 b4 = 2 b6 = 8 b8 = -1 c4 = -48 c6 = -1728 disc = -1792 (bad primes: [ 2 7 ]; # real components = 1) #torsion not yet computed Conductor = 56 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 3 0 I*1 4 -1 7 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,-1,1,-2,2] Curve [0,-1,1,-2,2] (reduced minimal model) b2 = -4 b4 = -4 b6 = 9 b8 = -13 c4 = 112 c6 = -1304 disc = -171 (bad primes: [ 3 19 ]; # real components = 1) #torsion not yet computed Conductor = 57 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 2 1 2 I2 2 1 19 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-7,5] Curve [1,0,1,-7,5] (reduced minimal model) b2 = 1 b4 = -13 b6 = 21 b8 = -37 c4 = 313 c6 = -5005 disc = 3249 (bad primes: [ 3 19 ]; # real components = 2) #torsion not yet computed Conductor = 57 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 2 1 2 I2 2 -1 19 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,20,-32] Curve [0,1,1,20,-32] (reduced minimal model) b2 = 4 b4 = 40 b6 = -127 b8 = -527 c4 = -944 c6 = 33128 disc = -1121931 (bad primes: [ 3 19 ]; # real components = 1) #torsion not yet computed Conductor = 57 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 10 1 10 I10 10 -1 19 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,-1,1] Curve [1,-1,0,-1,1] (reduced minimal model) b2 = -3 b4 = -2 b6 = 4 b8 = -4 c4 = 57 c6 = -621 disc = -116 (bad primes: [ 2 29 ]; # real components = 1) #torsion not yet computed Conductor = 58 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 2 1 2 I2 2 1 29 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,1,5,9] Curve [1,1,1,5,9] (reduced minimal model) b2 = 5 b4 = 11 b6 = 37 b8 = 16 c4 = -239 c6 = -6137 disc = -29696 (bad primes: [ 2 29 ]; # real components = 1) #torsion not yet computed Conductor = 58 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 10 1 10 I10 10 -1 29 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,0,0,-2,1] Curve [1,0,0,-2,1] (reduced minimal model) b2 = 1 b4 = -4 b6 = 4 b8 = -3 c4 = 97 c6 = -1009 disc = -61 (bad primes: [ 61 ]; # real components = 1) #torsion not yet computed Conductor = 61 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 61 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,-1,1] Curve [1,-1,1,-1,1] (reduced minimal model) b2 = -3 b4 = -1 b6 = 5 b8 = -4 c4 = 33 c6 = -945 disc = -496 (bad primes: [ 2 31 ]; # real components = 1) #torsion not yet computed Conductor = 62 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 1 4 I4 4 -1 31 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,9,0] Curve [1,-1,0,9,0] (reduced minimal model) b2 = -3 b4 = 18 b6 = 0 b8 = -81 c4 = -423 c6 = -1917 disc = -45927 (bad primes: [ 3 7 ]; # real components = 1) #torsion not yet computed Conductor = 63 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 8 2 2 I*2 2 -1 7 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,-4,0] Curve [0,0,0,-4,0] (reduced minimal model) b2 = 0 b4 = -8 b6 = 0 b8 = -16 c4 = 192 c6 = 0 disc = 4096 (bad primes: [ 2 ]; # real components = 2) #torsion not yet computed Conductor = 64 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 12 6 0 I*2 4 -1 -------------------------------------------------------------------------------- Integral model: [1,0,0,-1,0] Curve [1,0,0,-1,0] (reduced minimal model) b2 = 1 b4 = -2 b6 = 0 b8 = -1 c4 = 49 c6 = -73 disc = 65 (bad primes: [ 5 13 ]; # real components = 2) #torsion not yet computed Conductor = 65 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 5 1 1 1 I1 1 1 13 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-6,4] Curve [1,0,1,-6,4] (reduced minimal model) b2 = 1 b4 = -11 b6 = 17 b8 = -26 c4 = 265 c6 = -4069 disc = 1188 (bad primes: [ 2 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 66 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 2 1 2 I2 2 1 3 3 1 3 I3 3 -1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,1,-2,-1] Curve [1,1,1,-2,-1] (reduced minimal model) b2 = 5 b4 = -3 b6 = -3 b8 = -6 c4 = 97 c6 = -17 disc = 528 (bad primes: [ 2 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 66 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 1 4 I4 4 -1 3 1 1 1 I1 1 1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,0,0,-45,81] Curve [1,0,0,-45,81] (reduced minimal model) b2 = 1 b4 = -90 b6 = 324 b8 = -1944 c4 = 2161 c6 = -73225 disc = 2737152 (bad primes: [ 2 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 66 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 10 1 10 I10 10 -1 3 5 1 5 I5 5 -1 11 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [0,1,1,-12,-21] Curve [0,1,1,-12,-21] (reduced minimal model) b2 = 4 b4 = -24 b6 = -83 b8 = -227 c4 = 592 c6 = 14408 disc = -67 (bad primes: [ 67 ]; # real components = 1) #torsion not yet computed Conductor = 67 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 67 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-1,-1] Curve [1,0,1,-1,-1] (reduced minimal model) b2 = 1 b4 = -1 b6 = -3 b8 = -1 c4 = 25 c6 = 611 disc = -207 (bad primes: [ 3 23 ]; # real components = 1) #torsion not yet computed Conductor = 69 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 2 1 2 I2 2 -1 23 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,2,-3] Curve [1,-1,1,2,-3] (reduced minimal model) b2 = -3 b4 = 5 b6 = -11 b8 = 2 c4 = -111 c6 = 1863 disc = -2800 (bad primes: [ 2 5 7 ]; # real components = 1) #torsion not yet computed Conductor = 70 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 1 4 I4 4 -1 5 2 1 2 I2 2 1 7 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,6,-7] Curve [0,0,0,6,-7] (reduced minimal model) b2 = 0 b4 = 12 b6 = -28 b8 = -36 c4 = -288 c6 = 6048 disc = -34992 (bad primes: [ 2 3 ]; # real components = 1) #torsion not yet computed Conductor = 72 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 3 0 III 2 1 3 7 2 1 I*1 4 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,4,-3] Curve [1,-1,0,4,-3] (reduced minimal model) b2 = -3 b4 = 8 b6 = -12 b8 = -7 c4 = -183 c6 = 1755 disc = -5329 (bad primes: [ 73 ]; # real components = 1) #torsion not yet computed Conductor = 73 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 73 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [0,-1,1,-8,-7] Curve [0,-1,1,-8,-7] (reduced minimal model) b2 = -4 b4 = -16 b6 = -27 b8 = -37 c4 = 400 c6 = 8200 disc = -1875 (bad primes: [ 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 75 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 1 1 1 I1 1 1 5 4 2 0 IV 1 -1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-1,23] Curve [1,0,1,-1,23] (reduced minimal model) b2 = 1 b4 = -1 b6 = 93 b8 = 23 c4 = 25 c6 = -20125 disc = -234375 (bad primes: [ 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 75 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 1 1 1 I1 1 -1 5 7 2 1 I*1 2 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,2,4] Curve [0,1,1,2,4] (reduced minimal model) b2 = 4 b4 = 4 b6 = 17 b8 = 13 c4 = -80 c6 = -3160 disc = -6075 (bad primes: [ 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 75 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 5 1 5 I5 5 -1 5 2 2 0 II 1 1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,-21,-31] Curve [0,-1,0,-21,-31] (reduced minimal model) b2 = -4 b4 = -42 b6 = -124 b8 = -317 c4 = 1024 c6 = 32896 disc = -4864 (bad primes: [ 2 19 ]; # real components = 1) #torsion not yet computed Conductor = 76 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 2 0 IV* 1 -1 19 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,1,2,0] Curve [0,0,1,2,0] (reduced minimal model) b2 = 0 b4 = 4 b6 = 1 b8 = -4 c4 = -96 c6 = -216 disc = -539 (bad primes: [ 7 11 ]; # real components = 1) #torsion not yet computed Conductor = 77 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 7 2 1 2 I2 2 1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,0,4,11] Curve [1,1,0,4,11] (reduced minimal model) b2 = 5 b4 = 8 b6 = 44 b8 = 39 c4 = -167 c6 = -8189 disc = -41503 (bad primes: [ 7 11 ]; # real components = 1) #torsion not yet computed Conductor = 77 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 7 3 1 3 I3 1 1 11 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [0,1,1,-49,600] Curve [0,1,1,-49,600] (reduced minimal model) b2 = 4 b4 = -98 b6 = 2401 b8 = 0 c4 = 2368 c6 = -532792 disc = -156590819 (bad primes: [ 7 11 ]; # real components = 1) #torsion not yet computed Conductor = 77 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 7 6 1 6 I6 6 -1 11 3 1 3 I3 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,0,-19,685] Curve [1,1,0,-19,685] (reduced minimal model) b2 = 5 b4 = -38 b6 = 2740 b8 = 3064 c4 = 937 c6 = -598805 disc = -207028224 (bad primes: [ 2 3 13 ]; # real components = 1) #torsion not yet computed Conductor = 78 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 16 1 16 I16 2 1 3 5 1 5 I5 1 1 13 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [1,1,1,-2,0] Curve [1,1,1,-2,0] (reduced minimal model) b2 = 5 b4 = -3 b6 = 1 b8 = -1 c4 = 97 c6 = -881 disc = 79 (bad primes: [ 79 ]; # real components = 2) #torsion not yet computed Conductor = 79 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 79 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,-7,6] Curve [0,0,0,-7,6] (reduced minimal model) b2 = 0 b4 = -14 b6 = 24 b8 = -49 c4 = 336 c6 = -5184 disc = 6400 (bad primes: [ 2 5 ]; # real components = 2) #torsion not yet computed Conductor = 80 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 4 0 I*0 2 1 5 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,4,-4] Curve [0,-1,0,4,-4] (reduced minimal model) b2 = -4 b4 = 8 b6 = -16 b8 = 0 c4 = -176 c6 = 2368 disc = -6400 (bad primes: [ 2 5 ]; # real components = 1) #torsion not yet computed Conductor = 80 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 4 0 I*0 1 -1 5 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [1,0,1,-2,0] Curve [1,0,1,-2,0] (reduced minimal model) b2 = 1 b4 = -3 b6 = 1 b8 = -2 c4 = 73 c6 = -325 disc = 164 (bad primes: [ 2 41 ]; # real components = 2) #torsion not yet computed Conductor = 82 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 2 1 2 I2 2 1 41 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,1,1,0] Curve [1,1,1,1,0] (reduced minimal model) b2 = 5 b4 = 3 b6 = 1 b8 = -1 c4 = -47 c6 = 199 disc = -83 (bad primes: [ 83 ]; # real components = 1) #torsion not yet computed Conductor = 83 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 83 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,-1,-2] Curve [0,-1,0,-1,-2] (reduced minimal model) b2 = -4 b4 = -2 b6 = -8 b8 = 7 c4 = 64 c6 = 2080 disc = -2352 (bad primes: [ 2 3 7 ]; # real components = 1) #torsion not yet computed Conductor = 84 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 2 0 IV 1 -1 3 1 1 1 I1 1 1 7 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [0,1,0,7,0] Curve [0,1,0,7,0] (reduced minimal model) b2 = 4 b4 = 14 b6 = 0 b8 = -49 c4 = -320 c6 = 1952 disc = -21168 (bad primes: [ 2 3 7 ]; # real components = 1) #torsion not yet computed Conductor = 84 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 2 0 IV 3 -1 3 3 1 3 I3 3 -1 7 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [1,1,0,-8,-13] Curve [1,1,0,-8,-13] (reduced minimal model) b2 = 5 b4 = -16 b6 = -52 b8 = -129 c4 = 409 c6 = 8227 disc = 425 (bad primes: [ 5 17 ]; # real components = 2) #torsion not yet computed Conductor = 85 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 5 2 1 2 I2 2 1 17 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [0,0,0,-4,4] Curve [0,0,0,-4,4] (reduced minimal model) b2 = 0 b4 = -8 b6 = 16 b8 = -16 c4 = 192 c6 = -3456 disc = -2816 (bad primes: [ 2 11 ]; # real components = 1) #torsion not yet computed Conductor = 88 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 8 3 0 I*1 4 1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,1,-1,0] Curve [1,1,1,-1,0] (reduced minimal model) b2 = 5 b4 = -1 b6 = 1 b8 = 1 c4 = 49 c6 = -521 disc = -89 (bad primes: [ 89 ]; # real components = 1) #torsion not yet computed Conductor = 89 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 89 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,1,0,4,5] Curve [1,1,0,4,5] (reduced minimal model) b2 = 5 b4 = 8 b6 = 20 b8 = 9 c4 = -167 c6 = -3005 disc = -7921 (bad primes: [ 89 ]; # real components = 1) #torsion not yet computed Conductor = 89 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 89 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,6,0] Curve [1,-1,0,6,0] (reduced minimal model) b2 = -3 b4 = 12 b6 = 0 b8 = -36 c4 = -279 c6 = -1269 disc = -13500 (bad primes: [ 2 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 90 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 2 1 2 I2 2 1 3 3 2 0 III 2 1 5 3 1 3 I3 3 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,-8,11] Curve [1,-1,1,-8,11] (reduced minimal model) b2 = -3 b4 = -15 b6 = 45 b8 = -90 c4 = 369 c6 = -8073 disc = -8640 (bad primes: [ 2 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 90 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 6 1 6 I6 6 -1 3 3 2 0 III 2 1 5 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,13,-61] Curve [1,-1,1,13,-61] (reduced minimal model) b2 = -3 b4 = 27 b6 = -243 b8 = 0 c4 = -639 c6 = 49599 disc = -1574640 (bad primes: [ 2 3 5 ]; # real components = 1) #torsion not yet computed Conductor = 90 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 1 4 I4 4 -1 3 9 2 3 I*3 4 -1 5 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [0,0,1,1,0] Curve [0,0,1,1,0] (reduced minimal model) b2 = 0 b4 = 2 b6 = 1 b8 = -1 c4 = -48 c6 = -216 disc = -91 (bad primes: [ 7 13 ]; # real components = 1) #torsion not yet computed Conductor = 91 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 7 1 1 1 I1 1 1 13 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,1,-7,5] Curve [0,1,1,-7,5] (reduced minimal model) b2 = 4 b4 = -14 b6 = 21 b8 = -28 c4 = 352 c6 = -6616 disc = -91 (bad primes: [ 7 13 ]; # real components = 1) #torsion not yet computed Conductor = 91 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 7 1 1 1 I1 1 -1 13 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [0,1,0,2,1] Curve [0,1,0,2,1] (reduced minimal model) b2 = 4 b4 = 4 b6 = 4 b8 = 0 c4 = -80 c6 = -352 disc = -368 (bad primes: [ 2 23 ]; # real components = 1) #torsion not yet computed Conductor = 92 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 2 0 IV 3 -1 23 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,-1,1] Curve [0,0,0,-1,1] (reduced minimal model) b2 = 0 b4 = -2 b6 = 4 b8 = -1 c4 = 48 c6 = -864 disc = -368 (bad primes: [ 2 23 ]; # real components = 1) #torsion not yet computed Conductor = 92 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 2 0 IV 3 -1 23 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,0,-1] Curve [1,-1,1,0,-1] (reduced minimal model) b2 = -3 b4 = 1 b6 = -3 b8 = 2 c4 = -15 c6 = 567 disc = -188 (bad primes: [ 2 47 ]; # real components = 1) #torsion not yet computed Conductor = 94 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 2 1 2 I2 2 -1 47 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,1,0,-2,0] Curve [0,1,0,-2,0] (reduced minimal model) b2 = 4 b4 = -4 b6 = 0 b8 = -4 c4 = 112 c6 = -640 disc = 576 (bad primes: [ 2 3 ]; # real components = 2) #torsion not yet computed Conductor = 96 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 6 5 0 III 2 1 3 2 1 2 I2 2 -1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,-2,0] Curve [0,-1,0,-2,0] (reduced minimal model) b2 = -4 b4 = -4 b6 = 0 b8 = -4 c4 = 112 c6 = 640 disc = 576 (bad primes: [ 2 3 ]; # real components = 2) #torsion not yet computed Conductor = 96 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 6 5 0 III 2 -1 3 2 1 2 I2 2 1 -------------------------------------------------------------------------------- Integral model: [1,1,0,-25,-111] Curve [1,1,0,-25,-111] (reduced minimal model) b2 = 5 b4 = -50 b6 = -444 b8 = -1180 c4 = 1225 c6 = 86779 disc = -3294172 (bad primes: [ 2 7 ]; # real components = 1) #torsion not yet computed Conductor = 98 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 2 1 2 I2 2 1 7 7 2 1 I*1 2 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,-2,0] Curve [1,-1,1,-2,0] (reduced minimal model) b2 = -3 b4 = -3 b6 = 1 b8 = -3 c4 = 81 c6 = 135 disc = 297 (bad primes: [ 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 99 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 3 2 0 III 2 1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [1,-1,0,-15,8] Curve [1,-1,0,-15,8] (reduced minimal model) b2 = -3 b4 = -30 b6 = 32 b8 = -249 c4 = 729 c6 = -3645 disc = 216513 (bad primes: [ 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 99 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 9 2 0 III* 2 1 11 1 1 1 I1 1 -1 -------------------------------------------------------------------------------- Integral model: [1,-1,1,-59,186] Curve [1,-1,1,-59,186] (reduced minimal model) b2 = -3 b4 = -117 b6 = 745 b8 = -3981 c4 = 2817 c6 = -148257 disc = 216513 (bad primes: [ 3 11 ]; # real components = 2) #torsion not yet computed Conductor = 99 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 9 2 3 I*3 4 -1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,0,1,-3,-5] Curve [0,0,1,-3,-5] (reduced minimal model) b2 = 0 b4 = -6 b6 = -19 b8 = -9 c4 = 144 c6 = 4104 disc = -8019 (bad primes: [ 3 11 ]; # real components = 1) #torsion not yet computed Conductor = 99 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 3 6 2 0 I*0 1 -1 11 1 1 1 I1 1 1 -------------------------------------------------------------------------------- Integral model: [0,-1,0,-33,62] Curve [0,-1,0,-33,62] (reduced minimal model) b2 = -4 b4 = -66 b6 = 248 b8 = -1337 c4 = 1600 c6 = -44000 disc = 1250000 (bad primes: [ 2 5 ]; # real components = 2) #torsion not yet computed Conductor = 100 Global Root Number = 1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 4 2 0 IV 1 -1 5 7 2 1 I*1 2 1 -------------------------------------------------------------------------------- Integral model: [0,0,0,-36,0] Curve [0,0,0,-36,0] (reduced minimal model) b2 = 0 b4 = -72 b6 = 0 b8 = -1296 c4 = 1728 c6 = 0 disc = 2985984 (bad primes: [ 2 3 ]; # real components = 2) #torsion not yet computed Conductor = 576 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 12 6 0 I*2 4 -1 3 6 2 0 I*0 4 -1 -------------------------------------------------------------------------------- eclib-2013-01-01/tests/out/svectest2.out0000644000175200017520000000152012015437613014524 00000000000000Test run of sparse vector package. Enter n : Uninitialized new vec v = [] Copy of v = [] Enter new entries of v: Dimension = Number of entries = Position: Entry: Position: Entry: Position: Entry: Now v = [(1:2),(3:4),(5:6)] w = [] After w=v, Now v = [(1:2),(3:4),(5:6)] Now w = [(1:2),(3:4),(5:6)] w==v: 1 w!=v: 0 v+w = [(1:4),(3:8),(5:12)] v-w = [] Enter i : After w*=2, w = [(1:4),(3:8),(5:12)] 3*v = [(1:6),(3:12),(5:18)] Now v = [(1:2),(3:4),(5:6)] v+w = [(1:6),(3:12),(5:18)] Now v = [(1:2),(3:4),(5:6)] v-w = [(1:-2),(3:-4),(5:-6)] Now v = [(1:2),(3:4),(5:6)] w/2 = [(1:2),(3:4),(5:6)] Now w = [(1:4),(3:8),(5:12)] -v = [(1:-2),(3:-4),(5:-6)] +v = [(1:2),(3:4),(5:6)] +w = [(1:4),(3:8),(5:12)] 2*v-w = [] Resetting w[1] to 99: w = [(1:99),(3:8),(5:12)] After w-=2*v, w = [(1:95)] v as an ordinary vector = [2,0,4,0,6,0,0,0,0,0] eclib-2013-01-01/tests/out/vectest1.out0000644000175200017520000000157212015437677014361 00000000000000Test run of vector package. iota(10) = [1,2,3,4,5,6,7,8,9,10] Enter n : Uninitialized new vec v = [] Copy of v = [] Initialized new vec v = [0] Copy of v = [0] Enter new entries of v: Now v = [1] w = [0,0,0] After w=v, Now v = [1] Now w = [1] w==v: 1 w!=v: 0 Enter i : After w*=2, w = [2] 3*v = [3] Now v = [1] v+w = [3] Now v = [1] v-w = [-1] Now v = [1] v*w = 2 Now v = [1] w/2 = [1] Now w = [2] -v = [-1] +v = [1] +w = [2] v = [1]; w = [2] Elements of v: v[1] = 1 Member test: Enter a test number: 1 IS a member of v. Subscript test Enter length of subscript vec:Enter subscript vector:The sub-vector is [1] Change one entry of v. Index?New entry?New entry: v[1] = 1 Now v = [1] Initial slice; length? Slice = [1] Now v = [1] General slice; beginning, end? Slice = [1] Now v = [1] w = [2]; vecgcd(w) = 2 After makeprimitive(w), w = [1] u = [0] After swapvec(u,v): u = [1] v = [0] eclib-2013-01-01/tests/out/tmrank-short.out0000644000175200017520000000157212071067052015240 00000000000000Curve [0,1,1,-2,0] : Rank = 2 Curve [1,0,0,0,1] : Rank = 2 Curve [1,-1,0,-4,4] : Rank = 2 Curve [0,0,1,-7,6] : Rank = 3 Curve [0,0,1,-1,6] : Rank = 3 Curve [0,0,1,-49,132] : Rank = 3 Curve [0,1,1,-72,210] : Rank = 4 Curve [0,0,1,-7,36] : Rank = 4 Curve [1,0,0,-202,1089] : Rank = 4 Curve [0,0,1,-79,342] : Rank = 5 Curve [0,0,1,-169,930] : Rank = 5 Curve [0,1,1,-30,390] : Rank = 5 Curve [0,0,1,-547,-2934] : Rank = 6 Curve [0,0,0,-9907,306370] : Rank = 6 Curve [0,0,1,-277,4566] : Rank = 6 Curve [0,0,0,-9217,300985] : Rank = 7 Curve [0,1,0,-5945,583879] : Rank = 7 Curve [0,0,0,-9217,300985] : Rank = 7 Curve [0,0,0,-6544,7375129] : Rank = 8 Curve [0,1,0,9910,9815689] : Rank = 8 Curve [0,0,0,-6112,12325825] : Rank = 8 Curve [1,0,1,34318214642441646362435632562579908747,3184376895814127197244886284686214848599453811643486936756] : Rank = 15 eclib-2013-01-01/tests/out/allisog.out0000644000175200017520000000332611737577017014257 00000000000000Verbose? (0/1) [ [0,-1,1,-10,-20] [0,-1,1,-7820,-263580] [0,-1,1,0,0] ] [0,5,5;5,0,0;5,0,0] [ [1,0,1,4,-6] [1,0,1,-36,-70] [1,0,1,-1,0] [1,0,1,-171,-874] [1,0,1,-11,12] [1,0,1,-2731,-55146] ] [0,2,3,3,0,0;2,0,0,0,3,3;3,0,0,0,2,0;3,0,0,0,0,2;0,3,2,0,0,0;0,3,0,2,0,0] [ [1,1,1,-10,-10] [1,1,1,-5,2] [1,1,1,35,-28] [1,1,1,-135,-660] [1,1,1,-80,242] [1,1,1,0,0] [1,1,1,-110,-880] [1,1,1,-2160,-39540] ] [0,2,2,2,0,0,0,0;2,0,0,0,2,2,0,0;2,0,0,0,0,0,0,0;2,0,0,0,0,0,2,2;0,2,0,0,0,0,0,0;0,2,0,0,0,0,0,0;0,0,0,2,0,0,0,0;0,0,0,2,0,0,0,0] [ [1,-1,1,-1,-14] [1,-1,1,-6,-4] [1,-1,1,-1,0] [1,-1,1,-91,-310] ] [0,2,0,0;2,0,2,2;0,2,0,0;0,2,0,0] [ [0,1,1,-9,-15] [0,1,1,1,0] [0,1,1,-769,-8470] ] [0,3,3;3,0,0;3,0,0] [ [0,1,0,4,4] [0,1,0,-1,0] [0,1,0,-36,-140] [0,1,0,-41,-116] ] [0,2,3,0;2,0,0,3;3,0,0,2;0,3,2,0] [ [1,0,0,-4,-1] [1,0,0,-39,90] [1,0,0,1,0] [1,0,0,-49,-136] [1,0,0,-34,-217] [1,0,0,-784,-8515] ] [0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,0,0;2,0,0,0,2,2;0,0,0,2,0,0;0,0,0,2,0,0] [ [0,-1,0,-4,4] [0,-1,0,-64,220] [0,-1,0,1,0] [0,-1,0,-24,-36] [0,-1,0,16,-180] [0,-1,0,-384,-2772] ] [0,2,2,2,0,0;2,0,0,0,0,0;2,0,0,0,0,0;2,0,0,0,2,2;0,0,0,2,0,0;0,0,0,2,0,0] [ [1,0,1,-5,-8] [1,0,1,0,0] [1,0,1,-460,-3830] ] [0,3,3;3,0,0;3,0,0] [ [1,-1,1,-3,3] [1,-1,1,-213,-1257] ] [0,7;7,0] [ [0,0,1,0,-7] [0,0,1,0,0] [0,0,1,-270,-1708] [0,0,1,-30,63] ] [0,3,3,0;3,0,0,3;3,0,0,0;0,3,0,0] [ [1,0,1,1,2] [1,0,1,-19,26] [1,0,1,-14,-64] [1,0,1,-289,1862] [1,0,1,-69,-194] [1,0,1,-334,-2368] [1,0,1,-454,-544] [1,0,1,-5334,-150368] ] [0,2,3,0,0,0,0,0;2,0,0,2,2,3,0,0;3,0,0,0,0,2,0,0;0,2,0,0,0,0,3,0;0,2,0,0,0,0,0,3;0,3,2,0,0,0,2,2;0,0,0,3,0,2,0,0;0,0,0,0,3,2,0,0] [ [0,0,0,4,0] [0,0,0,-1,0] [0,0,0,-11,14] [0,0,0,-11,-14] ] [0,2,0,0;2,0,2,2;0,2,0,0;0,2,0,0] eclib-2013-01-01/tests/out/smattest.out0000644000175200017520000043506312071067052014461 00000000000000enter 0 to exit enter 1 to do all tests enter 2 to operations enter 3 to special speed test enter> enter 4 to elimination test enter> enter 5 to kernel test enter> enter 6 to multiply smat by smat enter> enter 7 to find eigenspaces enter> Test run of sparse matrix package. enter # of rows: enter # of colums: Unitialized new smat sm = row[1] ={ values [] positions: [] } row[2] ={ values [] positions: [] } row[3] ={ values [] positions: [] } row[4] ={ values [] positions: [] } row[5] ={ values [] positions: [] } row[6] ={ values [] positions: [] } row[7] ={ values [] positions: [] } row[8] ={ values [] positions: [] } row[9] ={ values [] positions: [] } row[10] ={ values [] positions: [] } row[11] ={ values [] positions: [] } row[12] ={ values [] positions: [] } row[13] ={ values [] positions: [] } row[14] ={ values [] positions: [] } row[15] ={ values [] positions: [] } row[16] ={ values [] positions: [] } row[17] ={ values [] positions: [] } row[18] ={ values [] positions: [] } row[19] ={ values [] positions: [] } row[20] ={ values [] positions: [] } row[21] ={ values [] positions: [] } row[22] ={ values [] positions: [] } row[23] ={ values [] positions: [] } row[24] ={ values [] positions: [] } row[25] ={ values [] positions: [] } row[26] ={ values [] positions: [] } row[27] ={ values [] positions: [] } row[28] ={ values [] positions: [] } row[29] ={ values [] positions: [] } row[30] ={ values [] positions: [] } row[31] ={ values [] positions: [] } row[32] ={ values [] positions: [] } row[33] ={ values [] positions: [] } row[34] ={ values [] positions: [] } row[35] ={ values [] positions: [] } row[36] ={ values [] positions: [] } row[37] ={ values [] positions: [] } row[38] ={ values [] positions: [] } row[39] ={ values [] positions: [] } row[40] ={ values [] positions: [] } row[41] ={ values [] positions: [] } row[42] ={ values [] positions: [] } row[43] ={ values [] positions: [] } row[44] ={ values [] positions: [] } row[45] ={ values [] positions: [] } row[46] ={ values [] positions: [] } row[47] ={ values [] positions: [] } row[48] ={ values [] positions: [] } row[49] ={ values [] positions: [] } row[50] ={ values [] positions: [] } row[51] ={ values [] positions: [] } row[52] ={ values [] positions: [] } row[53] ={ values [] positions: [] } row[54] ={ values [] positions: [] } row[55] ={ values [] positions: [] } row[56] ={ values [] positions: [] } row[57] ={ values [] positions: [] } row[58] ={ values [] positions: [] } row[59] ={ values [] positions: [] } row[60] ={ values [] positions: [] } row[61] ={ values [] positions: [] } row[62] ={ values [] positions: [] } row[63] ={ values [] positions: [] } row[64] ={ values [] positions: [] } row[65] ={ values [] positions: [] } row[66] ={ values [] positions: [] } row[67] ={ values [] positions: [] } row[68] ={ values [] positions: [] } row[69] ={ values [] positions: [] } row[70] ={ values [] positions: [] } row[71] ={ values [] positions: [] } row[72] ={ values [] positions: [] } row[73] ={ values [] positions: [] } row[74] ={ values [] positions: [] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [] positions: [] } row[78] ={ values [] positions: [] } row[79] ={ values [] positions: [] } row[80] ={ values [] positions: [] } row[81] ={ values [] positions: [] } row[82] ={ values [] positions: [] } row[83] ={ values [] positions: [] } row[84] ={ values [] positions: [] } row[85] ={ values [] positions: [] } row[86] ={ values [] positions: [] } row[87] ={ values [] positions: [] } row[88] ={ values [] positions: [] } row[89] ={ values [] positions: [] } row[90] ={ values [] positions: [] } row[91] ={ values [] positions: [] } row[92] ={ values [] positions: [] } row[93] ={ values [] positions: [] } row[94] ={ values [] positions: [] } row[95] ={ values [] positions: [] } row[96] ={ values [] positions: [] } row[97] ={ values [] positions: [] } row[98] ={ values [] positions: [] } row[99] ={ values [] positions: [] } row[100] ={ values [] positions: [] } Enter any number Enter size of a square matrix A: Enter entries of A: A = [[1,2], [3,4]] smat from matrix A = row[1] ={ values [1,2] positions: [1,2] } row[2] ={ values [3,4] positions: [1,2] } Enter any number Copy of smat = row[1] ={ values [1,2] positions: [1,2] } row[2] ={ values [3,4] positions: [1,2] } Enter any number Copy using assignment= row[1] ={ values [1,2] positions: [1,2] } row[2] ={ values [3,4] positions: [1,2] } Enter any number enter number of rows of smat for conversion Now enter number of columns smat = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } smat as a matrix = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,1,0,0,0,0,0,0,-9,0,6,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,9,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-9,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,9,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,6,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-3,0,0,0,0,0,1,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2], [0,5,0,-10,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,-8,0,0,0,0,0,0,0,0,0,-5,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,1,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0], [0,-9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0,0], [0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,6,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,-3,0], [0,0,0,0,0,0,9,0,7,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,4,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,8,-7,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0], [0,0,0,0,0,0,0,0,0,0,9,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,-10,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,-1,0,-9,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,-9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,8,0,-4,0,0,0,0,0,0,0,0,0,-9,0,-6,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-9,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,-8,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,-9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,4,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-6,0,0,0,0,0,0,0,1,0,0,0,0,0,0,-5,0,0,5,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,-2,0,-4,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,2,0,0,0,0,0,-9,0,-7,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,9,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,-7,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,5,0,9,0,0,0,3,0,9,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-9,0,0,0,0,0,0,0,0,0,0,4,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0], [0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,6,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0], [0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,-7,0,0,0,0,0,0,-8,0,0,0,3,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,5,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0], [0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,6,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,5,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,6,0,0,0,0,0,0,0,0,0,0,0,0,0,-9,0,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,9,0,0,0,0,0,0,0,0,0,0,3,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,-10,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,9,0,0,0,0,0,9,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,7,0,0,0,-5,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,2,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,-5,0,-6,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,9,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,-9,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,-8,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0], [0,0,0,0,0,0,0,0,-2,0,0,-9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,7,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,-2,8,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,-3,0,-7,0], [0,0,0,0,0,0,0,0,9,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,-5,0,0,0,0,0,0,0,0,0,0,-5,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0], [0,0,-1,0,0,0,0,0,0,-9,1,0,0,0,0,0,0,0,0,-2,0,-2,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,9,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,1,0,0,0,0,-6,0,0,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,-5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,-5,-8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,7,-9,0,0,0,0,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,-7,0,0,0,0,4,0,0,0,0,0,0,0,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] Enter any number Enter position: (row,col)T(50 , 50) = 0 testing set_row enter new row : which row ? (starting from zero) number of non-zero elements ? values ? positions ? new matrix : row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [1,2,3] positions: [10,20,30] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } testing operations Enter size of smat A row,col: Enter size of smat B: row,col: matrix A row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } matrix B row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } Enter any number C = A = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } Enter any number B==A?1 B!=A?0 C==A?1 C!=A?0 Enter any number after B+=A, A = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } and B = row[1] ={ values [-20,-8] positions: [40,94] } row[2] ={ values [12,18] positions: [38,56] } row[3] ={ values [10,12,-2,-14,-20,2,-18,12] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [18,2,-2,6,-14] positions: [9,14,37,46,86] } row[5] ={ values [-10,14,-4,4,-8,18] positions: [24,25,40,66,70,83] } row[6] ={ values [-14,12,18,-18] positions: [39,58,65,98] } row[7] ={ values [6,14,12,-12,-4] positions: [22,26,48,84,85] } row[8] ={ values [18,18,4,-20,12] positions: [54,60,61,91,92] } row[9] ={ values [12,-16,10,4,18] positions: [21,35,52,73,96] } row[10] ={ values [2,16,-2,-6,2,12,2,4] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [10,-20,-6,2,6,-8,-16,-10] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [10,16] positions: [56,91] } row[13] ={ values [16,2,18,8,-6,10] positions: [7,17,19,41,82,88] } row[14] ={ values [-8,6] positions: [69,97] } row[15] ={ values [-18,-14] positions: [2,66] } row[16] ={ values [18,14,12,-16] positions: [44,60,75,94] } row[17] ={ values [-6,18,12,-8,-8,-10,-12] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-2,-6] positions: [48,67] } row[19] ={ values [10,-2,-6] positions: [30,97,99] } row[20] ={ values [18,14,-10,10,18,8,-12,4] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [18] positions: [73] } row[22] ={ values [16,-6] positions: [12,72] } row[23] ={ values [2,-12,8] positions: [33,61,97] } row[24] ={ values [-2,16,-14,-12,-4,-20,6] positions: [37,42,43,54,82,84,97] } row[25] ={ values [18,-6,16,-16,-10,18,-12,-20,14] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-2,-18,-8,-6,-10,2] positions: [9,11,25,28,79,94] } row[27] ={ values [-18,6,-2,16,-16] positions: [10,39,47,75,95] } row[28] ={ values [-10] positions: [74] } row[29] ={ values [-16,-2,10,-4] positions: [7,20,74,77] } row[30] ={ values [4,10] positions: [40,61] } row[31] ={ values [8] positions: [65] } row[32] ={ values [12] positions: [32] } row[33] ={ values [-12,16] positions: [11,92] } row[34] ={ values [10,2,2,18,16,-8,-18,-12] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [18,-18,14,6,16] positions: [23,51,64,80,84] } row[36] ={ values [-4,6,4] positions: [14,25,70] } row[37] ={ values [-12,6,-2,-20,-8] positions: [21,29,76,83,97] } row[38] ={ values [-16,-6,-12] positions: [25,42,69] } row[39] ={ values [10,16,-14,-20] positions: [48,74,83,91] } row[40] ={ values [-16,-8,-6,18,-18] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-8,-6] positions: [1,37] } row[43] ={ values [-14,-14,2,18,8] positions: [20,51,78,91,94] } row[44] ={ values [12] positions: [69] } row[45] ={ values [-8,-4,-12,2,-10,10,-12,2] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-16,16] positions: [25,44] } row[47] ={ values [-4,-8,-10,12,6,4,-18,-14,8] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-4,18,18,8] positions: [33,38,40,71] } row[49] ={ values [18] positions: [35] } row[50] ={ values [-14,-12,-16,10,18,6,18,-4,-4] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [8,14,-12,-18,8,-4,8] positions: [15,17,45,61,72,75,96] } row[53] ={ values [4,10] positions: [38,58] } row[54] ={ values [14,-4] positions: [26,94] } row[55] ={ values [-16,18,4,-4] positions: [2,36,60,98] } row[56] ={ values [-8] positions: [19] } row[57] ={ values [14,14,8,-16,18,-2,12,18] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-6,18,12,-14,-16,6,4,10,-12] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-16] positions: [95] } row[60] ={ values [2,-20,12,16,10,12,-20,-10] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [6,10] positions: [10,17] } row[62] ={ values [10,-8,-16,12,-18,-16,6,-16] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [18,6,-16,-8,-20,-20,-20] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-6,-2,18,18] positions: [51,86,88,94] } row[65] ={ values [4,8] positions: [79,92] } row[66] ={ values [14,-10,-8,16] positions: [9,13,19,37] } row[67] ={ values [-6,8,-2,-20,-2] positions: [27,55,66,80,97] } row[68] ={ values [-4,-12] positions: [33,70] } row[69] ={ values [-20] positions: [81] } row[70] ={ values [-2,-10,-4,2] positions: [34,45,53,89] } row[71] ={ values [12,4,-2,12] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-14,-14] positions: [42,72] } row[74] ={ values [-14,-2,-4,14,-20,-10,-12,-6] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [2] positions: [18] } row[78] ={ values [-14,-20,-8,4,18,18] positions: [22,43,51,72,75,83] } row[79] ={ values [-10] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-4,10,4,-18] positions: [51,70,86,87] } row[82] ={ values [4,-16,2] positions: [32,36,41] } row[83] ={ values [16,-16,18,-14,-2,-14,-12] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-4,-18,16,14,-10,14,-4,16] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [4,-14,-8,2,-12,16,-6,-14] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [18,-2,-10,-6] positions: [9,13,54,80] } row[87] ={ values [2,-14,-14] positions: [14,48,83] } row[88] ={ values [-12,2,18,18,-10,-10,-2,18] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-2,-18,2,-4,-4,4,8] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-14,4,12,4] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [8,18,-4] positions: [80,85,87] } row[94] ={ values [-12] positions: [94] } row[95] ={ values [10,-14,-12,-4,10,-16] positions: [20,22,41,51,72,84] } row[96] ={ values [2,-12,-14,-20,-10,10,6,-10,-16] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-20,-20,14,-18,-6,-20,6] positions: [17,20,34,35,41,66,85] } row[98] ={ values [18,-4,-4] positions: [36,59,74] } row[99] ={ values [-4] positions: [43] } row[100] ={ values [-4,10,-12,-14,8,-12,18] positions: [13,35,47,53,58,68,82] } Enter any number after B-=A, A = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } and B = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } Enter any number after B*=2, B = row[1] ={ values [-20,-8] positions: [40,94] } row[2] ={ values [12,18] positions: [38,56] } row[3] ={ values [10,12,-2,-14,-20,2,-18,12] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [18,2,-2,6,-14] positions: [9,14,37,46,86] } row[5] ={ values [-10,14,-4,4,-8,18] positions: [24,25,40,66,70,83] } row[6] ={ values [-14,12,18,-18] positions: [39,58,65,98] } row[7] ={ values [6,14,12,-12,-4] positions: [22,26,48,84,85] } row[8] ={ values [18,18,4,-20,12] positions: [54,60,61,91,92] } row[9] ={ values [12,-16,10,4,18] positions: [21,35,52,73,96] } row[10] ={ values [2,16,-2,-6,2,12,2,4] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [10,-20,-6,2,6,-8,-16,-10] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [10,16] positions: [56,91] } row[13] ={ values [16,2,18,8,-6,10] positions: [7,17,19,41,82,88] } row[14] ={ values [-8,6] positions: [69,97] } row[15] ={ values [-18,-14] positions: [2,66] } row[16] ={ values [18,14,12,-16] positions: [44,60,75,94] } row[17] ={ values [-6,18,12,-8,-8,-10,-12] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-2,-6] positions: [48,67] } row[19] ={ values [10,-2,-6] positions: [30,97,99] } row[20] ={ values [18,14,-10,10,18,8,-12,4] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [18] positions: [73] } row[22] ={ values [16,-6] positions: [12,72] } row[23] ={ values [2,-12,8] positions: [33,61,97] } row[24] ={ values [-2,16,-14,-12,-4,-20,6] positions: [37,42,43,54,82,84,97] } row[25] ={ values [18,-6,16,-16,-10,18,-12,-20,14] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-2,-18,-8,-6,-10,2] positions: [9,11,25,28,79,94] } row[27] ={ values [-18,6,-2,16,-16] positions: [10,39,47,75,95] } row[28] ={ values [-10] positions: [74] } row[29] ={ values [-16,-2,10,-4] positions: [7,20,74,77] } row[30] ={ values [4,10] positions: [40,61] } row[31] ={ values [8] positions: [65] } row[32] ={ values [12] positions: [32] } row[33] ={ values [-12,16] positions: [11,92] } row[34] ={ values [10,2,2,18,16,-8,-18,-12] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [18,-18,14,6,16] positions: [23,51,64,80,84] } row[36] ={ values [-4,6,4] positions: [14,25,70] } row[37] ={ values [-12,6,-2,-20,-8] positions: [21,29,76,83,97] } row[38] ={ values [-16,-6,-12] positions: [25,42,69] } row[39] ={ values [10,16,-14,-20] positions: [48,74,83,91] } row[40] ={ values [-16,-8,-6,18,-18] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-8,-6] positions: [1,37] } row[43] ={ values [-14,-14,2,18,8] positions: [20,51,78,91,94] } row[44] ={ values [12] positions: [69] } row[45] ={ values [-8,-4,-12,2,-10,10,-12,2] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-16,16] positions: [25,44] } row[47] ={ values [-4,-8,-10,12,6,4,-18,-14,8] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-4,18,18,8] positions: [33,38,40,71] } row[49] ={ values [18] positions: [35] } row[50] ={ values [-14,-12,-16,10,18,6,18,-4,-4] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [8,14,-12,-18,8,-4,8] positions: [15,17,45,61,72,75,96] } row[53] ={ values [4,10] positions: [38,58] } row[54] ={ values [14,-4] positions: [26,94] } row[55] ={ values [-16,18,4,-4] positions: [2,36,60,98] } row[56] ={ values [-8] positions: [19] } row[57] ={ values [14,14,8,-16,18,-2,12,18] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-6,18,12,-14,-16,6,4,10,-12] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-16] positions: [95] } row[60] ={ values [2,-20,12,16,10,12,-20,-10] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [6,10] positions: [10,17] } row[62] ={ values [10,-8,-16,12,-18,-16,6,-16] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [18,6,-16,-8,-20,-20,-20] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-6,-2,18,18] positions: [51,86,88,94] } row[65] ={ values [4,8] positions: [79,92] } row[66] ={ values [14,-10,-8,16] positions: [9,13,19,37] } row[67] ={ values [-6,8,-2,-20,-2] positions: [27,55,66,80,97] } row[68] ={ values [-4,-12] positions: [33,70] } row[69] ={ values [-20] positions: [81] } row[70] ={ values [-2,-10,-4,2] positions: [34,45,53,89] } row[71] ={ values [12,4,-2,12] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-14,-14] positions: [42,72] } row[74] ={ values [-14,-2,-4,14,-20,-10,-12,-6] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [2] positions: [18] } row[78] ={ values [-14,-20,-8,4,18,18] positions: [22,43,51,72,75,83] } row[79] ={ values [-10] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-4,10,4,-18] positions: [51,70,86,87] } row[82] ={ values [4,-16,2] positions: [32,36,41] } row[83] ={ values [16,-16,18,-14,-2,-14,-12] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-4,-18,16,14,-10,14,-4,16] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [4,-14,-8,2,-12,16,-6,-14] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [18,-2,-10,-6] positions: [9,13,54,80] } row[87] ={ values [2,-14,-14] positions: [14,48,83] } row[88] ={ values [-12,2,18,18,-10,-10,-2,18] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-2,-18,2,-4,-4,4,8] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-14,4,12,4] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [8,18,-4] positions: [80,85,87] } row[94] ={ values [-12] positions: [94] } row[95] ={ values [10,-14,-12,-4,10,-16] positions: [20,22,41,51,72,84] } row[96] ={ values [2,-12,-14,-20,-10,10,6,-10,-16] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-20,-20,14,-18,-6,-20,6] positions: [17,20,34,35,41,66,85] } row[98] ={ values [18,-4,-4] positions: [36,59,74] } row[99] ={ values [-4] positions: [43] } row[100] ={ values [-4,10,-12,-14,8,-12,18] positions: [13,35,47,53,58,68,82] } Enter any number after B/=2, B = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } Enter any number A+B=row[1] ={ values [-20,-8] positions: [40,94] } row[2] ={ values [12,18] positions: [38,56] } row[3] ={ values [10,12,-2,-14,-20,2,-18,12] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [18,2,-2,6,-14] positions: [9,14,37,46,86] } row[5] ={ values [-10,14,-4,4,-8,18] positions: [24,25,40,66,70,83] } row[6] ={ values [-14,12,18,-18] positions: [39,58,65,98] } row[7] ={ values [6,14,12,-12,-4] positions: [22,26,48,84,85] } row[8] ={ values [18,18,4,-20,12] positions: [54,60,61,91,92] } row[9] ={ values [12,-16,10,4,18] positions: [21,35,52,73,96] } row[10] ={ values [2,16,-2,-6,2,12,2,4] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [10,-20,-6,2,6,-8,-16,-10] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [10,16] positions: [56,91] } row[13] ={ values [16,2,18,8,-6,10] positions: [7,17,19,41,82,88] } row[14] ={ values [-8,6] positions: [69,97] } row[15] ={ values [-18,-14] positions: [2,66] } row[16] ={ values [18,14,12,-16] positions: [44,60,75,94] } row[17] ={ values [-6,18,12,-8,-8,-10,-12] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-2,-6] positions: [48,67] } row[19] ={ values [10,-2,-6] positions: [30,97,99] } row[20] ={ values [18,14,-10,10,18,8,-12,4] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [18] positions: [73] } row[22] ={ values [16,-6] positions: [12,72] } row[23] ={ values [2,-12,8] positions: [33,61,97] } row[24] ={ values [-2,16,-14,-12,-4,-20,6] positions: [37,42,43,54,82,84,97] } row[25] ={ values [18,-6,16,-16,-10,18,-12,-20,14] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-2,-18,-8,-6,-10,2] positions: [9,11,25,28,79,94] } row[27] ={ values [-18,6,-2,16,-16] positions: [10,39,47,75,95] } row[28] ={ values [-10] positions: [74] } row[29] ={ values [-16,-2,10,-4] positions: [7,20,74,77] } row[30] ={ values [4,10] positions: [40,61] } row[31] ={ values [8] positions: [65] } row[32] ={ values [12] positions: [32] } row[33] ={ values [-12,16] positions: [11,92] } row[34] ={ values [10,2,2,18,16,-8,-18,-12] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [18,-18,14,6,16] positions: [23,51,64,80,84] } row[36] ={ values [-4,6,4] positions: [14,25,70] } row[37] ={ values [-12,6,-2,-20,-8] positions: [21,29,76,83,97] } row[38] ={ values [-16,-6,-12] positions: [25,42,69] } row[39] ={ values [10,16,-14,-20] positions: [48,74,83,91] } row[40] ={ values [-16,-8,-6,18,-18] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-8,-6] positions: [1,37] } row[43] ={ values [-14,-14,2,18,8] positions: [20,51,78,91,94] } row[44] ={ values [12] positions: [69] } row[45] ={ values [-8,-4,-12,2,-10,10,-12,2] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-16,16] positions: [25,44] } row[47] ={ values [-4,-8,-10,12,6,4,-18,-14,8] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-4,18,18,8] positions: [33,38,40,71] } row[49] ={ values [18] positions: [35] } row[50] ={ values [-14,-12,-16,10,18,6,18,-4,-4] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [8,14,-12,-18,8,-4,8] positions: [15,17,45,61,72,75,96] } row[53] ={ values [4,10] positions: [38,58] } row[54] ={ values [14,-4] positions: [26,94] } row[55] ={ values [-16,18,4,-4] positions: [2,36,60,98] } row[56] ={ values [-8] positions: [19] } row[57] ={ values [14,14,8,-16,18,-2,12,18] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-6,18,12,-14,-16,6,4,10,-12] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-16] positions: [95] } row[60] ={ values [2,-20,12,16,10,12,-20,-10] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [6,10] positions: [10,17] } row[62] ={ values [10,-8,-16,12,-18,-16,6,-16] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [18,6,-16,-8,-20,-20,-20] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-6,-2,18,18] positions: [51,86,88,94] } row[65] ={ values [4,8] positions: [79,92] } row[66] ={ values [14,-10,-8,16] positions: [9,13,19,37] } row[67] ={ values [-6,8,-2,-20,-2] positions: [27,55,66,80,97] } row[68] ={ values [-4,-12] positions: [33,70] } row[69] ={ values [-20] positions: [81] } row[70] ={ values [-2,-10,-4,2] positions: [34,45,53,89] } row[71] ={ values [12,4,-2,12] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-14,-14] positions: [42,72] } row[74] ={ values [-14,-2,-4,14,-20,-10,-12,-6] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [2] positions: [18] } row[78] ={ values [-14,-20,-8,4,18,18] positions: [22,43,51,72,75,83] } row[79] ={ values [-10] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-4,10,4,-18] positions: [51,70,86,87] } row[82] ={ values [4,-16,2] positions: [32,36,41] } row[83] ={ values [16,-16,18,-14,-2,-14,-12] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-4,-18,16,14,-10,14,-4,16] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [4,-14,-8,2,-12,16,-6,-14] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [18,-2,-10,-6] positions: [9,13,54,80] } row[87] ={ values [2,-14,-14] positions: [14,48,83] } row[88] ={ values [-12,2,18,18,-10,-10,-2,18] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-2,-18,2,-4,-4,4,8] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-14,4,12,4] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [8,18,-4] positions: [80,85,87] } row[94] ={ values [-12] positions: [94] } row[95] ={ values [10,-14,-12,-4,10,-16] positions: [20,22,41,51,72,84] } row[96] ={ values [2,-12,-14,-20,-10,10,6,-10,-16] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-20,-20,14,-18,-6,-20,6] positions: [17,20,34,35,41,66,85] } row[98] ={ values [18,-4,-4] positions: [36,59,74] } row[99] ={ values [-4] positions: [43] } row[100] ={ values [-4,10,-12,-14,8,-12,18] positions: [13,35,47,53,58,68,82] } Now A = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } and B = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } Enter any number A-B=row[1] ={ values [] positions: [] } row[2] ={ values [] positions: [] } row[3] ={ values [] positions: [] } row[4] ={ values [] positions: [] } row[5] ={ values [] positions: [] } row[6] ={ values [] positions: [] } row[7] ={ values [] positions: [] } row[8] ={ values [] positions: [] } row[9] ={ values [] positions: [] } row[10] ={ values [] positions: [] } row[11] ={ values [] positions: [] } row[12] ={ values [] positions: [] } row[13] ={ values [] positions: [] } row[14] ={ values [] positions: [] } row[15] ={ values [] positions: [] } row[16] ={ values [] positions: [] } row[17] ={ values [] positions: [] } row[18] ={ values [] positions: [] } row[19] ={ values [] positions: [] } row[20] ={ values [] positions: [] } row[21] ={ values [] positions: [] } row[22] ={ values [] positions: [] } row[23] ={ values [] positions: [] } row[24] ={ values [] positions: [] } row[25] ={ values [] positions: [] } row[26] ={ values [] positions: [] } row[27] ={ values [] positions: [] } row[28] ={ values [] positions: [] } row[29] ={ values [] positions: [] } row[30] ={ values [] positions: [] } row[31] ={ values [] positions: [] } row[32] ={ values [] positions: [] } row[33] ={ values [] positions: [] } row[34] ={ values [] positions: [] } row[35] ={ values [] positions: [] } row[36] ={ values [] positions: [] } row[37] ={ values [] positions: [] } row[38] ={ values [] positions: [] } row[39] ={ values [] positions: [] } row[40] ={ values [] positions: [] } row[41] ={ values [] positions: [] } row[42] ={ values [] positions: [] } row[43] ={ values [] positions: [] } row[44] ={ values [] positions: [] } row[45] ={ values [] positions: [] } row[46] ={ values [] positions: [] } row[47] ={ values [] positions: [] } row[48] ={ values [] positions: [] } row[49] ={ values [] positions: [] } row[50] ={ values [] positions: [] } row[51] ={ values [] positions: [] } row[52] ={ values [] positions: [] } row[53] ={ values [] positions: [] } row[54] ={ values [] positions: [] } row[55] ={ values [] positions: [] } row[56] ={ values [] positions: [] } row[57] ={ values [] positions: [] } row[58] ={ values [] positions: [] } row[59] ={ values [] positions: [] } row[60] ={ values [] positions: [] } row[61] ={ values [] positions: [] } row[62] ={ values [] positions: [] } row[63] ={ values [] positions: [] } row[64] ={ values [] positions: [] } row[65] ={ values [] positions: [] } row[66] ={ values [] positions: [] } row[67] ={ values [] positions: [] } row[68] ={ values [] positions: [] } row[69] ={ values [] positions: [] } row[70] ={ values [] positions: [] } row[71] ={ values [] positions: [] } row[72] ={ values [] positions: [] } row[73] ={ values [] positions: [] } row[74] ={ values [] positions: [] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [] positions: [] } row[78] ={ values [] positions: [] } row[79] ={ values [] positions: [] } row[80] ={ values [] positions: [] } row[81] ={ values [] positions: [] } row[82] ={ values [] positions: [] } row[83] ={ values [] positions: [] } row[84] ={ values [] positions: [] } row[85] ={ values [] positions: [] } row[86] ={ values [] positions: [] } row[87] ={ values [] positions: [] } row[88] ={ values [] positions: [] } row[89] ={ values [] positions: [] } row[90] ={ values [] positions: [] } row[91] ={ values [] positions: [] } row[92] ={ values [] positions: [] } row[93] ={ values [] positions: [] } row[94] ={ values [] positions: [] } row[95] ={ values [] positions: [] } row[96] ={ values [] positions: [] } row[97] ={ values [] positions: [] } row[98] ={ values [] positions: [] } row[99] ={ values [] positions: [] } row[100] ={ values [] positions: [] } Now A = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } and B = row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } test addition of scalar to smat After adding 17 to A it is now: row[1] ={ values [17,-10,-4] positions: [1,40,94] } row[2] ={ values [17,6,9] positions: [2,38,56] } row[3] ={ values [17,5,6,-1,-7,-10,1,-9,6] positions: [3,19,37,45,54,82,84,91,93] } row[4] ={ values [17,9,1,-1,3,-7] positions: [4,9,14,37,46,86] } row[5] ={ values [17,-5,7,-2,2,-4,9] positions: [5,24,25,40,66,70,83] } row[6] ={ values [17,-7,6,9,-9] positions: [6,39,58,65,98] } row[7] ={ values [17,3,7,6,-6,-2] positions: [7,22,26,48,84,85] } row[8] ={ values [17,9,9,2,-10,6] positions: [8,54,60,61,91,92] } row[9] ={ values [17,6,-8,5,2,9] positions: [9,21,35,52,73,96] } row[10] ={ values [17,1,8,-1,-3,1,6,1,2] positions: [10,13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,17,1,3,-4,-8,-5] positions: [2,4,6,11,43,61,88,89,99] } row[12] ={ values [17,5,8] positions: [12,56,91] } row[13] ={ values [8,17,1,9,4,-3,5] positions: [7,13,17,19,41,82,88] } row[14] ={ values [17,-4,3] positions: [14,69,97] } row[15] ={ values [-9,17,-7] positions: [2,15,66] } row[16] ={ values [17,9,7,6,-8] positions: [16,44,60,75,94] } row[17] ={ values [-3,17,9,6,-4,-4,-5,-6] positions: [7,17,23,26,34,50,68,94] } row[18] ={ values [17,-1,-3] positions: [18,48,67] } row[19] ={ values [17,5,-1,-3] positions: [19,30,97,99] } row[20] ={ values [9,7,-5,17,5,9,4,-6,2] positions: [7,9,11,20,24,34,43,46,74] } row[21] ={ values [17,9] positions: [21,73] } row[22] ={ values [8,17,-3] positions: [12,22,72] } row[23] ={ values [17,1,-6,4] positions: [23,33,61,97] } row[24] ={ values [17,-1,8,-7,-6,-2,-10,3] positions: [24,37,42,43,54,82,84,97] } row[25] ={ values [9,-3,17,8,-8,-5,9,-6,-10,7] positions: [11,12,25,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,17,-3,-5,1] positions: [9,11,25,26,28,79,94] } row[27] ={ values [-9,17,3,-1,8,-8] positions: [10,27,39,47,75,95] } row[28] ={ values [17,-5] positions: [28,74] } row[29] ={ values [-8,-1,17,5,-2] positions: [7,20,29,74,77] } row[30] ={ values [17,2,5] positions: [30,40,61] } row[31] ={ values [17,4] positions: [31,65] } row[32] ={ values [23] positions: [32] } row[33] ={ values [-6,17,8] positions: [11,33,92] } row[34] ={ values [5,1,1,17,9,8,-4,-9,-6] positions: [12,31,33,34,76,79,81,91,93] } row[35] ={ values [9,17,-9,7,3,8] positions: [23,35,51,64,80,84] } row[36] ={ values [-2,3,17,2] positions: [14,25,36,70] } row[37] ={ values [-6,3,17,-1,-10,-4] positions: [21,29,37,76,83,97] } row[38] ={ values [-8,17,-3,-6] positions: [25,38,42,69] } row[39] ={ values [17,5,8,-7,-10] positions: [39,48,74,83,91] } row[40] ={ values [-8,-4,-3,17,9,-9] positions: [6,11,25,40,54,59] } row[41] ={ values [17] positions: [41] } row[42] ={ values [-4,-3,17] positions: [1,37,42] } row[43] ={ values [-7,17,-7,1,9,4] positions: [20,43,51,78,91,94] } row[44] ={ values [17,6] positions: [44,69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,17,1] positions: [6,20,21,29,36,39,43,45,59] } row[46] ={ values [-8,8,17] positions: [25,44,46] } row[47] ={ values [-2,-4,-5,6,17,3,2,-9,-7,4] positions: [5,7,9,37,47,50,55,61,63,71] } row[48] ={ values [-2,9,9,17,4] positions: [33,38,40,48,71] } row[49] ={ values [9,17] positions: [35,49] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,17,-2] positions: [5,11,28,32,34,38,40,45,50,80] } row[51] ={ values [17] positions: [51] } row[52] ={ values [4,7,-6,17,-9,4,-2,4] positions: [15,17,45,52,61,72,75,96] } row[53] ={ values [2,17,5] positions: [38,53,58] } row[54] ={ values [7,17,-2] positions: [26,54,94] } row[55] ={ values [-8,9,17,2,-2] positions: [2,36,55,60,98] } row[56] ={ values [-4,17] positions: [19,56] } row[57] ={ values [7,7,4,-8,17,9,-1,6,9] positions: [6,18,32,39,57,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,17,5,-6] positions: [2,16,26,32,39,43,54,58,66,67] } row[59] ={ values [17,-8] positions: [59,95] } row[60] ={ values [1,-10,6,8,17,5,6,-10,-5] positions: [8,17,26,37,60,62,72,75,92] } row[61] ={ values [3,5,17] positions: [10,17,61] } row[62] ={ values [5,-4,-8,6,-9,-8,17,3,-8] positions: [6,14,34,35,49,57,62,66,84] } row[63] ={ values [9,3,-8,13,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,17,-1,9,9] positions: [51,64,86,88,94] } row[65] ={ values [17,2,4] positions: [65,79,92] } row[66] ={ values [7,-5,-4,8,17] positions: [9,13,19,37,66] } row[67] ={ values [-3,4,-1,17,-10,-1] positions: [27,55,66,67,80,97] } row[68] ={ values [-2,17,-6] positions: [33,68,70] } row[69] ={ values [17,-10] positions: [69,81] } row[70] ={ values [-1,-5,-2,17,1] positions: [34,45,53,70,89] } row[71] ={ values [6,2,-1,17,6] positions: [61,64,70,71,88] } row[72] ={ values [17] positions: [72] } row[73] ={ values [-7,-7,17] positions: [42,72,73] } row[74] ={ values [-7,-1,-2,7,7,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [17] positions: [75] } row[76] ={ values [17] positions: [76] } row[77] ={ values [1,17] positions: [18,77] } row[78] ={ values [-7,-10,-4,2,9,17,9] positions: [22,43,51,72,75,78,83] } row[79] ={ values [-5,17] positions: [8,79] } row[80] ={ values [17] positions: [80] } row[81] ={ values [-2,5,17,2,-9] positions: [51,70,81,86,87] } row[82] ={ values [2,-8,1,17] positions: [32,36,41,82] } row[83] ={ values [8,-8,9,-7,-1,-7,17,-6] positions: [15,27,32,48,60,65,83,97] } row[84] ={ values [-2,-9,8,7,-5,17,7,-2,8] positions: [9,12,34,35,38,84,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,17,8,-3,-7] positions: [22,31,39,59,74,85,95,97,99] } row[86] ={ values [9,-1,-5,-3,17] positions: [9,13,54,80,86] } row[87] ={ values [1,-7,-7,17] positions: [14,48,83,87] } row[88] ={ values [-6,1,9,9,-5,-5,-1,17,9] positions: [6,40,47,59,62,73,82,88,91] } row[89] ={ values [-1,-9,1,-2,-2,2,21] positions: [3,10,11,20,22,30,89] } row[90] ={ values [17] positions: [90] } row[91] ={ values [-7,2,6,17,2] positions: [30,44,51,91,99] } row[92] ={ values [17] positions: [92] } row[93] ={ values [4,9,-2,17] positions: [80,85,87,93] } row[94] ={ values [11] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8,17] positions: [20,22,41,51,72,84,95] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8,17] positions: [3,8,13,27,34,41,68,69,70,96] } row[97] ={ values [-10,-10,7,-9,-3,-10,3,17] positions: [17,20,34,35,41,66,85,97] } row[98] ={ values [9,-2,-2,17] positions: [36,59,74,98] } row[99] ={ values [-2,17] positions: [43,99] } row[100] ={ values [-2,5,-6,-7,4,-6,9,17] positions: [13,35,47,53,58,68,82,100] } After subtracting 17 again it is now: row[1] ={ values [-10,-4] positions: [40,94] } row[2] ={ values [6,9] positions: [38,56] } row[3] ={ values [5,6,-1,-7,-10,1,-9,6] positions: [19,37,45,54,82,84,91,93] } row[4] ={ values [9,1,-1,3,-7] positions: [9,14,37,46,86] } row[5] ={ values [-5,7,-2,2,-4,9] positions: [24,25,40,66,70,83] } row[6] ={ values [-7,6,9,-9] positions: [39,58,65,98] } row[7] ={ values [3,7,6,-6,-2] positions: [22,26,48,84,85] } row[8] ={ values [9,9,2,-10,6] positions: [54,60,61,91,92] } row[9] ={ values [6,-8,5,2,9] positions: [21,35,52,73,96] } row[10] ={ values [1,8,-1,-3,1,6,1,2] positions: [13,28,68,69,75,78,98,100] } row[11] ={ values [5,-10,-3,1,3,-4,-8,-5] positions: [2,4,6,43,61,88,89,99] } row[12] ={ values [5,8] positions: [56,91] } row[13] ={ values [8,1,9,4,-3,5] positions: [7,17,19,41,82,88] } row[14] ={ values [-4,3] positions: [69,97] } row[15] ={ values [-9,-7] positions: [2,66] } row[16] ={ values [9,7,6,-8] positions: [44,60,75,94] } row[17] ={ values [-3,9,6,-4,-4,-5,-6] positions: [7,23,26,34,50,68,94] } row[18] ={ values [-1,-3] positions: [48,67] } row[19] ={ values [5,-1,-3] positions: [30,97,99] } row[20] ={ values [9,7,-5,5,9,4,-6,2] positions: [7,9,11,24,34,43,46,74] } row[21] ={ values [9] positions: [73] } row[22] ={ values [8,-3] positions: [12,72] } row[23] ={ values [1,-6,4] positions: [33,61,97] } row[24] ={ values [-1,8,-7,-6,-2,-10,3] positions: [37,42,43,54,82,84,97] } row[25] ={ values [9,-3,8,-8,-5,9,-6,-10,7] positions: [11,12,33,46,49,65,75,81,88] } row[26] ={ values [-1,-9,-4,-3,-5,1] positions: [9,11,25,28,79,94] } row[27] ={ values [-9,3,-1,8,-8] positions: [10,39,47,75,95] } row[28] ={ values [-5] positions: [74] } row[29] ={ values [-8,-1,5,-2] positions: [7,20,74,77] } row[30] ={ values [2,5] positions: [40,61] } row[31] ={ values [4] positions: [65] } row[32] ={ values [6] positions: [32] } row[33] ={ values [-6,8] positions: [11,92] } row[34] ={ values [5,1,1,9,8,-4,-9,-6] positions: [12,31,33,76,79,81,91,93] } row[35] ={ values [9,-9,7,3,8] positions: [23,51,64,80,84] } row[36] ={ values [-2,3,2] positions: [14,25,70] } row[37] ={ values [-6,3,-1,-10,-4] positions: [21,29,76,83,97] } row[38] ={ values [-8,-3,-6] positions: [25,42,69] } row[39] ={ values [5,8,-7,-10] positions: [48,74,83,91] } row[40] ={ values [-8,-4,-3,9,-9] positions: [6,11,25,54,59] } row[41] ={ values [] positions: [] } row[42] ={ values [-4,-3] positions: [1,37] } row[43] ={ values [-7,-7,1,9,4] positions: [20,51,78,91,94] } row[44] ={ values [6] positions: [69] } row[45] ={ values [-4,-2,-6,1,-5,5,-6,1] positions: [6,20,21,29,36,39,43,59] } row[46] ={ values [-8,8] positions: [25,44] } row[47] ={ values [-2,-4,-5,6,3,2,-9,-7,4] positions: [5,7,9,37,50,55,61,63,71] } row[48] ={ values [-2,9,9,4] positions: [33,38,40,71] } row[49] ={ values [9] positions: [35] } row[50] ={ values [-7,-6,-8,5,9,3,9,-2,-2] positions: [5,11,28,32,34,38,40,45,80] } row[51] ={ values [] positions: [] } row[52] ={ values [4,7,-6,-9,4,-2,4] positions: [15,17,45,61,72,75,96] } row[53] ={ values [2,5] positions: [38,58] } row[54] ={ values [7,-2] positions: [26,94] } row[55] ={ values [-8,9,2,-2] positions: [2,36,60,98] } row[56] ={ values [-4] positions: [19] } row[57] ={ values [7,7,4,-8,9,-1,6,9] positions: [6,18,32,39,59,78,83,91] } row[58] ={ values [-3,9,6,-7,-8,3,2,5,-6] positions: [2,16,26,32,39,43,54,66,67] } row[59] ={ values [-8] positions: [95] } row[60] ={ values [1,-10,6,8,5,6,-10,-5] positions: [8,17,26,37,62,72,75,92] } row[61] ={ values [3,5] positions: [10,17] } row[62] ={ values [5,-4,-8,6,-9,-8,3,-8] positions: [6,14,34,35,49,57,66,84] } row[63] ={ values [9,3,-8,-4,-10,-10,-10] positions: [3,14,15,63,80,84,94] } row[64] ={ values [-3,-1,9,9] positions: [51,86,88,94] } row[65] ={ values [2,4] positions: [79,92] } row[66] ={ values [7,-5,-4,8] positions: [9,13,19,37] } row[67] ={ values [-3,4,-1,-10,-1] positions: [27,55,66,80,97] } row[68] ={ values [-2,-6] positions: [33,70] } row[69] ={ values [-10] positions: [81] } row[70] ={ values [-1,-5,-2,1] positions: [34,45,53,89] } row[71] ={ values [6,2,-1,6] positions: [61,64,70,88] } row[72] ={ values [] positions: [] } row[73] ={ values [-7,-7] positions: [42,72] } row[74] ={ values [-7,-1,-2,7,-10,-5,-6,-3] positions: [7,31,56,59,74,78,80,92] } row[75] ={ values [] positions: [] } row[76] ={ values [] positions: [] } row[77] ={ values [1] positions: [18] } row[78] ={ values [-7,-10,-4,2,9,9] positions: [22,43,51,72,75,83] } row[79] ={ values [-5] positions: [8] } row[80] ={ values [] positions: [] } row[81] ={ values [-2,5,2,-9] positions: [51,70,86,87] } row[82] ={ values [2,-8,1] positions: [32,36,41] } row[83] ={ values [8,-8,9,-7,-1,-7,-6] positions: [15,27,32,48,60,65,97] } row[84] ={ values [-2,-9,8,7,-5,7,-2,8] positions: [9,12,34,35,38,93,96,97] } row[85] ={ values [2,-7,-4,1,-6,8,-3,-7] positions: [22,31,39,59,74,95,97,99] } row[86] ={ values [9,-1,-5,-3] positions: [9,13,54,80] } row[87] ={ values [1,-7,-7] positions: [14,48,83] } row[88] ={ values [-6,1,9,9,-5,-5,-1,9] positions: [6,40,47,59,62,73,82,91] } row[89] ={ values [-1,-9,1,-2,-2,2,4] positions: [3,10,11,20,22,30,89] } row[90] ={ values [] positions: [] } row[91] ={ values [-7,2,6,2] positions: [30,44,51,99] } row[92] ={ values [] positions: [] } row[93] ={ values [4,9,-2] positions: [80,85,87] } row[94] ={ values [-6] positions: [94] } row[95] ={ values [5,-7,-6,-2,5,-8] positions: [20,22,41,51,72,84] } row[96] ={ values [1,-6,-7,-10,-5,5,3,-5,-8] positions: [3,8,13,27,34,41,68,69,70] } row[97] ={ values [-10,-10,7,-9,-3,-10,3] positions: [17,20,34,35,41,66,85] } row[98] ={ values [9,-2,-2] positions: [36,59,74] } row[99] ={ values [-2] positions: [43] } row[100] ={ values [-2,5,-6,-7,4,-6,9] positions: [13,35,47,53,58,68,82] } scalar addition OK A = 5x5 zero smat: row[1] ={ values [] positions: [] } row[2] ={ values [] positions: [] } row[3] ={ values [] positions: [] } row[4] ={ values [] positions: [] } row[5] ={ values [] positions: [] } After adding 17 to A it is now: row[1] ={ values [17] positions: [1] } row[2] ={ values [17] positions: [2] } row[3] ={ values [17] positions: [3] } row[4] ={ values [17] positions: [4] } row[5] ={ values [17] positions: [5] } After subtracting 17 again it is now: row[1] ={ values [] positions: [] } row[2] ={ values [] positions: [] } row[3] ={ values [] positions: [] } row[4] ={ values [] positions: [] } row[5] ={ values [] positions: [] } scalar addition OK test multiplication of smat by matrix enter smat: first row, col and then the rows now enter matrix: first row, col and then the entries the smat is (as a matrix) [[0,-10,-4], [0,6,0], [5,-7,6]] the matrix is [[1,2,3,4], [0,5,6,0], [7,8,9,10]] the product matrix is: [[-28,-82,-96,-40], [0,30,36,0], [47,23,27,80]] Correct Testing transpose function A=(A^t)^t ? yes! enter new value of t test of kernel function enter size of matrix for elimination (row,col) Do you want to input the matrix for elimination or do you want a matrix with random entries? (1 for random and zero otherwise want to determine the rank using matrix? (1 = yes; 0 = no )How many maximum number of non-zero entries per row? enter seed for random number generator calculating matrix, done rank using echmodp : 95 number of non-zero entries: 525 rank is:95 number of non-zero entries: 434 kernel correct enter new value of t eclib-2013-01-01/tests/out/space2.out0000644000175200017520000000061212015437630013757 00000000000000 Subspace package test program Enter size of square matrix M: Enter entries of M: M = [[1,2,3], [4,5,6], [7,8,9]] Trace(M) = 15 Enter number of times to repeat kernel tests: kernel(m) has basis [[1], [-2], [1]] pivots: [3] denom: 1 Now compute kernel mod p, p = 1073741789 kernel(m) has basis [[1], [-2], [1]] pivots: [3] !!! Agrees with old version !!! Enter size of square matrix M: eclib-2013-01-01/tests/out/tcurve.out0000644000175200017520000000263011737577017014132 00000000000000 Enter a curve: The curve is [0,0,1,-7,6] A test of invariants: The curve is [0,0,1,-7,6] b2 = 0 b4 = -14 b6 = 25 b8 = -49 c4 = 336 c6 = -5400 disc = 5077 (# real components = 2) #torsion not yet computed The minimal curve is [0,0,1,-7,6] (reduced minimal model) b2 = 0 b4 = -14 b6 = 25 b8 = -49 c4 = 336 c6 = -5400 disc = 5077 (# real components = 2) #torsion not yet computed A test of Tate's algorithm: [0,0,1,-7,6] (reduced minimal model) b2 = 0 b4 = -14 b6 = 25 b8 = -49 c4 = 336 c6 = -5400 disc = 5077 (bad primes: [ 5077 ]; # real components = 2) #torsion not yet computed Conductor = 5077 Full display: [0,0,1,-7,6] (reduced minimal model) b2 = 0 b4 = -14 b6 = 25 b8 = -49 c4 = 336 c6 = -5400 disc = 5077 (bad primes: [ 5077 ]; # real components = 2) #torsion not yet computed Conductor = 5077 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 5077 1 1 1 I1 1 1 Traces of Frobenius: p=2: ap=-2 p=3: ap=-3 p=5: ap=-4 p=7: ap=-4 p=11: ap=-6 p=13: ap=-4 p=17: ap=-4 p=19: ap=-7 p=23: ap=-6 p=29: ap=-6 p=31: ap=-2 p=37: ap=0 p=41: ap=0 p=43: ap=-8 p=47: ap=-9 p=53: ap=-9 p=59: ap=-11 p=61: ap=-2 p=67: ap=-12 p=71: ap=-8 p=73: ap=-14 p=79: ap=9 p=83: ap=-2 p=89: ap=11 p=97: ap=6 Testing construction from a non-integral model: After scaling down by 60, coeffs are [0,0,1/216000,-7/12960000,1/7776000000] Constructed curve is [0,0,1,-7,6] with scale = 60 eclib-2013-01-01/tests/out/d2.out0000644000175200017520000000140312015446207013106 00000000000000Verbose? Limit on height? Stop after first point found? Selmer only (0/1: if 1, just tests whether second descent possible)? Enter quartic coefficients (a,0,c,0,e) or just a c e cd-curve (nearer): [0,111,0,2738,0] cd-dash-curve (further): [0,-222,0,1369,0] I = 45177, J = 19146834 Minimal model for Jacobian: [0,0,0,-15059,-709142] Checking local solublity at primes [ 2 3 37 ]: Everywhere locally soluble. ------------------------------------------ RESULTS Quartic has rational point (x:y:z) = (883:37002:145) Point on (c,d) curve = [-113054905:-32672766:3048625] height = 13.565420700285587132 Point on (c',d') curve = [175298864692140:22290732796922058:2098872790442875] height = 27.130841400571174264 Enter quartic coefficients (a,0,c,0,e) or just a c e eclib-2013-01-01/tests/out/mmattest.out0000644000175200017520000000400511743231305014436 00000000000000 Multiprecision matrix package test program. Enter size of a square matrix A: Enter entries of A: A = [[1,2,3], [4,5,6], [7,8,9]] Creating an array of 3 matrices A= [[1,2,3], [4,5,6], [7,8,9]] 2A= [[2,4,6], [8,10,12], [14,16,18]] 3A= [[3,6,9], [12,15,18], [21,24,27]] row(A,1) = [1,2,3] row(A,2) = [4,5,6] row(A,3) = [7,8,9] A = [[1,2,3], [4,5,6], [7,8,9]] col(A,1) = [1,4,7] col(A,2) = [2,5,8] col(A,3) = [3,6,9] A = [[1,2,3], [4,5,6], [7,8,9]] directsum(A,A) = [[1,2,3,0,0,0], [4,5,6,0,0,0], [7,8,9,0,0,0], [0,0,0,1,2,3], [0,0,0,4,5,6], [0,0,0,7,8,9]] Enter any number After shortening to a matrix of longs, A = [[1,2,3], [4,5,6], [7,8,9]] B = A = [[1,2,3], [4,5,6], [7,8,9]] Enter any number B==A?1 B!=A?0 after B+:=A, A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[2,4,6], [8,10,12], [14,16,18]] Enter any number after B-:=A, A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[1,2,3], [4,5,6], [7,8,9]] Enter any number after B*:=2, A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[2,4,6], [8,10,12], [14,16,18]] Enter any number after B/:=2, A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[1,2,3], [4,5,6], [7,8,9]] Enter any number A+B= [[2,4,6], [8,10,12], [14,16,18]] Now A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[1,2,3], [4,5,6], [7,8,9]] Enter any number A-B= [[0,0,0], [0,0,0], [0,0,0]] Now A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[1,2,3], [4,5,6], [7,8,9]] Enter any number A*B= [[30,36,42], [66,81,96], [102,126,150]] Now A = [[1,2,3], [4,5,6], [7,8,9]] and B = [[1,2,3], [4,5,6], [7,8,9]] Enter any number -A= [[-1,-2,-3], [-4,-5,-6], [-7,-8,-9]] Now A = [[1,2,3], [4,5,6], [7,8,9]] -A= [[-1,-2,-3], [-4,-5,-6], [-7,-8,-9]] Now A = [[1,2,3], [4,5,6], [7,8,9]] Enter any number char. poly. of A has coefficients [ 0 -18 -15 1 ] det(A) = 0 Augmented matrix = [[1,2,3,1,0,0], [4,5,6,0,1,0], [7,8,9,0,0,1]] Which echelon method? (0=standard,1=longlong,2=modular) Echelon matrix = [[3,0,-3,0,-8,5], [0,3,6,0,7,-4], [0,0,0,3,-6,3]] pivotal columns: [1,2,4] nonpivotal columns: [3,5,6] Denom = 3 Rank = 2 Nullity = 1 A is not invertible; rk = 2 eclib-2013-01-01/tests/out/twist.out0000644000175200017520000000301011737577017013765 00000000000000 Curve is: [1,-1,0,4,3] (reduced minimal model) b2 = -3 b4 = 8 b6 = 12 b8 = -25 c4 = -183 c6 = -3429 disc = -10351 (bad primes: [ 11 941 ]; # real components = 1) #torsion not yet computed Conductor = 10351 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 11 1 1 1 I1 1 1 941 1 1 1 I1 1 1 Enter a twist value: (0 to set a new `original' curve, 1 to twist original, or any other integer to twist immediately preceding output) E * 10 is: [0,0,0,6100,254000] (reduced minimal model) b2 = 0 b4 = 12200 b6 = 1016000 b8 = -37210000 c4 = -292800 c6 = -219456000 disc = -42397696000000 (bad primes: [ 2 5 11 941 ]; # real components = 1) #torsion not yet computed Conductor = 16561600 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 2 18 6 0 I*8 4 1 5 6 2 0 I*0 1 1 11 1 1 1 I1 1 -1 941 1 1 1 I1 1 -1 Enter a twist value: (0 to set a new `original' curve, 1 to twist original, or any other integer to twist immediately preceding output) E * 10 is: [1,-1,0,4,3] (reduced minimal model) b2 = -3 b4 = 8 b6 = 12 b8 = -25 c4 = -183 c6 = -3429 disc = -10351 (bad primes: [ 11 941 ]; # real components = 1) #torsion not yet computed Conductor = 10351 Global Root Number = -1 Reduction type at bad primes: p ord(d) ord(N) ord(j) Kodaira c_p root_number 11 1 1 1 I1 1 1 941 1 1 1 I1 1 1 Enter a twist value: (0 to set a new `original' curve, 1 to twist original, or any other integer to twist immediately preceding output) eclib-2013-01-01/tests/out/tmrank.out0000644000175200017520000000157211751773020014106 00000000000000Curve [0,1,1,-2,0] : Rank = 2 Curve [1,0,0,0,1] : Rank = 2 Curve [1,-1,0,-4,4] : Rank = 2 Curve [0,0,1,-7,6] : Rank = 3 Curve [0,0,1,-1,6] : Rank = 3 Curve [0,0,1,-49,132] : Rank = 3 Curve [0,1,1,-72,210] : Rank = 4 Curve [0,0,1,-7,36] : Rank = 4 Curve [1,0,0,-202,1089] : Rank = 4 Curve [0,0,1,-79,342] : Rank = 5 Curve [0,0,1,-169,930] : Rank = 5 Curve [0,1,1,-30,390] : Rank = 5 Curve [0,0,1,-547,-2934] : Rank = 6 Curve [0,0,0,-9907,306370] : Rank = 6 Curve [0,0,1,-277,4566] : Rank = 6 Curve [0,0,0,-9217,300985] : Rank = 7 Curve [0,1,0,-5945,583879] : Rank = 7 Curve [0,0,0,-9217,300985] : Rank = 7 Curve [0,0,0,-6544,7375129] : Rank = 8 Curve [0,1,0,9910,9815689] : Rank = 8 Curve [0,0,0,-6112,12325825] : Rank = 8 Curve [1,0,1,34318214642441646362435632562579908747,3184376895814127197244886284686214848599453811643486936756] : Rank = 15 eclib-2013-01-01/tests/out/tmanin.out0000644000175200017520000000040411737577017014105 00000000000000Program tmanin. Using METHOD = 2 to find newforms MODULUS for linear algebra = 1073741789 Verbose output? How many primes for Hecke eigenvalues? Output Hecke eigenvalues to file? (0/1) Sign? (-1/0/1) Enter first and last N: >>>Level 90: 3 newform(s) found. eclib-2013-01-01/tests/out/tlegcert.out0000644000175200017520000000035312015437060014412 00000000000000Solving ax^2 + by^2 + cz^2 = 0 Using method 4 Enter coefficients a b c: 10000000019 10000000033 -10000010639 Enter certificate k1 k2 k3: Solution: (x:y:z) = (16081092938:20311652644:-25906834446) --OK Enter coefficients a b c: 0 0 0 eclib-2013-01-01/tests/out/telog.out0000644000175200017520000000527411737577017013743 00000000000000Testing some points: The points are P0 = [0:2:1], P1 = [1:0:1], and P2 = [2:0:1] Curve [0,0,1,-7,6] Periods: [w_1,w_2] = [(0,-1.4805482682414149933073311106409602506642033146287),(2.0758439915434665249420878417536431498858141282849,0)] tau = (0,1.4020778897057774955179040745500506975747935056134) (abs(tau)=1.4020778897057774955179040745500506975747935056134) w_R = (2.0758439915434665249420878417536431498858141282849,0) w_I = (0,1.4805482682414149933073311106409602506642033146287) Elliptic log of P is (0.54656290832212043141980107294107651770280526691204,0.74027413412070749665366555532048012533210165731435) Reconstructed P = [0:2:1] OK! Elliptic log of P is (0.90382935626867113367176487892234560308427831107608,0.74027413412070749665366555532048012533210165731435) Reconstructed P = [1:0:1] OK! Elliptic log of P is (1.14719994671046572970364208782769493741074222861,0) Reconstructed P = [2:0:1] OK! Elliptic log of P is (1.0931258166442408628396021458821530354056105338245,0) Reconstructed P = [245:-32:125] OK! Elliptic log of P is (1.8076587125373422673435297578446912061685566221522,0) Reconstructed P = [14:51:1] OK! Elliptic log of P is (0.21855590187746493446519633390174672493567032893506,0) Reconstructed P = [21:-96:1] OK! Elliptic log of P is (1.4503922645907915650915659518634221207870835779881,0) Reconstructed P = [3:3:1] OK! Elliptic log of P is (1.832473401101671928910210632848293815559350210751,0.74027413412070749665366555532048012533210165731435) Reconstructed P = [-2:-4:1] OK! Elliptic log of P is (0.60063703838834529828384101488661841970793696169797,0.74027413412070749665366555532048012533210165731435) Reconstructed P = [2:13:8] OK! (m*[0:2:1])/m = [ [0:2:1] ] Checking... [0:2:1] OK (m*[0:2:1])/m = [ [0:2:1] ] Checking... [0:2:1] OK (m*[0:2:1])/m = [ [0:2:1] ] Checking... [0:2:1] OK ================================ Curve [1,1,0,-202,1025] Periods: [w_1,w_2] = [(0,0.6327790298514333023716801301216127523020758542864),(-2.0131613909534741204308876218764326959565176646351,-0.3163895149257166511858400650608063761510379271432)] tau = (-0.5,3.1814603455271474113187811974948516017119213527374) (abs(tau)=3.2205108182028695361142148803829701925869457353831) w_R = (4.0263227819069482408617752437528653919130353292703,0) w_IR = (2.0131613909534741204308876218764326959565176646351,0.3163895149257166511858400650608063761510379271432) The point Q is = [-8:51:1] Elliptic log of P is (2.1525156669616024162853317818644956119079357950702,0) Reconstructed P = [-8:51:1] The point P3 is = [8:-3:1] Elliptic log of P is (3.4017204102584996326696274231234087985780021513184,0) Reconstructed P = [8:-3:1] (m*[8:-3:1])/m = [ [8:-3:1] ] Checking... [8:-3:1] OK ================================ eclib-2013-01-01/tests/out/mattest2.out0000644000175200017520000000326712015437622014357 00000000000000 Matrix package test program. Enter size of a square matrix A: Enter entries of A: A = [[1,2], [3,4]] Using A.output(cout): [[1,2], [3,4]] Using A.output_pari(cout): [1,2;3,4] Using A.output_pretty(cout): [1 2] [3 4] Enter a filename for matrix binary output: Matrix dumped to file 1 Matrix reread from file 1 B = [[1,2], [3,4]] agree Enter any number Creating an array of 3 matrices A= [[1,2], [3,4]] 2A= [[2,4], [6,8]] 3A= [[3,6], [9,12]] row(A,1) = [1,2] row(A,2) = [3,4] A = [[1,2], [3,4]] col(A,1) = [1,3] col(A,2) = [2,4] A = [[1,2], [3,4]] directsum(A,A) = [[1,2,0,0], [3,4,0,0], [0,0,1,2], [0,0,3,4]] Enter any number B = A = [[1,2], [3,4]] Enter any number B==A?1 B!=A?0 after B+:=A, A = [[1,2], [3,4]] and B = [[2,4], [6,8]] Enter any number after B-:=A, A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number after B*:=2, A = [[1,2], [3,4]] and B = [[2,4], [6,8]] Enter any number after B/:=2, A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number A+B= [[2,4], [6,8]] Now A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number A-B= [[0,0], [0,0]] Now A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number A*B= [[7,10], [15,22]] Now A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number -A= [[-1,-2], [-3,-4]] Now A = [[1,2], [3,4]] -A= [[-1,-2], [-3,-4]] Now A = [[1,2], [3,4]] Enter any number char. poly. of A has coefficients [ -2 -5 1 ] det(A) = -2 Augmented matrix = [[1,2,1,0], [3,4,0,1]] Which echelon method? (0=standard,1=longlong,2=modular) Using method 0 Echelon matrix = [[2,0,-4,2], [0,2,3,-1]] pivotal columns: [1,2] nonpivotal columns: [3,4] Denom = 2 Rank = 2 Nullity = 0 A has inverse (1/2)* [[-4,2], [3,-1]] Check: A.A^(-1) = I ? True! eclib-2013-01-01/tests/out/tsat.out0000644000175200017520000000052111737577017013572 00000000000000verbose (0/1)? Input a curve: Curve [0,0,1,-7,36] enter number of points: enter point 1 : enter point 2 : enter point 3 : enter point 4 : 4 points entered. prime p to saturate at? Saturating at prime 11 Original generators: [ [1:-6:1] [-30:21:8] [-3:5:1] [-2:6:1] ] Finished p-saturation for p = 11, points were saturated eclib-2013-01-01/tests/out/homtest.out0000644000175200017520000000361311737577017014307 00000000000000Enter first and last levels: >>>Level 900 Sign = 1: Dimension = 186 Cuspidal dimension = 145 Sign = -1: Dimension = 175 Cuspidal dimension = 145 Sign = 0: Dimension = 361 Cuspidal dimension = 290 >>>Level 901 Sign = 1: Dimension = 82 Cuspidal dimension = 79 Sign = -1: Dimension = 79 Cuspidal dimension = 79 Sign = 0: Dimension = 161 Cuspidal dimension = 158 >>>Level 902 Sign = 1: Dimension = 130 Cuspidal dimension = 123 Sign = -1: Dimension = 123 Cuspidal dimension = 123 Sign = 0: Dimension = 253 Cuspidal dimension = 246 >>>Level 903 Sign = 1: Dimension = 120 Cuspidal dimension = 113 Sign = -1: Dimension = 113 Cuspidal dimension = 113 Sign = 0: Dimension = 233 Cuspidal dimension = 226 >>>Level 904 Sign = 1: Dimension = 118 Cuspidal dimension = 111 Sign = -1: Dimension = 111 Cuspidal dimension = 111 Sign = 0: Dimension = 229 Cuspidal dimension = 222 >>>Level 905 Sign = 1: Dimension = 92 Cuspidal dimension = 89 denoms (2,2) Sign = -1: Dimension = 89 Cuspidal dimension = 89 Sign = 0: Dimension = 181 Cuspidal dimension = 178 >>>Level 906 Sign = 1: Dimension = 156 Cuspidal dimension = 149 Sign = -1: Dimension = 149 Cuspidal dimension = 149 Sign = 0: Dimension = 305 Cuspidal dimension = 298 >>>Level 907 Sign = 1: Dimension = 76 Cuspidal dimension = 75 Sign = -1: Dimension = 75 Cuspidal dimension = 75 Sign = 0: Dimension = 151 Cuspidal dimension = 150 >>>Level 908 Sign = 1: Dimension = 117 Cuspidal dimension = 112 Sign = -1: Dimension = 112 Cuspidal dimension = 112 Sign = 0: Dimension = 229 Cuspidal dimension = 224 >>>Level 909 Sign = 1: Dimension = 104 Cuspidal dimension = 99 Sign = -1: Dimension = 101 Cuspidal dimension = 99 Sign = 0: Dimension = 205 Cuspidal dimension = 198 >>>Level 910 Sign = 1: Dimension = 176 Cuspidal dimension = 161 Sign = -1: Dimension = 161 Cuspidal dimension = 161 Sign = 0: Dimension = 337 Cuspidal dimension = 322 eclib-2013-01-01/tests/out/mvectest.out0000644000175200017520000000303511737577017014454 00000000000000Test run of vector package. Enter n : Uninitialized new vector v = [] Copy of v = [] Initialized new vector v = [0,0,0,0,0,0,0,0,0,0] Copy of v = [0,0,0,0,0,0,0,0,0,0] Enter new entries of v: Now v = [1,2,3,4,5,4,3,2,1,0] w = [0,0,0] After w=v, Now v = [1,2,3,4,5,4,3,2,1,0] Now w = [1,2,3,4,5,4,3,2,1,0] w==v: 1 w!=v: 0 Enter i : After w*=2, w = [2,4,6,8,10,8,6,4,2,0] 3*v = [3,6,9,12,15,12,9,6,3,0] Now v = [1,2,3,4,5,4,3,2,1,0] v+w = [3,6,9,12,15,12,9,6,3,0] Now v = [1,2,3,4,5,4,3,2,1,0] v-w = [-1,-2,-3,-4,-5,-4,-3,-2,-1,0] Now v = [1,2,3,4,5,4,3,2,1,0] v*w = 170 Now v = [1,2,3,4,5,4,3,2,1,0] w/2 = [1,2,3,4,5,4,3,2,1,0] Now w = [2,4,6,8,10,8,6,4,2,0] -v = [-1,-2,-3,-4,-5,-4,-3,-2,-1,0] +v = [1,2,3,4,5,4,3,2,1,0] +w = [2,4,6,8,10,8,6,4,2,0] v = [1,2,3,4,5,4,3,2,1,0]; w = [2,4,6,8,10,8,6,4,2,0] Elements of v: v[1] = 1 v[2] = 2 v[3] = 3 v[4] = 4 v[5] = 5 v[6] = 4 v[7] = 3 v[8] = 2 v[9] = 1 v[10] = 0 Member test: Enter a test number: 4 IS a member of v. Subscript test Enter length of subscript vector:Enter subscript vector:The sub-vector is [4,3,2] Change one entry of v. Index?New entry?New entry: v[10] = 10 Now v = [1,2,3,4,5,4,3,2,1,10] Initial slice; length? Slice = [1,2,3,4,5] Now v = [1,2,3,4,5,4,3,2,1,10] General slice; beginning, end? Slice = [4,3,2,1,10] Now v = [1,2,3,4,5,4,3,2,1,10] w = [2,4,6,8,10,8,6,4,2,0]; mvecgcd(w) = 2 After makeprimitive(w), w = [1,2,3,4,5,4,3,2,1,0] v shortened to a vector of longs: [1,2,3,4,5,4,3,2,1,10] u = [0,0,0,0,0,0,0,0,0,0] After swapvec(u,v): u = [1,2,3,4,5,4,3,2,1,10] v = [0,0,0,0,0,0,0,0,0,0] eclib-2013-01-01/tests/out/conductor.out0000644000175200017520000000414311737577017014623 00000000000000[0,-1,1,-10,-20]: N = 11 [1,0,1,4,-6]: N = 14 [1,1,1,-10,-10]: N = 15 [1,-1,1,-1,-14]: N = 17 [0,1,1,-9,-15]: N = 19 [0,1,0,4,4]: N = 20 [1,0,0,-4,-1]: N = 21 [0,-1,0,-4,4]: N = 24 [1,0,1,-5,-8]: N = 26 [1,-1,1,-3,3]: N = 26 [0,0,1,0,-7]: N = 27 [1,0,1,1,2]: N = 30 [0,0,0,4,0]: N = 32 [1,1,0,-11,0]: N = 33 [1,0,0,-3,1]: N = 34 [0,1,1,9,1]: N = 35 [0,0,0,0,1]: N = 36 [0,0,1,-1,0]: N = 37 [0,1,1,-23,-50]: N = 37 [1,0,1,9,90]: N = 38 [1,1,1,0,1]: N = 38 [1,1,0,-4,-5]: N = 39 [0,0,0,-7,-6]: N = 40 [1,1,1,-4,5]: N = 42 [0,1,1,0,0]: N = 43 [0,1,0,3,-1]: N = 44 [1,-1,0,0,-5]: N = 45 [1,-1,0,-10,-12]: N = 46 [0,1,0,-4,-4]: N = 48 [1,-1,0,-2,-1]: N = 49 [1,0,1,-1,-2]: N = 50 [1,1,1,-3,1]: N = 50 [0,1,1,1,-1]: N = 51 [0,0,0,1,-10]: N = 52 [1,-1,1,0,0]: N = 53 [1,-1,0,12,8]: N = 54 [1,-1,1,1,-1]: N = 54 [1,-1,0,-4,3]: N = 55 [0,-1,0,0,-4]: N = 56 [0,0,0,1,2]: N = 56 [0,-1,1,-2,2]: N = 57 [1,0,1,-7,5]: N = 57 [0,1,1,20,-32]: N = 57 [1,-1,0,-1,1]: N = 58 [1,1,1,5,9]: N = 58 [1,0,0,-2,1]: N = 61 [1,-1,1,-1,1]: N = 62 [1,-1,0,9,0]: N = 63 [0,0,0,-4,0]: N = 64 [1,0,0,-1,0]: N = 65 [1,0,1,-6,4]: N = 66 [1,1,1,-2,-1]: N = 66 [1,0,0,-45,81]: N = 66 [0,1,1,-12,-21]: N = 67 [1,0,1,-1,-1]: N = 69 [1,-1,1,2,-3]: N = 70 [0,0,0,6,-7]: N = 72 [1,-1,0,4,-3]: N = 73 [0,-1,1,-8,-7]: N = 75 [1,0,1,-1,23]: N = 75 [0,1,1,2,4]: N = 75 [0,-1,0,-21,-31]: N = 76 [0,0,1,2,0]: N = 77 [1,1,0,4,11]: N = 77 [0,1,1,-49,600]: N = 77 [1,1,0,-19,685]: N = 78 [1,1,1,-2,0]: N = 79 [0,0,0,-7,6]: N = 80 [0,-1,0,4,-4]: N = 80 [1,0,1,-2,0]: N = 82 [1,1,1,1,0]: N = 83 [0,-1,0,-1,-2]: N = 84 [0,1,0,7,0]: N = 84 [1,1,0,-8,-13]: N = 85 [0,0,0,-4,4]: N = 88 [1,1,1,-1,0]: N = 89 [1,1,0,4,5]: N = 89 [1,-1,0,6,0]: N = 90 [1,-1,1,-8,11]: N = 90 [1,-1,1,13,-61]: N = 90 [0,0,1,1,0]: N = 91 [0,1,1,-7,5]: N = 91 [0,1,0,2,1]: N = 92 [0,0,0,-1,1]: N = 92 [1,-1,1,0,-1]: N = 94 [0,1,0,-2,0]: N = 96 [0,-1,0,-2,0]: N = 96 [1,1,0,-25,-111]: N = 98 [1,-1,1,-2,0]: N = 99 [1,-1,0,-15,8]: N = 99 [1,-1,1,-59,186]: N = 99 [0,0,1,-3,-5]: N = 99 [0,-1,0,-33,62]: N = 100 [0,0,0,-16/9,0]: N = 288 eclib-2013-01-01/tests/out/modtest.out0000644000175200017520000000106311737577017014300 00000000000000Display symbol details (0/1)? Enter first and last levels: >>>Level 900 (2160 symbols) symbols check OK! >>>Level 901 (972 symbols) symbols check OK! >>>Level 902 (1512 symbols) symbols check OK! >>>Level 903 (1408 symbols) symbols check OK! >>>Level 904 (1368 symbols) symbols check OK! >>>Level 905 (1092 symbols) symbols check OK! >>>Level 906 (1824 symbols) symbols check OK! >>>Level 907 (908 symbols) symbols check OK! >>>Level 908 (1368 symbols) symbols check OK! >>>Level 909 (1224 symbols) symbols check OK! >>>Level 910 (2016 symbols) symbols check OK! eclib-2013-01-01/tests/out/hecketest.out0000644000175200017520000002377511737577017014616 00000000000000Program hecketest. Using METHOD = 2 to find newforms MODULUS for linear algebra = 1073741789 See the hecke matrices (0/1)? Plus space (0/1)? Enter level: >>>Level 90 Dimension = 22 denominator = 1 Computing conjmat... done. Computing +1 eigenspace... done, dimension = 22 Computing -1 eigenspace... done, dimension = 0 Compute W-eigenspaces? Computing W(2)... done, sparsity = 0.0785124. Computed matrix = [[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0], [0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,1,0,-1,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0], [0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0], [0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,-1,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,-1], [0,0,0,0,0,0,1,-1,0,-1,1,0,0,0,0,0,0,0,0,1,0,-1], [0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0], [-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0]] Using sparse matrix code... Dimension of 1-eigenspace=11 Using sparse matrix code... Dimension of -1-eigenspace=11 Computing W(3)... done, sparsity = 0.179752. Computed matrix = [[0,0,-1,1,-1,0,0,0,0,0,0,0,0,0,0,1,-1,1,0,0,0,0], [0,0,-1,1,-1,0,0,0,0,0,0,0,1,0,0,0,-1,1,0,0,0,0], [0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,1,-1,0,0,0,-1,1,0,0,0,0,1,0,1,0,-1], [0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,1,0,0,-1,0,0,0,0,1,-1,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,1,0,-1,1,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,1,0,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,1,0,0,1,-1,0,0,0,1,0,0,0,0], [0,0,0,0,0,0,0,-1,0,1,0,0,0,-1,1,0,0,1,0,0,0,0], [1,-1,0,0,0,0,0,-1,0,1,0,0,0,0,0,0,0,1,0,0,0,0], [0,-1,1,1,0,0,0,-1,0,1,0,0,0,0,0,0,0,1,0,0,0,0], [0,0,0,0,1,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,1,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0,1,0], [0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,1,0,0], [0,0,0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0]] Using sparse matrix code... Dimension of 1-eigenspace=12 Using sparse matrix code... Dimension of -1-eigenspace=10 Computing W(5)... done, sparsity = 0.181818. Computed matrix = [[0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,1,0,0], [0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,1,0,0,0,1,0,0], [0,0,0,0,0,0,0,0,0,1,0,-1,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,1,0,0], [0,0,0,0,0,0,0,0,0,-1,1,0,0,0,-1,1,0,0,0,1,0,0], [0,0,-1,1,-1,0,-1,1,0,0,0,0,0,0,0,1,-1,0,0,0,0,1], [0,0,0,0,0,0,-1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1], [0,0,0,0,0,1,-1,0,0,0,1,-1,0,0,-1,1,0,0,0,0,0,1], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,1], [0,0,0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,1], [0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,1], [1,0,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1], [0,1,-1,-1,0,0,0,0,0,0,0,0,0,-1,0,1,0,0,0,0,0,1], [0,1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,1], [0,1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1], [0,1,-1,-1,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,1], [0,0,0,0,0,0,0,0,0,0,1,-1,0,0,-1,1,0,0,0,0,1,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0], [0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0], [0,0,-1,1,-1,0,0,0,0,0,0,0,0,0,0,1,-1,1,0,0,0,0], [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0]] Using sparse matrix code... Dimension of 1-eigenspace=10 Using sparse matrix code... Dimension of -1-eigenspace=12 How many T_p? Computing T_p for p = 7...Computed matrix = [[8,-4,-2,0,0,0,2,0,0,-2,2,0,0,4,-2,0,0,0,0,2,0,-2], [0,1,0,1,1,1,-1,2,0,2,-1,0,0,1,1,0,0,0,0,0,0,0], [0,0,-2,0,0,-1,1,0,0,-2,0,1,0,1,0,0,0,0,0,1,0,-1], [0,0,2,4,-1,0,2,0,0,2,-1,0,0,0,1,0,1,0,0,-1,0,1], [0,2,1,-1,2,1,-1,1,0,4,-2,1,0,-1,2,0,0,0,0,-2,0,2], [0,1,0,1,1,1,-1,2,0,2,-1,0,0,1,1,0,0,0,0,0,0,0], [0,0,2,3,1,0,2,0,0,0,0,1,0,-1,0,0,2,0,0,-1,0,1], [0,3,0,-2,3,1,-1,0,0,2,-2,3,0,-2,2,0,1,0,0,-2,0,2], [0,1,1,0,2,1,-1,-1,8,-2,0,0,0,-1,0,0,1,0,0,0,0,0], [0,1,1,0,3,2,-2,1,0,0,1,1,0,0,-1,0,2,0,0,0,0,0], [0,1,1,0,2,2,0,-1,0,-2,6,-1,0,-2,2,0,1,0,0,1,0,-1], [0,0,2,1,2,2,-2,2,0,2,1,-1,0,1,-1,0,1,0,0,0,0,0], [0,0,2,1,4,1,-1,0,0,0,1,-2,8,-4,-1,0,1,0,0,1,0,-1], [0,1,3,0,3,3,-3,1,0,2,1,0,0,-1,-1,0,2,0,0,-1,0,1], [0,1,2,1,2,3,-1,0,0,-2,6,-2,0,-3,2,0,1,0,0,1,0,-1], [0,0,1,3,0,3,-1,1,0,0,4,-3,0,-1,-4,8,-2,0,0,0,0,0], [0,-1,4,4,0,1,1,0,0,2,1,-1,0,0,-1,0,2,0,0,-1,0,1], [0,1,-2,0,-1,0,0,-4,0,4,-2,2,0,-1,2,0,-1,8,0,-1,0,1], [0,1,0,0,-2,1,-1,0,0,2,-1,1,0,-2,1,0,0,0,8,-1,0,1], [0,2,-2,-2,0,1,-3,2,0,0,0,-1,0,1,0,0,0,0,0,3,0,5], [0,0,0,0,0,-4,2,2,0,2,0,-2,0,2,0,0,-2,0,0,0,8,0], [0,0,-1,1,-1,-1,1,1,0,-2,1,-1,0,1,-1,0,1,0,0,3,0,5]] done, sparsity = 0.514463. Computing T_p for p = 11...Computed matrix = [[12,-6,0,-4,4,0,4,-2,0,-2,4,0,0,4,-4,0,2,0,0,2,0,-2], [0,1,4,-3,7,1,-1,0,0,4,-1,0,0,-1,1,0,4,0,0,0,0,0], [0,1,-1,-1,1,0,0,-1,0,2,0,-2,0,-1,0,0,1,0,0,0,0,0], [0,-2,5,4,2,-1,5,-1,0,0,1,2,0,0,-1,0,3,0,0,0,0,0], [0,3,1,0,3,0,0,3,0,2,-3,3,0,-2,3,0,0,0,0,0,0,0], [0,1,0,1,3,1,-5,4,0,4,-1,4,0,-1,1,0,0,0,0,-4,0,4], [0,0,2,7,0,-1,1,2,0,2,-3,2,0,-2,3,0,1,0,0,-3,0,3], [0,3,-1,0,3,3,-3,3,0,4,-3,0,0,-1,3,0,0,0,0,-3,0,3], [0,1,1,2,1,2,-2,-1,12,-2,-1,-1,0,0,1,0,0,0,0,0,0,0], [0,0,3,3,2,3,-3,1,0,2,0,1,0,3,0,0,0,0,0,0,0,0], [0,1,1,4,-1,5,-1,-1,0,-2,7,-4,0,-1,5,0,0,0,0,3,0,-3], [0,0,1,3,2,4,-4,1,0,4,0,0,0,2,0,0,0,0,0,-1,0,1], [0,1,0,2,3,2,-2,0,0,2,0,-4,12,-5,0,0,1,0,0,1,0,-1], [0,3,0,0,1,3,-3,2,0,4,0,-1,0,0,0,0,3,0,0,0,0,0], [0,4,-2,0,0,3,1,0,0,-2,8,-3,0,-3,4,0,0,0,0,1,0,-1], [0,3,-3,4,-3,4,0,1,0,0,5,-5,0,0,-5,12,-4,0,0,0,0,0], [0,1,2,6,-3,2,2,0,0,0,2,-2,0,3,-2,0,3,0,0,-1,0,1], [0,2,-4,1,-2,1,-1,-4,0,6,-3,0,0,-2,3,0,-1,12,0,-1,0,1], [0,2,-1,1,-4,1,-1,1,0,2,-2,1,0,-3,2,0,0,0,12,0,0,0], [0,1,-1,-3,3,0,-4,1,0,0,2,0,0,3,-2,0,-1,0,0,4,0,8], [0,0,0,-2,2,-6,2,2,0,2,2,0,0,2,-2,0,-2,0,0,-2,12,2], [0,1,-2,2,-3,-1,1,2,0,-2,0,-1,0,0,0,0,1,0,0,4,0,8]] done, sparsity = 0.528926. Computing T_p for p = 13...Computed matrix = [[14,-8,0,-2,2,2,2,-2,0,-2,6,0,0,6,-6,0,2,0,0,2,0,-2], [0,1,2,-1,5,3,-3,2,0,4,-1,2,0,-1,1,0,2,0,0,-2,0,2], [0,0,0,0,0,1,-1,0,0,2,0,-1,0,-1,0,0,0,0,0,-1,0,1], [0,-1,4,5,1,0,4,0,0,0,1,1,0,0,-1,0,4,0,0,-1,0,1], [0,2,1,1,2,3,-3,3,0,2,0,1,0,1,0,0,2,0,0,0,0,0], [0,3,2,-1,5,1,-3,2,0,4,-1,2,0,-1,1,0,2,0,0,-2,0,2], [0,-1,4,8,-1,0,2,0,0,2,0,0,0,1,0,0,3,0,0,-1,0,1], [0,1,2,2,3,3,-3,2,0,4,0,-1,0,2,0,0,1,0,0,0,0,0], [0,2,1,1,2,1,-1,-1,14,-2,-2,-1,0,-1,2,0,0,0,0,0,0,0], [0,3,1,0,3,2,-2,3,0,4,-3,1,0,0,3,0,0,0,0,-2,0,2], [0,3,0,2,1,3,1,0,0,-2,6,-3,0,-4,8,0,-1,0,0,2,0,-2], [0,4,0,-1,4,2,-2,2,0,4,-3,1,0,-1,3,0,1,0,0,-2,0,2], [0,2,0,1,6,-1,1,0,0,2,-3,-2,14,-8,3,0,-1,0,0,1,0,-1], [0,3,-1,0,3,1,-1,3,0,4,-3,2,0,-1,3,0,0,0,0,-1,0,1], [0,3,-1,1,1,2,2,-1,0,-2,8,-2,0,-3,6,0,-1,0,0,2,0,-2], [0,2,-3,5,-2,3,1,1,0,0,4,-3,0,-1,-4,14,-6,0,0,0,0,0], [0,0,2,7,0,-1,5,0,0,0,-1,2,0,0,1,0,1,0,0,-1,0,1], [0,-1,-2,4,-3,2,-2,-6,0,6,0,0,0,1,0,0,-1,14,0,1,0,-1], [0,1,-1,2,-5,2,-2,1,0,2,-1,1,0,-2,1,0,0,0,14,0,0,0], [0,4,-4,-6,2,1,-5,4,0,0,0,-1,0,1,0,0,0,0,0,3,0,11], [0,2,0,-4,4,-8,4,2,0,2,0,0,0,0,0,0,-2,0,0,-2,14,2], [0,1,-1,2,-3,-1,1,1,0,-2,1,-2,0,1,-1,0,2,0,0,5,0,9]] done, sparsity = 0.566116. Computing T_p for p = 17...Computed matrix = [[18,-10,-2,2,-2,2,2,0,0,-2,6,-2,0,10,-6,0,0,0,0,4,0,-4], [0,3,-1,3,1,3,-3,5,0,4,-2,1,0,2,2,0,-1,0,0,-1,0,1], [0,-2,2,2,-2,0,0,2,0,2,0,-2,0,2,0,0,-2,0,0,0,0,0], [0,0,3,10,-1,1,3,1,0,0,0,0,0,0,0,0,4,0,0,-1,0,1], [0,2,2,0,6,5,-5,2,0,2,2,1,0,1,-2,0,4,0,0,-1,0,1], [0,3,1,1,3,3,-1,3,0,4,-2,-1,0,2,2,0,1,0,0,1,0,-1], [0,-1,6,7,0,1,5,-2,0,2,2,0,0,1,-2,0,5,0,0,-1,0,1], [0,2,6,0,6,5,-5,2,0,4,2,1,0,-1,-2,0,4,0,0,-1,0,1], [0,3,2,-1,4,1,-1,-2,18,-2,-2,0,0,-3,2,0,1,0,0,-1,0,1], [0,5,1,-3,5,2,-2,3,0,8,-4,2,0,-3,4,0,1,0,0,-4,0,4], [0,4,1,-2,5,2,2,-1,0,-2,10,-1,0,-7,8,0,0,0,0,0,0,0], [0,5,-1,-3,5,0,0,3,0,4,-4,4,0,-1,4,0,1,0,0,-2,0,2], [0,3,1,-1,9,-2,2,-1,0,2,-4,0,18,-11,4,0,-1,0,0,0,0,0], [0,5,1,-3,7,2,-2,1,0,4,-4,6,0,-3,4,0,1,0,0,-4,0,4], [0,4,1,0,3,3,1,-3,0,-2,8,0,0,-6,10,0,0,0,0,1,0,-1], [0,2,-2,4,0,3,1,0,0,0,4,-1,0,-3,-4,18,-6,0,0,-1,0,1], [0,0,3,6,3,-2,6,-1,0,0,-2,5,0,-3,2,0,4,0,0,-2,0,2], [0,-2,0,4,-2,3,-3,-8,0,6,2,1,0,1,-2,0,0,18,0,1,0,-1], [0,1,0,1,-4,3,-3,0,0,2,0,2,0,-3,0,0,1,0,18,-1,0,1], [0,6,-6,-6,0,2,-6,6,0,0,-2,-2,0,0,2,0,0,0,0,6,0,12], [0,2,-2,-2,2,-10,6,4,0,2,-2,-2,0,2,2,0,-4,0,0,0,18,0], [0,0,-1,2,-3,-2,2,1,0,-2,2,-3,0,3,-2,0,2,0,0,6,0,12]] done, sparsity = 0.597107. Computing T_p for p = 19...Computed matrix = [[20,-10,-2,-2,2,0,4,-2,0,-4,8,0,0,10,-8,0,2,0,0,4,0,-4], [0,5,1,-1,5,1,-1,3,0,4,0,1,0,2,0,0,1,0,0,-1,0,1], [0,0,0,0,0,-2,2,0,0,-4,0,2,0,2,0,0,0,0,0,2,0,-2], [0,-1,5,9,1,-1,5,-1,0,4,0,1,0,0,0,0,3,0,0,-3,0,3], [0,3,3,1,5,4,-4,1,0,8,-2,0,0,1,2,0,1,0,0,-2,0,2], [0,1,1,-1,5,5,-1,3,0,4,0,1,0,2,0,0,1,0,0,-1,0,1], [0,-1,5,9,-1,2,6,-1,0,0,2,0,0,1,-2,0,5,0,0,0,0,0], [0,5,1,-1,3,4,-4,3,0,4,-2,4,0,-1,2,0,3,0,0,-2,0,2], [0,3,1,1,3,2,-2,-1,20,-4,-2,0,0,-3,2,0,1,0,0,0,0,0], [0,4,0,0,6,3,-3,4,0,4,-2,3,0,-3,2,0,2,0,0,-1,0,1], [0,5,-1,3,1,4,0,1,0,-4,10,-2,0,-7,10,0,-1,0,0,2,0,-2], [0,2,2,2,4,3,-3,6,0,4,-2,3,0,-1,2,0,0,0,0,-1,0,1], [0,2,2,2,8,1,-1,2,0,0,-2,-3,20,-11,2,0,0,0,0,1,0,-1], [0,4,4,0,6,5,-5,4,0,4,-2,1,0,-1,2,0,2,0,0,-3,0,3], [0,2,4,2,4,6,-2,0,0,-4,12,-4,0,-6,8,0,2,0,0,2,0,-2], [0,1,1,7,-1,6,-2,3,0,0,6,-6,0,-3,-6,20,-5,0,0,0,0,0], [0,0,6,8,0,1,3,2,0,4,-2,-1,0,-3,2,0,6,0,0,-3,0,3], [0,1,-3,3,-5,2,-2,-9,0,8,-2,2,0,1,2,0,-1,20,0,0,0,0], [0,2,0,2,-6,3,-3,0,0,4,-2,1,0,-3,2,0,0,0,20,-1,0,1], [0,4,-4,-8,4,0,-4,4,0,0,0,0,0,0,0,0,0,0,0,8,0,12], [0,0,0,-4,4,-10,6,4,0,4,0,-2,0,2,0,0,-4,0,0,-2,20,2], [0,0,-2,4,-4,-1,1,2,0,-4,2,-3,0,3,-2,0,2,0,0,7,0,13]] done, sparsity = 0.582645. Enter level: eclib-2013-01-01/tests/out/mattest1.out0000644000175200017520000000326712015437677014370 00000000000000 Matrix package test program. Enter size of a square matrix A: Enter entries of A: A = [[1,2], [3,4]] Using A.output(cout): [[1,2], [3,4]] Using A.output_pari(cout): [1,2;3,4] Using A.output_pretty(cout): [1 2] [3 4] Enter a filename for matrix binary output: Matrix dumped to file 1 Matrix reread from file 1 B = [[1,2], [3,4]] agree Enter any number Creating an array of 3 matrices A= [[1,2], [3,4]] 2A= [[2,4], [6,8]] 3A= [[3,6], [9,12]] row(A,1) = [1,2] row(A,2) = [3,4] A = [[1,2], [3,4]] col(A,1) = [1,3] col(A,2) = [2,4] A = [[1,2], [3,4]] directsum(A,A) = [[1,2,0,0], [3,4,0,0], [0,0,1,2], [0,0,3,4]] Enter any number B = A = [[1,2], [3,4]] Enter any number B==A?1 B!=A?0 after B+:=A, A = [[1,2], [3,4]] and B = [[2,4], [6,8]] Enter any number after B-:=A, A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number after B*:=2, A = [[1,2], [3,4]] and B = [[2,4], [6,8]] Enter any number after B/:=2, A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number A+B= [[2,4], [6,8]] Now A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number A-B= [[0,0], [0,0]] Now A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number A*B= [[7,10], [15,22]] Now A = [[1,2], [3,4]] and B = [[1,2], [3,4]] Enter any number -A= [[-1,-2], [-3,-4]] Now A = [[1,2], [3,4]] -A= [[-1,-2], [-3,-4]] Now A = [[1,2], [3,4]] Enter any number char. poly. of A has coefficients [ -2 -5 1 ] det(A) = -2 Augmented matrix = [[1,2,1,0], [3,4,0,1]] Which echelon method? (0=standard,1=longlong,2=modular) Using method 0 Echelon matrix = [[2,0,-4,2], [0,2,3,-1]] pivotal columns: [1,2] nonpivotal columns: [3,4] Denom = 2 Rank = 2 Nullity = 0 A has inverse (1/2)* [[-4,2], [3,-1]] Check: A.A^(-1) = I ? True! eclib-2013-01-01/tests/out/tequiv.out0000644000175200017520000000241111737577017014134 00000000000000Verbose? How many quartics to check? Enter quartic coefficients a,b,c,d,e ? 1: (1,0,-80,324,-244) new Enter quartic coefficients a,b,c,d,e ? 2: (1,0,-68,236,-96) Checking equivalence of (1,0,-68,236,-96) and (1,0,-80,324,-244) u-poly = [1,0, -306176, -39149568, 8727953408] No integral roots new Enter quartic coefficients a,b,c,d,e ? 3: (1,1,-35,11,190) Checking equivalence of (1,1,-35,11,190) and (1,0,-80,324,-244) u-poly = [1,0, -194816, -4748544, 7849278464] No integral roots Checking equivalence of (1,1,-35,11,190) and (1,0,-68,236,-96) u-poly = [1,0, -176704, -3458816, 6658838528] Root u = -272 equivalent to #2 Enter quartic coefficients a,b,c,d,e ? 4: (1,0,-26,12,233) Checking equivalence of (1,0,-26,12,233) and (1,0,-80,324,-244) equiv failed on first test! First has I=3472, J=-404912, disc=3463112448, type=1 Second has I=3472, J=-404912, disc=3463112448, type=2 Checking equivalence of (1,0,-26,12,233) and (1,0,-68,236,-96) equiv failed on first test! First has I=3472, J=-404912, disc=3463112448, type=1 Second has I=3472, J=-404912, disc=3463112448, type=2 Checking equivalence of (1,0,-26,12,233) and (1,1,-35,11,190) equiv failed on first test! First has I=3472, J=-404912, disc=3463112448, type=1 Second has I=3472, J=-404912, disc=3463112448, type=2 new eclib-2013-01-01/tests/tegr.cc0000644000175200017520000000434011774563612012527 00000000000000// tegr.cc -- test for finding egr subgroup from a set of points ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include #include #include #include #include #include #include #include #include int main() { // set_precision("Enter number of decimal places"); initprimes("PRIMES",0); int j, npts; long N, nclass, ncurve; Curve E; while(1) { cin >> N; if(N==0) exit(0); cin >> nclass >> ncurve; cin >> E; Curvedata C(E); cout< #include int main(void) { cout << "Test run of sparse vector package.\n\n"; int i,j,n,a; cout << "Enter n : "; cin >> n; svec v; cout << "Uninitialized new vec v = " << v << endl; svec v2(v); cout << "Copy of v = " << v2 << endl; cout << "Enter new entries of v: "; cout << "Dimension = "; cin>>n; v=svec(n); cout << "Number of entries = "; cin>>n; for(i=1; i<=n; i++) { cout<<"Position: "; cin>>j; cout<<"Entry: "; cin>>a; v.set(j,a); } cout << "Now v = " << v << endl; svec w(3); cout << "w = " << w << endl; w = v; cout << "After w=v, " << endl; cout << "Now v = " << v << endl; cout << "Now w = " << w << endl; cout << "w==v: " << (w==v) << endl; cout << "w!=v: " << (w!=v) << endl; cout << "v+w = " << v+w << endl; cout << "v-w = " << v-w << endl; cout << "Enter i : "; cin >> i; w*=2; cout << "After w*=2, w = " << w << endl; cout << "3*v = " << (3*v) << endl; cout << "Now v = " << v << endl; cout << "v+w = " << v+w << endl; cout << "Now v = " << v << endl; cout << "v-w = " << v-w << endl; cout << "Now v = " << v << endl; cout << "w/2 = " << w/2 << endl; cout << "Now w = " << w << endl; cout << "-v = " << -v << endl; cout << "+v = " << +v << endl; cout << "+w = " << +w << endl; cout << "2*v-w = " << (2*v-w) << endl; cout << "Resetting w[1] to 99: "; w.set(1,99); cout << "w = " << w << endl; w -= 2*v; cout << "After w-=2*v, w = " << w << endl; vec vv = v.as_vec(); cout << "v as an ordinary vector = "<> i; cout << i; if (member(i,v)) cout << " IS "; else cout << " IS NOT "; cout << "a member of v." << endl; cout << "Subscript test\n"; cout << "Enter length of subscript vec:"; int m; cin >> m; vec index=vec(m); cout << "Enter subscript vector:"; cin >> index; vec vv = v[index]; cout << "The sub-vector is " << vv << endl; cout << "Change one entry of v. Index?"; cin >> i; cout << "New entry?"; scalar x; cin >> x; v[i]=x; cout << "New entry: v[" << i << "] = " << v[i] << endl; cout << "Now v = " << v << endl; cout << "Initial slice; length? "; cin >> j; cout << "Slice = " << v.slice(j) << endl; cout << "Now v = " << v << endl; cout << "General slice; beginning, end? "; cin >> j >> k; cout << "Slice = " << v.slice(j,k) << endl; cout << "Now v = " << v << endl; cout << "w = " << w << "; vecgcd(w) = " << vecgcd(w) << endl; makeprimitive(w); cout << "After makeprimitive(w), w = " << w << endl; vec u(n); cout << "u = "<< u << endl; swapvec(u,v); cout << "After swapvec(u,v):\nu = " << u << "\nv = " << v << endl; #endif } eclib-2013-01-01/tests/theight.cc0000644000175200017520000001321011774563612013216 00000000000000// THEIGHT.CC -- test of height procedures ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// // #include int main(){ set_precision(100); initprimes("PRIMES",1); Curve E; while (cout<<"Input a curve: ", cin>>E, !E.isnull()) { Curvedata C(E, 0); cout<<"Curve "<< C < badp = getbad_primes(C); Point P(C); while ( cout<<"Input a point on curve, [0] to finish:\n", cin >> P, !(!cin)&& P.isvalid() ) { cout << "Point " << P; int ord = order(P); if(ord>0)cout<< " has order " << ord; else cout<< " has infinite order"; cout << endl; cout << "Local heights:\n"; bigfloat gh = to_bigfloat(0); bigint d = gcd(getZ(P),getX(P)); vector pdivsz=pdivs(d); vector::iterator qvar = pdivsz.begin(); while(qvar!=pdivsz.end()) { bigint q = *qvar++; cout << q << ":\t\t" << flush; bigfloat ph = pheight(P,q); gh+=ph; cout << ph << endl; } cout << "Sum so far =\t" << gh << endl; bigfloat lxd = 2*log(I2bigfloat(d)); cout << "log(den(x(P))) = " << lxd << endl; vector::iterator pvar = badp.begin(); while(pvar!=badp.end()) { bigint pr = *pvar++; if(div(pr,d)) continue; cout << pr << ":\t\t" << flush; bigfloat ph = pheight(P,pr); gh+=ph; cout << ph << endl; } cout << "Sum so far =\t" << gh << endl; bigfloat rh = realheight(P); cout << "R:\t\t" << rh << endl; gh += rh; cout << "\nSum of local heights: " << gh << endl; // // N.B. The call to height() calls realheight() and pheight() again, // since as height() was not called earlier, P's height field was // not set. // cout<<"global height of "< pointlist(3); pointlist[0] = P0; pointlist[1] = P1; pointlist[2] = P2; //cout << "Making a PointArray out of P0, P1, P2. It is " << pointlist << endl; //cout << "Calling regulator" << endl; bigfloat reg = regulator(pointlist); //cout << "Back from calling regulator" << endl; cout << "The regulator of P0, P1, P2 is " << reg << endl; return 0; } // end main() eclib-2013-01-01/tests/bigrattest.cc0000644000175200017520000000370011774563612013735 00000000000000// bigrattest.cc: test of bigrational number package ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include int main(void) { cout << "Test run of bigrational number procs.\n\n"; bigint n = BIGINT(4), d = BIGINT(6), g; g = gcd(n,d); cout << "gcd(" << n << "," << d << ") = " << g << "\n"; bigrational q = bigrational(n,d); cout << "q = " << q << " has denominator " << den(q) << \ " and numerator " << num(q) << "\n"; cout << "Enter a rational (either n or n/d): "; cin>>q; cout << "q = " << q << " has denominator " << den(q) << \ " and numerator " << num(q) << "\n"; cout<<"floor(q) = "<>q1>>q2>>q3; cout << "q1 = " << q1 << "\t"; cout << "q2 = " << q2 << "\t"; cout << "q3 = " << q3 << "\n"; cout << "Enter three rationals in the format [q1:q2:q3]: "; char c; cin>>c>>q1>>c>>q2>>c>>q3>>c; cout << "[q1:q2:q3] = [" << q1 << ":"; cout << q2 << ":"; cout << q3 << "]\n"; } eclib-2013-01-01/tests/thilbert.cc0000644000175200017520000000506211774563612013405 00000000000000// thilbert.cc: test of Hilbert symbol functions ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include #include #include //#define AUTO int main() { bigint a,b,p,x0,y0,z0; int resp, res, checkres; bigint zero, one; zero=0; one=1; #ifdef AUTO long la,lb,abmax; cout<<"Enter max for a,b: "; cin>>abmax; for(la=-abmax; la<=abmax; la++) for(lb=-abmax; lb<=abmax; lb++) { a=la; b=lb; if(a*b==0) continue; #else while(1) { cout<<"Enter nonzero a and b: "; cin>>a>>b; if(a*b==zero) break; #endif res=checkres=0; cout<<"("< plist = vector_union(pdivs(a),pdivs(b)); for (vector::iterator pr = plist.begin(); pr!=plist.end(); pr++) { p=*pr; if(p==2) continue; resp=local_hilbert(a,b,p); cout << p << "\t" << resp << endl; res = res|resp; checkres = checkres^resp; } cout<<"\nGlobal symbol = " << res << endl; cout<<"Check (should be 0) = " << checkres << endl; int gres = global_hilbert(a,b,plist,p); if(res==gres) cout<<"--agrees with single call to global_hilbert()\n"; else cout<<"--DISAGREES with single call to global_hilbert()\n"; quadratic q(a,zero,b); int oldres = !solve_conic(q,one,x0,y0,z0,4); if(oldres==res) { cout<<"--agrees with solve_conic()\n"; } else cout<<"--DISAGREES with solve_conic()\n"; } cout< #include int main() { long n, p; cout<<"Initialized table of " << nprimes() << " primes, up to "<> n; p=prime_number(n); cout << "prime_number("<)? "; cin >> n; vector plist=primes(n); cout << plist << endl; cout<<"Enter a number to see if it is that list: "; cin>>p; vector::iterator pi=find(plist.begin(),plist.end(),p); if(pi==plist.end()) cout<<"NOT in the list"< v(10); iota(v.begin(),v.end(),1); cout<<"iota(10): "<> n; for(primevar pr(n); pr.ok(); pr++) cout << "Prime number " << pr.index() << " = " << pr << endl; long m; while (cout << "\nEnter an integer m (0 to stop): ", cin >> m, m!=0) { cout << "Smallest prime factor of " << m << " is " << primdiv(m) << endl; plist=pdivs(m); cout << "m has " << plist.size() << " prime divisors: " << plist << endl; cout << "with exponents: "; for(vector::const_iterator pr = plist.begin(); pr!=plist.end(); pr++) cout << *pr <<":"< dlist=alldivs(m,plist); cout << "m has " << dlist.size() << " divisors: " << dlist << endl; dlist = posdivs(m,plist); cout << "m has " << dlist.size() << " positive divisors: " << dlist << endl; dlist = sqdivs(m,plist); cout << "m has " << dlist.size() << " positive divisors whose square divides m: " << dlist << endl; dlist = sqfreedivs(m,plist); cout << "m has " << dlist.size() << " positive square-free divisors: " << dlist << endl; } long a,b; int cont=1; while(cont) { cout<<"Enter integers a b (0 0 to stop): "; cin>>a>>b; long g=gcd(a,b); if(g==0) cont=0; else { cout<<"gcd = "<> P; cout << "P="< #include #include int main(){ set_precision("Enter number of decimal places"); initprimes("PRIMES",0); int verb=1; bigint v; vector ai(5); while (getcurve(ai,verb)) { cout << "Input curve = "; cout <<"["< #define MAXPRIME 1000000 int main() { initprimes("PRIMES",1); cout<<"long prime factors of 420:\n"; vector lplist = pdivs(420); cout< lqlist = posdivs(420, lplist); cout< a(3); a[0]=10; a[1]=20; a[2]=30; vector b = a; cout << "Elements of a are: " << a[0]<<"\t"< iplist = pdivs(num); cout< iqlist = posdivs(num, iplist); cout< of iplist (alldivs)\n"; vector irary(iplist); cout<<"stream output: "<::iterator vi; vi = find(irary.begin(),irary.end(),35); if(vi==irary.end()) cout<<"35 is not there\n"; else cout<<"35 is there: "<<*vi<<" is item number "<<(vi-irary.begin())<> aaa, aaa!=astop) { res = sign(aaa); cout << "a = " << aaa << ", sign(a) = " << res << "\n"; roota = sqrt(aaa); cout << "a = " << aaa << ", sqrt(a) = " << roota << " (rounded down)\n"; res = isqrt(aaa,roota); if(res) cout << "a is a square with exact square root " << roota << "\n"; else cout << "a is not a square\n"; } cout<<"\n\nTest of sqrt mod p\n"; bigint bb,p,r; while(cout << "Enter a prime p: ", cin>>p, cout<> m, sign(m)!=0) { cout << "m = " << m << endl; vector plist=pdivs(m); cout << "m has " << plist.size() << " prime divisors: " << plist << endl; cout << "with exponents: "; for(vector::const_iterator pr = plist.begin(); pr!=plist.end(); pr++) cout << *pr <<":"< dlist=alldivs(m,plist); cout << "m has " << dlist.size() << " divisors: " << dlist << endl; dlist = posdivs(m,plist); cout << "m has " << dlist.size() << " positive divisors: " << dlist << endl; dlist = sqdivs(m,plist); cout << "m has " << dlist.size() << " positive divisors whose square divides m: " << dlist << endl; dlist = sqfreedivs(m,plist); cout << "m has " << dlist.size() << " positive square-free divisors: " << dlist << endl; } cout< #include //#include //#include #include float ran0( long& idum ); float ran0( int& idum ); //#define SCALAR_OPTION 1 // ints #define SCALAR_OPTION 2 // longs #include long starttime,stoptime; void random_fill_in( smat& sm, int max, scalar seed ) { int *intpos = new int [sm.nco]; scalar *scalarval = new scalar [sm.nco]; for( int r = 0; r < sm.nro; r++ ) { int *lp = intpos; scalar *lv =scalarval; for( int i = 0; i < sm.nco; i++ ) { *lp++ = 0; *lv++ = 0; } int count = 0; int N = int( (max+1) * ran0( seed ) ); //number of entries in row i if( N == (max+1) ) N--; // could occur ! for( int s = 0; s < N; s++ ) { int v = int( 20 * ran0( seed ) ) - 10; // value between -10 & 9 if( v != 0 ) { int p = int( sm.nco * ran0( seed ) ); //position in matrix if( p == sm.nco ) p--; if( intpos[ p ] == 0 ) count++; intpos[ p ] = 1; scalarval[ p ] = v; } } delete[] sm.col[r]; delete[] sm.val[r]; int *ptr = sm.col[r] = new int [ count + 1 ]; scalar *vptr = sm.val[r] = new scalar [ count ]; *ptr++ = count; for( int l = 0; l < sm.nco; l++ ) { if( intpos[l] != 0 ) { *ptr++ = l+1; *vptr++ = scalarval[ l ]; } } } delete[] intpos; delete[] scalarval; } int main(void) { cout << "enter 0 to exit\n"; cout << "enter 1 to do all tests \n"; cout << "enter 2 to operations \n"; cout << "enter 3 to special speed test \n" << "enter> "< "< "< "< "<> t; while( t != 0 ) { if( t == 1 ) { int nr, nc; cout << "Test run of sparse matrix package.\n\n"; cout << "enter # of rows:\n"; cin >> nr; cout << "enter # of colums:\n"; cin >> nc; smat sm(nr,nc); cout << "Unitialized new smat sm = " << sm << endl; cout << "Enter any number "; cin >> i; //******** test of constructor from matrix *************** //mat a; int r; cout << "Enter size of a square matrix A: "; cin >> r; mat a(r,r); cout << "Enter entries of A: "; cin >> a; cout << "A = " << a; smat sm1(a); cout << "smat from matrix A = " << endl << sm1 << endl; cout << "Enter any number "; cin >> i; //******* test of copy constructor ******************* smat sm2 = sm1; cout << "Copy of smat = " << endl << sm2 << endl; cout << "Enter any number "; cin >> i; //******** test of assignment ************** smat sm3; sm3 = sm1; cout << "Copy using assignment= " << endl << sm3 << endl; cout << "Enter any number "; cin >> i; //********* testing function as_matrix ***** cout << "enter number of rows of smat for conversion " << endl; int numRow; cin >> numRow; cout << "Now enter number of columns" << endl; int numCol; cin >> numCol; smat T( numRow, numCol ); // cout << " Now enter smat for conversion" << endl; // cout << " for each row, enter first value then position for each of the entries" << endl; // cout << " for each row terminate input by typing zero as a value." << endl; // cin >> T; int max=10, seed = 10; random_fill_in( T, max, seed ); cout << endl << "smat = " << endl << T; cout << "smat as a matrix = "<< endl << T.as_mat( ) << endl; cout << "Enter any number "; cin >> i; //********* testing ref to (i,j) entry ********** cout << "Enter position: (row,col)"; int j,k; cin >> j; cin >> k; cout << "T(" << j <<" , " << k << ") = " << T.elem(j,k) <> i; cout << "number of non-zero elements ?" << endl; cin >> d; int n = d; int *pos = new int [d+1]; scalar *val = new scalar [d]; cout << "values ? " << endl; while( n-- ) cin >> *val++; cout << " positions ? " << endl; n = d; while( n-- ) cin >> *pos++; pos -= d; val -= d; T.set_row(i, d, pos, val); cout << " new matrix : " << endl; cout << T << endl; delete[] pos; delete[] val; } //*********testing operations *********** if( t == 1 || t == 2 ) { cout << "testing operations " << endl; int row,col; cout << "Enter size of smat A row,col: "<< endl; cin >> row >> col; smat A( row, col ); random_fill_in( A, 10, 10 ); // cout << "Enter entries of A: "<< endl; // cin >> A; cout << "Enter size of smat B: row,col: "<< endl; cin >> row >> col; smat B( row, col ); random_fill_in( B, 10, 10 ); // cout << "Enter entries of B: "<< endl; // cin >> B; cout << "matrix A" << endl << A << endl; cout << "matrix B" << endl << B << endl; cout << "Enter any number "; cin >> i; smat C = A; cout << "C = A = " << endl << C; cout << "Enter any number "; cin >> i; cout << "B==A?" << (B==A) << endl; cout << "B!=A?" << (B!=A) << endl; cout << "C==A?" << (C==A) << endl; cout << "C!=A?" << (C!=A) << endl; cout << "Enter any number "; cin >> i; B+=A; cout << "after B+=A, A = " << endl << A <> i; B-=A; cout << "after B-=A, A = " << A <> i; B*=2; cout << "after B*=2, B = " << B << endl; cout << "Enter any number "; cin >> i; B/=2; cout << "after B/=2, B = " << B << endl; cout << "Enter any number "; cin >> i; cout << "A+B=" << (A+B) << endl; cout << "Now A = " << A << "and B = " << B << endl; cout << "Enter any number "; cin >> i; cout << "A-B=" << (A-B) << endl; cout << "Now A = " << A << "and B = " << B; cout << "test addition of scalar to smat" << endl; B = A; scalar sc = 17; B += sc; cout<<"After adding 17 to A it is now:\n"<> row >> col; smat sm(row,col); random_fill_in( sm, 10, 10 ); // cin >> sm; cout << " now enter matrix: first row, col and then the entries"<> row >> col; mat m(row, col); cin >> m; mat sm_as_m = sm.as_mat(); cout << "the smat is (as a matrix) \n"<> row1 >> col1; smat sm1(row1,col1); cout << "now enter first smat;" << endl; cin >> sm1; cout << "enter dimension second smat;" << endl; cin >> row2 >> col2; smat sm2(row2, col2); cin >> sm2; cout << " the product is: " << endl; cout << sm1*sm2 << endl; } if ( t == 3 ) { int row,col; cout << "enter size of matrices for speed test (row,col) " << endl; cin >> row; cin >> col; mat m1( row,col); mat m2( row,col); mat m3(row,col); mat m(row,col); for( int r=1; r<=row; r++ ) { for( int c = 1; c<=5 && r+c < col; c++ ) { m1.set( r, r+c,1 ); m2.set( r, r+c-1, 2 ); m3.set( r, r+c+1, -1 ); } } smat sm1(m1); smat sm2 (m2); smat sm3 (m3); smat sm(row,col); cout << "want to see matrices ? "; int see; cin >> see; if( see ) { cout << "sm1 = " << sm1 << endl; cout << "sm2 = " << sm2 << endl; cout << "sm3 = " << sm3 << endl; } cout << "Loop how many times ?" << endl; int j, loop; cin >> loop; starttime = clock(); for(j = 0; j < loop; j++) { m += m1; m -= 2*m2; m += 3*m3; if(see>1) cout<1) cout<> nro; cin >> nc; smat sm(nro,nc); cout << "enter matrix as an smat" << endl; int max=10, seed = 10; random_fill_in( sm, max, seed ); // cin >> sm; cout << "display matrices? ( 0 = no; 1 = yes )" << endl; int flag, flag2; cin >> flag; cout << "display fill-in information?" << endl; cin >> flag2; if( flag ) cout << "matrix A is " << sm << endl; smat_elim A (sm ); if( flag2 ) { cout << "initial population: "; display_population(A); } A.step0(); cout << "after step0 " << endl; cout << "# of rows eliminated so far: " << A.get_rank( ) << endl; if( flag ) cout << " matrix: " << A << endl; if( flag2 ) display_population( A ); A.step1(); cout << "after step1" << endl; cout << "# of rows eliminated so far: " << A.get_rank( ) << endl; if( flag ) cout << " matrix: " << A << endl; if( flag2 ) display_population( A ); A.step2(); cout << "after step2" << endl; cout << "# of rows eliminated so far: " << A.get_rank( ) << endl; if( flag ) cout << " matrix: " << A << endl; if( flag2 ) display_population( A ); A.step3(); cout << "after step3" << endl; cout << "# of rows eliminated so far: " << A.get_rank( ) << endl; if( flag ) cout << " matrix: " << A << endl; if( flag2 ) display_population( A ); A.step4(); cout << "after step4" << endl; cout << "# of rows eliminated so far: " << A.get_rank( ) << endl; if( flag ) cout << " matrix: " << A << endl; if( flag2 ) display_population( A ); A.standard( ); cout << "after standard " << endl; cout << "rank of matrix: " << A.get_rank( ) << endl; if( flag ) cout << " matrix: " << A << endl; if( flag2 ) display_population( A ); } if( t == 5 ) { cout << "test of kernel function" << endl; cout << "enter size of matrix for elimination (row,col) "<< endl; int nro,nc; cin >> nro; cin >> nc; smat sm(nro,nc); int rand; cout << "Do you want to input the matrix for elimination or do you want\n"; cout << "a matrix with random entries? (1 for random and zero otherwise\n"; cin >> rand; int flag; cout << "want to determine the rank using matrix? (1 = yes; 0 = no )"; cin >> flag; if( rand ) { cout << "How many maximum number of non-zero entries per row?\n"; int max, seed; cin >> max; cout << "enter seed for random number generator\n"; cin >> seed; cout << "calculating matrix,\n"; random_fill_in( sm, max, seed ); cout << "done\n"; } else { cout << "enter matrix as an smat" << endl; cin >> sm; } smat_elim A( sm ); vec pc, npc; if( flag ) { long rk, ny; scalar pr = BIGPRIME; mat m = sm.as_mat (); mat ker_mat = echmodp( m, pc, npc, rk, ny, pr); cout << " rank using echmodp : " << rk; int pop = 0; int nro = nrows(ker_mat); int nco = ncols(ker_mat); for( int r = 1; r <= nro; r++ ) { for( int c = 1; c <= nco; c++ ) { pop += ( ker_mat( r, c ) != 0 ); } } cout << " number of non-zero entries: " << pop << endl; } /********A.step0 (); cout << "step0 : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in step0!!!"; A.step1 (); cout << "step1 : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in step1!!!"; A.step2(); cout << "step2 : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in step2!!!"; A.step3 (); cout << "step3 : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in step3!!!"; A.step4 (); cout << "step4 : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in step4!!!"; A.standard(); cout << "standard : A * ker_mat is : "; if( (A*ker_mat) == smat(nro)) cout << "0"; else cout << "problem in standard!!!";*****/ smat ker = A.kernel(pc,npc); cout << "rank is:" << dim( pc ) << endl; display_population(ker); smat result = mult_mod_p(sm,ker,BIGPRIME); // cout << "sm is:\n" << sm.as_mat() << endl; // cout << "ker is:\n" << ker.as_mat() << endl; // cout << "result is:\n" << result.as_mat() << endl; if( result == smat(nro) ) cout << "kernel correct\n"; else cout << "PROBLEM : kernel not correct!\n"; } if(t==7) { cout << "Test of kernel and eigenspace operations\n"; int row; cout << "Enter size of (square) smat A: "<< endl; cin >> row; smat A( row, row ); cout << "Enter entries of A: "<< endl; cin >> A; cout << "A = \n"<> lambda; cout<<"lambda = "<> t; } cout< #include #include #include #include #include #include #include #include #include #include #include #include //#define AUTOLOOP //#define COMPARE_OLD //#define CHECK_COMMUTE //#define TEST_EIGS double sparsity(const mat_m& m); double sparsity(const mat& m); vector eigrange(long p) { long aplim=3, four_p=p<<2; while (aplim*aplim<=four_p) aplim++; aplim--; vector ans(1+2*aplim); iota(ans.begin(),ans.end(),-aplim); return ans; } int main(void) { cout << "Program hecketest. Using METHOD = " << METHOD << " to find newforms" << endl; #ifdef MODULAR cout << "MODULUS for linear algebra = " << MODULUS << endl; #endif init_time(); start_time(); bigint P = BIGINT(BIGPRIME); int n=1; int plus=1; int verbose=0; cout << "See the hecke matrices (0/1)? "; cin >> verbose; cout << "Plus space (0/1)? "; cin >> plus; int limit; #ifdef AUTOLOOP cout<<"Enter limit on level: ";cin>>limit; while (n0) { cout<<"Enter level: "; cin>>n; #endif if (n>0) { cout << ">>>Level " << n << "\t"; homspace hplus(n,plus,0,0); int genus = hplus.h1dim(); long den = hplus.h1denom(); bigint den2; den2 = den*den; cout << "Dimension = " << genus << "\n"; cout << "denominator = " << den << "\n"; vector badprimes = hplus.plist; int nq = badprimes.size(); int firstq=0; // =0 for all W's if (genus>0) { mat_m id = idmat(genus); mat_m id2 = den2*id; mat_m* wqlist = new mat_m[nq]; cout << "Computing conjmat... " << flush; smat conjmat = hplus.s_conj(1); cout<<" done."<>w_eigs; for (int i=0; i1) cout<<" (scaled by "<>np; mat_m* tplist = new mat_m[np]; for (primevar pr(np+nq); pr.ok()&&ip1) cout<<" (scaled by "< eigs = eigrange(p); // hplus.eigrange(nq+ip); cout<<"\nChecking for eigenvalues from "<0) cout<<" IS "; else cout<<" is NOT "; cout<<"an eigenvalue"; if(nulty>0) cout<<", of multiplicity "<0) MT = MT * addscalar(m2,(-e*e)); } stop_time(); cout<<"...done, sparsity = "<0) cout<<" IS "; else cout<<" is NOT "; cout<<"an eigenvalue"; if(nulty>0) cout<<", of multiplicity "<0) } // end of if(n) } // end of while(n>0) or while(n #include int main(void) { cout << "Test run of rational number procs.\n\n"; long n = 4, d = 6, g; g = gcd(n,d); cout << "gcd(" << n << "," << d << ") = " << g << "\n"; rational q = rational(n,d); cout << "q = " << q << " has denominator " << den(q) << \ " and numerator " << num(q) << "\n"; while (0) { cout << "Enter numerator and denominator\n"; cin>>ws; if(cin.eof()) {cout<> n; cin >> d; q=rational(n,d); cout << "q = " << q << " has denominator " << den(q) << \ " and numerator " << num(q) << "\n"; } cout << "Enter a rational (either n or n/d): "; cin>>q; cout << "q = " << q << " has denominator " << den(q) << \ " and numerator " << num(q) << "\n"; cout<<"floor(q) = "<>q1>>q2>>q3; cout << "q1 = " << q1 << "\t"; cout << "q2 = " << q2 << "\t"; cout << "q3 = " << q3 << "\n"; cout << "Enter three rationals in the format [q1:q2:q3]: "; char c; cin>>c>>q1>>c>>q2>>c>>q3>>c; cout << "[q1:q2:q3] = [" << q1 << ":"; cout << q2 << ":"; cout << q3 << "]\n"; } eclib-2013-01-01/tests/conductor.cc0000644000175200017520000000262211774563612013567 00000000000000// conductor.cc: program to call Tate's algorithm and display conductors ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2012 John Cremona // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // mwrank is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License // along with mwrank; if not, write to the Free Software Foundation, // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA // ////////////////////////////////////////////////////////////////////////// #include #include int main(void) { initprimes("PRIMES",0); int verb=1; bigint v; vector ai(5); while (getcurve(ai,verb)) { cout <<"["< sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) eclib-2013-01-01/depcomp0000755000175200017520000004755611736361705011507 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: eclib-2013-01-01/configure.ac0000644000175200017520000001163012071067052012367 00000000000000 # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) AC_INIT([eclib], [2013-01-01], [john.cremona@gmail.com]) AM_INIT_AUTOMAKE([-Wall]) AC_MSG_NOTICE([Configuring eclib...]) AC_CONFIG_SRCDIR([libsrc]) #AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) # Initialise libtools: LT_INIT # Checks for programs: AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL # Checks for libraries. # The following AC_ARG_WITH section were written by Volker Braun dnl Find GMP AC_ARG_WITH(gmp, [AS_HELP_STRING([--with-gmp=], [prefix of GMP installation. e.g. /usr/local or /usr])], [], [AC_CHECK_LIB([gmp], [__gmpz_add],[ ], AC_MSG_ERROR([GMP library not found. Maybe you want to call configure with the --with-gmp= option? This tells configure where to find the GMP library and headers. e.g. --with-gmp=/usr/local or --with-gmp=/usr]))] ) case "$with_gmp" in ""|yes) GMP_LDFLAGS="" GMP_CFLAGS="" ;; no) AC_MSG_ERROR([Compiling without libgmp impossible (but --without-gmp given)]) ;; *) GMP_LDFLAGS="-L${with_gmp}/lib" GMP_CFLAGS="-I${with_gmp}/include" ;; esac GMP_LIBS="-lgmp" AC_SUBST(GMP_LIBS) AC_SUBST(GMP_LDFLAGS) AC_SUBST(GMP_CFLAGS) dnl Find PARI AC_ARG_WITH(pari, [AS_HELP_STRING([--with-pari=], [prefix of PARI installation. e.g. /usr/local or /usr])], [], [AC_CHECK_LIB([pari], [pari_kernel_init],[ ], AC_MSG_ERROR([Pari library not found. Maybe you want to call configure with the --with-pari= option? This tells configure where to find the PARI library and headers. e.g. --with-pari=/usr/local or --with-pari=/usr]),[${GMP_LIBS}])] ) case "$with_pari" in ""|yes) PARI_LDFLAGS="" PARI_CFLAGS="" ;; no) AC_MSG_ERROR([Compiling without libpari impossible (but --without-pari given)]) ;; *) PARI_LDFLAGS="-L${with_pari}/lib" PARI_CFLAGS="-I${with_pari}/include" ;; esac PARI_LIBS="-lpari" AC_SUBST(PARI_LIBS) AC_SUBST(PARI_CFLAGS) AC_SUBST(PARI_LDFLAGS) dnl Find the NTL Library AC_ARG_WITH(ntl, [AS_HELP_STRING([--with-ntl=], [prefix of NTL installation. e.g. /usr/local or /usr])], [], [AC_CHECK_LIB([ntl], [_ntl_gmul],[ ], AC_MSG_ERROR([NTL Library not found. Maybe you want to call configure with the --with-ntl= option? This tells configure where to find the NTL library and headers. e.g. --with-ntl=/usr/local or --with-ntl=/usr]),[${GMP_LIBS}])] ) case "$with_ntl" in ""|yes) NTL_LDFLAGS="" NTL_CFLAGS="" ;; no) AC_MSG_ERROR([Compiling without libntl impossible (but --without-ntl given)]) ;; *) NTL_LDFLAGS="-L${with_ntl}/lib" NTL_CFLAGS="-I${with_ntl}/include" ;; esac NTL_LIBS="-lntl" AC_SUBST(NTL_LIBS) AC_SUBST(NTL_CFLAGS) AC_SUBST(NTL_LDFLAGS) dnl Find the FLINT Library and determine if it has the nmod_mat module dnl (in FLINT from version 2.3) dnl dnl NB If your version of FLINT includes the optional hmod_mat module, dnl then compile with FLINT_LEVEL=2 by either using configure as usual dnl and then doing "make CXXFLAGS='-DFLINT_LEVEL=2'", or adding dnl CXXFLAGS='-DFLINT_LEVEL=2' to the ./configure command. In either dnl case, ignore the warnings about FLINT_LEVEL being redfined. dnl dnl First set defaults for when no suitable FLINT is found dnl FLINT_CFLAGS="-DFLINT_LEVEL=0" FLINT_LDFLAGS="" FLINT_LIBS="" AC_ARG_WITH(flint, [AS_HELP_STRING([--with-flint=],[prefix of FLINT installation.])], [FLINT_CFLAGS="-DFLINT_LEVEL=1 -I${with_flint}/include"; FLINT_LDFLAGS="-L${with_flint}/lib"; FLINT_LIBS="-lflint"], [AC_CHECK_LIB([flint], [fmpz_init, nmod_mat_rref], [FLINT_CFLAGS="-DFLINT_LEVEL=1"; FLINT_LIBS="-lflint"; AC_MSG_NOTICE([Building with FLINT support from system install])], [AC_MSG_NOTICE([No suitable FLINT Library (version >=2.3) found])], [${GMP_LIBS}])] ) if test ${with_flint} = no; then FLINT_CFLAGS="-DFLINT_LEVEL=0" FLINT_LDFLAGS="" FLINT_LIBS="" fi AC_SUBST(FLINT_LIBS) AC_SUBST(FLINT_CFLAGS) AC_SUBST(FLINT_LDFLAGS) # Checks for header files. AC_FUNC_ALLOCA AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_INLINE AC_TYPE_INT64_T AC_C_RESTRICT AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([floor memmove memset pow sqrt strchr]) AC_ARG_ENABLE([allprogs], AS_HELP_STRING([--disable-allprogs], [only build the library and mwrank, otherwise build all programs and tests]), [case "${enableval}" in yes) allprogs=true ;; no) allprogs=false ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-allprogs]) ;; esac],[allprogs=true]) AM_CONDITIONAL([ALLPROGS], [test x$allprogs = xtrue]) AC_CONFIG_FILES([ libsrc/Makefile tests/Makefile progs/Makefile doc/Makefile man/Makefile Makefile ]) AC_OUTPUT eclib-2013-01-01/missing0000755000175200017520000002415211736361705011514 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: eclib-2013-01-01/README0000644000175200017520000000271311737577017011002 00000000000000In addition to the generic installation instructions given in the INSTALL file, note the following. You can see all options to configure by typing ./configure --help. 1. The configure script will check or the existence of gmp and will fail if it does not find it. 2. Both NTL and PARI are required. If they have not been installed in a place where the system will find them automatically (such as /usr/local) then you will need to specify where they are when you configure, like this: ./configure --with-pari= --with-ntl= If you have Sage installed in SAGE_ROOT then you can use $SAGE_ROOT/local for both of these. 3. By default a lot of programs, including test programs, are built and will be installed by "make install". We only provide one option here: if you do ./configure --disable-allprogs then the only program built will be mwrank. (The whole eclib library will always be built). 3. After running make, "make check" will build and run a lot of test programs (in the subdirectory tests) and check that they give the expected output (using test input files in tests/in and comparing with the expected outputs in tests/out). 4. "make install" will install header files, library files, and test program binaries in subdirectories include, lib, bin in /usr/local by default, so that you would need to run "make install" with superuser privileges). You can specify an alternative place either by adding --prefix= to the ./configure command line.