m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU M4 source repository branch, master, updated. cvs-readonly-346


From: Gary V. Vaughan
Subject: [SCM] GNU M4 source repository branch, master, updated. cvs-readonly-346-g312695e
Date: Thu, 27 Nov 2014 17:19:24 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=312695e1ebb4e9807289f4b9d93b263a61a381a8

The branch, master has been updated
       via  312695e1ebb4e9807289f4b9d93b263a61a381a8 (commit)
       via  bb68bc18379fb91f9ea39a5bb4870a05e1f7516a (commit)
       via  64a09a29e335b68d1996d36c95cd95a1f85b2bcf (commit)
      from  e3740596954495555727057bd0486241cefdd4a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 312695e1ebb4e9807289f4b9d93b263a61a381a8
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 27 17:06:45 2014 +0000

    configury: improve dlsym underscore detection.
    
    * configure.ac (fn_module_cmds): Split ~ delimited command lists,
    and set globals required by $module_cmds and $archive_cmds.
    (libname): Preload with 'conftmod' ready for fun_module_cmds
    calls, and for reuse as an 8.3 compatible module basename in this
    check.
    (sys_dlsym_uscore): Use it to detect underscore prefix requirement
    in some dlysm() implementations more reliably.
    Reported by KO Myung-Hun
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit bb68bc18379fb91f9ea39a5bb4870a05e1f7516a
Author: Gary V. Vaughan <address@hidden>
Date:   Thu Nov 27 12:45:44 2014 +0000

    modules: clean up no-longer supported preloading references.
    
    * doc/m4.texi: Remove references to preloaded modules.
    * configure.ac (Preloaded module configuration): Remove.
    * Makefile.am (src_m4_LDFLAGS): Remove.  DLPREOPEN no longer set.
    (src_m4_DEPENDENCIES): Remove PREOPEN_DEPENDENCIES reference.
    * tests/atlocal.in (DYNAMIC_MODULES): Remove.
    * tests/testsuite.at (AT_CHECK_DYNAMIC_MODULE): Remove.
    * tests/builtins.at, tests/modules.at: Remove references to
    removed AT_CHECK_DYNAMIC_MODULE.
    * tests/generate.awk: Don't generate AT_CHECK_DYNAMIC_MODULE
    calls.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit 64a09a29e335b68d1996d36c95cd95a1f85b2bcf
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Nov 26 20:42:14 2014 +0000

    modules: only load modules with system module file extension.
    
    * m4/path.c (m4_load_filename): Compare with LT_MODULE_EXT instead
    of hardcoded '.so'.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am        |    3 +-
 configure.ac       |  101 +++++++++++++++++++--------------------------------
 doc/m4.texi        |   55 ++++++----------------------
 m4/path.c          |    2 +-
 tests/atlocal.in   |    1 -
 tests/builtins.at  |    1 -
 tests/generate.awk |    2 -
 tests/modules.at   |    6 ---
 tests/testsuite.at |   11 ------
 9 files changed, 52 insertions(+), 130 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 10a5eab..86561a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -142,9 +142,8 @@ if STACKOVF
 src_m4_SOURCES += src/stackovf.c
 endif
 src_m4_CPPFLAGS        = $(AM_CPPFLAGS) -Isrc -I$(srcdir)/src
-src_m4_LDFLAGS = $(AM_LDFLAGS) $(DLPREOPEN)
 src_m4_LDADD   = m4/libm4.la $(LTLIBICONV) $(LTLIBTHREAD)
-src_m4_DEPENDENCIES = $(PREOPEN_DEPENDENCIES) m4/libm4.la
+src_m4_DEPENDENCIES = m4/libm4.la
 
 ##                                                                      ##
 ##                 --- PASTED MANUALLY FROM GNULIB ---                  ##
diff --git a/configure.ac b/configure.ac
index 2688a7f..342aecf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,13 +183,14 @@ LT_LIB_DLLOAD
 LT_SYS_SYMBOL_USCORE
 
 LT_SYS_MODULE_EXT
