diff -Naurd autoconf/ChangeLog autoconf-patched/ChangeLog --- autoconf/ChangeLog 2006-09-06 12:58:50.000000000 +0900 +++ autoconf-patched/ChangeLog 2006-09-07 19:05:18.000000000 +0900 @@ -1,3 +1,11 @@ +2006-09-07 Romain Lenglet + + * lib/autoconf/erlang.m4 (AC_ERLANG_SUBST_ERTS_VERSION): Added + AC_ERLANG_SUBST_ERTS_VERSION macro. + * doc/autoconf.texi (Erlang Libraries): Document + AC_ERLANG_SUBST_ERTS_VERSION macro and ERLANG_ERTS_VERSION + variable. + 2006-09-05 Paul Eggert * doc/autoconf.texi (Preset Output Variables): srcdir and diff -Naurd autoconf/doc/autoconf.texi autoconf-patched/doc/autoconf.texi --- autoconf/doc/autoconf.texi 2006-09-06 12:58:50.000000000 +0900 +++ autoconf-patched/doc/autoconf.texi 2006-09-07 19:07:07.000000000 +0900 @@ -6724,7 +6724,7 @@ @cindex Erlang Autoconf defines the following macros for determining paths to the essential -Erlang/OTP programs: +Erlang/OTP programs, and information about those programs: @defmac AC_ERLANG_PATH_ERLC (@ovar{value-if-not-found}, @ovar{path}) @acindex{ERLANG_PATH_ERLC} @@ -6755,9 +6755,10 @@ @defmac AC_ERLANG_PATH_ERL (@ovar{value-if-not-found}, @ovar{path}) @acindex{ERLANG_PATH_ERL} @ovindex ERL -Determine an Erlang interpreter to use. If @code{ERL} is not already set in the -environment, check for @command{erl}. Set output variable @code{ERL} to the -complete path of the interpreter command found. +Determine an Erlang interpreter (ERTS - Erlang RunTime System) to use. +If @code{ERL} is not already set in the environment, check for address@hidden Set output variable @code{ERL} to the complete path of +the interpreter command found. The two optional arguments have the same meaning as the two last arguments of macro @code{AC_PROG_PATH} for looking for the @command{erl} program. For @@ -6776,6 +6777,15 @@ program is not found. @end defmac address@hidden AC_ERLANG_SUBST_ERTS_VERSION address@hidden address@hidden ERLANG_ERTS_VERSION +Determine the version of the Erlang interpreter (ERTS - Erlang RunTime +System) that is run when running the command the @code{ERL} variable is +set to. Set output variable @code{ERLANG_ERTS_VERSION} to the version +number of the interpreter. address@hidden defmac + @node Fortran Compiler @subsection Fortran Compiler Characteristics @@ -7361,6 +7371,11 @@ @end example @end defmac +To determine the version of the Erlang emulator (ERTS - Erlang RunTime +System), call the @code{AC_ERLANG_SUBST_ERTS_VERSION} macro instead, +which substitutes the @code{ERLANG_ERTS_VERSION} variable with the +emulator version. + In addition to the above macros, which test installed Erlang libraries, the following macros determine the paths to the directories into which newly built Erlang libraries are to be installed: diff -Naurd autoconf/lib/autoconf/erlang.m4 autoconf-patched/lib/autoconf/erlang.m4 --- autoconf/lib/autoconf/erlang.m4 2006-09-06 12:58:50.000000000 +0900 +++ autoconf-patched/lib/autoconf/erlang.m4 2006-09-07 18:40:59.000000000 +0900 @@ -269,6 +269,31 @@ ])# AC_ERLANG_SUBST_LIB_DIR + +dnl Determines the version of the Erlang/OTP emulator (ERTS) + +# AC_ERLANG_SUBST_ERTS_VERSION +# --------------- +AC_DEFUN([AC_ERLANG_SUBST_ERTS_VERSION], +[AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl +AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl +AC_CACHE_CHECK([for the Erlang/OTP ERTS version], + [erlang_cv_erts_version], + [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_version=`cat conftest.out`], + [AC_MSG_FAILURE([test Erlang program execution failed])]) + AC_LANG_POP(Erlang)[]dnl + ]) +AC_SUBST([ERLANG_ERTS_VERSION], [$erlang_cv_erts_version]) +])# AC_ERLANG_SUBST_ERTS_VERSION + + dnl Directories for installing Erlang/OTP packages are separated from the dnl directories determined by running the Erlang/OTP installation that is used dnl for building. diff -Naurd autoconf/NEWS autoconf-patched/NEWS --- autoconf/NEWS 2006-09-02 14:37:07.000000000 +0900 +++ autoconf-patched/NEWS 2006-09-07 19:12:22.000000000 +0900 @@ -13,6 +13,12 @@ New macro, with the behavior of the 2.60a AC_COMPUTE_INT macro. AC_COMPUTE_INT no longer caches or reports results. +** New macros and substituted variables to support Erlang/OTP. + New variables substituted to versions of libraries, by the + AC_ERLANG_CHECK_LIB macro: ERLANG_LIB_VER_. + New macro to determine the version of the Erlang emulator (ERTS): + AC_ERLANG_SUBST_ERTS_VERSION. + * Major changes in Autoconf 2.60a (2006-08-25) ** GNU M4 1.4.6 or later is now recommended. At least one "make check"