aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-07-30 17:20:43 -0400
committerGlenn Morris2012-07-30 17:20:43 -0400
commitb429a4eee4e09b1ba09e17ced5091d042955d84f (patch)
tree5e8cb71a2e905c8c826d90737186763615d754b5
parent8f25abd317c64e2a69e1839633382841c3848a2d (diff)
downloademacs-b429a4eee4e09b1ba09e17ced5091d042955d84f.tar.gz
emacs-b429a4eee4e09b1ba09e17ced5091d042955d84f.zip
Use an include file in configure.ac's AH_BOTTOM
* configure.ac (AH_BOTTOM): Use an include file, so that the contents do not get processed by autoheader. Eg this prevents undefs being commented out, and is the recommended technique from the autoconf manual. * src/conf_post.h: New, split from configure.ac's AH_BOTTOM. * src/Makefile.in (config_h): Add conf_post.h. * src/makefile.w32-in (CONFIG_H): Add conf_post.h.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac103
-rw-r--r--src/ChangeLog6
-rw-r--r--src/Makefile.in2
-rw-r--r--src/conf_post.h131
-rw-r--r--src/makefile.w32-in1
6 files changed, 145 insertions, 103 deletions
diff --git a/ChangeLog b/ChangeLog
index 14bf1f385cd..b0860362b1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12012-07-30 Glenn Morris <rgm@gnu.org>
2
3 * configure.ac (AH_BOTTOM): Use an include file, so that the
4 contents do not get processed by autoheader.
5
12012-07-30 Paul Eggert <eggert@cs.ucla.edu> 62012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Do not overwrite config.status while executing it (Bug#11214). 8 Do not overwrite config.status while executing it (Bug#11214).
diff --git a/configure.ac b/configure.ac
index a68caca4072..402524f436d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4198,108 +4198,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
4198#define EMACS_CONFIG_H 4198#define EMACS_CONFIG_H
4199])dnl 4199])dnl
4200 4200
4201dnl FIXME undefs in here get commented out by autoconf. :( 4201AH_BOTTOM([#include <conf_post.h>
4202AH_BOTTOM([
4203/* On AIX 3 this must be included before any other include file. */
4204#include <alloca.h>
4205#if ! HAVE_ALLOCA
4206# error "alloca not available on this machine"
4207#endif
4208
4209#ifdef SIGNAL_H_AHB
4210#undef SIGNAL_H_AHB
4211#include <signal.h>
4212#endif
4213
4214/* This silences a few compilation warnings on FreeBSD. */
4215#ifdef BSD_SYSTEM_AHB
4216#undef BSD_SYSTEM_AHB
4217#undef BSD_SYSTEM
4218#if __FreeBSD__ == 1
4219#define BSD_SYSTEM 199103
4220#elif __FreeBSD__ == 2
4221#define BSD_SYSTEM 199306
4222#elif __FreeBSD__ >= 3
4223#define BSD_SYSTEM 199506
4224#endif
4225#endif
4226
4227/* Define AMPERSAND_FULL_NAME if you use the convention
4228 that & in the full name stands for the login id. */
4229/* Turned on June 1996 supposing nobody will mind it. */
4230#define AMPERSAND_FULL_NAME
4231
4232/* `subprocesses' should be defined if you want to
4233 have code for asynchronous subprocesses
4234 (as used in M-x compile and M-x shell).
4235 Only MSDOS does not support this (it overrides
4236 this in its config_opsysfile below). */
4237
4238#define subprocesses
4239
4240/* Include the os dependent file. */
4241#ifdef config_opsysfile
4242# include config_opsysfile
4243#endif
4244
4245/* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs,
4246 SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */
4247#ifdef HAVE_NS
4248#if defined NS_IMPL_GNUSTEP
4249# define SYSTEM_PURESIZE_EXTRA 30000
4250#elif defined DARWIN_OS
4251# define SYSTEM_PURESIZE_EXTRA 200000
4252#endif
4253#endif
4254
4255#ifdef emacs /* Don't do this for lib-src. */
4256/* Tell regex.c to use a type compatible with Emacs. */
4257#define RE_TRANSLATE_TYPE Lisp_Object
4258#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
4259#ifdef make_number
4260/* If make_number is a macro, use it. */
4261#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
4262#else
4263/* If make_number is a function, avoid it. */
4264#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
4265#endif
4266#endif
4267
4268#include <string.h>
4269#include <stdlib.h>
4270
4271#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
4272#define NO_INLINE __attribute__((noinline))
4273#else
4274#define NO_INLINE
4275#endif
4276
4277#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
4278#define EXTERNALLY_VISIBLE __attribute__((externally_visible))
4279#else
4280#define EXTERNALLY_VISIBLE
4281#endif
4282
4283#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
4284# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
4285#else
4286# define ATTRIBUTE_FORMAT(spec) /* empty */
4287#endif
4288
4289#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
4290# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
4291 ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
4292#else
4293# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
4294 ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
4295#endif
4296
4297#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
4298
4299/* Some versions of GNU/Linux define noinline in their headers. */
4300#ifdef noinline
4301#undef noinline
4302#endif
4303 4202
4304#endif /* EMACS_CONFIG_H */ 4203#endif /* EMACS_CONFIG_H */
4305 4204
diff --git a/src/ChangeLog b/src/ChangeLog
index a7e6cb52eae..f3e8b58e071 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-07-30 Glenn Morris <rgm@gnu.org>
2
3 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4 * Makefile.in (config_h): Add conf_post.h.
5 * makefile.w32-in (CONFIG_H): Add conf_post.h.
6
12012-07-30 Jan Djärv <jan.h.d@swipnet.se> 72012-07-30 Jan Djärv <jan.h.d@swipnet.se>
2 8
3 * nsterm.m (ns_do_open_file): New variable. 9 * nsterm.m (ns_do_open_file): New variable.
diff --git a/src/Makefile.in b/src/Makefile.in
index 2f96affeb56..1ea7d162b14 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -57,7 +57,7 @@ lispdir = ../lisp
57 57
58# Configuration files for .o files to depend on. 58# Configuration files for .o files to depend on.
59S_FILE = @S_FILE@ 59S_FILE = @S_FILE@
60config_h = config.h $(S_FILE) 60config_h = config.h conf_post.h $(S_FILE)
61 61
62bootstrap_exe = $(abs_builddir)/bootstrap-emacs$(EXEEXT) 62bootstrap_exe = $(abs_builddir)/bootstrap-emacs$(EXEEXT)
63 63
diff --git a/src/conf_post.h b/src/conf_post.h
new file mode 100644
index 00000000000..5efecfb8c05
--- /dev/null
+++ b/src/conf_post.h
@@ -0,0 +1,131 @@
1/* conf_post.h --- configure.ac includes this via AH_BOTTOM
2
3Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
4 Free Software Foundation, Inc.
5
6This file is part of GNU Emacs.
7
8GNU Emacs is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 3 of the License, or
11(at your option) any later version.
12
13GNU Emacs is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20
21/* Commentary:
22
23 Rather than writing this code directly in AH_BOTTOM, we include it
24 via this file. This is so that it does not get processed by
25 autoheader. Eg, any undefs here would otherwise be commented out.
26*/
27
28/* Code: */
29
30/* On AIX 3 this must be included before any other include file. */
31#include <alloca.h>
32#if ! HAVE_ALLOCA
33# error "alloca not available on this machine"
34#endif
35
36#ifdef SIGNAL_H_AHB
37#undef SIGNAL_H_AHB
38#include <signal.h>
39#endif
40
41/* This silences a few compilation warnings on FreeBSD. */
42#ifdef BSD_SYSTEM_AHB
43#undef BSD_SYSTEM_AHB
44#undef BSD_SYSTEM
45#if __FreeBSD__ == 1
46#define BSD_SYSTEM 199103
47#elif __FreeBSD__ == 2
48#define BSD_SYSTEM 199306
49#elif __FreeBSD__ >= 3
50#define BSD_SYSTEM 199506
51#endif
52#endif
53
54/* Define AMPERSAND_FULL_NAME if you use the convention
55 that & in the full name stands for the login id. */
56/* Turned on June 1996 supposing nobody will mind it. */
57#define AMPERSAND_FULL_NAME
58
59/* `subprocesses' should be defined if you want to
60 have code for asynchronous subprocesses
61 (as used in M-x compile and M-x shell).
62 Only MSDOS does not support this (it overrides
63 this in its config_opsysfile below). */
64
65#define subprocesses
66
67/* Include the os dependent file. */
68#ifdef config_opsysfile
69# include config_opsysfile
70#endif
71
72/* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs,
73 SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */
74#ifdef HAVE_NS
75#if defined NS_IMPL_GNUSTEP
76# define SYSTEM_PURESIZE_EXTRA 30000
77#elif defined DARWIN_OS
78# define SYSTEM_PURESIZE_EXTRA 200000
79#endif
80#endif
81
82#ifdef emacs /* Don't do this for lib-src. */
83/* Tell regex.c to use a type compatible with Emacs. */
84#define RE_TRANSLATE_TYPE Lisp_Object
85#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
86#ifdef make_number
87/* If make_number is a macro, use it. */
88#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
89#else
90/* If make_number is a function, avoid it. */
91#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
92#endif
93#endif
94
95#include <string.h>
96#include <stdlib.h>
97
98#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
99#define NO_INLINE __attribute__((noinline))
100#else
101#define NO_INLINE
102#endif
103
104#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
105#define EXTERNALLY_VISIBLE __attribute__((externally_visible))
106#else
107#define EXTERNALLY_VISIBLE
108#endif
109
110#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
111# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
112#else
113# define ATTRIBUTE_FORMAT(spec) /* empty */
114#endif
115
116#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
117# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
118 ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
119#else
120# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
121 ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
122#endif
123
124#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
125
126/* Some versions of GNU/Linux define noinline in their headers. */
127#ifdef noinline
128#undef noinline
129#endif
130
131/* conf_post.h ends here */
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 45972db2cf4..10ab0619fb4 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -406,6 +406,7 @@ CODING_H = $(SRC)/coding.h \
406MS_W32_H = $(SRC)/s/ms-w32.h \ 406MS_W32_H = $(SRC)/s/ms-w32.h \
407 $(NT_INC)/sys/stat.h 407 $(NT_INC)/sys/stat.h
408CONFIG_H = $(SRC)/config.h \ 408CONFIG_H = $(SRC)/config.h \
409 $(SRC)/conf_post.h \
409 $(MS_W32_H) 410 $(MS_W32_H)
410DIR_H = $(NT_INC)/sys/dir.h \ 411DIR_H = $(NT_INC)/sys/dir.h \
411 $(SRC)/ndir.h 412 $(SRC)/ndir.h