-libm4_shlibext=$libltdl_cv_shlibext
 
 if test yes = "$sys_symbol_underscore"; then
+  libm4_shlibext=$libltdl_cv_shlibext
+
   AC_MSG_CHECKING([whether dlsym requires underscore prefixed symbols])
-  AC_CACHE_VAL([mfour_cv_sys_dlsym_uscore], [dnl
-    # Use Libtool to make a loadable module
-    cat >conftest_loadme.$ac_ext <<_M4_EOF
+  AC_CACHE_VAL([libm4_cv_sys_dlsym_uscore], [dnl
+    libname=conftmod # stay within 8.3 filename limits!
+    cat >$libname.$ac_ext <<_M4_EOF
 [#line $LINENO "configure"
 #include "confdefs.h"
 /* When -fvisibility=hidden is used, assume the code has been annotated
@@ -199,16 +200,30 @@ int fnord () __attribute__((visibility("default")));
 #endif
 int fnord () { return 42; }]
 _M4_EOF
-    libobjs=conftest_loadme.$ac_objext; lib=conftest_loadme$libm4_shlibext
-    save_module_cmds=$module_cmds; module_cmds=`eval echo $module_cmds`
-    test -n "$module_cmds" || module_cmds=`eval echo $archive_cmds`
-    $CC $pic_flag -c conftest_loadme.$ac_ext
-    eval "wl=\"$lt_prog_compiler_wl\"; major=; versuffix=; verstring=; 
deplibs=; \
-         rpath=/not-exists/conftest_loadme$libm4_shlibext; $module_cmds"
-    module_cmds=$save_module_cmds
+
+    # fn_module_cmds module_cmds
+    # Execute tilde-delimited MODULE_CMDS with environment primed for
+    # ${module_cmds} or ${archive_cmds} type content.
+    fn_module_cmds ()
+    {( # subshell avoids polluting parent global environment
+        module_cmds_save_ifs=$IFS; IFS='~'
+        for cmd in $1; do
+          IFS=$module_cmds_save_ifs
+          libobjs=$libname.$ac_objext; lib=$libname$libm4_shlibext
+          rpath=/not-exists; soname=$libname$libm4_shlibext; output_objdir=.
+          major=; versuffix=; verstring=; deplibs=
+          ECHO=echo; wl=$lt_prog_compiler_wl; allow_undefined_flag=
+          eval $cmd
+        done
+        IFS=$module_cmds_save_ifs
+    )}
+
+    # Compile a loadable module using libtool macro expansion results.
+    $CC $pic_flag -c $libname.$ac_ext
+    fn_module_cmds "${module_cmds:-$archive_cmds}"
 
     # Try to fetch fnord with dlsym().
-    mfour_dlunknown=0; mfour_dlnouscore=1; mfour_dluscore=2
+    libm4_dlunknown=0; libm4_dlnouscore=1; libm4_dluscore=2
     cat >conftest.$ac_ext <<_M4_EOF
 [#line $LINENO "configure"
 #include "confdefs.h"
@@ -231,14 +246,14 @@ _M4_EOF
 #  endif
 #endif
 int main () {
-  void *handle = dlopen ("`pwd`/$objdir/conftest_loadme$libm4_shlibext", 
RTLD_GLOBAL|RTLD_NOW);
-  int status = $mfour_dlunknown;
+  void *handle = dlopen ("`pwd`/$libname$libm4_shlibext", 
RTLD_GLOBAL|RTLD_NOW);
+  int status = $libm4_dlunknown;
   if (handle) {
     if (dlsym (handle, "fnord"))
-      status = $mfour_dlnouscore;
+      status = $libm4_dlnouscore;
     else {
       if (dlsym (handle, "_fnord"))
-        status = $mfour_dluscore;
+        status = $libm4_dluscore;
       else
        puts (dlerror ());
     }
@@ -250,16 +265,16 @@ int main () {
 _M4_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
-      mfour_status=$?
-      case x$mfour_status in
-        x$mfour_dlnouscore) mfour_cv_sys_dlsym_uscore=no ;;
-       x$mfour_dluscore) mfour_cv_sys_dlsym_uscore=yes ;;
-       x*) mfour_cv_sys_dlsym_uscore=unknown ;;
+      libm4_status=$?
+      case x$libm4_status in
+        x$libm4_dlnouscore) libm4_cv_sys_dlsym_uscore=no ;;
+       x$libm4_dluscore) libm4_cv_sys_dlsym_uscore=yes ;;
+       x*) libm4_cv_sys_dlsym_uscore=unknown ;;
       esac
     fi
-    rm -rf conftest*
+    rm -rf conftest* $libname*
   ])
-  sys_dlsym_uscore=$mfour_cv_sys_dlsym_uscore
+  sys_dlsym_uscore=$libm4_cv_sys_dlsym_uscore
   AC_MSG_RESULT($sys_dlsym_uscore)
   if test yes = "$sys_dlsym_uscore"; then
     AC_DEFINE([DLSYM_USCORE], [1],
@@ -271,46 +286,6 @@ AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['$PATH_SEPARATOR'],
                   [Define this to system search path delimiter])
 
 
-## ------------------------------- ##
-## Preloaded module configuration. ##
-## ------------------------------- ##
-AS_IF([test "x$enable_shared" != xno],
-      [DYNAMIC_MODULES=yes], [DYNAMIC_MODULES=no])
-AC_SUBST([DYNAMIC_MODULES], [$DYNAMIC_MODULES])
-
-AC_MSG_CHECKING([for modules to preload])
-  DLPREOPEN=
-
-  AC_ARG_WITH([modules],
-    [AS_HELP_STRING([--with-modules=MODULES],
-                    [preload MODULES @<:@default: ]M4_DEFAULT_PRELOAD[@:>@])],
-    [use_modules="$withval"],
-    [use_modules="$M4_default_preload"])
-
-  PREOPEN_DEPENDENCIES=
-  DLPREOPEN="-dlpreopen force"
-  if test -z "$use_modules"; then
-    use_modules=none
-  else
-    if test "$use_modules" != yes; then
-      for module in $use_modules; do
-        case $module in
-          no|none) break ;;
-          m4|traditional|gnu|load|mpeval) dir=modules ;;
-          import|modtest|shadow|stdlib|time) dir=tests ;;
-          *) AC_MSG_ERROR([Unrecognized module `$module' in --with-modules])
-            ;;
-        esac
-        DLPREOPEN="$DLPREOPEN -dlpreopen $dir/$module.la"
-        PREOPEN_DEPENDENCIES="$PREOPEN_DEPENDENCIES $dir/$module.la"
-      done
-    fi
-  fi
-AC_MSG_RESULT([$use_modules])
-AC_SUBST([DLPREOPEN])
-AC_SUBST([PREOPEN_DEPENDENCIES])
-
-
 ## ---------------- ##
 ## Gettext support. ##
 ## ---------------- ##
diff --git a/doc/m4.texi b/doc/m4.texi
index e09f3c4..ba1b157 100644
--- a/doc/m4.texi
+++ b/doc/m4.texi
@@ -6587,16 +6587,11 @@ could be added only by writing more code in the M4 
language, or at the
 extreme by hacking the sources and recompiling the whole thing to make
 a custom M4 installation.
 
-Starting with release 2.0, M4 uses Libtool's @code{libltdl} facilities
-(@pxref{Using libltdl, , libltdl, libtool, The GNU Libtool Manual})
-to move all of M4's builtins out to pluggable modules.  Unless compile
-time options are set to change the default build, the installed M4 2.0
-binary is virtually identical to 1.4.x, supporting the same builtins.
-However, additional modules can be loaded into the running M4 interpreter
-as it is started up at the command line, or during normal expansion of
-macros.  This facilitates runtime extension of the M4 builtin macro
-list using compiled C code linked against a new shared library,
-typically named @file{libm4.so}.
+Starting with release 2.0, M4 supports and is composed of loadable modules.
+Additional modules can be loaded into the running M4 interpreter as it is
+started up at the command line, or during normal expansion of macros.  This
+facilitates runtime extension of the M4 builtin macro list using compiled C
+code linked against a new shared library, typically named @file{libm4.so}.
 
 For example, you might want to add a @code{setenv} builtin to M4, to
 use before invoking @code{esyscmd}.  We might write a @file{setenv.c}
@@ -6655,27 +6650,11 @@ setenv(`PATH', `/sbin:/bin:/usr/sbin:/usr/bin')
 @result{}
 @end example
 
-Also, at build time, you can choose which modules to build into
-the core (so that they will be available without dynamic loading).
-SUSv3 M4 functionality is contained in the module @samp{m4}, GNU
-extensions in the module @samp{gnu}, additional module builtins in the
-module @samp{load} and so on.
-
-We hinted earlier that the @code{m4} and @code{gnu} modules are
-preloaded into the installed M4 binary, but it is possible to install
-a @emph{thinner} binary; for example, omitting the GNU
-extensions by configuring the distribution with @kbd{./configure
---with-modules=m4}.  For a binary built with that option to understand
-code that uses GNU extensions, you must then run @kbd{m4 gnu}.
-It is also possible to build a @emph{fatter} binary with additional
-modules preloaded: adding, say, the @code{load} module using
address@hidden/configure --with-modules="m4 gnu load"}.
-
-GNU M4 now has a facility for defining additional builtins without
-recompiling the sources.  In actual fact, all of the builtins provided
-by GNU M4 are loaded from such modules.  All of the builtin
-descriptions in this manual are annotated with the module from which
-they are loaded -- mostly from the module @samp{m4}.
+Also, at run time, you can choose which core modules to load. SUSv3 M4
+functionality is contained in the module @samp{m4}, GNU extensions in the
+module @samp{gnu}, and so on. All of the builtin descriptions in this manual
+are annotated with the module from which they are loaded -- mostly from the
+module @samp{m4}.
 
 When you start GNU M4, the modules @samp{m4} and @samp{gnu} are
 loaded by default.  If you supply the @option{-G} option at startup, the
@@ -6698,8 +6677,8 @@ a module multiple times will not affect the order of this 
list, the
 position depends on when the module was @emph{first} loaded.
 @end deffn
 
-For example, if GNU @code{m4} is started with the
address@hidden module, @code{m4modules} will yield the following:
+For example, after GNU @code{m4} is started with no additional modules,
address@hidden will yield the following:
 
 @example
 $ @kbd{m4}
@@ -6751,16 +6730,6 @@ Expands to the empty string, as an indication that the
 @samp{traditional} module is loaded.
 @end deffn
 
address@hidden load
-This module supplies the builtins for advanced use of modules from within a
-GNU @code{m4} program.  @xref{Modules}, for more details.  The
-module also defines the following macro:
-
address@hidden {Macro (load)} __load__
-Expands to the empty string, as an indication that the @samp{load}
-module is loaded.
address@hidden deffn
-
 @item mpeval
 This module provides the implementation for the experimental
 @code{mpeval} feature.  If the host machine does not have the
diff --git a/m4/path.c b/m4/path.c
index ca5e261..8f57726 100644
--- a/m4/path.c
+++ b/m4/path.c
@@ -337,7 +337,7 @@ m4_load_filename (m4 *context, const m4_call_info *caller,
 
   if (!m4_get_posixly_correct_opt (context)
       && suffix
-      && STREQ (suffix, ".so"))
+      && STREQ (suffix, LT_MODULE_EXT))
     {
       m4_module_load (context, filename, obs);
     }
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 119898e..84cd9ea 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -21,7 +21,6 @@
 
 # Some tests cannot be performed with all the configurations.
 address@hidden@
address@hidden@
 
 # Prefer tools learned during configure.
 SED='@SED@'
diff --git a/tests/builtins.at b/tests/builtins.at
index 5b17a86..8bda542 100644
--- a/tests/builtins.at
+++ b/tests/builtins.at
@@ -806,7 +806,6 @@ AT_CLEANUP
 ## ------ ##
 
 AT_SETUP([mpeval])
-AT_CHECK_DYNAMIC_MODULE
 AT_CHECK_GMP
 
 AT_DATA([[in]],
diff --git a/tests/generate.awk b/tests/generate.awk
index a80d499..f0ee5a7 100755
--- a/tests/generate.awk
+++ b/tests/generate.awk
@@ -173,8 +173,6 @@ function new_test(input, status, output, error, options, 
xfail, examples) {
   if (error == "ignore\n")
     error = "ignore";
 
-  if (options ~ / (import|load|modtest|mpeval|perl|shadow|stdlib|time)/)
-    printf ("AT_CHECK_DYNAMIC_MODULE\n");
   if (options ~ / mpeval/)
     printf ("AT_CHECK_GMP\n");
   if (xfail == 1)
diff --git a/tests/modules.at b/tests/modules.at
index f5d28b7..9320ce4 100644
--- a/tests/modules.at
+++ b/tests/modules.at
@@ -27,7 +27,6 @@ AT_BANNER([Module support.])
 
 AT_SETUP([Freezing modules])
 AT_KEYWORDS([frozen])
-AT_CHECK_DYNAMIC_MODULE
 
 AT_DATA([[frozen.m4]],
 [[divert(1)dnl
@@ -78,7 +77,6 @@ AT_CLEANUP([frozen.m4f])
 # or M4-OPTIONS set to pick up test modules.
 m4_define([AT_CHECK_M4_MODTEST],
 [AT_SETUP([$1])
-AT_CHECK_DYNAMIC_MODULE
 
 AT_DATA([input.m4],
 [[test
@@ -130,7 +128,6 @@ AT_CHECK_M4_MODTEST([M4PATH: relative path],
 ## ------ ##
 
 AT_SETUP([modules: shadow])
-AT_CHECK_DYNAMIC_MODULE
 
 AT_DATA([[input.m4]],
 [[# no modules loaded yet
@@ -233,7 +230,6 @@ AT_CLEANUP
 # from the first command:
 
 AT_SETUP([modules: importing])
-AT_CHECK_DYNAMIC_MODULE
 
 AT_DATA([[input.m4]],
 [[import
@@ -278,7 +274,6 @@ AT_CLEANUP
 # Support text macros with requested numbers of parameters.
 
 AT_SETUP([modules: text])
-AT_CHECK_DYNAMIC_MODULE
 
 AT_DATA([input.m4],
 [[__test__
@@ -320,7 +315,6 @@ AT_CLEANUP
 # memory and then redefined by a subsequent load.
 
 AT_SETUP([modules: trace])
-AT_CHECK_DYNAMIC_MODULE
 
 AT_DATA([[input.m4]],
 [[test
diff --git a/tests/testsuite.at b/tests/testsuite.at
index aad7f0d..a7cdfc4 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -141,17 +141,6 @@ m4_pattern_allow([^dnl$])
 # We exercise m4.
 AT_TESTED([m4])
 
-# AT_CHECK_DYNAMIC_MODULE
-# -----------------------
-# Add keyword `module' to the test, and skip the test if dynamic
-# modules were disabled at configure time.
-m4_define([AT_CHECK_DYNAMIC_MODULE],
-[AT_KEYWORDS([module])
-AT_CHECK([if test "x$DYNAMIC_MODULES" = xno ; then
-  echo Dynamic module support not detected, skipping this test.
-  exit 77
-fi])])
-
 # AT_CHECK_GMP
 # -----------------------
 # Add keyword `gmp' to the test, and skip the test if the use of GMP


hooks/post-receive
-- 
GNU M4 source repository



reply via email to

[Prev in Thread] Current Thread [Next in Thread]