libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.4.4-3-gef519e9


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.4.4-3-gef519e9
Date: Wed, 03 Dec 2014 19:00:32 +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 Libtool".

The branch, master has been updated
       via  ef519e9eccb47d53857876c1486270b1a6dd89c2 (commit)
       via  f31984b92ad1b31d7e4c964a0949a916371b0a60 (commit)
      from  6cc831405a3b290735739fbe27807414f37ac4bb (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 ef519e9eccb47d53857876c1486270b1a6dd89c2
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Dec 3 18:53:08 2014 +0000

    bootstrap: sync with upstream for runtime M4 checking functions.
    
    * gl/build-aux/extract-trace: Sync with upstream for runtime M4
    checking functions.
    * bootstrap: Regenerate.
    * NEWS: Update.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

commit f31984b92ad1b31d7e4c964a0949a916371b0a60
Author: Gary V. Vaughan <address@hidden>
Date:   Wed Dec 3 18:33:57 2014 +0000

    configury: bail out early if GNU M4 is not on the path.
    
    Now that libtoolize requires an installed GNU M4 to parse
    configure.ac and aclocal.m4 sources for libltdl macros, let the
    user know at configure time when it is missing.
    * m4/m4.m4: New file for rejecting non-GNU and buggy GNU versions
    of M4. Copied from GNU Autoconf m4.m4.
    * Makefile.am (lt_aclocal_m4_deps): Add m4/m4.m4.
    * configure.ac (AC_PROG_GNU_M4): Call it.
    * NEWS: Update.
    Reported by Michael Felt
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

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

Summary of changes:
 Makefile.am                |    1 +
 NEWS                       |   10 +++
 bootstrap                  |  135 +++++++++++++++++++++++++++++++-------------
 configure.ac               |    7 ++
 gl/build-aux/extract-trace |  135 +++++++++++++++++++++++++++++++-------------
 m4/m4.m4                   |   82 ++++++++++++++++++++++++++
 6 files changed, 292 insertions(+), 78 deletions(-)
 create mode 100644 m4/m4.m4

diff --git a/Makefile.am b/Makefile.am
index 60a067e..1fb5e5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -356,6 +356,7 @@ lt_aclocal_m4_deps = \
        $(srcdir)/$(macro_dir)/ltdl.m4 \
        $(srcdir)/$(macro_dir)/ltoptions.m4 \
        $(srcdir)/$(macro_dir)/ltsugar.m4 \
+       $(srcdir)/$(macro_dir)/m4.m4 \
        $(srcdir)/$(ltdl_dir)/configure.ac
 
 lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps)
diff --git a/NEWS b/NEWS
index 1112312..280ab4c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,16 @@ NEWS - list of user-visible changes between releases of GNU 
Libtool
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** New features:
+
+  - Libtoolize searches for the best available M4 on the user PATH at
+    runtime, rather than settling for the first one found.
+
+** Bug fixes:
+
+  - Bail out at configure time if the installed M4 is not sufficient
+    for the purposes of libtoolize.
+
 
 * Noteworthy changes in release 2.4.4 (2014-11-29) [stable]
 
diff --git a/bootstrap b/bootstrap
index 45d41ec..a6ffd54 100755
--- a/bootstrap
+++ b/bootstrap
@@ -2155,7 +2155,7 @@ test -z "$progpath" && . `echo "$0" |${SED-sed} 
's|[^/]*$||'`/funclib.sh
 test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 
