autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63-100-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63-100-g2509abe
Date: Fri, 24 Oct 2008 21:32:42 +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 Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=2509abe0dc371ffe74789dac9421d31019822133

The branch, master has been updated
       via  2509abe0dc371ffe74789dac9421d31019822133 (commit)
      from  6369d61222cbc8f1c930d4ed79cbdd2745178d55 (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 2509abe0dc371ffe74789dac9421d31019822133
Author: Paolo Bonzini <address@hidden>
Date:   Mon Oct 20 15:35:17 2008 +0200

    Use a shell function for AC_CHECK_FUNC.
    
    * lib/autoconf/functions.m4 (_AC_CHECK_FUNC_BODY): New macro.
    (AC_CHECK_FUNC): Use a shell function.
    * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Reduce number of forks.
    
    Signed-off-by: Eric Blake <address@hidden>

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

Summary of changes:
 ChangeLog                 |    8 ++++++++
 lib/autoconf/c.m4         |   23 +++++++++++------------
 lib/autoconf/functions.m4 |   30 +++++++++++++++++++++++-------
 3 files changed, 42 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b26d7ca..61b5f33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-24  Paolo Bonzini  <address@hidden>
+       and Eric Blake  <address@hidden>
+
+       Use a shell function for AC_CHECK_FUNC.
+       * lib/autoconf/functions.m4 (_AC_CHECK_FUNC_BODY): New macro.
+       (AC_CHECK_FUNC): Use a shell function.
+       * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Reduce number of forks.
+
 2008-10-24  Eric Blake  <address@hidden>
 
        Work around fact that gnulib-tool doesn't use m4_copy.
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index f3b3e5f..90a091c 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -189,8 +189,7 @@ m4_define([_AC_LANG_PREFIX(Objective C)], [OBJC])
 m4_define([AC_LANG_SOURCE(C)],
 [/* confdefs.h.  */
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >>conftest.$ac_ext
 /* end confdefs.h.  */
 $1])
 
@@ -883,7 +882,7 @@ AC_DEFUN([AC_PROG_CXX_C_O],
 [AC_REQUIRE([AC_PROG_CXX])dnl
 AC_LANG_PUSH([C++])dnl
 AC_CACHE_CHECK([whether $CXX understands -c and -o together],
-               [ac_cv_prog_cxx_c_o],
+              [ac_cv_prog_cxx_c_o],
 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
 # We test twice because some compilers refuse to overwrite an existing
 # `.o' file with `-o', although they will create one.
@@ -899,8 +898,8 @@ fi
 rm -f conftest*])
 if test $ac_cv_prog_cxx_c_o = no; then
   AC_DEFINE(CXX_NO_MINUS_C_MINUS_O, 1,
-            [Define to 1 if your C++ compiler doesn't accept
-             -c and -o together.])
+           [Define to 1 if your C++ compiler doesn't accept
+            -c and -o together.])
 fi
 AC_LANG_POP([C++])dnl
 ])# AC_PROG_CXX_C_O
@@ -1343,7 +1342,7 @@ AC_DEFUN([AC_PROG_CC_STDC],
   AS_CASE([$ac_cv_prog_cc_stdc],
     [no], [AC_MSG_RESULT([unsupported])],
     [''], [AC_MSG_RESULT([none needed])],
-          [AC_MSG_RESULT([$ac_cv_prog_cc_stdc])])
+         [AC_MSG_RESULT([$ac_cv_prog_cc_stdc])])
 ])
 
 
@@ -1536,10 +1535,10 @@ dnl the user did not specify a config header but is 
relying on the
 dnl default behavior for universal builds.
      m4_default([$4],
        [AC_CONFIG_COMMANDS_PRE([m4_ifset([AH_HEADER], [],
-         [AC_DIAGNOSE([obsolete],
-           [AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS])])])dnl
-        AC_DEFINE([AC_APPLE_UNIVERSAL_BUILD],1,
-          [Define if building universal (internal helper macro)])])
+        [AC_DIAGNOSE([obsolete],
+          [AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS])])])dnl
+       AC_DEFINE([AC_APPLE_UNIVERSAL_BUILD],1,
+         [Define if building universal (internal helper macro)])])
      ;; #(
    *)
      m4_default([$3],
@@ -1950,9 +1949,9 @@ AC_DEFUN([AC_OPENMP],
          done])])
     case $ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp in #(
       "none needed" | unsupported)
-        ;; #(
+       ;; #(
       *)
-        OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp 
;;
+       OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp 
;;
     esac
   fi
   AC_SUBST([OPENMP_]_AC_LANG_PREFIX[FLAGS])
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index f478ccc..0bc9299 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -61,18 +61,34 @@
 ## 1. Generic tests for functions.  ##
 ## -------------------------------- ##
 
+# _AC_CHECK_FUNC_BODY
+# -------------------
+# Shell function body for AC_CHECK_FUNC.
+m4_define([_AC_CHECK_FUNC_BODY],
+[  AS_LINENO_PUSH([$[]1])
+  AC_CACHE_CHECK([for $[]2], [$[]3],
+  [AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY($[]2)],
+                 [AS_VAR_SET([$[]3], [yes])],
+                 [AS_VAR_SET([$[]3], [no])])])
+  AS_LINENO_POP
+])# _AC_CHECK_FUNC_BODY
+
 
 # AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # -----------------------------------------------------------------
+# Check whether FUNCTION links in the current language.  Set the cache
+# variable ac_cv_func_FUNCTION accordingly, then execute
+# ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
 AC_DEFUN([AC_CHECK_FUNC],
-[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
-AC_CACHE_CHECK([for $1], [ac_var],
-[AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])],
-               [AS_VAR_SET([ac_var], [yes])],
-               [AS_VAR_SET([ac_var], [no])])])
+[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_check_func],
+  [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_check_func],
+    [LINENO FUNC VAR],
+    [Tests whether FUNC exists, setting the cache variable VAR accordingly])],
+  [_$0_BODY])]dnl
+[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])]dnl
+[ac_func_[]_AC_LANG_ABBREV[]_check_func "$LINENO" "$1" "ac_var"
 AS_VAR_IF([ac_var], [yes], [$2], [$3])
-AS_VAR_POPDEF([ac_var])dnl
-])# AC_CHECK_FUNC
+AS_VAR_POPDEF([ac_var])])# AC_CHECK_FUNC
 
 
 # _AH_CHECK_FUNCS(FUNCTION...)


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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