autoconf-patches
[Top][All Lists]
Advanced

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

[RFC] Shell functions, take 2


From: Paolo Bonzini
Subject: [RFC] Shell functions, take 2
Date: Tue, 6 May 2003 15:48:42 +0200

This version of the patch does not need the change to AC_INCLUDES_DEFAULT,
so that patch is withdrawn; this patch has the AS_VAR_SET and
AS_REQUIRE_SHELL_FN as prerequisites.  Passes make check (with my additional
tests) and FWIW it builds configure scripts for Autoconf and GNU Smalltalk
2.1.1 that exhibit no change in the output files.

If this is to be applied, I reckon it would be good to release Autoconf 2.58
or 2.57b just before this patch... of course WRT Autoconf I'm everything but
a release manager, but there are indeed some good things in 2.57a.

There is one known problem: some shells including bash reset $LINENO at the
beginning of a shell function, so the fifth line in a shell function is
output to config.log as configure:5.  I did not prepare a documentation
patch for this fact because I cannot test on other shells such as zsh or
pdksh.

To summarize (average means the average of GNU Smalltalk's four configure
script: the main one, libsnprintfv, libsigsegv, libltdl):
- the decrease in configure script size is 7-25% (average 15%)
- the speedup in autoconf is 10-30% (average 22%)
- the decrease in configure script speed is not easily measured (I measure a
change ranging from nothing to 6% slower, sometimes in user time and
sometimes only in wall time even if the machine is not loaded at all).

Paolo


2003-05-05  Paolo Bonzini  <address@hidden>

        * functions.m4 (AC_CHECK_FUNC): use shell functions
        * general.m4 (AC_CHECK_DECL): use shell functions
        (_AC_COMPUTE_INT_PREPROC,
        _AC_COMPUTE_INT_RUN): use AS_VAR_SET to set
        the variable
        * headers.m4 (_AC_CHECK_HEADER_MONGREL,
        _AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_NEW):
        use shell functions
        * libs.m4 (AC_SEARCH_LIBS, AC_CHECK_LIB): use
        shell functions
        * types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_SIZEOF,
        AC_CHECK_MEMBER): use shell functions


Attachment: ac-shell-func.patch
Description: Binary data


reply via email to

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