's|[^/]*$||'`/options-parser
 
 # Set a version string.
-scriptversion=2014-01-04.01; # UTC
+scriptversion=2014-12-03.16; # UTC
 
 # 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
@@ -2224,6 +2224,68 @@ func_autoconf_configure ()
 }
 
 
+# func_tool_version_output CMD [FATAL-ERROR-MSG]
+# ----------------------------------------------
+# Attempt to run 'CMD --version', discarding errors.  The output can be
+# ignored by redirecting stdout, and this function used simply to test
+# whether the command exists and exits normally when passed a
+# '--version' argument.
+# When FATAL-ERROR-MSG is given, then this function will display the
+# message and exit if running 'CMD --version' returns a non-zero exit
+# status.
+func_tool_version_output ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fatal_error_msg=$2
+
+    # Some tools, like 'git2cl' produce thousands of lines of output
+    # unless stdin is /dev/null - in that case we want to return
+    # successfully without saving all of that output.  Other tools,
+    # such as 'help2man' exit with a non-zero status when stdin comes
+    # from /dev/null, so we re-execute without /dev/null if that
+    # happens.  This means that occasionally, the output from both calls
+    # ends up in the result, but the alternative would be to discard the
+    # output from one call, and hope the other produces something useful.
+    { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
+    _G_status=$?
+
+    test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
+        && func_fatal_error "$_G_fatal_error_msg"
+
+    (exit $_G_status)
+}
+
+
+# func_tool_version_number CMD [FATAL-ERROR-MSG]
+# ----------------------------------------------
+# Pass arguments to func_tool_version_output, but set
+# $func_tool_version_number_result to the last dot delimited digit string
+# on the first line of output.
+func_tool_version_number ()
+{
+    $debug_cmd
+
+    _G_verout=`func_tool_version_output "$@" |sed 1q`
+    _G_status=$?
+
+    # A version number starts with a digit following a space on the first
+    # line of output from `--version`.
+    if test -n "$_G_verout"; then
+      _G_vernum=`expr "$_G_verout" : '.* \([0-9][^ ]*\)'`
+    fi
+
+    if test -n "$_G_vernum"; then
+      printf '%s\n' "$_G_vernum"
+    else
+      printf '%s\n' "$_G_verout"
+    fi
+
+    (exit $_G_status)
+}
+
+
 # func_find_tool ENVVAR NAMES...
 # ------------------------------
 # Search for a required program.  Use the value of ENVVAR, if set,
@@ -2241,16 +2303,44 @@ func_find_tool ()
     if test -n "$_G_find_tool_res"; then
       _G_find_tool_error_prefix="\$$find_tool_envvar: "
     else
+      _G_find_tool_res=
+      _G_bestver=
       for _G_prog
       do
-        if func_tool_version_output $_G_prog >/dev/null; then
-          _G_find_tool_res=$_G_prog
-          break
-        fi
+        _G_find_tool_save_IFS=$IFS
+       IFS=:
+       for _G_dir in $PATH; do
+         IFS=$_G_find_tool_save_IFS
+         _G_progpath=$_G_dir/$_G_prog
+          test -r $_G_progpath && {
+            _G_curver=`func_tool_version_number $_G_progpath`
+           case $_G_bestver,$_G_curver in
+           ,)
+             # first non--version responsive prog sticks!
+              test -n "$_G_progpath" || _G_find_tool_res=$_G_progpath
+              ;;
+            ,*)
+             # first --version responsive prog beats non--version responsive!
+             _G_find_tool_res=$_G_progpath
+             _G_bestver=$_G_curver
+             ;;
+           *,*)
+             # another --version responsive prog must be newer to beat 
previous one!
+             test "x$_G_curver" = "x$_G_bestver" \
+               || func_lt_ver "$_G_curver" "$_G_bestver" \
+               || {
+                    _G_find_tool_res=$_G_progpath
+                    _G_bestver=$_G_curver
+                  }
+             ;;
+           esac
+          }
+       done
+       IFS=$_G_find_tool_save_IFS
       done
     fi
     if test -n "$_G_find_tool_res"; then
-      func_tool_version_output >/dev/null $_G_find_tool_res "\
+      func_tool_version_number >/dev/null $_G_find_tool_res "\
 ${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'"
 
       # Make sure the result is exported to the environment for children
@@ -2265,39 +2355,6 @@ One of these is required:
 }
 
 
-# func_tool_version_output CMD [FATAL-ERROR-MSG]
-# ----------------------------------------------
-# Attempt to run 'CMD --version', discarding errors.  The output can be
-# ignored by redirecting stdout, and this function used simply to test
-# whether the command exists and exits normally when passed a
-# '--version' argument.
-# When FATAL-ERROR-MSG is given, then this function will display the
-# message and exit if running 'CMD --version' returns a non-zero exit
-# status.
-func_tool_version_output ()
-{
-    $debug_cmd
-
-    _G_cmd=$1
-    _G_fatal_error_msg=$2
-
-    # Some tools, like 'git2cl' produce thousands of lines of output
-    # unless stdin is /dev/null - in that case we want to return
-    # successfully without saving all of that output.  Other tools,
-    # such as 'help2man' exit with a non-zero status when stdin comes
-    # from /dev/null, so we re-execute without /dev/null if that
-    # happens.  This means that occasionally, the output from both calls
-    # ends up in the result, but the alternative would be to discard the
-    # output from one call, and hope the other produces something useful.
-    { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
-    _G_status=$?
-
-    test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
-        && func_fatal_error "$_G_fatal_error_msg"
-
-    (exit $_G_status)
-}
-
 
 ## -------------------- ##
 ## Resource management. ##
diff --git a/configure.ac b/configure.ac
index 77a0f66..630185a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,6 +81,13 @@ AS_BOX([Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION])
 echo
 
 
+## ------------ ##
+## Shell tools. ##
+## ------------ ##
+
+AC_PROG_GNU_M4
+
+
 ## ------------------------ ##
 ## Automake Initialisation. ##
 ## ------------------------ ##
diff --git a/gl/build-aux/extract-trace b/gl/build-aux/extract-trace
index 41a7b8b..14b0f0a 100755
--- a/gl/build-aux/extract-trace
+++ b/gl/build-aux/extract-trace
@@ -12,7 +12,7 @@ test -z "$progpath" && . `echo "$0" |${SED-sed} 
's|[^/]*$||'`/funclib.sh
 test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 
's|[^/]*$||'`/options-parser
 
 # Set a version string.
