m4-patches
[Top][All Lists]
Advanced

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

head configure.ac cleanup


From: Eric Blake
Subject: head configure.ac cleanup
Date: Sat, 10 Jun 2006 15:15:04 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Right now, building CVS head of m4 requires CVS gnulib, CVS libtool,
autoconf 2.59d (an alpha drop) or better, and automake 1.9.6 plus patches
or a CVS build.  Therefore, we might as well prune some of the cruft that
has built up over the years that is now taken care of by newer autotools,
or which is no longer necessary because all viable porting targets can now
be assumed to be C89 capable.  Some of these cleanups are also ported from
branch-1_4.

2006-06-10  Eric Blake  <address@hidden>

        * README (Patches): Document the current dependence on CVS
        builds of autotools.
        * ltdl/m4/gnulib-cache.m4: Update, and use --macro-prefix=M4.
        * configure.ac: Use consistent quoting throughout.
        (AC_PREREQ): Bump to 2.59d.
        (AC_INIT): Package name begins with uppercase.
        (AC_ARG_WITH): Use AS_HELP_STRING.
        (AM_INIT_AUTOMAKE): Enable gnits mode.
        (AC_ISC_POSIX, AM_PROG_CC_STDC, AC_PROG_INSTALL, AC_PROG_MAKE_SET),
        (AC_PROG_AWK, AM_C_PROTOTYPES, AC_C_CONST, AC_HEADER_STDC),
        (AC_CHECK_HEADERS, AC_FUNC_ALLOCA, AC_FUNC_VPRINTF): Remove checks
        done by gnulib or automake, or which autoconf has declared
        obsolete.
        * m4/m4private.h (Includes): Assume C89 or better, and use errno
        unconditionally.
        * m4/output.c (Includes): Likewise.
        * modules/gnu.c (Includes): Likewise.
        * modules/m4.c (Includes): Likewise.
        * src/m4.h (Includes): Likewise.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEizZY84KuGfSFAYARAoJSAJ9oTP+2UWA/ZgUtQwTNsTFk2VJzfgCfRPKi
fyxBR0XdgizUIByXPLXJFvM=
=bUzN
-----END PGP SIGNATURE-----
Index: configure.ac
===================================================================
RCS file: /sources/m4/m4/configure.ac,v
retrieving revision 1.44
diff -u -p -r1.44 configure.ac
--- configure.ac        6 May 2006 12:19:07 -0000       1.44
+++ configure.ac        10 Jun 2006 21:09:38 -0000
@@ -17,12 +17,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301  USA
 
-AC_PREREQ([2.59])
+AC_PREREQ([2.59d])
 
 ## ------------------------ ##
 ## Autoconf initialisation. ##
 ## ------------------------ ##
-AC_INIT([GNU m4], [1.9a], address@hidden)
+AC_INIT([GNU M4], [1.9a], address@hidden)
 
 AC_CONFIG_SRCDIR([src/m4.h])
 AC_CONFIG_AUX_DIR([ltdl/config])
