2007-05-02 Stepan Kasal * lib/autoconf/lang.m4, lib/autoconf/c.m4, lib/autoconf/fortran.m4, lib/autoconf/erlang.m4: Cleanup of section titles and other comments; no code change. Index: lib/autoconf/c.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v retrieving revision 1.245 diff -u -r1.245 c.m4 --- lib/autoconf/c.m4 6 Mar 2007 07:30:17 -0000 1.245 +++ lib/autoconf/c.m4 2 May 2007 15:10:21 -0000 @@ -51,8 +51,30 @@ # Roland McGrath, Noah Friedman, david d zuhn, and many others. +# Table of Contents: +# +# 1. Language selection +# and routines to produce programs in a given language. +# 1a. C 1b. C++ 1c. Objective C +# +# 2. Producing programs in a given language. +# 2a. C 2b. C++ 2c. Objective C +# +# 3. Looking for a compiler +# And possibly the associated preprocessor. +# 3a. C 3b. C++ 3c. Objective C +# +# 4. Compilers' characteristics. +# 4a. C + + + +## ----------------------- ## +## 1. Language selection. ## +## ----------------------- ## + # -------------------- # -# 1b. The C language. # +# 1a. The C language. # # -------------------- # @@ -83,8 +105,9 @@ m4_define([_AC_LANG_PREFIX(C)], [C]) + # ---------------------- # -# 1c. The C++ language. # +# 1b. The C++ language. # # ---------------------- # @@ -117,7 +140,7 @@ # ------------------------------ # -# 1d. The Objective C language. # +# 1c. The Objective C language. # # ------------------------------ # @@ -148,15 +171,15 @@ -## ---------------------- ## -## 2.Producing programs. ## -## ---------------------- ## - +## ----------------------- ## +## 2. Producing programs. ## +## ----------------------- ## # --------------- # -# 2b. C sources. # +# 2a. C sources. # # --------------- # + # AC_LANG_SOURCE(C)(BODY) # ----------------------- # We can't use '#line $LINENO "configure"' here, since @@ -299,10 +322,12 @@ ])]) + # ----------------- # -# 2c. C++ sources. # +# 2b. C++ sources. # # ----------------- # + # AC_LANG_SOURCE(C++)(BODY) # ------------------------- m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(C++)]) @@ -335,9 +360,10 @@ # ------------------------- # -# 2d. Objective C sources. # +# 2c. Objective C sources. # # ------------------------- # + # AC_LANG_SOURCE(Objective C)(BODY) # --------------------------------- m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(Objective C)]) @@ -374,7 +400,7 @@ ## -------------------------------------------- ## # -------------------- # -# 3b. The C compiler. # +# 3a. The C compiler. # # -------------------- # @@ -691,8 +717,9 @@ ])# AC_PROG_CC_C_O + # ---------------------- # -# 3c. The C++ compiler. # +# 3b. The C++ compiler. # # ---------------------- # @@ -878,8 +905,9 @@ ])# AC_PROG_CXX_C_O + # ------------------------------ # -# 3d. The Objective C compiler. # +# 3c. The Objective C compiler. # # ------------------------------ # @@ -1017,18 +1045,15 @@ - - - ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ## - # -------------------------------- # -# 4b. C compiler characteristics. # +# 4a. C compiler characteristics. # # -------------------------------- # + # _AC_PROG_CC_C89 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) # ---------------------------------------------------------------- # If the C compiler is not in ANSI C89 (ISO C90) mode by default, try Index: lib/autoconf/erlang.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/erlang.m4,v retrieving revision 1.4 diff -u -r1.4 erlang.m4 --- lib/autoconf/erlang.m4 17 Nov 2006 21:04:54 -0000 1.4 +++ lib/autoconf/erlang.m4 2 May 2007 15:10:21 -0000 @@ -47,8 +47,27 @@ # Written by Romain Lenglet. +# Table of Contents: +# +# 0. Utility macros +# +# 1. Language selection +# and routines to produce programs in a given language. +# +# 2. Producing programs in a given language. +# +# 3. Looking for a compiler +# And possibly the associated preprocessor. + + + +## ------------------- ## +## 0. Utility macros. ## +## ------------------- ## + + # AC_ERLANG_PATH_ERLC([VALUE-IF-NOT-FOUND], [PATH]) -# ---------------------------------------------- +# ------------------------------------------------- AC_DEFUN([AC_ERLANG_PATH_ERLC], [AC_ARG_VAR([ERLC], [Erlang/OTP compiler command [autodetected]])dnl if test -n "$ERLC"; then @@ -58,19 +77,21 @@ AC_PATH_TOOL(ERLC, erlc, [$1], [$2]) fi AC_ARG_VAR([ERLCFLAGS], [Erlang/OTP compiler flags [none]])dnl -])# AC_ERLANG_PATH_ERLC +]) + # AC_ERLANG_NEED_ERLC([PATH]) -# ------------------------ +# --------------------------- AC_DEFUN([AC_ERLANG_NEED_ERLC], [AC_ERLANG_PATH_ERLC([not found], [$1]) if test "$ERLC" = "not found"; then AC_MSG_ERROR([Erlang/OTP compiler (erlc) not found but required]) fi -])# AC_ERLANG_NEED_ERLC +]) + # AC_ERLANG_PATH_ERL([VALUE-IF-NOT-FOUND], [PATH]) -# --------------------------------------------- +# ------------------------------------------------ AC_DEFUN([AC_ERLANG_PATH_ERL], [AC_ARG_VAR([ERL], [Erlang/OTP interpreter command [autodetected]])dnl if test -n "$ERL"; then @@ -79,34 +100,25 @@ else AC_PATH_TOOL(ERL, erl, [$1], [$2])[]dnl fi -])# AC_ERLANG_PATH_ERL +]) + # AC_ERLANG_NEED_ERL([PATH]) -# ----------------------- +# -------------------------- AC_DEFUN([AC_ERLANG_NEED_ERL], [AC_ERLANG_PATH_ERL([not found], [$1]) if test "$ERL" = "not found"; then AC_MSG_ERROR([Erlang/OTP interpreter (erl) not found but required]) fi -])# AC_ERLANG_NEED_ERL - - - - - +]) -dnl Extend Autoconf's AC_LANG macro to accept Erlang as a language for tests ## ----------------------- ## ## 1. Language selection. ## ## ----------------------- ## -# ------------------------- # -# 1x. The Erlang language. # -# ------------------------- # - # AC_LANG(Erlang) # --------------- m4_define([AC_LANG(Erlang)], @@ -115,6 +127,7 @@ ac_link='$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD ; echo "#!/bin/sh" > conftest$ac_exeext ; AS_ECHO(["\"$ERL\" -run conftest start -run init stop -noshell"]) >> conftest$ac_exeext ; chmod +x conftest$ac_exeext' ]) + # AC_LANG_ERLANG # -------------- m4_define([AC_LANG_ERLANG], [AC_LANG(Erlang)]) @@ -130,15 +143,12 @@ m4_define([_AC_LANG_PREFIX(Erlang)], [ERL]) + ## ---------------------- ## ## 2.Producing programs. ## ## ---------------------- ## -# ---------------------- # -# 2x. Generic routines. # -# ---------------------- # - # AC_LANG_SOURCE(Erlang)(BODY) # ---------------------------- m4_define([AC_LANG_SOURCE(Erlang)], @@ -156,13 +166,11 @@ ]) + ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## -# ------------------------- # -# 3x. The Erlang compiler. # -# ------------------------- # # AC_LANG_PREPROC(Erlang) # ----------------------- @@ -172,20 +180,17 @@ [$0: No preprocessor defined for ]_AC_LANG)]) # AC_LANG_COMPILER(Erlang) -# ---------------------------- +# ------------------------ # Find the Erlang compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(Erlang)], [AC_REQUIRE([AC_ERLANG_PATH_ERLC])]) - - - -dnl Macro for checking if an Erlang library is installed, and to -dnl determine its version - # 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 +# AC_DEFUN([AC_ERLANG_CHECK_LIB], [AC_REQUIRE([AC_ERLANG_PATH_ERLC])[]dnl AC_REQUIRE([AC_ERLANG_PATH_ERL])[]dnl @@ -223,11 +228,10 @@ ])# AC_ERLANG_CHECK_LIB - -dnl Determines the Erlang/OTP root directory - # AC_ERLANG_SUBST_ROOT_DIR -# --------------- +# ------------------------ +# 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 @@ -247,8 +251,9 @@ AC_SUBST([ERLANG_ROOT_DIR], [$erlang_cv_root_dir]) ])# AC_ERLANG_SUBST_ROOT_DIR + # AC_ERLANG_SUBST_LIB_DIR -# --------------- +# ----------------------- AC_DEFUN([AC_ERLANG_SUBST_LIB_DIR], [AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl @@ -269,13 +274,13 @@ ])# AC_ERLANG_SUBST_LIB_DIR -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. - - # 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], @@ -290,7 +295,7 @@ # AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(PACKAGE_TARNAME, PACKAGE_VERSION) -# --------------- +# -------------------------------------------------------------------- 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]) Index: lib/autoconf/fortran.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/fortran.m4,v retrieving revision 1.217 diff -u -r1.217 fortran.m4 --- lib/autoconf/fortran.m4 29 Dec 2006 06:44:42 -0000 1.217 +++ lib/autoconf/fortran.m4 2 May 2007 15:10:22 -0000 @@ -49,6 +49,29 @@ # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. + +# Table of Contents: +# +# Preamble +# +# 0. Utility macros +# +# 1. Language selection +# and routines to produce programs in a given language. +# +# 2. Producing programs in a given language. +# +# 3. Looking for a compiler +# And possibly the associated preprocessor. +# +# 4. Compilers' characteristics. + + + +## ---------- ## +## Preamble. ## +## ---------- ## + # Fortran vs. Fortran 77: # This file contains macros for both "Fortran 77" and "Fortran", where # the former is the "classic" autoconf Fortran interface and is intended @@ -61,6 +84,12 @@ # _AC_LANG_PREFIX in order to name cache and environment variables, etc. + +## ------------------- ## +## 0. Utility macros. ## +## ------------------- ## + + # _AC_LIST_MEMBER_IF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # @@ -131,11 +160,6 @@ ## ----------------------- ## -# -------------------------- # -# 1d. The Fortran language. # -# -------------------------- # - - # AC_LANG(Fortran 77) # ------------------- m4_define([AC_LANG(Fortran 77)], @@ -196,14 +220,11 @@ [Fortran], [FC])]) -## ---------------------- ## -## 2.Producing programs. ## -## ---------------------- ## +## ----------------------- ## +## 2. Producing programs. ## +## ----------------------- ## -# --------------------- # -# 2d. Fortran sources. # -# --------------------- # # AC_LANG_SOURCE(Fortran 77)(BODY) # AC_LANG_SOURCE(Fortran)(BODY) @@ -261,11 +282,6 @@ ## -------------------------------------------- ## -# -------------------------- # -# 3d. The Fortran compiler. # -# -------------------------- # - - # AC_LANG_PREPROC(Fortran 77) # --------------------------- # Find the Fortran 77 preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. @@ -508,16 +524,12 @@ ])# AC_PROG_FC_C_O + ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ## -# ---------------------------------------- # -# 4d. Fortran 77 compiler characteristics. # -# ---------------------------------------- # - - # _AC_PROG_FC_V_OUTPUT([FLAG = $ac_cv_prog_{f77/fc}_v]) # ------------------------------------------------- # Link a trivial Fortran program, compiling with a verbose output FLAG Index: lib/autoconf/lang.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v retrieving revision 1.187 diff -u -r1.187 lang.m4 --- lib/autoconf/lang.m4 29 Apr 2007 05:50:27 -0000 1.187 +++ lib/autoconf/lang.m4 2 May 2007 15:10:23 -0000 @@ -54,29 +54,15 @@ # # 1. Language selection # and routines to produce programs in a given language. -# a. generic routines -# b. C -# c. C++ -# d. Fortran 77 # # 2. Producing programs in a given language. -# a. generic routines -# b. C -# c. C++ -# d. Fortran 77 # # 3. Looking for a compiler # And possibly the associated preprocessor. -# a. Generic routines. -# b. C -# c. C++ -# d. Fortran 77 +# +# 3a. Computing EXEEXT and OBJEXT. # # 4. Compilers' characteristics. -# a. Generic routines. -# b. C -# c. C++ -# d. Fortran 77 @@ -85,11 +71,6 @@ ## ----------------------- ## - -# -------------------------------- # -# 1a. Generic language selection. # -# -------------------------------- # - # AC_LANG_CASE(LANG1, IF-LANG1, LANG2, IF-LANG2, ..., DEFAULT) # ------------------------------------------------------------ # Expand into IF-LANG1 if the current language is LANG1 etc. else @@ -201,14 +182,9 @@ -## ---------------------- ## -## 2.Producing programs. ## -## ---------------------- ## - - -# ---------------------- # -# 2a. Generic routines. # -# ---------------------- # +## ----------------------- ## +## 2. Producing programs. ## +## ----------------------- ## # AC_LANG_CONFTEST(BODY) @@ -270,13 +246,11 @@ [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) + ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## -# ----------------------------------------------------- # -# 3a. Generic routines in compilers and preprocessors. # -# ----------------------------------------------------- # # AC_LANG_COMPILER # ---------------- @@ -405,9 +379,9 @@ -# ----------------------------- # -# Computing EXEEXT and OBJEXT. # -# ----------------------------- # +# --------------------------------- # +# 3a. Computing EXEEXT and OBJEXT. # +# --------------------------------- # # Files to ignore @@ -657,7 +631,6 @@ - ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ##