sxemacs-patches
[Top] [All Lists]

[MERGE-REQ] Summary for sxemacs--hrop--22.1.9--patch-76

From: Sebastian Freundt <hroptatyr@xxxxxxxxxxx>
Subject: [MERGE-REQ] Summary for sxemacs--hrop--22.1.9--patch-76
Date: Sat, 31 May 2008 23:11:35 +0000
Sender: sxemacs-patches-bounces@xxxxxxxxxxx
User-agent: Gnus/5.110011 (No Gnus v0.11) SXEmacs/22.1.9 (linux)
Location: hroptatyr@xxxxxxxxxxxxxxxxxxxx 
http://www.math.tu-berlin.de/~freundt/archives/sxemacs/

Revision: sxemacs--hrop--22.1.9--patch-76
Archive: hroptatyr@xxxxxxxxxxxxxxxxxxxx
Creator: Sebastian Freundt <hroptatyr@xxxxxxxxxxx>
Date: Sat May 31 23:11:10 UTC 2008
Standard-date: 2008-05-31 23:11:10 GMT
Modified-files: m4/sxe-aux.m4 m4/sxe-compiler.m4
    m4/sxe-mem.m4 src/lstream.c
New-patches: 
hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-22
    hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-23
    hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/sxemacs--hrop-BLDCHN--22.1.9--patch-24
    hroptatyr@xxxxxxxxxxxxxxxxxxxx/sxemacs--hrop--22.1.9--patch-76
Summary: minor, use meta macro to create adder macros
Keywords: 

This changeset contains some m4 goodies to top off the per-target CPPFLAGS
usage and generally cleans up m4 and c.ac code.

Also, fix one more warning in bdwgc mode and be very uptight about old compilers
and enabled BDWGC.


* m4/sxe-aux.m4 (__SXE_MAKE_ADDER): new, create meta macro to create those
  SXE_ADD_*_OBJS macros

* m4/sxe-compiler.m4 (SXE_CHECK_CC_VERSION): fix, subst compiler_version var

* m4/sxe-mem.m4 (SXE_CHECK_BDWGC): fix, be extremely bitchy about old compilers
  and bdwgc

* src/lstream.c (Lstream_new): fix, do not declare unused variable


* added files

    
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-22
    
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-23
    
{arch}/sxemacs/sxemacs--hrop-BLDCHN/sxemacs--hrop-BLDCHN--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxxxx/patch-log/patch-24
    
{arch}/sxemacs/sxemacs--hrop/sxemacs--hrop--22.1.9/hroptatyr@xxxxxxxxxxxxxxxxxxxx/patch-log/patch-76

* modified files

--- orig/m4/sxe-aux.m4
+++ mod/m4/sxe-aux.m4
@@ -65,88 +65,42 @@
 ])dnl SXE_CHECK_USER_VARS
 
 
-dnl SXE_ADD_EVENTS_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_EVENTS_OBJ], [
-       libsxeevents_objs="$libsxeevents_objs libsxeevents_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. EVENTS) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_EVENTS_OBJ
-AC_DEFUN([SXE_ADD_EVENTS_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_EVENTS_OBJ([$i])
-       done
-])dnl SXE_ADD_EVENTS_OBJS
-AC_DEFUN([SXE_SUBST_EVENTS_OBJS], [AC_SUBST(libsxeevents_objs)])
-
-dnl SXE_ADD_CORE_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_CORE_OBJ], [
-       libsxecore_objs="$libsxecore_objs libsxecore_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. CORE) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_CORE_OBJ
-AC_DEFUN([SXE_ADD_CORE_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_CORE_OBJ([$i])
-       done
-])dnl SXE_ADD_CORE_OBJS
-AC_DEFUN([SXE_SUBST_CORE_OBJS], [AC_SUBST(libsxecore_objs)])
-
-dnl SXE_ADD_ENT_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_ENT_OBJ], [
-       libent_objs="$libent_objs libent_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. ENT) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_ENT_OBJ
-AC_DEFUN([SXE_ADD_ENT_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_ENT_OBJ([$i])
-       done
-])dnl SXE_ADD_ENT_OBJS
-AC_DEFUN([SXE_SUBST_ENT_OBJS], [AC_SUBST(libent_objs)])
-
-dnl SXE_ADD_MM_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_MM_OBJ], [
-       libmm_objs="$libmm_objs libmm_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. MM) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_MM_OBJ
-AC_DEFUN([SXE_ADD_MM_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_MM_OBJ([$i])
-       done
-])dnl SXE_ADD_MM_OBJS
-AC_DEFUN([SXE_SUBST_MM_OBJS], [AC_SUBST(libmm_objs)])
-
-dnl SXE_ADD_MULE_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_MULE_OBJ], [
-       libmule_objs="$libmule_objs libmule_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. MULE) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_MULE_OBJ
-AC_DEFUN([SXE_ADD_MULE_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_MULE_OBJ([$i])
-       done
-])dnl SXE_ADD_MULE_OBJS
-AC_DEFUN([SXE_SUBST_MULE_OBJS], [AC_SUBST(libmule_objs)])
+dnl A meta defun that can create those nifty SXE_ADD_*_OBJ macros
+m4_define([__SXE_MAKE_ADDER], [
+       ## arg1 is the name to be used throughout m4
+       ## arg2 is the library sans _la or _a to be used in the Makefiles
+       ## defines SXE_ADD_<arg1>_OBJ
+       ## defines SXE_ADD_<arg1>_OBJS
+       ## defines SXE_SUBST_<arg1>_OBJS
+
+       m4_define([SXE_ADD_]$1[_OBJ], [
+               $2_objs="$$2_objs $2_a-]$[1]["
+               if test "$extra_verbose" = "yes"; then
+                       echo "    sxemacs (cat. $1) will be linked with 
\"]$[1][\""
+               fi
+       ])dnl
 
-dnl SXE_ADD_DB_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_DB_OBJ], [
-       libsxedb_objs="$libsxedb_objs libsxedb_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. DB) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_DB_OBJ
-AC_DEFUN([SXE_ADD_DB_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_DB_OBJ([$i])
-       done
-])dnl SXE_ADD_DB_OBJS
+       m4_define([SXE_ADD_]$1[_OBJS], [
+               for i in ]$[1][; do
+                       ]SXE_ADD_[]$1[]_OBJ([$i])[
+               done
+       ])dnl
+       
+       m4_define([SXE_SUBST_]$1[_OBJS], [
+               AC_SUBST($2_objs)
+       ])dnl
+])dnl __SXE_MAKE_ADDER
+
+
+dnl creates SXE_ADD_CORE_{OBJ,OBJS}
+__SXE_MAKE_ADDER([CORE], [libsxecore])
+
+dnl creates SXE_ADD_CRUFT_{OBJ,OBJS}
+__SXE_MAKE_ADDER([CRUFT], [libcruft])
+
+dnl creates SXE_ADD_DB_{OBJ,OBJS}
+__SXE_MAKE_ADDER([DB], [libsxedb])
+dnl redefine this
 AC_DEFUN([SXE_SUBST_DB_OBJS], [
        AC_SUBST([libsxedb_objs])
        AC_SUBST([DB_CPPFLAGS])
@@ -154,47 +108,24 @@
        AC_SUBST([DB_LIBS])
 ])dnl SXE_SUBST_DB_OBJS
 
-dnl SXE_ADD_MEMALLOC_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_MEMALLOC_OBJ], [
-       libmemalloc_objs="$libmemalloc_objs libmemalloc_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. MEMALLOC) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_MEMALLOC_OBJ
-AC_DEFUN([SXE_ADD_MEMALLOC_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_MEMALLOC_OBJ([$i])
-       done
-])dnl SXE_ADD_MEMALLOC_OBJS
-AC_DEFUN([SXE_SUBST_MEMALLOC_OBJS], [AC_SUBST(libmemalloc_objs)])
+dnl creates SXE_ADD_ENT_{OBJ,OBJS}
+__SXE_MAKE_ADDER([ENT], [libent])
 
-dnl SXE_ADD_SXEUI_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_SXEUI_OBJ], [
-       libsxeui_objs="$libsxeui_objs libsxeui_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. SXE UI) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_SXEUI_OBJ
-AC_DEFUN([SXE_ADD_SXEUI_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_SXEUI_OBJ([$i])
-       done
-])dnl SXE_ADD_SXEUI_OBJS
-AC_DEFUN([SXE_SUBST_SXEUI_OBJS], [AC_SUBST(libsxeui_objs)])
+dnl creates SXE_ADD_EVENTS_{OBJ,OBJS}
+__SXE_MAKE_ADDER([EVENTS], [libsxeevents])
+
+dnl creates SXE_ADD_MEMALLOC_{OBJ,OBJS}
+__SXE_MAKE_ADDER([MEMALLOC], [libmemalloc])
+
+dnl creates SXE_ADD_MM_{OBJ,OBJS}
+__SXE_MAKE_ADDER([MM], [libmm])
+
+dnl creates SXE_ADD_MULE_{OBJ,OBJS}
+__SXE_MAKE_ADDER([MULE], [libmule])
+
+dnl creates SXE_ADD_SXEUI_{OBJ,OBJS}
+__SXE_MAKE_ADDER([SXEUI], [libsxeui])
 
-dnl SXE_ADD_MULE_OBJS(foo.o ...)
-AC_DEFUN([SXE_ADD_CRUFT_OBJ], [
-       libcruft_objs="$libcruft_objs libcruft_a-[$1]" && \
-       if test "$extra_verbose" = "yes"; then
-               echo "    sxemacs (cat. CRUFT) will be linked with \"[$1]\""
-       fi
-])dnl SXE_ADD_CRUFT_OBJ
-AC_DEFUN([SXE_ADD_CRUFT_OBJS], [
-       for i in [$1]; do
-               SXE_ADD_CRUFT_OBJ([$i])
-       done
-])dnl SXE_ADD_CRUFT_OBJS
-AC_DEFUN([SXE_SUBST_CRUFT_OBJS], [AC_SUBST(libcruft_objs)])
 
 dnl SXE_ADD_STATMOD_A(foo.o ...)
 AC_DEFUN([SXE_ADD_STATMOD_A], [


--- orig/m4/sxe-compiler.m4
+++ mod/m4/sxe-compiler.m4
@@ -132,7 +132,8 @@
                ;;
        esac
 
-       AC_MSG_RESULT($compiler_version)
+       AC_SUBST([compiler_version])
+       AC_MSG_RESULT([$compiler_version])
 
        dnl Awww, shucks.
        if test -z "$compiler_version"; then


--- orig/m4/sxe-mem.m4
+++ mod/m4/sxe-mem.m4
@@ -2,9 +2,44 @@
 
 AC_DEFUN([SXE_CHECK_BDWGC], [dnl
        ## the actual check
+       AC_REQUIRE([SXE_CHECK_CC_VERSION])
+
        AC_CACHE_CHECK([for Boehm-Demers-Weiser GC support],
                [sxe_cv_feat_bdwgc], [_SXE_CHECK_BDWGC])
 
+       ## quick compiler check
+       if test "$with_experimental_features_bdwgc" = "yes"; then
+               case "$compiler_version" in
+               gcc*\ 3.* | gcc*\ 2.* )
+                       AC_MSG_NOTICE([
+Stop right there, my friend!
+The powers that be have deemed you unworthy of succeeding in building
+SXEmacs in BDWGC mode with _that_ compiler ($compiler_version)!
+
+It's not that we are going to stop you now but this will definitely fail.
+In order to build a BDWGC-flavoured SXEmacs you want to use a GCC C compiler
+of the 4th series.
+
+The alternative is likewisely simple, do NOT enable the BDWGC feature,
+that is leave --with-experimental-features alone, or explicitly turn off the
+BDWGC feature like so: --with-experimental-features=nobdwgc.
+
+I shall now give you a grace period of 32 seconds to consider your answer,
+will you (from most recommended to least recommended)
+a) upgrade your gcc, or
+b) rerun configure not requesting the BDWGC feature, or
+c) continue the build and promise not to complain?
+                               ])
+                       sleep 32
+                       AC_MSG_NOTICE([
+Your time is up and you've made the wrongest decision, possibly, ever!
+Well, you can still press C-c (control c, that is).
+                               ])
+                       sleep 5
+                       ;;
+               esac
+       fi
+
        AM_CONDITIONAL([HAVE_BDWGC], [test "$have_bdwgc" = "yes"])
 ])dnl SXE_CHECK_BDWGC
 


--- orig/src/lstream.c
+++ mod/src/lstream.c
@@ -251,7 +251,6 @@
 Lstream_new(const Lstream_implementation *imp, const char *mode)
 {
        lstream_t p;
-       Lisp_Object tmp;
 
 #if defined HAVE_BDWGC && defined EF_USE_BDWGC
        GC_finalization_proc *foo = NULL;
@@ -263,6 +262,7 @@
        GC_REGISTER_FINALIZER(p, lstr_finaliser, NULL, foo, bar);
 #else  /* !BDWGC */
        int i;
+       Lisp_Object tmp;
 
        for (i = 0; i < lstream_type_count; i++) {
                if (lstream_types[i] == imp)



Attachment: pgpqf55fS_u9A.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
  • [MERGE-REQ] Summary for sxemacs--hrop--22.1.9--patch-76, Sebastian Freundt <=