-scriptversion=2014-01-04.01; # UTC
+scriptversion=2014-12-03.16; # UTC
 
 # 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
@@ -81,6 +81,68 @@ func_autoconf_configure ()
 }
 
 
+# func_tool_version_output CMD [FATAL-ERROR-MSG]
+# ----------------------------------------------
+# Attempt to run 'CMD --version', discarding errors.  The output can be
+# ignored by redirecting stdout, and this function used simply to test
+# whether the command exists and exits normally when passed a
+# '--version' argument.
+# When FATAL-ERROR-MSG is given, then this function will display the
+# message and exit if running 'CMD --version' returns a non-zero exit
+# status.
+func_tool_version_output ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fatal_error_msg=$2
+
+    # Some tools, like 'git2cl' produce thousands of lines of output
+    # unless stdin is /dev/null - in that case we want to return
+    # successfully without saving all of that output.  Other tools,
+    # such as 'help2man' exit with a non-zero status when stdin comes
+    # from /dev/null, so we re-execute without /dev/null if that
+    # happens.  This means that occasionally, the output from both calls
+    # ends up in the result, but the alternative would be to discard the
+    # output from one call, and hope the other produces something useful.
+    { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
+    _G_status=$?
+
+    test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
+        && func_fatal_error "$_G_fatal_error_msg"
+
+    (exit $_G_status)
+}
+
+
+# func_tool_version_number CMD [FATAL-ERROR-MSG]
+# ----------------------------------------------
+# Pass arguments to func_tool_version_output, but set
+# $func_tool_version_number_result to the last dot delimited digit string
+# on the first line of output.
+func_tool_version_number ()
+{
+    $debug_cmd
+
+    _G_verout=`func_tool_version_output "$@" |sed 1q`
+    _G_status=$?
+
+    # A version number starts with a digit following a space on the first
+    # line of output from `--version`.
+    if test -n "$_G_verout"; then
+      _G_vernum=`expr "$_G_verout" : '.* \([0-9][^ ]*\)'`
+    fi
+
+    if test -n "$_G_vernum"; then
+      printf '%s\n' "$_G_vernum"
+    else
+      printf '%s\n' "$_G_verout"
+    fi
+
+    (exit $_G_status)
+}
+
+
 # func_find_tool ENVVAR NAMES...
 # ------------------------------
 # Search for a required program.  Use the value of ENVVAR, if set,
