autoconf-patches
[Top][All Lists]
Advanced

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

Re: AC_FUNC_FNMATCH jamboree patch


From: Akim Demaille
Subject: Re: AC_FUNC_FNMATCH jamboree patch
Date: 07 Jun 2002 11:30:32 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

| > From: Akim Demaille <address@hidden>
| > Date: 07 Jun 2002 08:58:36 +0200
| > 
| > Paul, BTW, I have always hated AC_FUNC_FNMATCH for not _replacing_ the
| > function, as do the others.  Do we have to reproduce the error to
| > AC_FUNC_FNMATCH_GNU?
| 
| No.  Sorry, I didn't think of that.  How about if we remove the
| existing AC_FUNC_FNMATCH_GNU and rename AC_REPLACE_FNMATCH_GNU to
| AC_FUNC_FNMATCH_GNU?

That was my suggestion :)

| > Oh, BTW, I was wondering: the fact that you pass the cache variable
| > name is because you want to provide some form of compatibility?
| 
| Yes, that was it.  Some programs (e.g. a2ps, CVS, RPM) use
| ac_cv_func_fnmatch_works to decide whether to replace fnmatch.
| 
| Perhaps we should have an upgrade strategy, something like this:
| 
| 1.  Rename the current AC_FUNC_FNMATCH to AC_FUNC_FNMATCH_WORKS, and
|     define AC_FUNC_FNMATCH to have the same meaning as
|     AC_FUNC_FNMATCH_WORKS except that it also issues a warning that
|     its meaning will change eventually and that if you want to avoid
|     the warning you should use AC_FUNC_FNMATCH_WORKS.
| 
| 2.  In some long-distant future version of Autoconf, modify
|     AC_FUNC_FNMATCH so that it invokes AC_REPLACE_FNMATCH.

What actually harm would it make to simply change AC_FUNC_FNMATCH to
the semantics people want, and to set the old cache variables to a
value that does not trigger an additional AC_LIBOBJ?

In addition, we can m4_pattern_forbid these cache variable names, or
even AU_DEFUN them so that they trigger a warning when used?


I'm applying this.

Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.245
diff -u -u -r1.245 NEWS
--- NEWS 7 Jun 2002 07:17:53 -0000 1.245
+++ NEWS 7 Jun 2002 09:27:36 -0000
@@ -13,8 +13,8 @@
 
 - AC_CONFIG_LINKS now makes copies if it can't make links.
 - AC_FUNC_FNMATCH now tests only for POSIX compatibility, reverting to
-  Autoconf 2.13 behavior.  The new macro AC_FUNC_FNMATCH_GNU also tests for
-  GNU extensions to fnmatch.
+  Autoconf 2.13 behavior.  The new macro AC_FUNC_FNMATCH_GNU also
+  tests for GNU extensions to fnmatch, and replaces fnmatch if needed.
 
 - AC_FUNC_SETVBUF_REVERSED no longer fails when cross-compiling.
 
@@ -24,7 +24,7 @@
 
 - New macros
   AC_CONFIG_LIBOBJ_DIR, AC_GNU_SOURCE, AC_PROG_EGREP, AC_PROG_FGREP,
-  AC_REPLACE_FNMATCH, AC_REPLACE_FNMATCH_GNU, AC_TYPE_MBSTATE_T.
+  AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_TYPE_MBSTATE_T.
 
 - AC_FUNC_GETLOADAVG
   looks for getloadavg.c in the CONFIG_LIBOBJ_DIR.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.632
diff -u -u -r1.632 autoconf.texi
--- doc/autoconf.texi 7 Jun 2002 08:11:46 -0000 1.632
+++ doc/autoconf.texi 7 Jun 2002 09:27:37 -0000
@@ -3557,9 +3557,10 @@
 @acindex FUNC_FNMATCH_GNU
 @c @fuindex fnmatch
 @prindex @code{fnmatch}
-Behave like @code{AC_FUNC_FNMATCH}, but also test whether @code{fnmatch}
-supports @acronym{GNU} extensions.  Detect common implementation bugs,
-for example, the bugs in the @acronym{GNU} C Library 2.1.
+Behave like @code{AC_REPLACE_FNMATCH} (@emph{replace}) but also test
+whether @code{fnmatch} supports @acronym{GNU} extensions.  Detect common
+implementation bugs, for example, the bugs in the @acronym{GNU} C
+Library 2.1.
 @end defmac
 
 @defmac AC_FUNC_FORK
@@ -3922,14 +3923,6 @@
 this source code is compiled as an @code{AC_LIBOBJ} replacement, and the
 @file{fnmatch_.h} file is linked to @file{fnmatch.h} so that it can be
 included in place of the system @code{<fnmatch.h>}.
address@hidden defmac
-
address@hidden AC_REPLACE_FNMATCH_GNU
address@hidden REPLACE_FNMATCH_GNU
address@hidden @fuindex fnmatch
address@hidden @code{fnmatch}
-Samr as @code{AC_REPLACE_FNMATCH}, but requiring the @acronym{GNU}
-extensions to @code{fnmatch} (see @code{AC_FUNC_FNMATCH_GNU}).
 @end defmac
 
 
Index: lib/autoconf/functions.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/functions.m4,v
retrieving revision 1.63
diff -u -u -r1.63 functions.m4
--- lib/autoconf/functions.m4 7 Jun 2002 07:17:54 -0000 1.63
+++ lib/autoconf/functions.m4 7 Jun 2002 09:27:37 -0000
@@ -392,17 +392,6 @@
 ])# AC_FUNC_FNMATCH
 
 
-# AC_FUNC_FNMATCH_GNU
-# -------------------
-AC_DEFUN([AC_FUNC_FNMATCH_GNU],
-[AC_REQUIRE([AC_GNU_SOURCE])
-_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
-                    [AC_DEFINE([HAVE_FNMATCH], 1,
-                    [Define to 1 if your system has a working GNU `fnmatch'
-                    function.])])
-])# AC_FUNC_FNMATCH_GNU
-
-
 # _AC_LIBOBJ_FNMATCH
 # ------------------
 # Prepare the replacement of fnmatch.
@@ -429,14 +418,14 @@
 ])# AC_REPLACE_FUNC_FNMATCH
 
 
-# AC_REPLACE_FUNC_FNMATCH_GNU
-# ---------------------------
-AC_DEFUN([AC_REPLACE_FNMATCH_GNU],
+# AC_FUNC_FNMATCH_GNU
+# -------------------
+AC_DEFUN([AC_FUNC_FNMATCH_GNU],
 [AC_REQUIRE([AC_GNU_SOURCE])
 _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
                     [rm -f $ac_config_libobj_dir/fnmatch.h],
                     [_AC_LIBOBJ_FNMATCH])
-])# AC_REPLACE_FUNC_FNMATCH_GNU
+])# AC_FUNC_FNMATCH_GNU
 
 
 # AU::AM_FUNC_FNMATCH



reply via email to

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