@@ -54,22 +54,22 @@ AC_DEFINE_UNQUOTED([TIMESTAMP], ["$TIMES
 ## -------------------------- ##
 ## M4 specific configuration. ##
 ## -------------------------- ##
+dnl Autoconf recommends that packages use lowercase for their package-specific
+dnl prefix for cache variables.  But in the case of m4, that collides with
+dnl the m4_ namespace provided by m4sugar, so we prefer M4_ as our
+dnl package-specific prefix.  FIXME - consistently use M4_ in the m4 macros
+dnl that feed the creation of configure.
+m4_pattern_forbid([^M4_])
 m4_pattern_allow([^m4_cv_])
 
-# We use some of Jim's macros.
-dnl m4_pattern_forbid([^jm_])
-dnl m4_pattern_allow([^jm_cv_])
-dnl m4_pattern_allow([^jm_ac_cv_])
-dnl m4_pattern_allow([^jm_with_])
-
-AC_MSG_CHECKING(for modules to preload)
+AC_MSG_CHECKING([for modules to preload])
   m4_pattern_allow([^m4_default_preload$])
   m4_default_preload="m4 traditional gnu"
   DLPREOPEN=
 
   AC_ARG_WITH([modules],
-    [AC_HELP_STRING([--with-modules=MODULES],
-                    [preload MODULES @<:@default: $m4_default_preload@:>@])],
+    [AS_HELP_STRING([--with-modules=MODULES],
+                   [preload MODULES @<:@default: $m4_default_preload@:>@])],
     [use_modules="$withval"],
     [use_modules="$m4_default_preload"])
 
@@ -85,16 +85,16 @@ AC_MSG_CHECKING(for modules to preload)
       done
     fi
   fi
-AC_MSG_RESULT($use_modules)
-AC_SUBST(DLPREOPEN)
-AC_SUBST(PREOPEN_DEPENDENCIES)
+AC_MSG_RESULT([$use_modules])
+AC_SUBST([DLPREOPEN])
+AC_SUBST([PREOPEN_DEPENDENCIES])
 
 
 
 ## ------------------------ ##
 ## Automake Initialisation. ##
 ## ------------------------ ##
-AM_INIT_AUTOMAKE([1.9.5 subdir-objects dist-bzip2])
+AM_INIT_AUTOMAKE([1.9.6 subdir-objects dist-bzip2 gnits])
 
 
 
@@ -102,10 +102,8 @@ AM_INIT_AUTOMAKE([1.9.5 subdir-objects d
 ## C compiler checks. ##
 ## ------------------ ##
 AC_PROG_CC
+M4_EARLY
 
-gl_EARLY
-AC_ISC_POSIX
-AM_PROG_CC_STDC
 AC_PROG_CPP
 AM_PROG_CC_C_O
 m4_CHECK_DEBUGGING
@@ -135,8 +133,8 @@ esac
 ## ---------------- ##
 ## Gettext support. ##
 ## ---------------- ##
-AM_GNU_GETTEXT(external, need-ngettext)
-AM_GNU_GETTEXT_VERSION(0.14.1)
+AM_GNU_GETTEXT([external], [need-ngettext])
+AM_GNU_GETTEXT_VERSION([0.14.1])
 m4_GNU_GETTEXT
 
 
@@ -144,7 +142,7 @@ m4_GNU_GETTEXT
 ## --------------- ##
 ## Gnulib support, ##
 ## --------------- ##
-gl_INIT
+M4_INIT
 
 # Gnulib doesn't always do things quite the way M4 would like...
 m4_ERROR
@@ -156,18 +154,13 @@ m4_REGEX
 ## ------------------------ ##
 ## Other external programs. ##
 ## ------------------------ ##
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
 AC_PATH_PROG(PERL, perl)
-AC_PROG_AWK
 
 
 
 ## --------------------------- ##
 ## C compiler characteristics. ##
 ## --------------------------- ##
-AM_C_PROTOTYPES
-AC_C_CONST
 AC_TYPE_SIZE_T
 AC_CHECK_SIZEOF([long long int])
 
@@ -176,8 +169,7 @@ AC_CHECK_SIZEOF([long long int])
 ## ------------------------- ##
 ## C headers required by M4. ##
 ## ------------------------- ##
-AC_HEADER_STDC
-AC_CHECK_HEADERS([limits.h locale.h memory.h string.h unistd.h errno.h])
+AC_CHECK_HEADERS([limits.h])
 AC_CHECK_HEADERS([signal.h sys/signal.h], break)
 
 if test $ac_cv_header_stdbool_h = yes; then
@@ -192,9 +184,7 @@ AC_SUBST([INCLUDE_STDBOOL_H])
 ## --------------------------------- ##
 ## Library functions required by M4. ##
 ## --------------------------------- ##
-AC_CHECK_FUNCS([bzero calloc mkstemp mktemp strerror tmpfile])
-AC_FUNC_ALLOCA
-AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([bzero calloc mktemp strerror tmpfile])
 
 AM_WITH_DMALLOC
 
@@ -203,8 +193,8 @@ m4_SYS_STACKOVF
 # This is for the modules
 AC_STRUCT_TM
 AC_FUNC_STRFTIME
-AC_CHECK_FUNCS(getcwd gethostname mktime uname)
-AC_CHECK_FUNCS(setenv unsetenv putenv clearenv)
+AC_CHECK_FUNCS([getcwd gethostname mktime uname \
+               setenv unsetenv putenv clearenv])
 
 m4_LIB_GMP
 AM_CONDITIONAL([USE_GMP], [test "x$USE_GMP" = xyes])
Index: README
===================================================================
RCS file: /sources/m4/m4/README,v
retrieving revision 1.8
diff -u -p -r1.8 README
--- README      10 Jun 2006 15:17:11 -0000      1.8
+++ README      10 Jun 2006 21:09:38 -0000
@@ -62,9 +62,12 @@ system, compiler, libraries, ...
 ## Patches ##
 ## ------- ##
 
-If you wish to run bootstrap, the released versions of autoconf and automake
-are missing some functionality we need.  You will need to patch automake-1.9.5
-and autoconf-2.59 according to the patches below:
+If you wish to run bootstrap, the released versions of autoconf,
+automake, and libtool are missing some functionality we need.  You
+will need a CVS build of libtool head (1.5.x does not have enough
+functionality), and use the 2.59d snapshot of autoconf or a CVS
+build.  If you do not use a CVS build of automake, you can instead
+patch automake-1.9.5 or 1.9.6 according to the patch below:
 
 --- automake-1.9.5/automake.in.orig    2005-02-12 10:06:56.000000000 +0000
 +++ automake-1.9.5/automake.in 2005-04-20 14:08:05.000000000 +0100
@@ -174,28 +177,3 @@ and autoconf-2.59 according to the patch
  
  # &require_conf_file ($WHERE, $MYSTRICT, @FILES)
  # ----------------------------------------------
---- autoconf-2.59/lib/autoconf/general.m4.orig 2003-10-27 11:10:56.000000000 
+0000
-+++ autoconf-2.59/lib/autoconf/general.m4      2005-04-25 17:56:48.000000000 
+0100
-@@ -2435,7 +2435,7 @@
- 
- # _AC_LIBOBJS_NORMALIZE
- # ---------------------
--# Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext,
-+# Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
- # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
- # Used with AC_CONFIG_COMMANDS_PRE.
- AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
-@@ -2445,9 +2445,10 @@
-   # 1. Remove the extension, and $U if already installed.
-   ac_i=`echo "$ac_i" |
-        sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
--  # 2. Add them.
--  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
--  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-+  #    will be set to the directory where LIBOBJS objects are built.
-+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
- done
- AC_SUBST([LIB@&address@hidden, [$ac_libobjs])
- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
Index: ltdl/m4/gnulib-cache.m4
===================================================================
RCS file: /sources/m4/m4/ltdl/m4/gnulib-cache.m4,v
retrieving revision 1.1
diff -u -p -r1.1 gnulib-cache.m4
--- ltdl/m4/gnulib-cache.m4     5 May 2006 13:30:15 -0000       1.1
+++ ltdl/m4/gnulib-cache.m4     10 Jun 2006 21:09:38 -0000
@@ -1,4 +1,5 @@
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004-2006 Free Software Foundation, Inc.
+#
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
 # Public License, this file may be distributed as part of a program
@@ -14,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gnu 
--m4-base=ltdl/m4 --aux-dir=ltdl/config --libtool --macro-prefix=gl assert 
error exit free gettext mkstemp obstack progname regex stdbool strtol xalloc 
xalloc-die xstrndup
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gnu 
--m4-base=ltdl/m4 --aux-dir=ltdl/config --libtool --macro-prefix=M4 assert 
error exit free gettext mkstemp obstack progname regex stdbool strtol xalloc 
xalloc-die xstrndup
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_MODULES([assert error exit free gettext mkstemp obstack progname regex 
stdbool strtol xalloc xalloc-die xstrndup])
@@ -24,4 +25,4 @@ gl_M4_BASE([ltdl/m4])
 gl_TESTS_BASE([tests])
 gl_LIB([libgnu])
 gl_LIBTOOL
-gl_MACRO_PREFIX([gl])
+gl_MACRO_PREFIX([M4])
Index: m4/m4private.h
===================================================================
RCS file: /sources/m4/m4/m4/m4private.h,v
retrieving revision 1.46
diff -u -p -r1.46 m4private.h
--- m4/m4private.h      27 Oct 2005 16:04:03 -0000      1.46
+++ m4/m4private.h      10 Jun 2006 21:09:38 -0000
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2004, 2005
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2004, 2005, 
2006
                  Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -26,9 +26,7 @@
 #  include <config.h>
 #endif
 
-#if HAVE_ERRNO_H
 #include <errno.h>
-#endif
 
 #ifndef errno
 extern int errno;
@@ -57,7 +55,7 @@ struct m4 {
   m4_symbol_table *    symtab;
   m4_syntax_table *    syntax;
 
-  FILE *               debug_file;     /* File for debugging output.  */
+  FILE *               debug_file;     /* File for debugging output.  */
   m4_obstack           trace_messages;
 
   /* Option flags  (set in src/main.c).  */
@@ -165,9 +163,9 @@ struct m4_symbol_value {
 };
 
 #define VALUE_NEXT(T)          ((T)->next)
-#define VALUE_HANDLE(T)        ((T)->handle)
+#define VALUE_HANDLE(T)        ((T)->handle)
 #define VALUE_FLAGS(T)         ((T)->flags)
-#define VALUE_ARG_SIGNATURE(T)         ((T)->arg_signature)
+#define VALUE_ARG_SIGNATURE(T) ((T)->arg_signature)
 #define VALUE_MIN_ARGS(T)      ((T)->min_args)
 #define VALUE_MAX_ARGS(T)      ((T)->max_args)
 
Index: m4/output.c
===================================================================
RCS file: /sources/m4/m4/m4/output.c,v
retrieving revision 1.21
diff -u -p -r1.21 output.c
--- m4/output.c 4 May 2005 18:39:50 -0000       1.21
+++ m4/output.c 10 Jun 2006 21:09:38 -0000
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002, 2004
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1998, 2002, 2004, 2006
    Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -30,9 +30,7 @@
 #  include <unistd.h>
 #endif
 
-#if HAVE_ERRNO_H
-# include <errno.h>
-#endif
+#include <errno.h>
 
 #ifndef errno
 extern int errno;
Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.38
diff -u -p -r1.38 gnu.c
--- modules/gnu.c       9 May 2006 03:40:23 -0000       1.38
+++ modules/gnu.c       10 Jun 2006 21:09:38 -0000
@@ -30,9 +30,7 @@
 #include <m4module.h>
 #include <modules/m4.h>
 
-#if HAVE_ERRNO_H
-#  include <errno.h>
-#endif
+#include <errno.h>
 #ifndef errno
 int errno;
 #endif
Index: modules/m4.c
===================================================================
RCS file: /sources/m4/m4/modules/m4.c,v
retrieving revision 1.61
diff -u -p -r1.61 m4.c
--- modules/m4.c        9 May 2006 03:40:23 -0000       1.61
+++ modules/m4.c        10 Jun 2006 21:09:38 -0000
@@ -29,9 +29,7 @@
 #  include <unistd.h>
 #endif
 
-#if HAVE_ERRNO_H
-#  include <errno.h>
-#endif
+#include <errno.h>
 #ifndef errno
 extern int errno;
 #endif
Index: src/m4.h
===================================================================
RCS file: /sources/m4/m4/src/m4.h,v
retrieving revision 1.17
diff -u -p -r1.17 m4.h
--- src/m4.h    6 May 2005 09:05:44 -0000       1.17
+++ src/m4.h    10 Jun 2006 21:09:38 -0000
@@ -1,5 +1,5 @@
 /* GNU m4 -- A simple macro processor
-   Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+   Copyright (C) 1989, 90, 91, 92, 93, 94, 06 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
@@ -73,9 +73,7 @@ long strtol ();
 
 #endif /* STDC_HEADERS */
 
-#if HAVE_ERRNO_H
 #include <errno.h>
-#endif
 
 #ifndef errno
 extern int errno;

reply via email to

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