[SCM] an open source computer algebra system branch, master-3-1-5, updated. dcebb184fbf374a8905edd0b02d7795bc29620e9

Felix Salfelder felix at salfelder.org
Mon Jul 15 18:42:32 UTC 2013


The following commit has been merged in the master-3-1-5 branch:
commit aea42a0d0b9fbee7789e41923b5aa8a8cbd802de
Author: Bernhard R. Link <brlink at debian.org>
Date:   Sun Feb 26 13:38:14 2012 +0100

    move libreadline to main binary
    
    and link Singular binary against libsingular instead of carrying a copy
    of everything.

diff --git a/Singular/Makefile.in b/Singular/Makefile.in
index f1b93ae..8db7465 100644
--- a/Singular/Makefile.in
+++ b/Singular/Makefile.in
@@ -132,7 +132,7 @@ HAVE_MPSR       = @HAVE_MPSR@
 #
 # Handle libSINGULAR stuff
 #
-LIBSINGULAR_LIBS =-lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc
+LIBSINGULAR_LIBS =-lsingfac -lsingcf -lntl -lgmp -lomalloc -ldl
 
 SO_SUFFIX = so
 
@@ -375,12 +375,14 @@ Singular-static: version.h
 	${MAKE} LD_STATIC=1 S_EXT="-static" Singular-static
 	echo "#undef HAVE_STATIC" > static.h
 
+SINGULAR_DYNAMIC = libsingular.$(SO_SUFFIX) ../kernel/feread.o ../kernel/fereadl.o
+
 Singular${S_EXT}: mod2.h Makefile version.h $(WIN_LIBS) scanner.cc  ${OBJS} \
-          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS) 
+          iparith.o tesths.cc libparse.cc claptmpl.o mpsr_Tok.o $(DL_LIBS) $(SINGULAR_DYNAMIC)
 	${CXX} ${CXXFLAGS} ${CPPFLAGS} ${CXXTEMPLFLAGS} ${DEFS} \
 	  -o Singular${S_EXT} \
 	  tesths.cc iparith.o mpsr_Tok.o claptmpl.o\
-	  ${OBJS} ${LDFLAGS} ${LIBS} ../kernel/mmalloc.o 
+	  ${OBJS} $(SINGULAR_DYNAMIC) ${LDFLAGS} ${LIBS} ../kernel/mmalloc.o
 
 libsingular: libsingular.${SO_SUFFIX}
 
diff --git a/kernel/Makefile.in b/kernel/Makefile.in
index 78d2b07..727364e 100644
--- a/kernel/Makefile.in
+++ b/kernel/Makefile.in
@@ -91,7 +91,7 @@ endif
 # normal C++ source files
 CXXSOURCES=bigintmat.cc clapconv.cc \
     clapsing.cc \
-    febase.cc feread.cc feResource.cc \
+    febase.cc feResource.cc \
     ffields.cc hdegree.cc hilb.cc hutil.cc \
     sca.cc gring.cc gr_kstd2.cc summator.cc ncSAMult.cc ncSAFormula.cc \
     ideals.cc intvec.cc int64vec.cc \
@@ -119,7 +119,7 @@ CXXSOURCES=bigintmat.cc clapconv.cc \
 CXXSOURCES2	= SingularBuilder.cpp
 
 # normal C source files
-CSOURCES=weight0.c fegetopt.c fereadl.c dError.c mmstd.c
+CSOURCES=weight0.c fegetopt.c dError.c mmstd.c
 
 # C++ sources which are used if part of the kernel are dynamically linked
 ifeq ($(DL_KERNEL),1)
@@ -137,7 +137,8 @@ STATIC_SOURCES=p_Procs_Static.cc
 
 # special C++ source files (need extra compiling and/or linking), for which
 # dependencies should be generated
-ESOURCES=mmalloc.cc $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES)
+ESOURCES=mmalloc.cc $(DL_KERNEL_SOURCES) $(DL_LIB_SOURCES) $(STATIC_SOURCES) feread.cc
+ECSOURCES=fereadl.c
 
 SOURCES=${CSOURCES} ${CXXSOURCES} \
 	prCopyTemplate.cc \
@@ -177,13 +178,13 @@ HEADERS=bigintmat.h hutil.h idrec.h stairc.h ideals.h \
 	p_Procs_Dynamic.h p_Procs_Impl.h p_Procs_Set.h \
 	p_Procs.h p_Procs_Static.h p_Mult_q.h
 
-DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} \
+DISTFILES=${SOURCES} ${HEADERS} ${ESOURCES} ${ECSOURCES} \
         Makefile.in \
 	mkinstalldirs \
 	prCopy.pl
 
 OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o) #$(CXXSOURCES2:.cpp=.o)
-OBJS2 := $(ESOURCES:.cc=.o)
+OBJS2 := $(ESOURCES:.cc=.o) $(ECSOURCES:.c=.o)
 OBJSG2 := $(ESOURCES:.cc=.og)
 OBJSP2 := $(ESOURCES:.cc=.op)
 
@@ -338,8 +339,8 @@ maintainer-clean: distclean srcclean
 ## miscellanous targets
 ##
 
-TAGS:   ${SOURCES} ${ESOURCES} ${HEADERS} 
-	etags ${SOURCES} ${ESOURCES} ${HEADERS}
+TAGS:   ${SOURCES} ${ESOURCES} ${ECSOURCES} ${HEADERS} 
+	etags ${SOURCES} ${ESOURCES} ${ECSOURCES} ${HEADERS}
 
 tags:   
 	ctags *.c *.h *.cc *.inc
@@ -447,7 +448,7 @@ libkernel_p.a: ${OBJP} ${DL_LIBSP} ${OBJSP2}
 	echo $(@:.d=.og) $(@:.d=.op) " " \\ > $@
 	$(CCM) ${CPPFLAGS} ${DEFSG} $< >> $@
 
-depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(CSOURCES:.c=.d)
+depend:   $(CXXSOURCES:.cc=.dd) $(ESOURCES:.cc=.dd) $(ECSOURCES:.c=.d) $(CSOURCES:.c=.d)
 	cat *.d *.dd >depend
 
 ifeq (depend,$(wildcard depend))
diff --git a/kernel/febase.cc b/kernel/febase.cc
index 725eca2..971f7fd 100644
--- a/kernel/febase.cc
+++ b/kernel/febase.cc
@@ -26,6 +26,47 @@
 #include <kernel/dError.h>
 #include <kernel/options.h>
 
+/* some stuff move here from feread.cc: */
+
+/* ===================================================================*/
+/* =                      batch mode                                = */
+/* ===================================================================*/
+/* dummy (for batch mode): */
+char * fe_fgets_dummy(const char *pr,char *s, int size)
+{
+  return NULL;
+}
+
+/* ===================================================================*/
+/* =                        fgets                                   = */
+/* ===================================================================*/
+char * fe_fgets(const char *pr,char *s, int size)
+{
+  if (BVERBOSE(V_PROMPT))
+  {
+    fprintf(stdout,"%s",pr);
+  }
+  mflush();
+  return fgets(s,size,stdin);
+}
+
+char * fe_fgets_stdin_init(const char *pr,char *s, int size) __attribute__((weak));
+char * fe_fgets_stdin_init(const char *pr,char *s, int size) {
+	Werror("No method to read from stdin loaded!\n");
+	return NULL;
+}
+extern "C" {
+void fe_reset_input_mode (void) __attribute__((weak));
+void fe_reset_input_mode (void)
+{
+}
+}
+
+char * (*fe_fgets_stdin)(const char *pr,char *s, int size)
+ = fe_fgets_stdin_init;
+
+/* end of some stuff move here from feread.cc */
+
 #define fePutChar(c) fputc((unsigned char)(c),stdout)
 /*0 implementation */
 
diff --git a/kernel/feread.cc b/kernel/feread.cc
index 8f67c5e..522ed9c 100644
--- a/kernel/feread.cc
+++ b/kernel/feread.cc
@@ -30,10 +30,6 @@
 #include <unistd.h>
 #endif
 
-static char * fe_fgets_stdin_init(const char *pr,char *s, int size);
-char * (*fe_fgets_stdin)(const char *pr,char *s, int size)
- = fe_fgets_stdin_init;
-
 extern char *iiArithGetCmd(int);
 
 /* ===================================================================*/
@@ -289,23 +285,11 @@ char * fe_fgets_stdin_drl(const char *pr,char *s, int size)
 }
 #endif
 
-/* ===================================================================*/
-/* =                        fgets                                   = */
-/* ===================================================================*/
-char * fe_fgets(const char *pr,char *s, int size)
-{
-  if (BVERBOSE(V_PROMPT))
-  {
-    fprintf(stdout,"%s",pr);
-  }
-  mflush();
-  return fgets(s,size,stdin);
-}
 
 /* ===================================================================*/
 /* =       init for static rl, dyn. rl, emu. rl                     = */
 /* ===================================================================*/
-static char * fe_fgets_stdin_init(const char *pr,char *s, int size)
+char * fe_fgets_stdin_init(const char *pr,char *s, int size)
 {
 #if (defined(HAVE_READLINE) || defined(HAVE_LIBREADLINE)) && !defined(HAVE_DYN_RL) && !defined(HAVE_FEREAD)
   /* Allow conditional parsing of the ~/.inputrc file. */
@@ -393,12 +377,3 @@ static char * fe_fgets_stdin_init(const char *pr,char *s, int size)
 #endif
 }
 
-/* ===================================================================*/
-/* =                      batch mode                                = */
-/* ===================================================================*/
-/* dummy (for batch mode): */
-char * fe_fgets_dummy(const char *pr,char *s, int size)
-{
-  return NULL;
-}
-

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list