Commit bbd347f5 authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from trunk.

parents e4ecdc9c 9ee7d8b9
2012-04-21 Paul Eggert <eggert@cs.ucla.edu>
Sync from gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc
dated 2011-10-07. Regenerating from current gnulib would be a
pervasive change, and currently the trunk isn't open to such changes.
* configure.in (WARN_CFLAGS): Remove; no longer needed now
that gnulib does it.
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
* m4/gl-comp.m4: Update. (Bug#11285)
2012-04-20 Ludovic Courtès <ludo@gnu.org>
* configure.in: Don't use the -R option (Bug#11251).
2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
configure: new option --enable-gcc-warnings (Bug#11207)
I have been using this change for many months in my private copy
of Emacs, and have used it to find several bugs. It's mature
enough to publish now.
* Makefile.in (GNULIB_MODULES): Add warnings, manywarnings.
* configure.in: Support --enable-gcc-warnings, in the style of
other GNU packages such as coreutils.
(C_WARNINGS_SWITCH): Remove, replacing with...
(WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable.
(PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I,
when including system files with GCC.
* etc/NEWS: Mention --enable-gcc-warnings.
* INSTALL (DETAILED BUILDING AND INSTALLATION): Likewise.
* lib/Makefile.am (AM_CFLAGS): New macro.
* m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib.
2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
* configure.in (AC_CHECK_FUNCS):
Add getpwent, endpwent, getgrent, endgrent. (Bug#7900)
2012-04-16 Glenn Morris <rgm@gnu.org>
* configure.in (NS_HAVE_NSINTEGER): Remove unnecessary variable.
* configure.in: Remove X libs workaround for old autoconf.
2012-04-12 Ken Brown <kbrown@cornell.edu>
* configure.in: Warn that Cygwin 1.5 is unsupported. (Bug#10398)
2012-04-11 Glenn Morris <rgm@gnu.org>
* configure.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
2012-04-10 Glenn Morris <rgm@gnu.org>
* configure.in: Conditionally generate admin/unidata/Makefile.
2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
* info/dir (File):
* Makefile.in: Add emacs-gnutls to the info directory and the
INFO_FILES target.
* info/dir, Makefile.in (INFO_FILES): Add emacs-gnutls manual.
2012-04-09 Glenn Morris <rgm@gnu.org>
......@@ -2298,7 +2354,7 @@
2010-03-12 Eli Zaretskii <eliz@gnu.org>
These changes remove termcap.c from the build on Posix platforms.
These changes remove termcap.c from the build on POSIX platforms.
* configure.in <AC_CHECK_HEADERS>: Remove termcap.h.
* configure: Regenerated.
......
......@@ -317,6 +317,12 @@ Use --with-wide-int to implement Emacs values with the type 'long long',
even on hosts where a narrower type would do. With this option, on a
typical 32-bit host, Emacs integers have 62 bits instead of 30.
Use --enable-gcc-warnings to enable compile-time checks that warn
about possibly-questionable C code. This is intended for developers
and is useful with GNU-compatible compilers. On a recent GNU system
there should be no warnings; on older and on non-GNU systems the
generated warnings may still be useful.
The `--prefix=PREFIXDIR' option specifies where the installation process
should put emacs and its data files. This defaults to `/usr/local'.
- Emacs (and the other utilities users run) go in PREFIXDIR/bin
......
......@@ -336,8 +336,9 @@ GNULIB_MODULES = \
careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
dup2 \
filemode getloadavg getopt-gnu ignore-value intprops lstat \
mktime pthread_sigmask readlink \
socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
manywarnings mktime pthread_sigmask readlink \
socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat \
warnings
GNULIB_TOOL_FLAGS = \
--avoid=msvc-inval --avoid=msvc-nothrow \
--avoid=raise --avoid=threadlib \
......
2012-04-10 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-skip-regexp): Add "from trunk".
* unidata/Makefile.in: Add FSF copyright.
Make it use autoconf features, and work for out-of-tree builds.
2012-04-07 Eli Zaretskii <eliz@gnu.org>
* unidata/README:
......
......@@ -53,12 +53,17 @@ pt-br Rodrigo Real
ru Alex Ott
sk Miroslav Vaško
** For a major release, add a "New in Emacs XX" section to faq.texi.
** Remove temporary +++/--- lines in NEWS.
** Try to reorder NEWS: most important things first, related items together.
** Consider bumping customize-changed-options-previous-release.
** cusver-check from admin.el cam help find new defcustoms missing
:version tags.
* BUGS
** Check for modes which bind M-s that conflicts with a new global binding M-s
......@@ -155,13 +160,8 @@ mini.texi rgm
misc.texi cyd
modes.texi cyd
msdog.texi rgm (can't actually test any of it though)
It was not obvious to me that the following is true (it could well be though):
Emacs on Windows automatically determines your default printer and
sets the variable `printer-name' to that printer's name.
msdog-xtra.texi rgm (can't actually test any of it though)
mule.texi
mule.texi rgm (not 100% sure about "Fontsets")
m-x.texi cyd
package.texi cyd
picture-xtra.texi rgm
......@@ -182,7 +182,7 @@ xresources.texi cyd
abbrevs.texi rgm
advice.texi cyd
anti.texi
anti.texi rgm
back.texi rgm
backups.texi cyd
buffers.texi cyd
......@@ -211,7 +211,7 @@ loading.texi cyd
macros.texi cyd
maps.texi rgm
markers.texi rgm
minibuf.texi
minibuf.texi rgm
modes.texi cyd
nonascii.texi cyd
numbers.texi cyd
......@@ -219,7 +219,7 @@ objects.texi cyd
os.texi cyd
package.texi rgm
positions.texi cyd
processes.texi
processes.texi rgm
searching.texi rgm
sequences.texi cyd
streams.texi cyd
......
;;; bzrmerge.el --- help merge one Emacs bzr branch to another
;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
;; Keywords: maint
;; 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
......@@ -28,7 +28,7 @@
(require 'cl)) ; assert
(defvar bzrmerge-skip-regexp
"back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version"
"back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk"
"Regexp matching logs of revisions that might be skipped.
`bzrmerge-missing' will ask you if it should skip any matches.")
......
# Makefile -- Makefile to generate character property tables.
# Copyright (C) 2012 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
# Registration Number H13PRO009
......@@ -18,25 +21,33 @@
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
SHELL = /bin/sh
srcdir = @srcdir@
abs_builddir = @abs_builddir@
top_srcdir = @top_srcdir@
abs_top_builddir = @abs_top_builddir@
EMACS = ../../src/emacs
DSTDIR = ../../lisp/international
RUNEMACS = ${EMACS} -Q -batch
EMACS = ${abs_top_builddir}/src/emacs
DSTDIR = ${top_srcdir}/lisp/international
emacs = ${EMACS} -batch --no-site-file --no-site-lisp
all: ${DSTDIR}/charprop.el
.el.elc:
${RUNEMACS} -batch -f batch-byte-compile $<
${emacs} -f batch-byte-compile $<
unidata.txt: UnicodeData.txt
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < UnicodeData.txt > $@
unidata.txt: ${srcdir}/UnicodeData.txt
sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@
${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt
ELC=`/bin/pwd`/unidata-gen.elc; \
DATADIR=`/bin/pwd`; \
DATA=unidata.txt; \
cd ${DSTDIR}; \
${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
cd ${DSTDIR} && ${emacs} -l ${srcdir}/unidata-gen \
-f unidata-gen-files ${srcdir} ${abs_builddir}/unidata.txt
## Like the above, but generate in PWD rather than lisp/international.
charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
${emacs} -l ${srcdir}/unidata-gen \
-f unidata-gen-files ${srcdir} unidata.txt
install: charprop.el
cp charprop.el ${DSTDIR}
......@@ -46,4 +57,9 @@ clean:
if test -f charprop.el; then \
rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
fi
rm -f charprop.el unidata-gen.elc unidata.txt
rm -f charprop.el ${srcdir}/unidata-gen.elc unidata.txt
distclean: clean
-rm -f ./Makefile
maintainer-clean: distclean
......@@ -70,9 +70,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/manywarnings.m4 \
$(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \
$(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \
$(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pthread_sigmask.m4 \
$(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \
$(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
......@@ -88,7 +89,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
$(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
$(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in
$(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_t.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
......@@ -152,8 +154,6 @@ CYGWIN_OBJ = @CYGWIN_OBJ@
C_SWITCH_MACHINE = @C_SWITCH_MACHINE@
C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@
C_SWITCH_X_SITE = @C_SWITCH_X_SITE@
C_SWITCH_X_SYSTEM = @C_SWITCH_X_SYSTEM@
C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DBUS_OBJ = @DBUS_OBJ@
......@@ -329,9 +329,11 @@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
GNULIB_WCTOMB = @GNULIB_WCTOMB@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@
GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@
GREP = @GREP@
GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
......@@ -695,7 +697,9 @@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
VERSION = @VERSION@
VMLIMIT_OBJ = @VMLIMIT_OBJ@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
WIDGET_OBJ = @WIDGET_OBJ@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XFT_CFLAGS = @XFT_CFLAGS@
......@@ -814,6 +818,7 @@ MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \
stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \
time.h-t unistd.h unistd.h-t
noinst_LIBRARIES = libgnu.a
AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src
libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \
sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c
......
......@@ -999,6 +999,7 @@ m4_include([m4/inttypes.m4])
m4_include([m4/largefile.m4])
m4_include([m4/longlong.m4])
m4_include([m4/lstat.m4])
m4_include([m4/manywarnings.m4])
m4_include([m4/md5.m4])
m4_include([m4/mktime.m4])
m4_include([m4/multiarch.m4])
......@@ -1032,4 +1033,5 @@ m4_include([m4/time_h.m4])
m4_include([m4/time_r.m4])
m4_include([m4/tm_gmtoff.m4])
m4_include([m4/unistd_h.m4])
m4_include([m4/warnings.m4])
m4_include([m4/wchar_t.m4])
......@@ -95,6 +95,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to make the limit macros in <stdint.h> visible. */
#undef GL_TRIGGER_STDC_LIMIT_MACROS
/* enable some gnulib portability checks */
#undef GNULIB_PORTCHECK
/* Define to 1 if you want to use the GNU memory allocator. */
#undef GNU_MALLOC
......@@ -203,6 +206,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
/* Define to 1 if you have the `endgrent' function. */
#undef HAVE_ENDGRENT
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
/* Define to 1 if you have the `euidaccess' function. */
#undef HAVE_EUIDACCESS
......@@ -254,6 +263,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `getdomainname' function. */
#undef HAVE_GETDOMAINNAME
/* Define to 1 if you have the `getgrent' function. */
#undef HAVE_GETGRENT
/* Define to 1 if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME
......@@ -278,6 +290,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `getpt' function. */
#undef HAVE_GETPT
/* Define to 1 if you have the `getpwent' function. */
#undef HAVE_GETPWENT
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
......@@ -1163,6 +1178,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* enable compile-time and run-time bounds-checking, and some warnings */
#undef _FORTIFY_SOURCE
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
......@@ -1270,6 +1288,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
# define __GNUC_STDC_INLINE__ 1
#endif
/* Define to 1 if the compiler is checking for lint. */
#undef lint
/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t
......
This diff is collapsed.
......@@ -686,47 +686,121 @@ else
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
### Use -Wdeclaration-after-statement if the compiler supports it
AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement])
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no)
if test $has_option = yes; then
C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
fi
AC_MSG_RESULT($has_option)
CFLAGS="$SAVE_CFLAGS"
unset has_option
unset SAVE_CFLAGS
### Use -Wold-style-definition if the compiler supports it
# This can be removed when conversion to standard C is finished.
AC_MSG_CHECKING([whether gcc understands -Wold-style-definition])
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wold-style-definition"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no)
if test $has_option = yes; then
C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
fi
AC_MSG_RESULT($has_option)
CFLAGS="$SAVE_CFLAGS"
unset has_option
unset SAVE_CFLAGS
### Use -Wimplicit-function-declaration if the compiler supports it
AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration])
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wimplicit-function-declaration"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no)
if test $has_option = yes; then
C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
fi
AC_MSG_RESULT($has_option)
CFLAGS="$SAVE_CFLAGS"
unset has_option
unset SAVE_CFLAGS
AC_SUBST(C_WARNINGS_SWITCH)
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings (for developers)])],
[case $enableval in
yes|no) ;;
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
esac
gl_gcc_warnings=$enableval],
[gl_gcc_warnings=no]
)
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
# Otherwise, run RUN-IF-NOT-FOUND.
AC_DEFUN([gl_GCC_VERSION_IFELSE],
[AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM(
[[
#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__)
/* ok */
#else
# error "your version of gcc is older than $1.$2"
#endif
]]),
], [$3], [$4])
]
)
# When compiling with GCC, prefer -isystem to -I when including system
# include files, to avoid generating useless diagnostics for the files.
if test "$gl_gcc_warnings" != yes; then
isystem='-I'
else
isystem='-isystem '
# This, $nw, is the list of warnings we disable.
nw=
case $with_x_toolkit in
lucid | athena | motif)
# Old toolkits mishandle 'const'.
nw="$nw -Wwrite-strings"
;;
*)
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
;;
esac
AC_SUBST([WERROR_CFLAGS])
nw="$nw -Waggregate-return" # anachronistic
nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
nw="$nw -Wc++-compat" # We don't care about C++ compilers
nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
nw="$nw -Wtraditional" # Warns on #elif which we use often
nw="$nw -Wcast-qual" # Too many warnings for now
nw="$nw -Wconversion" # Too many warnings for now
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Wsign-conversion" # Too many warnings for now
nw="$nw -Woverlength-strings" # Not a problem these days
nw="$nw -Wtraditional-conversion" # Too many warnings for now
nw="$nw -Wpadded" # Our structs are not padded
nw="$nw -Wredundant-decls" # We regularly (re)declare getenv etc.
nw="$nw -Wlogical-op" # any use of fwrite provokes this
nw="$nw -Wformat-nonliteral" # Emacs does this a lot
nw="$nw -Wvla" # warnings in gettext.h
nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
nw="$nw -Wswitch-enum" # Too many warnings for now
nw="$nw -Wswitch-default" # Too many warnings for now
nw="$nw -Wfloat-equal" # e.g., ftoastr.c
nw="$nw -Winline" # e.g., dispnew.c's inlining of row_equal_p
# Emacs doesn't care about shadowing; see
# <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
nw="$nw -Wshadow"
# The following lines should be removable at some point.
nw="$nw -Wstack-protector"
nw="$nw -Wstrict-overflow"
nw="$nw -Wsuggest-attribute=const"
nw="$nw -Wsuggest-attribute=pure"
gl_MANYWARN_ALL_GCC([ws])
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
for w in $ws; do
gl_WARN_ADD([$w])
done
gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now
gl_WARN_ADD([-Wno-switch]) # Too many warnings for now
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
gl_WARN_ADD([-Wno-format-nonliteral])
# In spite of excluding -Wlogical-op above, it is enabled, as of
# gcc 4.5.0 20090517.
gl_WARN_ADD([-Wno-logical-op])
gl_WARN_ADD([-fdiagnostics-show-option])
gl_WARN_ADD([-funit-at-a-time])
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
AC_DEFINE([_FORTIFY_SOURCE], [2],
[enable compile-time and run-time bounds-checking, and some warnings])
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
# We use a slightly smaller set of warning options for lib/.
# Remove the following and save the result in GNULIB_WARN_CFLAGS.
nw=
nw="$nw -Wunused-macros"
gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
AC_SUBST([GNULIB_WARN_CFLAGS])
fi
#### Some other nice autoconf tests.
......@@ -1127,8 +1201,13 @@ AC_DEFUN([PKG_CHECK_MODULES], [
if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
$1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
$1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e 's,///*,/,g'`
edit_cflags="
s,///*,/,g
s/^/ /
s/ -I/ $isystem/g
s/^ //
"
$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
$1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'`
AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS'])
succeeded=yes
......@@ -1421,15 +1500,6 @@ else
window_system=x11
fi
## Workaround for bug in autoconf <= 2.62.
## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
## No need to do anything special for these standard directories.
if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
fi
LD_SWITCH_X_SITE_AUX=
LD_SWITCH_X_SITE_AUX_RPATH=
if test "${x_libraries}" != NONE; then
......@@ -1463,7 +1533,7 @@ AC_SUBST(LD_SWITCH_X_SITE_AUX)
AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH)
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
fi
if test x"${x_includes}" = x; then
......@@ -1550,13 +1620,12 @@ fail;
AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
[AC_MSG_ERROR([`--with-ns' was specified, but the include
files are missing or cannot be compiled.])])
NS_HAVE_NSINTEGER=yes
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
[NSInteger i;])],
ns_have_nsinteger=yes,
ns_have_nsinteger=no)
if test $ns_have_nsinteger = no; then
NS_HAVE_NSINTEGER=no
if test $ns_have_nsinteger = yes; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
fi
fi
AC_SUBST(TEMACS_LDFLAGS2)
......@@ -2589,7 +2658,7 @@ AC_SUBST(LIBGPM)
dnl Check for malloc/malloc.h on darwin
AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
C_SWITCH_X_SYSTEM=
GNUSTEP_CFLAGS=
### Use NeXTstep API to implement GUI.
if test "${HAVE_NS}" = "yes"; then
AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.])
......@@ -2600,15 +2669,10 @@ if test "${HAVE_NS}" = "yes"; then
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.])
# See also .m.o rule in Makefile.in */
# FIXME: are all these flags really needed? Document here why. */
dnl FIXME this should be renamed to GNUSTEP_CFLAGS, and only
dnl used in src/Makefile.in.
C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
## Extra CFLAGS applied to src/*.m files.
GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
fi
if test "${NS_HAVE_NSINTEGER}" = "yes"; then
AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
fi
# We also have mouse menus.
HAVE_MENUS=yes
OTHER_FILES=ns-app
......@@ -2751,6 +2815,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp getline getdelim mremap fsync sync \
difftime mempcpy mblen mbrlen posix_memalign \
getpwent endpwent getgrent endgrent \
cfmakeraw cfsetspeed copysign __executable_start)
dnl Cannot use AC_CHECK_FUNCS
......@@ -3222,7 +3287,7 @@ AC_SUBST(gameuser)
## end of LIBX_BASE, but nothing ever set it.
AC_SUBST(LD_SWITCH_X_SITE)
AC_SUBST(C_SWITCH_X_SITE)
AC_SUBST(C_SWITCH_X_SYSTEM)
AC_SUBST(GNUSTEP_CFLAGS)
AC_SUBST(CFLAGS)
## Used in lwlib/Makefile.in.
AC_SUBST(X_TOOLKIT_TYPE)
......@@ -3443,7 +3508,7 @@ case "$opsys" in
## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM