[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-52-g9e380c5
"Eric Blake" <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.cvs |
|---|---|
| Message-ID | <[email protected]> |
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 Autoconf source repository".
http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=9e380c5ada53c8212506aabc8971caaf5eae6137
The branch, master has been updated
via 9e380c5ada53c8212506aabc8971caaf5eae6137 (commit)
from 5f19cfb87838c2c04951b05ee4a33aa18db5ccd2 (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 9e380c5ada53c8212506aabc8971caaf5eae6137
Author: Romain Lenglet <[email protected]>
Date: Thu May 28 20:14:07 2009 +0900
New AC_ERLANG_SUBST_ERTS_VER macro.
* lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER.
* doc/autoconf.texi (Erlang Libraries): Document
AC_ERLANG_SUBST_ERTS_VER.
* NEWS: Likewise.
* AUTHORS: Update Romain Lenglet's email address.
* THANKS: Update.
Suggested by Ruslan Babayev.
Signed-off-by: Eric Blake <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
AUTHORS | 2 +-
ChangeLog | 11 +++++
NEWS | 3 +
THANKS | 3 +-
doc/autoconf.texi | 45 ++++++++++++++++++++-
lib/autoconf/erlang.m4 | 102 ++++++++++++++++++++++++++++-------------------
6 files changed, 120 insertions(+), 46 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index 9c07a86..aac3f00 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -83,7 +83,7 @@ Gregorio Guidi [email protected] 2005-03-03
Bruno Haible [email protected] 2005-06-12
Toby Oliver Hilary White [email protected] 2005-10-18
Eric Benjamin Blake [email protected] 2006-01-18
-Romain Lenglet [email protected] 2006-02-10
+Romain Lenglet [email protected] 2006-02-10
Markus Duft [email protected] 2006-08-03
Robert Schiele [email protected] 2006-09-12
Joel Edward Denny [email protected] 2006-09-15
diff --git a/ChangeLog b/ChangeLog
index e07b300..a9f3ca8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-05-28 Romain Lenglet <[email protected]>
+
+ New AC_ERLANG_SUBST_ERTS_VER macro.
+ * lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER.
+ * doc/autoconf.texi (Erlang Libraries): Document
+ AC_ERLANG_SUBST_ERTS_VER.
+ * NEWS: Likewise.
+ * AUTHORS: Update Romain Lenglet's email address.
+ * THANKS: Update.
+ Suggested by Ruslan Babayev.
+
2009-05-26 Eric Blake <[email protected]>
Sanitize more problematic environment variables.
diff --git a/NEWS b/NEWS
index 9626cac..82ba635 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ GNU Autoconf NEWS - User visible changes.
** AS_IF and AS_CASE have been taught to avoid syntax errors even when
given arguments that expand to just whitespace.
+** The following documented autoconf macros are new:
+ AC_ERLANG_SUBST_ERTS_VER
+
** Ensure AT_CHECK can support commands that include a # given with
proper m4 quoting. For shell comments, this is a new feature; for
non-shell comments, this fixes a regression introduced in 2.63b.
diff --git a/THANKS b/THANKS
index 3c2843b..eab63f2 100644
--- a/THANKS
+++ b/THANKS
@@ -313,8 +313,9 @@ Roger Leigh [email protected]
Roland McGrath [email protected]
Rolf Ebert [email protected]
Rolf Vandevaart [email protected]
-Romain Lenglet [email protected]
+Romain Lenglet [email protected]
Ruediger Kuhlmann [email protected]
+Ruslan Babayev [email protected]
Russ Allbery [email protected]
Russ Boylan [email protected]
Ryuji Abe [email protected]
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 3ddecdf..632058d 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -7798,10 +7798,22 @@ presence of certain Erlang libraries. All those macros require the
configuration of an Erlang interpreter and an Erlang compiler
(@pxref{Erlang Compiler and Interpreter}).
+@defmac AC_ERLANG_SUBST_ERTS_VER
+@acindex{ERLANG_SUBST_ERTS_VER}
+@ovindex ERLANG_ERTS_VER
+Set the output variable @code{ERLANG_ERTS_VER} to the version of the
+Erlang runtime system (as returned by Erlang's
+@code{erlang:system_info(version)} function). The result of this test
+is cached if caching is enabled when running @command{configure}. The
+@code{ERLANG_ERTS_VER} variable is not intended to be used for testing
+for features of specific ERTS versions, but to be used for substituting
+the ERTS version in Erlang/OTP release resource files (@code{.rel}
+files), as shown below.
+@end defmac
+
@defmac AC_ERLANG_SUBST_ROOT_DIR
@acindex{ERLANG_SUBST_ROOT_DIR}
@ovindex ERLANG_ROOT_DIR
-
Set the output variable @code{ERLANG_ROOT_DIR} to the path to the base
directory in which Erlang/OTP is installed (as returned by Erlang's
@code{code:root_dir/0} function). The result of this test is cached if
@@ -7811,7 +7823,6 @@ caching is enabled when running @command{configure}.
@defmac AC_ERLANG_SUBST_LIB_DIR
@acindex{ERLANG_SUBST_LIB_DIR}
@ovindex ERLANG_LIB_DIR
-
Set the output variable @code{ERLANG_LIB_DIR} to the path of the library
directory of Erlang/OTP (as returned by Erlang's
@code{code:lib_dir/0} function), which subdirectories each contain an installed
@@ -7824,7 +7835,6 @@ when running @command{configure}.
@acindex{ERLANG_CHECK_LIB}
@ovindex ERLANG_LIB_DIR_@var{library}
@ovindex ERLANG_LIB_VER_@var{library}
-
Test whether the Erlang/OTP library @var{library} is installed by
calling Erlang's @code{code:lib_dir/1} function. The result of this
test is cached if caching is enabled when running @command{configure}.
@@ -7848,6 +7858,35 @@ AC_ERLANG_CHECK_LIB([stdlib],
echo "is installed in \"$ERLANG_LIB_DIR_stdlib\""],
[AC_MSG_ERROR([stdlib was not found!])])
@end example
+
+The @samp{ERLANG_LIB_VER_@var{library}} variables (set by
+@code{AC_ERLANG_CHECK_LIB}) and the @code{ERLANG_ERTS_VER} variable (set
+by @code{AC_ERLANG_SUBST_ERTS_VER}) are not intended to be used for
+testing for features of specific versions of libraries or of the Erlang
+runtime system. Those variables are intended to be substituted in
+Erlang release resource files (@code{.rel} files). For instance, to
+generate a @file{example.rel} file for an application depending on the
+@code{stdlib} library, @file{configure.ac} could contain:
+
+@example
+AC_ERLANG_SUBST_ERTS_VER
+AC_ERLANG_CHECK_LIB([stdlib],
+ [],
+ [AC_MSG_ERROR([stdlib was not found!])])
+AC_CONFIG_FILES([example.rel])
+@end example
+
+@noindent
+The @file{example.rel.in} file used to generate @file{example.rel}
+should contain:
+
+@example
+{release,
+ {"@@PACKAGE@@", "@@VERSION@@"},
+ {erts, "@@ERLANG_ERTS_VER@@"},
+ [{stdlib, "@@ERLANG_LIB_VER_stdlib@@"},
+ {@@PACKAGE@@, "@@VERSION@@"}]}.
+@end example
@end defmac
In addition to the above macros, which test installed Erlang libraries, the
diff --git a/lib/autoconf/erlang.m4 b/lib/autoconf/erlang.m4
index 7f6d92d..1e4418b 100644
--- a/lib/autoconf/erlang.m4
+++ b/lib/autoconf/erlang.m4
@@ -1,6 +1,6 @@
# This file is part of Autoconf. -*- Autoconf -*-
# Erlang/OTP language support.
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
#
# 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
@@ -163,7 +163,7 @@ $2
# Find the Erlang preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able.
AC_DEFUN([AC_LANG_PREPROC(Erlang)],
[m4_warn([syntax],
- [$0: No preprocessor defined for ]_AC_LANG)])
+ [$0: No preprocessor defined for ]_AC_LANG)])
# AC_LANG_COMPILER(Erlang)
# ------------------------
@@ -175,8 +175,7 @@ AC_DEFUN([AC_LANG_COMPILER(Erlang)],
# AC_ERLANG_CHECK_LIB(LIBRARY, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------------------------
# Macro for checking if an Erlang library is installed, and to
-# determine its version
-#
+# determine its version.
AC_DEFUN([AC_ERLANG_CHECK_LIB],
[AC_REQUIRE([AC_ERLANG_PATH_ERLC])[]dnl
AC_REQUIRE([AC_ERLANG_PATH_ERL])[]dnl
@@ -184,29 +183,29 @@ AC_CACHE_CHECK([for Erlang/OTP '$1' library subdirectory],
[erlang_cv_lib_dir_$1],
[AC_LANG_PUSH(Erlang)[]dnl
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
- ReturnValue = case code:lib_dir("[$1]") of
- {error, bad_name} ->
- file:write_file("conftest.out", "not found\n"),
- 1;
- LibDir ->
- file:write_file("conftest.out", LibDir),
- 0
- end,
- halt(ReturnValue)])],
- [erlang_cv_lib_dir_$1=`cat conftest.out`],
- [if test ! -f conftest.out; then
- AC_MSG_FAILURE([test Erlang program execution failed])
- else
- erlang_cv_lib_dir_$1="not found"
- fi])
+ [AC_LANG_PROGRAM([], [dnl
+ ReturnValue = case code:lib_dir("[$1]") of
+ {error, bad_name} ->
+ file:write_file("conftest.out", "not found\n"),
+ 1;
+ LibDir ->
+ file:write_file("conftest.out", LibDir),
+ 0
+ end,
+ halt(ReturnValue)])],
+ [erlang_cv_lib_dir_$1=`cat conftest.out`],
+ [if test ! -f conftest.out; then
+ AC_MSG_FAILURE([test Erlang program execution failed])
+ else
+ erlang_cv_lib_dir_$1="not found"
+ fi])
AC_LANG_POP(Erlang)[]dnl
])
AC_CACHE_CHECK([for Erlang/OTP '$1' library version],
[erlang_cv_lib_ver_$1],
[AS_IF([test "$erlang_cv_lib_dir_$1" = "not found"],
- [erlang_cv_lib_ver_$1="not found"],
- [erlang_cv_lib_ver_$1=`AS_ECHO(["$erlang_cv_lib_dir_$1"]) | sed -n -e 's,^.*-\([[^/-]]*\)$,\1,p'`])[]dnl
+ [erlang_cv_lib_ver_$1="not found"],
+ [erlang_cv_lib_ver_$1=`AS_ECHO(["$erlang_cv_lib_dir_$1"]) | sed -n -e 's,^.*-\([[^/-]]*\)$,\1,p'`])[]dnl
])
AC_SUBST([ERLANG_LIB_DIR_$1], [$erlang_cv_lib_dir_$1])
AC_SUBST([ERLANG_LIB_VER_$1], [$erlang_cv_lib_ver_$1])
@@ -216,8 +215,7 @@ AS_IF([test "$erlang_cv_lib_dir_$1" = "not found"], [$3], [$2])
# AC_ERLANG_SUBST_ROOT_DIR
# ------------------------
-# Determines the Erlang/OTP root directory
-#
+# Determines the Erlang/OTP root directory.
AC_DEFUN([AC_ERLANG_SUBST_ROOT_DIR],
[AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl
AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl
@@ -225,13 +223,13 @@ AC_CACHE_CHECK([for Erlang/OTP root directory],
[erlang_cv_root_dir],
[AC_LANG_PUSH(Erlang)[]dnl
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
- RootDir = code:root_dir(),
- file:write_file("conftest.out", RootDir),
- ReturnValue = 0,
- halt(ReturnValue)])],
- [erlang_cv_root_dir=`cat conftest.out`],
- [AC_MSG_FAILURE([test Erlang program execution failed])])
+ [AC_LANG_PROGRAM([], [dnl
+ RootDir = code:root_dir(),
+ file:write_file("conftest.out", RootDir),
+ ReturnValue = 0,
+ halt(ReturnValue)])],
+ [erlang_cv_root_dir=`cat conftest.out`],
+ [AC_MSG_FAILURE([test Erlang program execution failed])])
AC_LANG_POP(Erlang)[]dnl
])
AC_SUBST([ERLANG_ROOT_DIR], [$erlang_cv_root_dir])
@@ -247,13 +245,13 @@ AC_CACHE_CHECK([for Erlang/OTP library base directory],
[erlang_cv_lib_dir],
[AC_LANG_PUSH(Erlang)[]dnl
AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([], [dnl
- LibDir = code:lib_dir(),
- file:write_file("conftest.out", LibDir),
- ReturnValue = 0,
- halt(ReturnValue)])],
- [erlang_cv_lib_dir=`cat conftest.out`],
- [AC_MSG_FAILURE([test Erlang program execution failed])])
+ [AC_LANG_PROGRAM([], [dnl
+ LibDir = code:lib_dir(),
+ file:write_file("conftest.out", LibDir),
+ ReturnValue = 0,
+ halt(ReturnValue)])],
+ [erlang_cv_lib_dir=`cat conftest.out`],
+ [AC_MSG_FAILURE([test Erlang program execution failed])])
AC_LANG_POP(Erlang)[]dnl
])
AC_SUBST([ERLANG_LIB_DIR], [$erlang_cv_lib_dir])
@@ -262,11 +260,9 @@ AC_SUBST([ERLANG_LIB_DIR], [$erlang_cv_lib_dir])
# AC_ERLANG_SUBST_INSTALL_LIB_DIR
# -------------------------------
-#
# Directories for installing Erlang/OTP packages are separated from the
# directories determined by running the Erlang/OTP installation that is used
# for building.
-#
AC_DEFUN([AC_ERLANG_SUBST_INSTALL_LIB_DIR],
[AC_MSG_CHECKING([for Erlang/OTP library installation base directory])
AC_ARG_VAR([ERLANG_INSTALL_LIB_DIR],
@@ -286,7 +282,8 @@ AC_DEFUN([AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR],
[AC_REQUIRE([AC_ERLANG_SUBST_INSTALL_LIB_DIR])[]dnl
AC_MSG_CHECKING([for Erlang/OTP '$1' library installation subdirectory])
AC_ARG_VAR([ERLANG_INSTALL_LIB_DIR_$1],
- [Erlang/OTP '$1' library installation subdirectory [ERLANG_INSTALL_LIB_DIR/$1-$2]])
+ [Erlang/OTP '$1' library installation subdirectory
+ [ERLANG_INSTALL_LIB_DIR/$1-$2]])
if test -n "$ERLANG_INSTALL_LIB_DIR_$1"; then
AC_MSG_RESULT([$ERLANG_INSTALL_LIB_DIR_$1])
else
@@ -294,3 +291,26 @@ else
AC_MSG_RESULT([$ERLANG_INSTALL_LIB_DIR/$1-$2])
fi
])# AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR
+
+
+# AC_ERLANG_SUBST_ERTS_VER
+# ------------------------
+# Determines the Erlang runtime system version.
+AC_DEFUN([AC_ERLANG_SUBST_ERTS_VER],
+[AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl
+AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl
+AC_CACHE_CHECK([for Erlang/OTP ERTS version],
+ [erlang_cv_erts_ver],
+ [AC_LANG_PUSH([Erlang])[]dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([], [dnl
+ Version = erlang:system_info(version),
+ file:write_file("conftest.out", Version),
+ ReturnValue = 0,
+ halt(ReturnValue)])],
+ [erlang_cv_erts_ver=`cat conftest.out`],
+ [AC_MSG_FAILURE([test Erlang program execution failed])])
+ AC_LANG_POP([Erlang])[]dnl
+ ])
+AC_SUBST([ERLANG_ERTS_VER], [$erlang_cv_erts_ver])
+])# AC_ERLANG_SUBST_ERTS_VER
hooks/post-receive
--
GNU Autoconf source repository