@@ -98,16 +160,44 @@ func_find_tool ()
     if test -n "$_G_find_tool_res"; then
       _G_find_tool_error_prefix="\$$find_tool_envvar: "
     else
+      _G_find_tool_res=
+      _G_bestver=
       for _G_prog
       do
-        if func_tool_version_output $_G_prog >/dev/null; then
-          _G_find_tool_res=$_G_prog
-          break
-        fi
+        _G_find_tool_save_IFS=$IFS
+       IFS=:
+       for _G_dir in $PATH; do
+         IFS=$_G_find_tool_save_IFS
+         _G_progpath=$_G_dir/$_G_prog
+          test -r $_G_progpath && {
+            _G_curver=`func_tool_version_number $_G_progpath`
+           case $_G_bestver,$_G_curver in
+           ,)
+             # first non--version responsive prog sticks!
+              test -n "$_G_progpath" || _G_find_tool_res=$_G_progpath
+              ;;
+            ,*)
+             # first --version responsive prog beats non--version responsive!
+             _G_find_tool_res=$_G_progpath
+             _G_bestver=$_G_curver
+             ;;
+           *,*)
+             # another --version responsive prog must be newer to beat 
previous one!
+             test "x$_G_curver" = "x$_G_bestver" \
+               || func_lt_ver "$_G_curver" "$_G_bestver" \
+               || {
+                    _G_find_tool_res=$_G_progpath
+                    _G_bestver=$_G_curver
+                  }
+             ;;
+           esac
+          }
+       done
+       IFS=$_G_find_tool_save_IFS
       done
     fi
     if test -n "$_G_find_tool_res"; then
-      func_tool_version_output >/dev/null $_G_find_tool_res "\
+      func_tool_version_number >/dev/null $_G_find_tool_res "\
 ${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'"
 
       # Make sure the result is exported to the environment for children
@@ -122,39 +212,6 @@ One of these is required:
 }
 
 
-# func_tool_version_output CMD [FATAL-ERROR-MSG]
-# ----------------------------------------------
-# Attempt to run 'CMD --version', discarding errors.  The output can be
-# ignored by redirecting stdout, and this function used simply to test
-# whether the command exists and exits normally when passed a
-# '--version' argument.
-# When FATAL-ERROR-MSG is given, then this function will display the
-# message and exit if running 'CMD --version' returns a non-zero exit
-# status.
-func_tool_version_output ()
-{
-    $debug_cmd
-
-    _G_cmd=$1
-    _G_fatal_error_msg=$2
-
-    # Some tools, like 'git2cl' produce thousands of lines of output
-    # unless stdin is /dev/null - in that case we want to return
-    # successfully without saving all of that output.  Other tools,
-    # such as 'help2man' exit with a non-zero status when stdin comes
-    # from /dev/null, so we re-execute without /dev/null if that
-    # happens.  This means that occasionally, the output from both calls
-    # ends up in the result, but the alternative would be to discard the
-    # output from one call, and hope the other produces something useful.
-    { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
-    _G_status=$?
-
-    test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
-        && func_fatal_error "$_G_fatal_error_msg"
-
-    (exit $_G_status)
-}
-
 
 ## -------------------- ##
 ## Resource management. ##
diff --git a/m4/m4.m4 b/m4/m4.m4
new file mode 100644
index 0000000..80bd42c
--- /dev/null
+++ b/m4/m4.m4
@@ -0,0 +1,82 @@
+# m4.m4 serial 12
+
+# Copyright (C) 2000, 2006-2014 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.
+
+# AC_PROG_GNU_M4
+# --------------
+# Check for GNU M4, at least 1.4.6 (all earlier versions had bugs in
+# trace support and regexp support):
+# http://lists.gnu.org/archive/html/bug-gnu-utils/2006-11/msg00096.html
+# http://lists.gnu.org/archive/html/bug-autoconf/2009-07/msg00023.html
+# Also, check whether --error-output (through 1.4.x) or --debugfile (2.0)
+# is supported, and AC_SUBST M4_DEBUGFILE accordingly.
+# Also avoid versions of m4 that trigger strstr bugs.
+AC_DEFUN([AC_PROG_GNU_M4],
+  [AC_ARG_VAR([M4], [Location of GNU M4 1.4.6 or later.  Defaults to the first
+    program of 'm4', 'gm4', or 'gnum4' on PATH that meets Autoconf needs.])
+  AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4],
+    [rm -f conftest.m4f
+ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
+AS_UNSET([POSIXLY_CORRECT])
+AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
+      [dnl Creative quoting here to avoid raw dnl and ifdef in configure.
+      # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F.
+      # Root out GNU M4 1.4.15 with buggy false negative replacement strstr.
+      # Root out Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 with buggy
+      # false positive strstr.
+      ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)'
+      ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl
+      ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(..wi.d.,.d.),-1,bug)'
+      ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(dnl
+;:11-:12-:12-:12-:12-:12-:12-:12-:12.:12.:12.:12.:12.:12.:12.:12.:12-,dnl
+:12-:12-:12-:12-:12-:12-:12-:12-),-1,,strstr-bug2)'
+      test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
+      && test -z "`AS_ECHO([$ac_snippet]) | $ac_path_M4 --trace=mac 2>&1`" \
+      && test -f conftest.m4f \
+      && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:
+      rm -f conftest.m4f],
+      [AC_MSG_ERROR([no acceptable m4 could be found in \$PATH.
+GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
+GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
+Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.])])])
+  M4=$ac_cv_path_M4
+  AC_CACHE_CHECK([whether $ac_cv_path_M4 accepts --gnu],
+    [ac_cv_prog_gnu_m4_gnu],
+    [case `$M4 --help < /dev/null 2>&1` in
+      *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;;
+      *) ac_cv_prog_gnu_m4_gnu=no ;;
+    esac])
+  if test "$ac_cv_prog_gnu_m4_gnu" = yes; then
+    M4_GNU=--gnu
+  else
+    M4_GNU=
+  fi
+  AC_SUBST([M4_GNU])
+  if test x$ac_had_posixly_correct = xyes; then
+    POSIXLY_CORRECT=:
+    if test $ac_cv_prog_gnu_m4_gnu = no; then
+      AC_MSG_WARN([the version of M4 that was found does not support -g])
+      AC_MSG_WARN([using it with POSIXLY_CORRECT set may cause problems])
+    fi
+  fi
+  AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],
+    [case `$M4 --help < /dev/null 2>&1` in
+      *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
+      *) ac_cv_prog_gnu_m4_debugfile=--error-output ;;
+    esac])
+  AC_SUBST([M4_DEBUGFILE], [$ac_cv_prog_gnu_m4_debugfile])
+])
+
+# Compatibility for bootstrapping with Autoconf 2.61.
+dnl FIXME - replace this with AC_PREREQ([2.62]) after the release.
+# AC_PATH_PROGS_FEATURE_CHECK was added the same time the slightly broken,
+# undocumented _AC_PATH_PROG_FEATURE_CHECK was deleted.
+m4_ifndef([AC_PATH_PROGS_FEATURE_CHECK],
+  [m4_define([AC_PATH_PROGS_FEATURE_CHECK],
+    [_AC_PATH_PROG_FEATURE_CHECK([$1], [$2], [$3], [$5])
+])])


hooks/post-receive
-- 
GNU Libtool



reply via email to

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