annotate m4/alloca.m4 @ 14528:662ae53d8d37

Remove leftover generated .h files after config.status changed. * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional GL_GENERATE_ALLOCA_H. * modules/alloca-opt (Makefile.am): Remove alloca.h if GL_GENERATE_ALLOCA_H evaluates to false. * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional GL_GENERATE_ARGZ_H. * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H evaluates to false. * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional GL_GENERATE_BYTESWAP_H. * modules/byteswap (Makefile.am): Remove byteswap.h if GL_GENERATE_BYTESWAP_H evaluates to false. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional GL_GENERATE_ERRNO_H. * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H evaluates to false. * m4/float_h.m4 (gl_FLOAT_H): New automake conditional GL_GENERATE_FLOAT_H. * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H evaluates to false. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional GL_GENERATE_FNMATCH_H. * modules/fnmatch (Makefile.am): Remove fnmatch.h if GL_GENERATE_FNMATCH_H evaluates to false. * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional GL_GENERATE_GLOB_H. * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H evaluates to false. * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New automake conditional GL_GENERATE_ICONV_H. * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H evaluates to false. * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional GL_GENERATE_NETINET_IN_H. * modules/netinet_in (Makefile.am): Remove netinet/in.h if GL_GENERATE_NETINET_IN_H evaluates to false. * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake conditional GL_GENERATE_PTHREAD_H. (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here. * modules/pthread (Makefile.am): Remove pthread.h if GL_GENERATE_PTHREAD_H evaluates to false. * m4/sched_h.m4 (gl_SCHED_H): New automake conditional GL_GENERATE_SCHED_H. * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H evaluates to false. * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake conditional GL_GENERATE_SELINUX_CONTEXT_H. * modules/selinux-h (Makefile.am): Remove selinux/context.h if GL_GENERATE_SELINUX_CONTEXT_H evaluates to false. * m4/stdarg.m4 (gl_STDARG_H): New automake conditional GL_GENERATE_STDARG_H. * modules/stdarg (Makefile.am): Remove stdarg.h if GL_GENERATE_STDARG_H evaluates to false. * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional GL_GENERATE_STDBOOL_H. * modules/stdbool (Makefile.am): Remove stdbool.h if GL_GENERATE_STDBOOL_H evaluates to false. * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake conditional GL_GENERATE_STDDEF_H. (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here. * modules/stddef (Makefile.am): Remove stddef.h if GL_GENERATE_STDDEF_H evaluates to false. * m4/stdint.m4 (gl_STDINT_H): New automake conditional GL_GENERATE_STDINT_H. * modules/stdint (Makefile.am): Remove stdint.h if GL_GENERATE_STDINT_H evaluates to false. * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional GL_GENERATE_SYSEXITS_H. * modules/sysexits (Makefile.am): Remove sysexits.h if GL_GENERATE_SYSEXITS_H evaluates to false. Reported by Karl Berry and Ralf Wildenhues.
author Bruno Haible <bruno@clisp.org>
date Wed, 06 Apr 2011 01:55:16 +0200
parents 97fc9a21a8fb
children 578f64214a48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14528
662ae53d8d37 Remove leftover generated .h files after config.status changed.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
1 # alloca.m4 serial 11
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13870
diff changeset
2 dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
12559
c2cbabec01dd update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents: 11007
diff changeset
3 dnl Inc.
5611
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5063
diff changeset
4 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
5 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
6 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
7
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 AC_DEFUN([gl_FUNC_ALLOCA],
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 [
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 AC_REQUIRE([AC_FUNC_ALLOCA])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 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
12 gl_PREREQ_ALLOCA
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 fi
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
14
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
15 # 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
16 if test $ac_cv_working_alloca_h = yes; then
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
17 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
18 AC_EGREP_CPP([Need own alloca], [
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
19 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
20 Need own alloca
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
21 #endif
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
22 ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
23 ])
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
24 if test $gl_cv_rpl_alloca = yes; then
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
25 dnl OK, alloca can be implemented through a compiler built-in.
11007
f6cba5a556ce many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents: 9592
diff changeset
26 AC_DEFINE([HAVE_ALLOCA], [1],
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
27 [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
28 a header that may be supplied by this distribution.])
7535
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
29 ALLOCA_H=alloca.h
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
30 else
7662
8c905c6c16a0 Fix alloca.m4 message.
Bruno Haible <bruno@clisp.org>
parents: 7659
diff changeset
31 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
32 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
33 ALLOCA_H=
a0dfb5334b53 Cache a result.
Bruno Haible <bruno@clisp.org>
parents: 5611
diff changeset
34 fi
5063
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
35 else
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
36 ALLOCA_H=alloca.h
1aecdc8063ba alloca cleanup: always include <alloca.h>.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4631
diff changeset
37 fi
4156
99ea86c79f44 Make it possibly to simply write: #include <alloca.h>.
Bruno Haible <bruno@clisp.org>
parents: 4107
diff changeset
38 AC_SUBST([ALLOCA_H])
14528
662ae53d8d37 Remove leftover generated .h files after config.status changed.
Bruno Haible <bruno@clisp.org>
parents: 14079
diff changeset
39 AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
4107
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 ])
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 # Prerequisites of lib/alloca.c.
7c1a6b73f48e An autoconf macro for its associated module.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 # 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
44 AC_DEFUN([gl_PREREQ_ALLOCA], [:])