Commit b429a4ee authored by Glenn Morris's avatar Glenn Morris

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.
parent 8f25abd3
2012-07-30 Glenn Morris <rgm@gnu.org>
* configure.ac (AH_BOTTOM): Use an include file, so that the
contents do not get processed by autoheader.
2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
Do not overwrite config.status while executing it (Bug#11214).
......
......@@ -4198,108 +4198,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define EMACS_CONFIG_H
])dnl
dnl FIXME undefs in here get commented out by autoconf. :(
AH_BOTTOM([
/* On AIX 3 this must be included before any other include file. */
#include <alloca.h>
#if ! HAVE_ALLOCA
# error "alloca not available on this machine"
#endif
#ifdef SIGNAL_H_AHB
#undef SIGNAL_H_AHB
#include <signal.h>
#endif
/* This silences a few compilation warnings on FreeBSD. */
#ifdef BSD_SYSTEM_AHB
#undef BSD_SYSTEM_AHB
#undef BSD_SYSTEM
#if __FreeBSD__ == 1
#define BSD_SYSTEM 199103
#elif __FreeBSD__ == 2
#define BSD_SYSTEM 199306
#elif __FreeBSD__ >= 3
#define BSD_SYSTEM 199506
#endif
#endif
/* Define AMPERSAND_FULL_NAME if you use the convention
that & in the full name stands for the login id. */
/* Turned on June 1996 supposing nobody will mind it. */
#define AMPERSAND_FULL_NAME
/* `subprocesses' should be defined if you want to
have code for asynchronous subprocesses
(as used in M-x compile and M-x shell).
Only MSDOS does not support this (it overrides
this in its config_opsysfile below). */
#define subprocesses
/* Include the os dependent file. */
#ifdef config_opsysfile
# include config_opsysfile
#endif
/* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs,
SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */
#ifdef HAVE_NS
#if defined NS_IMPL_GNUSTEP
# define SYSTEM_PURESIZE_EXTRA 30000
#elif defined DARWIN_OS
# define SYSTEM_PURESIZE_EXTRA 200000
#endif
#endif
#ifdef emacs /* Don't do this for lib-src. */
/* Tell regex.c to use a type compatible with Emacs. */
#define RE_TRANSLATE_TYPE Lisp_Object
#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
#ifdef make_number
/* If make_number is a macro, use it. */
#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
#else
/* If make_number is a function, avoid it. */
#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
#endif
#endif
#include <string.h>
#include <stdlib.h>
#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
#define NO_INLINE __attribute__((noinline))
#else
#define NO_INLINE
#endif
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
#define EXTERNALLY_VISIBLE __attribute__((externally_visible))
#else
#define EXTERNALLY_VISIBLE
#endif
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
#else
# define ATTRIBUTE_FORMAT(spec) /* empty */
#endif
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
#else
# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
#endif
#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
/* Some versions of GNU/Linux define noinline in their headers. */
#ifdef noinline
#undef noinline
#endif
AH_BOTTOM([#include <conf_post.h>
#endif /* EMACS_CONFIG_H */
......
2012-07-30 Glenn Morris <rgm@gnu.org>
* conf_post.h: New, split from configure.ac's AH_BOTTOM.
* Makefile.in (config_h): Add conf_post.h.
* makefile.w32-in (CONFIG_H): Add conf_post.h.
2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_do_open_file): New variable.
......
......@@ -57,7 +57,7 @@ lispdir = ../lisp
# Configuration files for .o files to depend on.
S_FILE = @S_FILE@
config_h = config.h $(S_FILE)
config_h = config.h conf_post.h $(S_FILE)
bootstrap_exe = $(abs_builddir)/bootstrap-emacs$(EXEEXT)
......
/* conf_post.h --- configure.ac includes this via AH_BOTTOM
Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Commentary:
Rather than writing this code directly in AH_BOTTOM, we include it
via this file. This is so that it does not get processed by
autoheader. Eg, any undefs here would otherwise be commented out.
*/
/* Code: */
/* On AIX 3 this must be included before any other include file. */
#include <alloca.h>
#if ! HAVE_ALLOCA
# error "alloca not available on this machine"
#endif
#ifdef SIGNAL_H_AHB
#undef SIGNAL_H_AHB
#include <signal.h>
#endif
/* This silences a few compilation warnings on FreeBSD. */
#ifdef BSD_SYSTEM_AHB
#undef BSD_SYSTEM_AHB
#undef BSD_SYSTEM
#if __FreeBSD__ == 1
#define BSD_SYSTEM 199103
#elif __FreeBSD__ == 2
#define BSD_SYSTEM 199306
#elif __FreeBSD__ >= 3
#define BSD_SYSTEM 199506
#endif
#endif
/* Define AMPERSAND_FULL_NAME if you use the convention
that & in the full name stands for the login id. */
/* Turned on June 1996 supposing nobody will mind it. */
#define AMPERSAND_FULL_NAME
/* `subprocesses' should be defined if you want to
have code for asynchronous subprocesses
(as used in M-x compile and M-x shell).
Only MSDOS does not support this (it overrides
this in its config_opsysfile below). */
#define subprocesses
/* Include the os dependent file. */
#ifdef config_opsysfile
# include config_opsysfile
#endif
/* Mac OS X / GNUstep need a bit more pure memory. Of the existing knobs,
SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */
#ifdef HAVE_NS
#if defined NS_IMPL_GNUSTEP
# define SYSTEM_PURESIZE_EXTRA 30000
#elif defined DARWIN_OS
# define SYSTEM_PURESIZE_EXTRA 200000
#endif
#endif
#ifdef emacs /* Don't do this for lib-src. */
/* Tell regex.c to use a type compatible with Emacs. */
#define RE_TRANSLATE_TYPE Lisp_Object
#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
#ifdef make_number
/* If make_number is a macro, use it. */
#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
#else
/* If make_number is a function, avoid it. */
#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
#endif
#endif
#include <string.h>
#include <stdlib.h>
#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
#define NO_INLINE __attribute__((noinline))
#else
#define NO_INLINE
#endif
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
#define EXTERNALLY_VISIBLE __attribute__((externally_visible))
#else
#define EXTERNALLY_VISIBLE
#endif
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
# define ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
#else
# define ATTRIBUTE_FORMAT(spec) /* empty */
#endif
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
#else
# define ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
#endif
#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
/* Some versions of GNU/Linux define noinline in their headers. */
#ifdef noinline
#undef noinline
#endif
/* conf_post.h ends here */
......@@ -406,6 +406,7 @@ CODING_H = $(SRC)/coding.h \
MS_W32_H = $(SRC)/s/ms-w32.h \
$(NT_INC)/sys/stat.h
CONFIG_H = $(SRC)/config.h \
$(SRC)/conf_post.h \
$(MS_W32_H)
DIR_H = $(NT_INC)/sys/dir.h \
$(SRC)/ndir.h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment