bug tcl8.4.6 -> autoconf -> tcl.m4

From: Andreas Otto (nospam_at_onlinehome.de)
Date: 04/29/04


Date: Thu, 29 Apr 2004 17:34:42 +0200


Hi,

  my case: current SuSe linux to build "configure" with autoconf 2-13

  what happen: building configure with "autoconf" fails:
  why?

  1) tcl.m4 -> SC_ENABLE_SYMBOLS
  2) SC_ENABLE_SYMBOLS is using the word "symbols" to check for
     --enable-symbols
  4) now gnu-m4 defines:

info -> m4
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><
Getting the defined macro names
===============================

   The name of the currently defined macro can be accessed by `symbols':
     symbols

which results in a sorted list of quoted strings. This contrasts with
`dumpdef' which output can not be accessed by `m4' programs.

   When given arguments, `symbols' returns the sorted subset of the
symbols currently defined:
     symbols(`ifndef', `ifdef', `define', `undef')
     =>define,ifdef
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

the m4 key-word "symbols" breaks the tcl build-keyword "symbols"
   5) patch tcl.m4 (ACHTUNG!: "[" and "]" arround "symbols" ) :

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AC_DEFUN(SC_ENABLE_SYMBOLS, [
    AC_MSG_CHECKING([for build with [symbols]])
    AC_ARG_ENABLE([[symbols]], [ --enable-symbols build with
debugging symbols [--disable-symbols]], [tcl_ok=$enableval],
[tcl_ok=no])
# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like
CFLAGS_DEFAULT.
    if test "$tcl_ok" = "no"; then
        CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
        LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
        DBGX=""
        AC_MSG_RESULT([no])
    else
        CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
        LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
        DBGX=g
        if test "$tcl_ok" = "yes"; then
            AC_MSG_RESULT([yes (standard debugging)])
        fi
    fi
    AC_SUBST(CFLAGS_DEFAULT)
    AC_SUBST(LDFLAGS_DEFAULT)

    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
        AC_DEFINE(TCL_MEM_DEBUG)
    fi

    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
        AC_DEFINE(TCL_COMPILE_DEBUG)
        AC_DEFINE(TCL_COMPILE_STATS)
    fi

    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
        if test "$tcl_ok" = "all"; then
            AC_MSG_RESULT([enabled [symbols] mem compile debugging])
        else
            AC_MSG_RESULT([enabled $tcl_ok debugging])
        fi
    fi
])
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  to fix this problem :^)

mfg

  aotto