annotate m4/alloca.m4 @ 9209:5a0294ce5372

Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS. * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS Autoconf definition. * modules/euidaccess (Depends-on): Add extensions, for AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59. * modules/fnmatch (Depends-on): Likewise. * modules/getaddrinfo (Depends-on): Likewise. * modules/getdelim (Depends-on): Likewise. * modules/getline (Depends-on): Likewise. * modules/getsubopt (Depends-on): Likewise. * modules/gettext (Depends-on): Likewise. * modules/group-member (Depends-on): Likewise. * modules/mbchar (Depends-on): Likewise. * modules/memmem (Depends-on): Likewise. * modules/mempcpy (Depends-on): Likewise. * modules/memrchr (Depends-on): Likewise. * modules/pagealign_alloc (Depends-on): Likewise. * modules/readutmp (Depends-on): Likewise. * modules/stpcpy (Depends-on): Likewise. * modules/stpncpy (Depends-on): Likewise. * modules/strchrnul (Depends-on): Likewise. * modules/strndup (Depends-on): Likewise. * modules/strsep (Depends-on): Likewise. * modules/strverscmp (Depends-on): Likewise. * modules/vasprintf (Depends-on): Likewise. * modules/wcwidth (Depends-on): Likewise. * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise. * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise. * m4/glob.m4 (gl_PREREQ_GLOB): Likewise. * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise. * m4/mbchar.m4 (gl_MBCHAR): Likewise. * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise. * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise. * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise. * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise. * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise. * m4/readutmp.m4 (gl_READUTMP): Likewise. * m4/regex.m4 (gl_PREREQ_REGEX): Likewise. * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise. * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise. * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise. * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise. * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise. * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise. * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise. * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise. * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback, so that lock.m4 can be used in gettext without extensions module.
author Eric Blake <ebb9@byu.net>
date Wed, 12 Sep 2007 15:59:57 +0000
parents 8c905c6c16a0
children d309fd90fbf3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7659
e2febe678452 * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
Eric Blake <ebb9@byu.net>
parents: 7535
diff changeset
1 # alloca.m4 serial 7
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
2 dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc.
5611
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
3 dnl This file is free software; the Free Software Foundation
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_ALLOCA],
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 [
4184
bd50be83d452 Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents: 4156
diff changeset
9 dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
bd50be83d452 Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents: 4156
diff changeset
10 AC_REQUIRE([AC_PROG_CPP])
bd50be83d452 Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents: 4156
diff changeset
11 AC_REQUIRE([AC_PROG_EGREP])
bd50be83d452 Work around a bug of AC_EGREP_CPP in autoconf-2.57.
Bruno Haible <bruno@clisp.org>
parents: 4156
diff changeset
12
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_REQUIRE([AC_FUNC_ALLOCA])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 if test $ac_cv_func_alloca_works = no; then
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 gl_PREREQ_ALLOCA
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 fi
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
17
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
18 # Define an additional variable used in the Makefile substitution.
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
19 if test $ac_cv_working_alloca_h = yes; then
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
20 AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
21 AC_EGREP_CPP([Need own alloca], [
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
22 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
23 Need own alloca
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
24 #endif
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
25 ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
26 ])
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
27 if test $gl_cv_rpl_alloca = yes; then
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
28 dnl OK, alloca can be implemented through a compiler built-in.
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
29 AC_DEFINE([HAVE_ALLOCA], 1,
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
30 [Define to 1 if you have 'alloca' after including <alloca.h>,
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
31 a header that may be supplied by this distribution.])
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
32 ALLOCA_H=alloca.h
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
33 else
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
34 dnl alloca exists as a library function, i.e. it is slow and probably
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
35 dnl a memory leak. Don't define HAVE_ALLOCA in this case.
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
36 ALLOCA_H=
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
37 fi
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
38 else
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
39 ALLOCA_H=alloca.h
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
40 fi
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
41 AC_SUBST([ALLOCA_H])
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
42
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
43 AC_DEFINE(HAVE_ALLOCA_H, 1,
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
44 [Define HAVE_ALLOCA_H for backward compatibility with older code
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
45 that includes <alloca.h> only if HAVE_ALLOCA_H is defined.])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 ])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 # Prerequisites of lib/alloca.c.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
4631
069117fb861f Remove K&R cruft.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4334
diff changeset
50 AC_DEFUN([gl_PREREQ_ALLOCA], [:])